HL7 Version 2 to FHIR
1.0.0 - STU 1

HL7 Version 2 to FHIR - Downloaded Version 1.0.0 See the Directory of published versions

## Datatype Maps

Page standards status: Informative

The sections below list the data type mappings defined by this guide. Data Type Mapping is driven by CSV files with specific columns. The use of these columns is described in the section on mapping at the bottom of this page.

### Chapter 2A Control|Data Types

- CE - Coded Entry to FHIR CodeableConcept
- CF - Coded Element With Formatted Values to FHIR CodeableConcept
- CNE - Coded With No Exceptions to FHIR CodeableConcept
- CNN - Composite Id Number And Name Simplified to FHIR Practitioner
- CQ - Composite Quantity With Units to FHIR Quantity
- CQ - Composite Quantity With Units to FHIR code
- CQ - Composite Quantity With Units to FHIR decimal
- CQ - Composite Quantity With Units to FHIR unsignedInt
- CWE - Coded With Exceptions to FHIR Annotation
- CWE - Coded With Exceptions to FHIR CodeableConcept
- CWE - Coded With Exceptions to FHIR Coding
- CWE - Coded With Exceptions to FHIR Device
- CWE - Coded With Exceptions to FHIR Duration
- CWE - Coded With Exceptions to FHIR Identifier
- CWE - Coded With Exceptions to FHIR Organization
- CWE - Coded With Exceptions to FHIR PractitionerRole
- CWE - Coded With Exceptions to FHIR Quantity
- CWE[DurationUnit] - Coded With Exceptions to FHIR Timing
- CWE[SupportingInfo] - Coded With Exceptions to FHIR Observation
- CWE - Coded With Exceptions to FHIR code
- CWE - Coded With Exceptions to FHIR string
- CWE - Coded With Exceptions to FHIR uri
- CX - Extended Composite Id With Check Digit to FHIR Identifier
- CX[Mother] - Extended Composite Id With Check Digit to FHIR RelatedPerson
- CX - Extended Composite Id With Check Digit to FHIR string
- DLD[Discharge] - Discharge To Location And Date to FHIR Location
- DLN - Driver's License Number to FHIR Identifier
- DR - Date/Time Range to FHIR Period
- DR - Date/Time Range to FHIR dateTime
- DTM[Time] - Date/Time to FHIR Annotation
- DTM - Date/Time to FHIR dateTime
- ED - Encapsulated Data to FHIR Attachment
- ED - Encapsulated Data to FHIR DocumentReference
- EI - Entity Identifier to FHIR Coding
- EI - Entity Identifier to FHIR Condition
- EIP[FillerAssignedIdentifier] - Entity Identifier Pair to FHIR Identifier
- EIP[PlacerAssignedIdentifier] - Entity Identifier Pair to FHIR Identifier
- EI - Entity Identifier to FHIR Procedure
- EI[DefaultAssigner] - Entity Identifier to FHIR Identifier
- EI[Extension] - Entity Identifier to FHIR Identifier
- EI[Organization] - Entity Identifier to FHIR Identifier
- EI[System] - Entity Identifier to FHIR Identifier
- EI[udiCarrier] - Entity Identifier to FHIR Device
- FN - Family Name to FHIR HumanName
- FT[Comment] - Formatted Text Data to FHIR Annotation
- HD - Hierarchic Designator to FHIR Device
- HD - Hierarchic Designator to FHIR Identifier
- HD - Hierarchic Designator to FHIR Location
- HD - Hierarchic Designator to FHIR Organization
- HD[endpoint] - Hierarchic Designator to FHIR MessageHeader.destination
- HD[endpoint] - Hierarchic Designator to FHIR MessageHeader.source
- HD[name] - Hierarchic Designator to FHIR MessageHeader.destination
- HD[name] - Hierarchic Designator to FHIR MessageHeader.source
- HD - Hierarchic Designator to FHIR uri
- ID - Coded Value For Hl7 Defined Tables to FHIR CodeableConcept
- ID - Coded Value For Hl7 Defined Tables to FHIR Coding
- ID[UniversalID] - Coded Value For Hl7 Defined Tables to FHIR CodeableConcept
- ID - Coded Value For Hl7 Defined Tables to FHIR boolean
- ID - Coded Value For Hl7 Defined Tables to FHIR code
- ID - Coded Value For Hl7 Defined Tables to FHIR string
- IS - Coded Value For User to FHIR CodeableConcept
- IS - Coded Value For User to FHIR code
- IS - Coded Value For User to FHIR string
- MSG - Message Type to FHIR Coding
- MSG - Message Type to FHIR MessageHeader
- MSG - Message Type to FHIR code
- NA - Numeric Array to FHIR SampledData
- NDL - Name With Date And Location to FHIR PractitionerRole
- NM - Numeric to FHIR Quantity
- NM[LengthOfStay] - Numeric to FHIR Quantity
- NM - Numeric to FHIR positiveInt
- NR - Numeric Range to FHIR Range
- OG[Subidentifier] - Observation Grouper to FHIR Extension
- PL - Person Location to FHIR Location
- PLN - Practitioner License Or Other Id Number to FHIR Identifier
- PT - Processing Type to FHIR Meta
- RI - Repeat Interval to FHIR Timing
- RP - Reference Pointer to FHIR Attachment
- RP - Reference Pointer to FHIR DocumentReference
- RPT - Repeat Pattern to FHIR Timing
- SAD - Street Address to FHIR Address
- SN - Structured Numeric to FHIR Quantity
- SN - Structured Numeric to FHIR Range
- SN - Structured Numeric to FHIR Ratio
- SPS[Source] - Specimen Source to FHIR Specimen
- ST - String Data to FHIR CodeableConcept
- ST - String Data to FHIR Identifier
- TQ - Timing/Quantity to FHIR Appointment
- TQ - Timing/Quantity to FHIR MedicationRequest
- TQ - Timing/Quantity to FHIR ServiceRequest
- TQ[ExecutionPeriod] - Timing/Quantity to FHIR Task
- TQ[Priority] - Timing/Quantity to FHIR Task
- TS - Timestamp to FHIR dateTime
- XAD - Extended Address to FHIR Address
- XCN - Extended Composite Id Number And Name For Persons to FHIR Patient
- XCN - Extended Composite Id Number And Name For Persons to FHIR Practitioner
- XCN - Extended Composite Id Number And Name For Persons to FHIR PractitionerRole
- XCN - Extended Composite Id Number And Name For Persons to FHIR RelatedPerson
- XCN[Author] - Extended Composite Id Number And Name For Persons to FHIR Annotation
- XON - Extended Composite Name And Identification Number For Organizations to FHIR Location
- XON - Extended Composite Name And Identification Number For Organizations to FHIR Organization
- XON - Extended Composite Name And Identification Number For Organizations to FHIR string
- XPN - Extended Person Name to FHIR HumanName
- XPN - Extended Person Name to FHIR string
- XTN - Extended Telecommunication Number to FHIR ContactPoint

## Mapping

- HL7 v2
  - Sort Order
    - See the General Guidelines
  - Identifier
    - Contains the formal Data Type Name and Component Sequence according to the base standard using "." as the delimiter.
    - In a couple of places, e.g., DTM data type, mapping is based on the physical position in the component. This will be noted using (pn)(x-y), e.g., DTM.(p1)(3-4)
      - (pn) - the part of the data type, e.g., (p1) for part 1.
      - (x-y) - the position within the part, e.g., (3-4). This may just be a single position, e.g., (5).
      - Note the use of parts is relatively arbitrary. In the case of DTM this is used for the year/month/date/time aspect vs. the time offset aspect. However, if one wants to use the absolute position of across parts, add the position start/end (x and y) to the last position of the prior part.
  - Name
    - The formal name of the data type in the most current published version
  - Data Type
    - The data type of the component in the most current published version if not deprecated
    - Otherwise it is the data type at the time it was deprecated and removed.
  - Cardinality (Min and Max)
    - The cardinality in the most current published version expressed numerically if not deprecated
    - Otherwise it reflects the cardinality at the time it was deprecated and removed.
- Condition
  - See the General Guidelines
- HL7 FHIR
  - FHIR Attribute
    - The first column reflects an existing FHIR attribute in the target FHIR version.
      - The full path to the component or attribute is derived from the source spreadsheets by combining the datatype or resource name in the spreadsheet name (e.g., CodeableConcept in the HL7 Data Type - FHIR R4: CWE[CodeableConcept] spreadsheet with the component or attribute name in column J in the spreadsheet (e.g., value) yielindg "CodeableConcept.identifier". Depending on the resource this is used, it would actually pick up the resource attribute. For example, RXA-5 Administered Code is mapped in HL7 Segment - FHIR R4: RXA[Immunization] to vaccineCode in the segment spreadsheet yielding Immunization.vaccineCode. RXA-5 uses CWE and vaccineCode uses CodeableConcept, so CWE.1 in the HL7 Data Type - FHIR R4: CWE[CodeableConcept] is mapped to value, yielding CodeableConcept.value in the data type mapping spreadsheet. Then the full path is to Immunization.vaccineCode.value.
    - When there is not a single attribute to point to, rather a v2 field needs to be mapped to multiple FHIR attribute, e.g., ORC-27 Quantity/Timing where the TQ data type components need to be mapped to multiple ServiceRequest attributes, then the label "$this" is used. Further mapping guidance is then provided in the Data Type mapping column.
    - When a multi-component data type maps to a primitive data type, e.g., CWE to string, then $value will indicate that it is acutally mapped to the single component of the primitive data type as leaving it blank would indicate it is not being mapped.
    - The second column reflects a proposed extension. It will be expressed with extension-[name] (when suggested as a full extension) or extension??-[name] (when it is open whether to include it in core and pre-adopt, or a full extension). Once approved, the full extension paths will be put in the first column.
    - This approach will enable tooling to already process existing FHIR attributes and not have to create special handling for elements still being proposed.
  - Data Type
    - The FHIR attribute's data type in the target FHIR version.
    - Like the v2 data type, a physical position may be used, e.g., with DataTime. See above for interpretation.
  - Cardinality (Min and Max)
    - The FHIR attribute's minimum and maximum cardinality in the target FHIR version.
  - Data Type Mapping
    - The URL to the Data Type Map that is to be used for the component in this segment.
    - There may be multiple flavors of the data type maps to support different mappings. The flavor is appended to the end of the data type name using [] brackets, e.g., CWE[Coding].
  - Vocabulary Mapping
    - The URL to the Vocabulary Map that is to be used for the coded element for this attribute.
    - If the applicable HL7 v2 table is empty, e.g., user defined tables without examples, this cell will be blank.
    - This is used where the HL7 v2 data type is either CWE, CNE, CF, CE, ID, or IS while the HL7 FHIR data type is code, Coding, Codeable Concept, of boolean.
  - Assignment
    - The value that is to be assigned to the FHIR Attribute referenced.
      - If it is to be set to a particular string, it is uses "string".
      - If it is to be set to a value in a v2 element or FHIR attribute, the identifier for that element/attribute is stated, e.g., CWE.4 or Patient.identifier.value.
      - If there is no specific string or variable that is to be used, then the instructions are included between // bars, e.g., /instructions/.
    - Note these can be combined if multiple values need to be concatenated together.