---
id: "hl7v2_identifier_type"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["medical"]
langs: ["common"]
quality: 75
url: "http://registry.apicrafter.io/datatype/hl7v2_identifier_type"
---

# HL7 identifier type code (HL7 Table 0203) (`hl7v2_identifier_type`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Code from HL7 Table 0203 that tells what kind of identifier a value is, for example MR for a medical record number, SS for a Social Security number, PPN for a passport number, DL for a driver's license number or NPI for a national provider identifier. HL7 version 2 messages carry it in the CX, PLN, PPN, XCN and XON data types. HL7 maintains the table as the code system v2-0203 in HL7 Terminology (THO). The codes are case-sensitive and uppercase. The regexp lists the codes of version 5.0.0 of the code system (HL7 Terminology 7.5.0); NNxxx stands for NN followed by an ISO 3166 three-letter country code.

- Personal data (PII): no
- Categories: Medical/pharma identifiers (medical)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^(?:PAYERID|FDRFN|LACSN|NBSNR|NN[A-Z]{3}|SNBSN|ACSN|ANON|APRN|ASID|BCFN|BSNR|CAAI|CONM|DCFN|ETIN|FILL|KZVA|LANR|NIIH|NIIP|PLAC|PPIN|SAMN|UCID|UPIN|USID|ZANR|AIN|AMA|ANC|AND|ANT|BCT|BRN|DDS|DEA|DFN|DPM|DSG|ESN|FDR|FGN|GIN|GKV|IND|JHN|L&I|MCD|MCN|MCR|MCT|MRT|NCT|NII|NPI|OBI|PCN|PEN|PGN|PHC|PHE|PHO|PIN|PKV|PNT|PPN|PRC|PRN|RPH|RRI|RRP|SID|SNO|SRX|STN|TAX|TPR|TRL|UDI|UMB|WCN|AC|AM|AN|BA|BC|BR|CC|CY|CZ|DC|DI|DL|DN|DO|DP|DR|DS|EI|EN|FI|GI|GL|GN|HC|LI|LN|LR|MA|MB|MC|MD|MI|MR|MS|NE|NH|NI|NP|OD|PA|PC|PE|PI|PN|PT|QA|RI|RN|RR|SB|SL|SN|SP|SR|SS|TN|VN|VP|VS|WC|WP|XV|XX|U)$
```

## Examples

- `MR` — Medical record number
- `SS` — Social Security number
- `PPN` — Passport number
- `DL` — Driver's license number
- `NPI` — National provider identifier
- `mr` (invalid example) — Codes are uppercase
- `SSN` (invalid example) — Not a code of the table

## Sources

- doc: <https://terminology.hl7.org/CodeSystem-v2-0203.html>
- doc: <https://terminology.hl7.org/ValueSet-v2-0203.html>

## Quality

Score 75/100. Missing: mapping (Wikidata, Schema.org, ...), translation, detector coverage.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/hl7v2_identifier_type.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/medical/hl7v2_identifier_type.yaml>
