Segment OBX in FHIR

How segment OBX (Observation/result) becomes FHIR R4 resources, from the HL7 Version 2 to FHIR guide.

HL7 v2 definition
Definition of OBX in HL7 v2 2.8
Maps
Observation (Component)DocumentReferenceObservation
Used in messages
ADT_A01ADT_A02ADT_A05ADT_A06ADT_A09ADT_A11ADT_A17MDM_T02OML_O21ORM_O01ORU_R01SIU_S12VXU_V04

To ObservationComponent72 rows

HL7 v2 sourcev2 typeFHIR elementFHIR typeConditions and notes
OBX-3Observation Identifier
CWEcodeCodeableConcept
OBX-3Observation Identifier
CWEcomponent[each].codeCodeableConcept
OBX-4Observation Sub-id
ST$this
Map to Observation.partOf or Observation.hasMember or Observation.DerivedFrom according to the implementation guidance for the v2 message at hand, otherwise map to the extension-sub-id to enable the final destination to determine how to structure the observations.
OBX-5Observation Value
variescomponent[each].valueQuantityquantity
If IF OBX-2 EQUALS "NM"
OBX-5Observation Value
variescomponent[each].valueStringstring
If IF OBX-2 IN ("ST", "FT", "TX")Any markup in ST, FT or TX data may not present properly given that valueString is a string data type
OBX-5Observation Value
variescomponent[each].valueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "CF"
OBX-5Observation Value
variescomponent[each].valueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "CNE"
OBX-5Observation Value
variescomponent[each].valueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "CE"
OBX-5Observation Value
variescomponent[each].valueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "CWE"
OBX-5Observation Value
variescomponent[each].valueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "IS"
OBX-5Observation Value
variescomponent[each].valuePeriodPeriod
If IF OBX-2 EQUALS "DR"
OBX-5Observation Value
variescomponent[each].valueDateTimedateTime
If IF OBX-2 IN ("DTM", "DT")
OBX-5Observation Value
variescomponent[each].valueRangeRange
If IF OBX-2 EQUALS "NR"
OBX-5Observation Value
variescomponent[each].valueStringstring
If IF OBX-2 EQUALS "VR"Value OBX-5.1+"-"+OBX-5.2
OBX-5Observation Value
variescomponent[each].valueTimetime
If IF OBX-2 EQUALS "TM"
OBX-5Observation Value
variescomponent[each].valueStringstring
If IF (OBX-2 EQUALS "SN" AND OBX-5.1 EQUALS "<>"Value OBX-5.1+" "+OBX-5.2+" "+OBX-5.3+" "+OBX-5.4" "OBX-6"
OBX-5Observation Value
variescomponent[each].valueRatio[1]Ratio
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/")
OBX-5Observation Value
variescomponent[each].valueRange[1]Range
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-"
OBX-5Observation Value
variescomponent[each].valueStringstring
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "+"Value OBX-5.1+" "+OBX-5.2+" "+OBX-5.3+" "+OBX-5.4" "OBX-6"
OBX-5Observation Value
variescomponent[each].valueQuantity[1]Quantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 NOT IN (":", "/", "-", "+")
OBX-5Observation Value
variescomponent[each].valueStringstring
If line 19 through 23 all fail while OBX-2 = SNValue OBX-5.1+" "+OBX-5.2+" "+OBX-5.3+" "+OBX-5.4" "OBX-6"
OBX-5Observation Value
variescomponent[each].extension[1].urluri
If IF OBX-2 EQUALS "ED" AND IF OBX-5.4 EQUALS "Base64"If none of the other observations in OBX-5 are not derived from the documentation includedValue "https://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.valueAttachment"
OBX-5Observation Value
variescomponent[each].extension[1].valueAttachmentAttachment
If IF OBX-2 EQUALS "ED" AND IF OBX-5.4 EQUALS "Base64"If none of the other observations in OBX-5 are not derived from the documentation included
OBX-5Observation Value
variesderivedFrom(DocumentReference)Reference
If IF OBX-2 EQUALS "ED" AND IF OBX-5.4 EQUALS "Base64"And if other observation in OBX-5 are derived from the documentation included
OBX-5Observation Value
variescomponent[each].extension[1].urluri
If IF OBX-2 EQUALS "RP"If none of the other observations in OBX-5 are not derived from the documentation referencedValue "https://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.valueAttachment"
OBX-5Observation Value
variescomponent[each].extension[1].valueAttachmentAttachment
If IF OBX-2 EQUALS "RP"If none of the other observations in OBX-5 are not derived from the documentation referenced
OBX-5Observation Value
variesderivedFrom(DocumentReference)Reference
If IF OBX-2 EQUALS "RP"And if other observation in OBX-5 are derived from the documentation being referenced
OBX-6Units
CWEcomponent[each].valueQuantityQuantity
If IF OBX-2 IN ("NA", "NM")
OBX-6Units
CWEcomponent[each].valueQuantity[1]Quantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 NOT IN (":", "/", "-", "+")
OBX-6Units
CWEcomponent[each].valueRange[1].lowSimpleQuantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-"
OBX-6Units
CWEcomponent[each].valueRange[1].highSimpleQuantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-"
OBX-6Units
CWEcomponent[each].valueRatio[1].numeratorQuantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/")
OBX-6Units
CWEcomponent[each].valueRatio[1].denominatorQuantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/")
OBX-7References Range
STcomponent[each].referenceRange.text
OBX-8Interpretation Codes
CWEinterpretationCodeableConcept
OBX-10Nature Of Abnormal Test
IDextension[2].uriuri
Value "http://hl7.org/fhir/StructureDefinition/observation-nature-of-abnormal-test"
OBX-10Nature Of Abnormal Test
IDextension[2].valueCodeableConceptCodeableConcept
Code map v2-0080
OBX-11Observation Result Status
IDstatuscode
OBX-11Observation Result Status
IDstatus.extension[1].urluri
If IF OBX-11 IS "X"Value "http://hl7.org/fhir/StructureDefinition/alternate-codes"
OBX-11Observation Result Status
IDstatus.extension[1].valueCodeableConcept.coding.codeCodeableConcept
If IF OBX-11 IS "X"Value "X"
OBX-11Observation Result Status
IDstatus.extension[1].valueCodeableConcept.coding.systemstring
If IF OBX-11 IS "X"Value "http://terminology.hl7.org/CodeSystem/v2-0085"
OBX-11Observation Result Status
IDdataAbsentReason.coding[2].code
If IF OBX-11 IS "N"Value "not-asked"
OBX-11Observation Result Status
IDdataAbsentReason.coding[2].system
If IF OBX-11 IS "N"Value "http://terminology.hl7.org/CodeSystem/data-absent-reason"
OBX-14Date/Time Of The Observation
DTMeffectiveDateTimedateTime
OBX-16Responsible Observer
XCNperformer[1](PractitionerRole.practitioner(Practitioner))Reference(PractitionerRole)
OBX-16Responsible Observer
XCNperformer[1](PractitionerRole.code.coding.code)string
Value "responsibleObserver"
OBX-16Responsible Observer
XCNperformer[1](PractitionerRole.code.coding.system)uri
Value "http://terminology.hl7.org/CodeSystem/practitioner-role"
OBX-17Observation Method
CWEmethodCodeableConcept
OBX-18Equipment Instance Identifier
EIdevice(Device.identifier)Identifier
OBX-19Date/Time Of The Analysis
DTMextension[1].urluri
OBX-19Date/Time Of The Analysis
DTMextension[1].valueDateTimedateTime
OBX-20Observation Site
CWEbodySiteCodeableConcept
OBX-21Observation Instance Identifier
EIidentifierIdentifier
OBX-21Observation Instance Identifier
EIidentifier.type.coding.codecode
Value "FILL"
OBX-23Performing Organization Name
XONperformer[2](Organization)Reference(Organization)
OBX-23Performing Organization Name
XONperformer[2](PractitionerRole.organization(Organization))Reference(Organization)
If IF OBX-25 VALUED
OBX-24Performing Organization Address
XADperformer[2](Organization.address)Address
OBX-24Performing Organization Address
XADperformer[2](PractitionerRole.organization(Organization.address))Address
If IF OBX-25 VALUED
OBX-25Performing Organization Medical Director
XCNperformer[2](PractitionerRole)Reference(PractitionerRole)
OBX-25Performing Organization Medical Director
XCNperformer[2](PractitionerRole.code.coding.value)string
Value "MDIR"
OBX-25Performing Organization Medical Director
XCNperformer[2](PractitionerRole.code.coding.system)uri
Value "http://terminology.hl7.org/CodeSystem/v2-0912"
OBX-29
IDcategory[1].coding.codecode
OBX-29
IDcategory[1].coding.systemuri
OBX-30
IDextension[2].urluri
Value "http://hl7.org/fhir/StructureDefinition/observation-structure-type"
OBX-30
IDextension[2].valueCodeableConcept.coding.codecode
OBX-30
IDextension[2].valueCodeableConcept.coding.systemuri
Value "http://hl7.org/fhir/StructureDefinition/observation-structure-type"
OBX-33
EIPextension[1].uriReference
If IF OBX-33 COUNT>1Value "http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.specimen"
OBX-33
EIPextension[1].valueReference(Group.member.entity(Specimen.identifier[1])
If IF OBX-33 COUNT>1
OBX-33
EIPextension[2].uri
If IF OBX-33 COUNT>1Value "http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.specimen"
OBX-33
EIPextension[2].valueReference(Group.member.entity(Specimen.identifier[2]))
If IF OBX-33 COUNT>1
OBX-33
EIPspecimen(Specimen.identifier[1])Identifier
If IF OBX-33 COUNT=1
OBX-33
EIPspecimen(Specimen.identifier[2])Identifier
If IF OBX-33 COUNT=1

To DocumentReference6 rows

HL7 v2 sourcev2 typeFHIR elementFHIR typeConditions and notes
OBX-5Observation Value
variescontent[1].attachmentAttachment
If IF OBX-2="ED"
OBX-5Observation Value
variescontent[2].databinary64
If IF OBX-2="FT"
OBX-5Observation Value
variescontent[2].contentTypecode
If IF OBX-2="FT"Value "text/hl7v2"
OBX-5Observation Value
variescontent[3].urluri
If IF OBX-2="RP"
OBX-5Observation Value
variescontent[4].databinary64
If IF OBX-2="TX"
OBX-5Observation Value
variescontent[4].contentTypecode
If IF OBX-2="TX"Value "application/text"

To Observation72 rows

HL7 v2 sourcev2 typeFHIR elementFHIR typeConditions and notes
OBX-3Observation Identifier
CWEcodeCodeableConcept
OBX-4Observation Sub-id
OG$this
Map to Observation.partOf or Observation.hasMember or Observation.DerivedFrom according to the implementation guidance for the v2 message at hand, otherwise map to the extension-sub-id to enable the final destination to determine how to structure the observations.
OBX-5Observation Value
variesvalueQuantity.valuequantity
If IF OBX-2 EQUALS "NM"
OBX-5Observation Value
variesvalueStringstring
If IF OBX-2 IN ("ST", "FT", "TX")Any markup in ST, FT or TX data may not present properly given that valueString is a string data type
OBX-5Observation Value
variesvalueCodeableConcept[1]CodeableConcept
If IF OBX-2 EQUALS "CF"
OBX-5Observation Value
variesvalueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "CNE"
OBX-5Observation Value
variesvalueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "CE"
OBX-5Observation Value
variesvalueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "CWE"
OBX-5Observation Value
variesvalueCodeableConceptCodeableConcept
If IF OBX-2 EQUALS "IS"
OBX-5Observation Value
variesvaluePeriodPeriod
If IF OBX-2 EQUALS "DR"
OBX-5Observation Value
variesvalueDateTimedateTime
If IF OBX-2 IN ("DTM", "DT")
OBX-5Observation Value
variesvalueRangeRange
If IF OBX-2 EQUALS "NR"
OBX-5Observation Value
variesvalueStringstring
If IF OBX-2 EQUALS "VR"Value OBX-5.1+"-"+OBX-5.2
OBX-5Observation Value
variesvalueTimetime
If IF OBX-2 EQUALS "TM"
OBX-5Observation Value
variesvalueStringstring
If IF (OBX-2 EQUALS "SN" AND OBX-5.1 EQUALS "<>"Value OBX-5.1+" "+OBX-5.2+" "+OBX-5.3+" "+OBX-5.4" "OBX-6"
OBX-5Observation Value
variesvalueRatio[1]Ratio
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/")
OBX-5Observation Value
variesvalueRange[1]Range
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-"
OBX-5Observation Value
variesvalueStringstring
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "+"Value OBX-5.1+" "+OBX-5.2+" "+OBX-5.3+" "+OBX-5.4" "OBX-6"
OBX-5Observation Value
variesvalueQuantity[1]Quantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 NOT IN (":", "/", "-", "+")
OBX-5Observation Value
variesvalueStringstring
If line 19 through 23 all fail while OBX-2 = SNValue OBX-5.1+" "+OBX-5.2+" "+OBX-5.3+" "+OBX-5.4" "OBX-6"
OBX-5Observation Value
variesvalueSampedDataSampledData
If IF OBX-2 EQUALS "NA"
OBX-5Observation Value
variesextension[1].urluri
If IF OBX-2 EQUALS "ED" AND IF OBX-5.4 EQUALS "Base64"Value "https://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.valueAttachment"
OBX-5Observation Value
variesextension[1].valueAttachmentAttachment
If IF OBX-2 EQUALS "ED" AND IF OBX-5.4 EQUALS "Base64"
OBX-5Observation Value
variesextension[1].urluri
If IF OBX-2 EQUALS "RP"Value "https://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.valueAttachment"
OBX-5Observation Value
variesextension[1].valueAttachmentAttachment
If IF OBX-2 EQUALS "RP"
OBX-6Units
CWEvalueQuantity[1]Quantity
If IF OBX-2 IN ("NA", "NM")
OBX-6Units
CWEvalueQuantity[1]Quantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 NOT IN (":", "/", "-", "+")
OBX-6Units
CWEvalueRange[1].lowSimpleQuantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-"
OBX-6Units
CWEvalueRange[1].highSimpleQuantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-"
OBX-6Units
CWEvalueRatio[1].numeratorQuantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/")
OBX-6Units
CWEvalueRatio[1].denominatorQuantity
If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/")
OBX-7References Range
STreferenceRange.textstring
OBX-8Interpretation Codes
CWEinterpretationCodeableConcept
OBX-10Nature Of Abnormal Test
IDextension[2].uriuri
Value "http://hl7.org/fhir/StructureDefinition/observation-nature-of-abnormal-test"
OBX-10Nature Of Abnormal Test
IDextension[2].valueCodeableConceptCodeableConcept
Code map v2-0080
OBX-11Observation Result Status
IDstatuscode
OBX-11Observation Result Status
IDstatus.extension[1].urluri
If IF OBX-11 IS "X"Value "http://hl7.org/fhir/StructureDefinition/alternate-codes"
OBX-11Observation Result Status
IDstatus.extension[1].valueCodeableConcept.coding.codeCodeableConcept
If IF OBX-11 IS "X"Value "X"
OBX-11Observation Result Status
IDstatus.extension[1].valueCodeableConcept.coding.systemstring
If IF OBX-11 IS "X"Value "http://terminology.hl7.org/CodeSystem/v2-0085"
OBX-11Observation Result Status
IDdataAbsentReason.coding[2].code
If IF OBX-11 IS "N"Value "not-asked"
OBX-11Observation Result Status
IDdataAbsentReason.coding[2].system
If IF OBX-11 IS "N"Value "http://terminology.hl7.org/CodeSystem/data-absent-reason"
OBX-14Date/Time Of The Observation
DTMeffectiveDateTimedateTime
OBX-15Producer's Id
CWEperformer[2](Organization)identifier
OBX-15Producer's Id
CWEperformer[2](PractitionerRole)
OBX-16Responsible Observer
XCNperformer[1](PractitionerRole.practitioner(Practitioner))Reference(PractitionerRole)
OBX-16Responsible Observer
XCNperformer[1](PractitionerRole.code.coding.code)CodeableConcept
Value "responsibleObserver"
OBX-16Responsible Observer
XCNperformer[1](PractitionerRole.code.coding.system)CodeableConcept
Value "http://terminology.hl7.org/CodeSystem/practitioner-role"
OBX-17Observation Method
CWEmethodCodeableConcept
OBX-18Equipment Instance Identifier
EIdevice(Device.identifier)Identifier
OBX-19Date/Time Of The Analysis
DTMextension[2].urluri
OBX-19Date/Time Of The Analysis
DTMextension[2].valueDateTimedateTime
OBX-20Observation Site
CWEbodySiteCodeableConcept
OBX-21Observation Instance Identifier
EIidentifierIdentifier
OBX-21Observation Instance Identifier
EIidentifier.type.coding.codecode
Value "FILL"
OBX-23Performing Organization Name
XONperformer[2](Organization)Reference(Organization)
If IF OBX-25 NOT VALUED
OBX-23Performing Organization Name
XONperformer[2](PractitionerRole[1].organization(Organization))Reference(Organization)
If IF OBX-25 VALUED
OBX-24Performing Organization Address
XADperformer[2](Organization.address)Address
If IF OBX-25 NOT VALUED
OBX-24Performing Organization Address
XADperformer[2](PractitionerRole[1].organization(Organization.address))Address
If IF OBX-25 VALUED
OBX-25Performing Organization Medical Director
XCNperformer[2](PractitionerRole[1].practitioner)Reference(PractitionerRole)
OBX-25Performing Organization Medical Director
XCNperformer[2](PractitionerRole[1].code.coding.code)code
Value "MDIR"
OBX-25Performing Organization Medical Director
XCNperformer[2](PractitionerRole[1].code.coding.system)
Value "http://terminology.hl7.org/CodeSystem/v2-0912"
OBX-29
IDcategory[1].coding.codecode
OBX-29
IDcategory[1].coding.systemuri
OBX-30
IDextension[2].urluri
Value "http://hl7.org/fhir/StructureDefinition/observation-structure-type"
OBX-30
IDextension[2].valueCodeableConcept.coding.codecode
OBX-30
IDextension[2].valueCodeableConcept.coding.systemuri
Value "http://hl7.org/fhir/StructureDefinition/observation-structure-type"
OBX-33
EIPextension[1].uriReference
If IF OBX-33 COUNT>1Value "http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.specimen"
OBX-33
EIPextension[1].valueReference(Group.member.entity(Specimen.identifier[1])
If IF OBX-33 COUNT>1
OBX-33
EIPextension[2].uri
If IF OBX-33 COUNT>1Value "http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.specimen"
OBX-33
EIPextension[2].valueReference(Group.member.entity(Specimen.identifier[2]))
If IF OBX-33 COUNT>1
OBX-33
EIPspecimen(Specimen.identifier[1])Identifier
If IF OBX-33 COUNT=1
OBX-33
EIPspecimen(Specimen.identifier[2])Identifier
If IF OBX-33 COUNT=1