HL7 PID → FHIR Patient
The PID (patient identification) segment becomes a FHIR R4 Patient. The fiddly parts are PID-3 (each repeat is a distinct identifier with its own type), and PID-10 / PID-22, which become the US Core race and ethnicity extensions rather than plain fields.
An HL7 PID segment maps to a FHIR Patient: PID-3→identifier, PID-5→name, PID-7→birthDate, PID-8→gender (+ US Core birthsex), PID-11→address, PID-13→telecom, PID-16→maritalStatus, PID-10/22→US Core race/ethnicity, PID-29/30→deceased[x].
Field-by-field
| HL7 field | FHIR path | Notes |
|---|---|---|
| PID-3 | Patient.identifier | Each ~ repeat is a separate identifier; PID-3.5 sets the type (MR, SSN…), PID-3.4 the assigner. |
| PID-5 | Patient.name | XPN → family / given / suffix; each ~ repeat is a distinct name. |
| PID-7 | Patient.birthDate | Date of birth (date-only). |
| PID-8 | Patient.gender + birthsex | Administrative gender, plus the US Core us-core-birthsex extension. |
| PID-10 / PID-22 | US Core race / ethnicity | CWE codes → us-core-race / us-core-ethnicity (CDC system). A code outside the CDC value set is surfaced, not forced. |
| PID-11 | Patient.address | XAD → line / city / state / postalCode; each ~ repeat emitted. |
| PID-13 | Patient.telecom | Home contact number(s); each ~ repeat emitted. |
| PID-15 | Patient.communication | Primary language. |
| PID-16 | Patient.maritalStatus | HL7 table 0002 → v3-MaritalStatus. |
| PID-29 / PID-30 | Patient.deceased[x] | Death date / indicator — never dropped (a date with no timezone is kept date-only and flagged). |
| PID-4, 6, 14, 17, 23, 25, 26 | — surfaced | Alternate ID, mother’s maiden name, business phone, religion, birthplace, birth order, citizenship are surfaced for review. |
Live example
This is produced by the actual converter — paste your own message and it runs the same way, entirely in your browser.
MSH|^~\&|ADT|HOSP|ZK|MERIDIAN|20240101103000||ADT^A01|MSG1|P|2.5.1 PID|1||MRN123^^^HOSP^MR~123-45-6789^^^USA^SS||DOE^JANE^Q||19850312|F||2106-3^White^CDCREC|456 OAK ST^^BOSTON^MA^02101||(617)555-1212|||M||||||2186-5^Not Hispanic or Latino^CDCREC
{
"resourceType": "Patient",
"id": "patient",
"identifier": [
{
"value": "MRN123",
"assigner": {
"display": "HOSP"
},
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR",
"display": "Medical record number"
}
],
"text": "MR"
}
},
{
"value": "123-45-6789",
"assigner": {
"display": "USA"
},
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "SS",
"display": "Social Security number"
}
],
"text": "SS"
}
}
],
"name": [
{
"family": "Doe",
"given": [
"Jane",
"Q"
],
"text": "Jane Q Doe"
}
],
"gender": "female",
"birthDate": "1985-03-12",
"maritalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"code": "M",
"display": "Married"
}
]
},
"extension": [
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
"extension": [
{
"url": "ombCategory",
"valueCoding": {
"system": "urn:oid:2.16.840.1.113883.6.238",
"code": "2106-3",
"display": "White"
}
},
{
"url": "text",
"valueString": "White"
}
]
},
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
"extension": [
{
"url": "ombCategory",
"valueCoding": {
"system": "urn:oid:2.16.840.1.113883.6.238",
"code": "2186-5",
"display": "Not Hispanic or Latino"
}
},
{
"url": "text",
"valueString": "Not Hispanic or Latino"
}
]
},
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex",
"valueCode": "F"
}
],
"address": [
{
"line": [
"456 OAK ST"
],
"city": "BOSTON",
"state": "MA",
"postalCode": "02101",
"text": "456 OAK ST, BOSTON, MA 02101"
}
],
"telecom": [
{
"system": "phone",
"value": "(617)555-1212"
}
]
}Nothing needed review for this message
Every populated field above was mapped. When a field can’t be mapped, it appears here instead of being dropped — that’s the guarantee.
Related mappings
Zkeleton builds conversion and data infrastructure for healthcare. This converter is free, runs entirely in your browser, and never sends a message anywhere — we keep it open because clean data plumbing should be a commodity, not a toll.