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 0399: Country Code

HL7 v2 Table 0399 Country Code does not enumerate its own values — it is a pass-through wrapper around ISO 3166-1 alpha-3. The HL7 standard delegates the full code list to ISO and only specifies that the three-letter alpha-3 form is the expected representation in v2 messages. The table is used in XAD.6 Country across every address-bearing segment (PID-11, NK1-4, GT1-5, IN1-19, STF-11) and in PID-26 Citizenship in profiles that key citizenship off country rather than a separate citizenship code.

Purpose

Country codes show up wherever an address or a national identity is exchanged. Centralizing on ISO 3166-1 alpha-3 means the same value (USA, CAN, GBR) carries through HL7 v2, FHIR, IHE, and X12 837 claims without translation. Table 0399 exists in the HL7 vocabulary catalog so profiles can bind to it by name (HL70399) instead of citing ISO directly, but the underlying authority remains ISO.

Where it's used

  • XAD.6 Country — the canonical home; appears in PID-11 Patient Address, NK1-4 Next of Kin Address, GT1-5 Guarantor Address, IN1-19 Insured's Address, STF-11 Staff Address, ORC-23 Sort-by Address, and any other XAD-typed field.
  • PID-26 Citizenship — some profiles bind the Citizenship CWE to HL70399; others use a dedicated citizenship value set.
  • PID-28 Nationality (deprecated post v2.6 in favor of PID-26).
  • ROL-11 Provider's Address — ROL.
  • Any custom Z-segment that carries a country code.

Code list

The complete code list is the ISO 3166-1 alpha-3 standard. A representative subset:

CodeDisplayComment
USAUnited States of AmericaISO 3166-1 alpha-3
CANCanada
GBRUnited Kingdom of Great Britain and Northern IrelandNot UK — that is alpha-2's exception, not alpha-3
FRAFrance
DEUGermanyNot GER — non-standard
JPNJapan
AUSAustralia
BRABrazil
MEXMexico
INDIndia
CHNChina
ZAFSouth Africa
ITAItaly
ESPSpain
NLDNetherlands
KORKorea, Republic of
RUSRussian Federation
… many moreFull set = ISO 3166-1 alpha-3

Full code list: see ISO 3166-1 — Country Codes. The standard publishes ~250 entries covering all assigned country codes, exceptional reservations (e.g. EUR is not assigned; the EU has reserved alpha-2 EU), and transitional codes. The HL7 v2 specification calls for alpha-3, but modern HL7 profiles and many real-world senders also accept alpha-2 (US, CA, GB). Engines should accept both forms inbound and normalize to alpha-3 on outbound.

Code system: http://terminology.hl7.org/CodeSystem/v2-0399 OID: 2.16.840.1.113883.18.265

HL7-defined vs user-defined

Table 0399 is a pass-through table — neither HL7-defined nor user-defined in the conventional sense. HL7 holds no authority over the values; ISO does. Senders should not extend the table. The only legitimate "extension" is to fall back to alpha-2 when a profile explicitly permits it, or to use the four-letter ISO 3166-1 alpha-4 reservation set for transitional codes (rare in practice).

Version differences

  • v2.3 / v2.4 — XAD.6 carried country codes as free text; no formal table binding.
  • v2.5 — Table 0399 introduced and bound to XAD.6 with alpha-3 as the recommended form.
  • v2.6 — PID-26 Citizenship promoted; some profiles bound PID-26 to HL70399.
  • v2.7 / v2.8 / v2.8.1 — Stable. The table continues to defer to ISO 3166-1; HL7 does not version the underlying ISO content. Senders pick up ISO additions (e.g. SSD South Sudan added by ISO in 2011) automatically.

Common mistakes

  • Using alpha-2 when the spec calls for alpha-3. US instead of USA parses in many engines but fails strict validators built against the published table.
  • Inventing display-style codes. UK, GER, HOL are not ISO assignments. Use GBR, DEU, NLD.
  • Putting the country name in XAD.6. ^^^^^United States^M is invalid — XAD.6 takes the code, not the display string.
  • Confusing PID-26 Citizenship with PID-11 Country. A patient may live in Germany (XAD.6 = DEU) but be a US citizen (PID-26 = USA); they are independent fields.
  • Hard-coding a country list that misses ISO updates. Engines that ship a static country table built in 2009 silently reject SSD (South Sudan), BES (Bonaire, Sint Eustatius and Saba), and CUW (Curaçao). Rebuild against the live ISO list.

Examples

XAD with country (US address):

123 Main St^^Boston^MA^02101^USA^M

Canadian address:

500 Yonge St^^Toronto^ON^M5B 2L9^CAN^H

UK address — note GBR, not UK:

10 Downing St^^London^^SW1A 2AA^GBR^H

In context — PID-11 with two addresses (home in DEU, mailing in USA):

PID|1||MRN12345^^^MRN||SCHMIDT^HANS^^^^^L||19800101|M|||Hauptstr 1^^Berlin^^10115^DEU^H~PO Box 99^^Boston^MA^02101^USA^M

In context — PID-26 Citizenship bound to HL70399:

PID|1||MRN12345^^^MRN||DOE^JANE||19800101|F||||||||||||||||||USA^United States of America^HL70399

Common pitfall — alpha-2 in a strict environment:

123 Main St^^Boston^MA^02101^US^M

This parses in lenient engines but fails strict 0399 binding; modernize to USA.

FHIR mapping

Table 0399 is pass-through in the v2-to-FHIR mapping. FHIR uses ISO 3166-1 directly via the code system URI urn:iso:std:iso:3166. No v2-to-FHIR IG ConceptMap is required because:

  1. The HL7 v2 table delegates to ISO 3166-1.
  2. FHIR uses ISO 3166-1 directly with the same code values.
  3. No translation is needed — the alpha-3 code travels unchanged from v2 to FHIR.
HL7 v2 (0399)FHIR target
XAD.6 Country (alpha-3)Address.country (string), commonly carrying the alpha-3 code
PID-26 CitizenshipPatient.extension[citizenship].code.coding with system = urn:iso:std:iso:3166

If a profile sends alpha-2, the receiver should either accept it as-is in Address.country (FHIR allows either form in the free-text field) or normalize to alpha-3 before populating a strongly-typed extension.

Engine considerations

  • Alpha-2 vs alpha-3 normalization — engines should accept both inbound and emit alpha-3 outbound. A canonical lookup table (alpha-2 ↔ alpha-3 ↔ numeric-3) is small (~250 rows) and cheap to keep in memory.
  • ISO list freshness — country codes change. Engines built against a frozen list from a previous decade silently drop newer assignments (SSD South Sudan, 2011). Treat the country list as a versioned reference dataset and refresh on ISO releases.
  • Display string suppression — XAD.6 is the code field, not a display field. Some senders inject the display string; the engine should strip it on inbound or route to a curation queue.
  • Citizenship binding — when PID-26 uses HL70399, the CWE carrying citizenship should still emit HL70399 in CWE.3 even though the code itself is ISO; this preserves table provenance for downstream profile validation.

How Vorro handles Country Code

Vorro treats HL70399 as a thin label over a live ISO 3166-1 dataset.

  • The country dataset is refreshed against the ISO 3166-1 maintenance feed; alpha-2, alpha-3, numeric-3, and the official short name are stored together so the engine can normalize any inbound representation.
  • Inbound XAD.6 accepts alpha-2 or alpha-3; outbound XAD.6 always emits alpha-3 to match the HL7 specification.
  • Unknown or retired codes (e.g. YUG, SCG) route to a soft-warning curation queue and are passed through unchanged so historical messages remain auditable.
  • For FHIR projection, Address.country is populated with the alpha-3 form; PID-26 Citizenship surfaces as a Patient.citizenship extension with system = urn:iso:std:iso:3166.

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