STU 3 Candidate

This page is part of the FHIR Specification (v1.4.0: STU 3 Ballot 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

1.18.3 Data Type Mappings

FHIR Infrastructure Work GroupMaturity Level: N/ABallot Status: DSTU 2

This page provides mappings for the data types. There are mappings to HL7 v2 , HL7 v3 , and (where appropriate) vCard.

Table of Contents

Primitive Types
ElementinstanttimedatedateTimedecimalbooleanintegerstringuribase64BinarycodeidoidunsignedIntpositiveIntmarkdown
Complex Types
ElementIdentifierHumanNameAddressContactPointTimingQuantitySimpleQuantityAttachmentRangePeriodRatioCodeableConceptCodingSampledDataAgeDistanceDurationCountMoneyAnnotationSignature

1.18.3.1 Primitive Types

See also Base Definition, Examples and Detailed Descriptions.

Data TypeV2RIM
base64Binary~EDBIN
booleann/aBL
dateDTTS
dateTimeDTMTS
decimal~NMREAL
instantDTMTS
integer~NM/~SIINT
stringSTST
timeTMn/a
urin/aURL

1.18.3.2 Attachment

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.3 Mappings for HL7 v2 (http://hl7.org/v2)

AttachmentED/RP
    contentTypeED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used
    language
    dataED.5
    urlRP.1+RP.2 - if they refer to a URL (see v2.6)
    size
    hash
    title
    creation

1.18.3.4 Mappings for RIM (http://hl7.org/v3)

AttachmentED
    contentType./mediaType, ./charset
    language./language
    data./data
    url./reference/literal
    sizeN/A (needs data type R3 proposal)
    hash.integrityCheck[parent::ED/integrityCheckAlgorithm="SHA-1"]
    title./title/data
    creationN/A (needs data type R3 proposal)

1.18.3.5 Identifier

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.6 Mappings for HL7 v2 (http://hl7.org/v2)

IdentifierCX / EI (occasionally, more often EI maps to a resource id or a URL)
    useN/A
    typeCX.5
    systemCX.4 / EI-2-4
    valueCX.1 / EI.1
    periodCX.7 + CX.8
    assignerCX.4 / (CX.4,CX.9,CX.10)

1.18.3.7 Mappings for RIM (http://hl7.org/v3)

IdentifierII - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]
    useRole.code or implied by context
    typeRole.code or implied by context
    systemII.root or Role.id.root
    valueII.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
    periodRole.effectiveTime or implied by context
    assignerII.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper

1.18.3.8 Mappings for ServD (http://www.omg.org/spec/ServD/1.0/)

IdentifierIdentifier
    use
    type
    system./IdentifierType
    value./Value
    period./StartDate and ./EndDate
    assigner./IdentifierIssuingAuthority

1.18.3.9 Coding

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.10 Mappings for Ontological RIM Mapping (http://hl7.org/orim)

Codingfhir:Coding rdfs:subClassOf dt:CDCoding
    systemfhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem
    versionfhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion
    codefhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code
    displayfhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName
    userSelectedfhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]

1.18.3.11 Mappings for HL7 v2 (http://hl7.org/v2)

CodingCE/CNE/CWE subset one of the sets of component 1-3 or 4-6
    systemC*E.3
    versionC*E.7
    codeC*E.1
    displayC*E.2 - but note this is not well followed
    userSelectedSometimes implied by being first

1.18.3.12 Mappings for RIM (http://hl7.org/v3)

CodingCV
    system./codeSystem
    version./codeSystemVersion
    code./code
    displayCV.displayName
    userSelectedCD.codingRationale

1.18.3.13 CodeableConcept

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.14 Mappings for Ontological RIM Mapping (http://hl7.org/orim)

CodeableConceptfhir:CodeableConcept rdfs:subClassOf dt:CD
    codingfhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding
    textfhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText

1.18.3.15 Mappings for HL7 v2 (http://hl7.org/v2)

CodeableConceptCE/CNE/CWE
    codingC*E.1-8, C*E.10-22
    textC*E.9. But note many systems use C*E.2 for this

1.18.3.16 Mappings for RIM (http://hl7.org/v3)

CodeableConceptCD
    codingunion(., ./translation)
    text./originalText[mediaType/code="text/plain"]/data

1.18.3.17 Quantity

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.18 Mappings for HL7 v2 (http://hl7.org/v2)

QuantitySN (see also Range) or CQ
    valueSN.2 / CQ - N/A
    comparatorSN.1 / CQ.1
    unit(see OBX.6 etc.) / CQ.2
    system(see OBX.6 etc.) / CQ.2
    code(see OBX.6 etc.) / CQ.2

1.18.3.19 Mappings for RIM (http://hl7.org/v3)

QuantityPQ, IVL<PQ>, MO, CO, depending on the values
    valuePQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value
    comparatorIVL properties
    unitPQ.unit
    systemCO.codeSystem, PQ.translation.codeSystem
    codePQ.code, MO.currency, PQ.translation.code

1.18.3.20 Range

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.21 Mappings for HL7 v2 (http://hl7.org/v2)

RangeNR and also possibly SN (but see also quantity)
    lowNR.1
    highNR.2

1.18.3.22 Mappings for RIM (http://hl7.org/v3)

RangeIVL<QTY[not(type="TS")]> [lowClosed="true" and highClosed="true"]or URG<QTY[not(type="TS")]>
    low./low
    high./high

1.18.3.23 Ratio

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.24 Mappings for HL7 v2 (http://hl7.org/v2)

RatioN/A
    numerator
    denominator

1.18.3.25 Mappings for RIM (http://hl7.org/v3)

RatioRTO
    numerator.numerator
    denominator.denominator

1.18.3.26 Period

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.27 Mappings for HL7 v2 (http://hl7.org/v2)

PeriodDR
    startDR.1
    endDR.2

1.18.3.28 Mappings for RIM (http://hl7.org/v3)

PeriodIVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]
    start./low
    end./high

1.18.3.29 SampledData

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.30 Mappings for HL7 v2 (http://hl7.org/v2)

SampledDataN/A (but see section 7.14 in v2.7)
    origin
    period
    factor
    lowerLimit
    upperLimit
    dimensions
    data

1.18.3.31 Mappings for RIM (http://hl7.org/v3)

SampledDataSLIST + GLIST
    originSLIST.origin
    periodGLIST.increment
    factorSLIST.factor
    lowerLimitN/A (use SLIST.digits.nullFlavor)
    upperLimitN/A (use SLIST.digits.nullFlavor)
    dimensionsN/A (fixed to 1)
    dataSLIST.digits

1.18.3.32 HumanName

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.33 Mappings for HL7 v2 (http://hl7.org/v2)

HumanNameXPN
    useXPN.7, but often indicated by which field contains the name
    textimplied by XPN.11
    familyXPN.1
    givenXPN.2 + XPN.3
    prefixXPN.5
    suffixXPN/4
    periodXPN.13 + XPN.14

1.18.3.34 Mappings for RIM (http://hl7.org/v3)

HumanNameEN (actually, PN)
    useunique(./use)
    text./formatted
    family./part[partType = FAM]
    given./part[partType = GIV]
    prefix./part[partType = PFX]
    suffix./part[partType = SFX]
    period./usablePeriod[type="IVL<TS>"]

1.18.3.35 Mappings for ServD (http://www.omg.org/spec/ServD/1.0/)

HumanNameProviderName
    use./NamePurpose
    text
    family./FamilyName
    given./GivenNames
    prefix./TitleCode
    suffix
    period./StartDate and ./EndDate

vCard Mappings

  • HumanName.text = vCard "FN" field
  • HumanName.use = use of the vCard "TYPE" parameter
  • HumanName.family, .given, .prefix, .suffix = parts of vCard "N" field. Note that there is no FHIR equivalent for the poorly defined "additional" name field. In FHIR, given names go in "middle" names
  • The vCard nickname corresponds to a name with the use "nickname"

1.18.3.36 Address

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.37 Mappings for HL7 v2 (http://hl7.org/v2)

AddressXAD
    useXAD.7
    typeXAD.18
    textXAD.1 + XAD.2 + XAD.3 + XAD.4 + XAD.5 + XAD.6
    lineXAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)
    cityXAD.3
    districtXAD.9
    stateXAD.4
    postalCodeXAD.5
    countryXAD.6
    periodXAD.12 / XAD.13 + XAD.14

1.18.3.38 Mappings for RIM (http://hl7.org/v3)

AddressAD
    useunique(./use)
    typeunique(./use)
    text./formatted
    lineAD.part[parttype = AL]
    cityAD.part[parttype = CTY]
    districtAD.part[parttype = CNT | CPA]
    stateAD.part[parttype = STA]
    postalCodeAD.part[parttype = ZIP]
    countryAD.part[parttype = CNT]
    period./usablePeriod[type="IVL<TS>"]

1.18.3.39 Mappings for vCard (http://w3.org/vcard)

Address
    use
    typeaddress type parameter
    textaddress label parameter
    linestreet
    citylocality
    district
    stateregion
    postalCodecode
    countrycountry
    period

1.18.3.40 Mappings for ServD (http://www.omg.org/spec/ServD/1.0/)

AddressAddress
    use./AddressPurpose
    type
    text
    line./StreetAddress (newline delimitted)
    city./Jurisdiction
    district
    state./Region
    postalCode./PostalIdentificationCode
    country./Country
    period./StartDate and ./EndDate

1.18.3.41 ContactPoint

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.42 Mappings for HL7 v2 (http://hl7.org/v2)

ContactPointXTN
    systemXTN.3
    valueXTN.1 (or XTN.12)
    useXTN.2 - but often indicated by field
    rankn/a
    periodN/A

1.18.3.43 Mappings for RIM (http://hl7.org/v3)

ContactPointTEL
    system./scheme
    value./url
    useunique(./use)
    rankn/a
    period./useablePeriod[type="IVL<TS>"]

1.18.3.44 Mappings for ServD (http://www.omg.org/spec/ServD/1.0/)

ContactPointContactPoint
    system./ContactPointType
    value./Value
    use./ContactPointPurpose
    rank
    period./StartDate and ./EndDate

1.18.3.45 Timing

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.46 Mappings for HL7 v2 (http://hl7.org/v2)

TimingN/A
    event
    repeat
        bounds[x]
        count
        countMax
        duration
        durationMax
        durationUnit
        frequency
        frequencyMax
        period
        periodMax
        periodUnit
        when
        offset
    code

1.18.3.47 Mappings for RIM (http://hl7.org/v3)

TimingQSET<TS> (GTS)
    eventQLIST<TS>
    repeatImplies PIVL or EIVL
        bounds[x]IVL(TS) used in a QSI
        countPIVL.count
        countMaxPIVL.count
        durationPIVL.phase / EIVL.offset
        durationMaxPIVL.phase / EIVL.offset
        durationUnitPIVL.phase.unit
        frequencyPIVL.phase / EIVL.offset
        frequencyMaxPIVL.phase
        periodPIVL.phase
        periodMaxPIVL.phase
        periodUnitPIVL.phase.unit
        whenEIVL.event
        offset
    codeQSC.code

1.18.3.48 Signature

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.49 Annotation

See also Base Definition, Examples and Detailed Descriptions.

1.18.3.50 Mappings for HL7 v2 (http://hl7.org/v2)

AnnotationN/A
    author[x]N/A
    timeN/A
    textN/A

1.18.3.51 Mappings for RIM (http://hl7.org/v3)

AnnotationAct
    author[x]Act.participant[typeCode=AUT].role
    timeAct.effectiveTime
    textAct.text