ZKELETON//HL7 → FHIR Open converter

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.

The short answer

An HL7 PID segment maps to a FHIR Patient: PID-3identifier, PID-5name, PID-7birthDate, PID-8gender (+ US Core birthsex), PID-11address, PID-13telecom, PID-16maritalStatus, PID-10/22→US Core race/ethnicity, PID-29/30deceased[x].

Field-by-field

HL7 fieldFHIR pathNotes
PID-3Patient.identifierEach ~ repeat is a separate identifier; PID-3.5 sets the type (MR, SSN…), PID-3.4 the assigner.
PID-5Patient.nameXPN → family / given / suffix; each ~ repeat is a distinct name.
PID-7Patient.birthDateDate of birth (date-only).
PID-8Patient.gender + birthsexAdministrative gender, plus the US Core us-core-birthsex extension.
PID-10 / PID-22US Core race / ethnicityCWE codes → us-core-race / us-core-ethnicity (CDC system). A code outside the CDC value set is surfaced, not forced.
PID-11Patient.addressXAD → line / city / state / postalCode; each ~ repeat emitted.
PID-13Patient.telecomHome contact number(s); each ~ repeat emitted.
PID-15Patient.communicationPrimary language.
PID-16Patient.maritalStatusHL7 table 0002 → v3-MaritalStatus.
PID-29 / PID-30Patient.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— surfacedAlternate 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.

Live example — run by the actual engine Try this in the converter
HL7 v2 in
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
FHIR R4 out
{
  "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

Built by Zkeleton

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.