NEWFree ROI Calculators — quantify what prior auth and siloed data are costing your organization.Prior Auth ROI Siloed Data ROI
HL7 v2Code Table6 min read

HL7 Table HL70171: Citizenship

HL70171 carries a person's country of citizenship on PID-26 Citizenship. Unlike most HL7-defined code tables, HL70171 does not enumerate its own codes — it defers to ISO 3166-1 alpha-3 country codes (USA, CAN, GBR, etc.) and acts as a thin HL7 wrapper around that ISO standard. The field repeats on PID-26 to support dual or multiple citizenship.

Purpose

HL70171 records the country (or countries) of which a person is a legal citizen. It is administrative and self-reported — typically captured at registration — and is used for billing (international patient programs), reporting (statutory population health reporting in some jurisdictions), and consular notification (some hospitals notify a patient's consulate on serious admissions).

It is not a statement of ethnicity, race, country of birth, or residence. PID-11 carries address (including country of residence); PID-23 carries birth place; PID-22 carries ethnic group. HL70171 answers only "of which country is this person a citizen?" — and the field repeats when the answer is more than one.

Where it's used

  • PID-26 Citizenship — the canonical home of HL70171, repeating to support dual and multiple citizenship.
  • NK1-19 Citizenship — next-of-kin citizenship on the NK1 segment.
  • STF-28 Citizenship — staff/provider citizenship on STF master-file messages.

Code list

HL70171 enumerates no codes of its own. The valid value set is ISO 3166-1 alpha-3. A representative sample relevant to U.S. healthcare integration:

CodeDisplayComment/Description
USAUnited States of AmericaThe most-used HL70171 value in U.S. acute care.
CANCanada
GBRUnited KingdomNote: GBR covers all four UK constituent countries; UK is not valid ISO.
MEXMexico
FRAFrance
DEUGermanyReplaced the legacy DDR/FRG codes after reunification.
JPNJapan
CHNChinaPeople's Republic of China; Taiwan is TWN.
INDIndia
BRABrazil
AUSAustralia
(more)Full set = ISO 3166-1 alpha-3 (~249 codes)See iso.org/iso-3166-country-codes.html for the complete enumeration.

ISO 3166-1 alpha-3 contains roughly 249 active codes plus a handful of reserved and transitional codes. The full enumeration is maintained by the ISO 3166 Maintenance Agency and updated periodically (recent additions include MNE Montenegro and SSD South Sudan).

Code system OID

  • OID: 2.16.840.1.113883.18.83 (HL7's wrapper OID for citizenship)
  • Canonical URI: http://terminology.hl7.org/CodeSystem/v2-0171
  • Underlying ISO system URI: urn:iso:std:iso:3166

Many modern profiles emit the ISO URI directly rather than the HL7 wrapper, because FHIR Patient.address.country and related fields bind to the ISO system, not the HL7 wrapper.

HL7-defined vs user-defined

HL70171 is HL7-defined, but in a pass-through sense: HL7 does not maintain the code list; it points downstream at ISO 3166-1. Conformant sites must not invent local citizenship codes inside HL70171 — they must either use an existing ISO alpha-3 code or carry the value as an OTH-flagged free-text qualifier on the CWE. Codes like UK (instead of GBR), EN (English nationality is not a citizenship), or vendor abbreviations are non-conformant.

Version differences

  • v2.1 – v2.2 — Citizenship not present on PID.
  • v2.3 — PID-26 Citizenship added; HL70171 introduced as a deferral to ISO 3166-1 alpha-3.
  • v2.4 – v2.5 — Field repetition explicitly permitted to support dual citizenship.
  • v2.6 — Data type clarified as CE.
  • v2.7 – v2.8.1 — Data type upgraded to CWE, enabling OID metadata transmission. No change to the underlying ISO deferral.

Common mistakes

  • Sending ISO 3166-1 alpha-2 (US, CA, GB) instead of alpha-3. HL70171 specifies alpha-3 — US is not a valid HL70171 value.
  • Sending the numeric ISO 3166-1 code (840 for USA) instead of alpha-3. Numeric codes are valid ISO but not the form HL70171 expects.
  • Using UK for the United Kingdom. UK is a colloquialism and is not an ISO code; the correct value is GBR.
  • Sending a country name string (United States, USA citizen) instead of the alpha-3 code.
  • Conflating PID-26 with PID-11 (address country) or PID-23 (birth place). A patient born in Mexico, resident in Texas, and citizen of the U.S. has three different country values across three different fields — they do not all collapse to USA.

Examples

A U.S. citizen:

PID|1||10456^^^MRN^MR||DOE^JANE^A||19850412|F|||123 MAIN ST^^BOSTON^MA^02118||(617)555-1212||EN|S|||10456|123-45-6789|USA

Dual citizen (U.S. and Canada) — note the field repetition with ~:

PID|1||10456^^^MRN^MR||DOE^JANE||19850412|F|||||||EN|S|||10456|123-45-6789|USA~CAN

A v2.7+ CWE-typed PID-26 with ISO system metadata:

PID|1||10456^^^MRN^MR||DOE^JANE||19850412|F|||||||EN|S|||10456|||USA^United States of America^ISO3166_1^^^^2.8.1^^^^urn:iso:std:iso:3166

FHIR representation using the standard citizenship extension:

{
  "resourceType": "Patient",
  "id": "10456",
  "extension": [{
    "url": "http://hl7.org/fhir/StructureDefinition/patient-citizenship",
    "extension": [{
      "url": "code",
      "valueCodeableConcept": {
        "coding": [{
          "system": "urn:iso:std:iso:3166",
          "code": "USA",
          "display": "United States of America"
        }]
      }
    }]
  }]
}

Mapping failure example — alpha-2 code sent:

PID|1||10456^^^MRN^MR||DOE^JANE||19850412|F|||||||EN|S|||10456|||US

US is alpha-2, not the alpha-3 HL70171 expects. A conformant engine should auto-correct to USA (alpha-2 to alpha-3 is unambiguous) and log the correction, rather than rejecting the message outright.

FHIR mapping

There is no published v2-to-FHIR ConceptMap for HL70171 because it is a pass-through to ISO 3166-1 — the v2 code and the FHIR code are the same string. FHIR consumers bind directly to urn:iso:std:iso:3166 and place the value in one of:

  • Patient.extension with URL http://hl7.org/fhir/StructureDefinition/patient-citizenship (most common; US Core and several national IGs use this slot).
  • Patient.communication (when citizenship is being used as a proxy for preferred language — generally discouraged).
  • A custom national-IG extension where the regulator demands a specific slot.

When PID-26 repeats (dual citizenship), the FHIR extension repeats accordingly.

HL7 v2 (HL70171)FHIR (urn:iso:std:iso:3166)
USAUSA
CANCAN
GBRGBR
(any alpha-3)(same alpha-3)

Engine considerations

  • Alpha-2 to alpha-3 normalization — Sources frequently send alpha-2. Engines should maintain the ISO 3166-1 mapping table and auto-promote on ingest (USUSA).
  • Numeric to alpha-3 normalization — Some legacy systems send numeric codes (840 for USA); engines should normalize.
  • Repetition handling — PID-26 repeats with ~. Engines must preserve order (primary citizenship first) when round-tripping through FHIR.
  • Country name aliasingBurma / Myanmar (MMR), Czech Republic / Czechia (CZE), Macedonia / North Macedonia (MKD) — store the alpha-3 code, not the display string, and let the display vary by locale.
  • CWE upgrade — In v2.7+ profiles PID-26 is CWE, allowing CWE.14 = urn:iso:std:iso:3166. Engines must handle both CE and CWE.

How Vorro handles HL70171

Vorro validates PID-26 against the active ISO 3166-1 alpha-3 list on ingest. Recognized alpha-3 codes pass through unchanged. Alpha-2 and numeric ISO codes are auto-promoted to alpha-3 with a log entry; invalid strings (UK, free-text country names, vendor abbreviations) are routed to the terminology curation queue.

On outbound, Vorro emits HL70171 as CE for v2.5 and earlier profiles and as CWE with CWE.14 set to urn:iso:std:iso:3166 for v2.7+ destinations. For FHIR outbound channels Vorro places the value in Patient.extension[patient-citizenship] and preserves field repetition for dual citizens.

Sources

← Back to HL7 v2 Guide

Ready to Integrate This Into Your Workflow?

Talk to a Vorro expert about implementing HL7 v2 in your specific environment.

Browse HL7 v2 Guides
HL7 Table HL70171: Citizenship | Vorro Academy | Vorro