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 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
OBX-3Observation Identifier | CWE | code | CodeableConcept | |
OBX-3Observation Identifier | CWE | component[each].code | CodeableConcept | |
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 | varies | component[each].valueQuantity | quantity | If IF OBX-2 EQUALS "NM" |
OBX-5Observation Value | varies | component[each].valueString | string | 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 | varies | component[each].valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "CF" |
OBX-5Observation Value | varies | component[each].valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "CNE" |
OBX-5Observation Value | varies | component[each].valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "CE" |
OBX-5Observation Value | varies | component[each].valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "CWE" |
OBX-5Observation Value | varies | component[each].valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "IS" |
OBX-5Observation Value | varies | component[each].valuePeriod | Period | If IF OBX-2 EQUALS "DR" |
OBX-5Observation Value | varies | component[each].valueDateTime | dateTime | If IF OBX-2 IN ("DTM", "DT") |
OBX-5Observation Value | varies | component[each].valueRange | Range | If IF OBX-2 EQUALS "NR" |
OBX-5Observation Value | varies | component[each].valueString | string | If IF OBX-2 EQUALS "VR"Value OBX-5.1+"-"+OBX-5.2 |
OBX-5Observation Value | varies | component[each].valueTime | time | If IF OBX-2 EQUALS "TM" |
OBX-5Observation Value | varies | component[each].valueString | string | 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 | varies | component[each].valueRatio[1] | Ratio | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/") |
OBX-5Observation Value | varies | component[each].valueRange[1] | Range | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-" |
OBX-5Observation Value | varies | component[each].valueString | string | 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 | varies | component[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 | varies | component[each].valueString | string | 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 | varies | component[each].extension[1].url | uri | 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 | varies | component[each].extension[1].valueAttachment | Attachment | 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 | varies | derivedFrom(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 | varies | component[each].extension[1].url | uri | 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 | varies | component[each].extension[1].valueAttachment | Attachment | 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 | varies | derivedFrom(DocumentReference) | Reference | If IF OBX-2 EQUALS "RP"And if other observation in OBX-5 are derived from the documentation being referenced |
OBX-6Units | CWE | component[each].valueQuantity | Quantity | If IF OBX-2 IN ("NA", "NM") |
OBX-6Units | CWE | component[each].valueQuantity[1] | Quantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 NOT IN (":", "/", "-", "+") |
OBX-6Units | CWE | component[each].valueRange[1].low | SimpleQuantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-" |
OBX-6Units | CWE | component[each].valueRange[1].high | SimpleQuantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-" |
OBX-6Units | CWE | component[each].valueRatio[1].numerator | Quantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/") |
OBX-6Units | CWE | component[each].valueRatio[1].denominator | Quantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/") |
OBX-7References Range | ST | component[each].referenceRange.text | ||
OBX-8Interpretation Codes | CWE | interpretation | CodeableConcept | Code map v3-observationinterpretation |
OBX-10Nature Of Abnormal Test | ID | extension[2].uri | uri | Value "http://hl7.org/fhir/StructureDefinition/observation-nature-of-abnormal-test" |
OBX-10Nature Of Abnormal Test | ID | extension[2].valueCodeableConcept | CodeableConcept | Code map v2-0080 |
OBX-11Observation Result Status | ID | status | code | Code map observation-status |
OBX-11Observation Result Status | ID | status.extension[1].url | uri | If IF OBX-11 IS "X"Value "http://hl7.org/fhir/StructureDefinition/alternate-codes" |
OBX-11Observation Result Status | ID | status.extension[1].valueCodeableConcept.coding.code | CodeableConcept | If IF OBX-11 IS "X"Value "X" |
OBX-11Observation Result Status | ID | status.extension[1].valueCodeableConcept.coding.system | string | If IF OBX-11 IS "X"Value "http://terminology.hl7.org/CodeSystem/v2-0085" |
OBX-11Observation Result Status | ID | dataAbsentReason.coding[2].code | If IF OBX-11 IS "N"Value "not-asked" | |
OBX-11Observation Result Status | ID | dataAbsentReason.coding[2].system | If IF OBX-11 IS "N"Value "http://terminology.hl7.org/CodeSystem/data-absent-reason" | |
OBX-14Date/Time Of The Observation | DTM | effectiveDateTime | dateTime | |
OBX-16Responsible Observer | XCN | performer[1](PractitionerRole.practitioner(Practitioner)) | Reference(PractitionerRole) | |
OBX-16Responsible Observer | XCN | performer[1](PractitionerRole.code.coding.code) | string | Value "responsibleObserver" |
OBX-16Responsible Observer | XCN | performer[1](PractitionerRole.code.coding.system) | uri | Value "http://terminology.hl7.org/CodeSystem/practitioner-role" |
OBX-17Observation Method | CWE | method | CodeableConcept | |
OBX-18Equipment Instance Identifier | EI | device(Device.identifier) | Identifier | |
OBX-19Date/Time Of The Analysis | DTM | extension[1].url | uri | |
OBX-19Date/Time Of The Analysis | DTM | extension[1].valueDateTime | dateTime | |
OBX-20Observation Site | CWE | bodySite | CodeableConcept | |
OBX-21Observation Instance Identifier | EI | identifier | Identifier | |
OBX-21Observation Instance Identifier | EI | identifier.type.coding.code | code | Value "FILL" |
OBX-23Performing Organization Name | XON | performer[2](Organization) | Reference(Organization) | |
OBX-23Performing Organization Name | XON | performer[2](PractitionerRole.organization(Organization)) | Reference(Organization) | If IF OBX-25 VALUED |
OBX-24Performing Organization Address | XAD | performer[2](Organization.address) | Address | |
OBX-24Performing Organization Address | XAD | performer[2](PractitionerRole.organization(Organization.address)) | Address | If IF OBX-25 VALUED |
OBX-25Performing Organization Medical Director | XCN | performer[2](PractitionerRole) | Reference(PractitionerRole) | |
OBX-25Performing Organization Medical Director | XCN | performer[2](PractitionerRole.code.coding.value) | string | Value "MDIR" |
OBX-25Performing Organization Medical Director | XCN | performer[2](PractitionerRole.code.coding.system) | uri | Value "http://terminology.hl7.org/CodeSystem/v2-0912" |
OBX-29 | ID | category[1].coding.code | code | |
OBX-29 | ID | category[1].coding.system | uri | |
OBX-30 | ID | extension[2].url | uri | Value "http://hl7.org/fhir/StructureDefinition/observation-structure-type" |
OBX-30 | ID | extension[2].valueCodeableConcept.coding.code | code | |
OBX-30 | ID | extension[2].valueCodeableConcept.coding.system | uri | Value "http://hl7.org/fhir/StructureDefinition/observation-structure-type" |
OBX-33 | EIP | extension[1].uri | Reference | If IF OBX-33 COUNT>1Value "http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.specimen" |
OBX-33 | EIP | extension[1].valueReference(Group.member.entity(Specimen.identifier[1]) | If IF OBX-33 COUNT>1 | |
OBX-33 | EIP | extension[2].uri | If IF OBX-33 COUNT>1Value "http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.specimen" | |
OBX-33 | EIP | extension[2].valueReference(Group.member.entity(Specimen.identifier[2])) | If IF OBX-33 COUNT>1 | |
OBX-33 | EIP | specimen(Specimen.identifier[1]) | Identifier | If IF OBX-33 COUNT=1 |
OBX-33 | EIP | specimen(Specimen.identifier[2]) | Identifier | If IF OBX-33 COUNT=1 |
To DocumentReference6 rows
| HL7 v2 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
OBX-5Observation Value | varies | content[1].attachment | Attachment | If IF OBX-2="ED" |
OBX-5Observation Value | varies | content[2].data | binary64 | If IF OBX-2="FT" |
OBX-5Observation Value | varies | content[2].contentType | code | If IF OBX-2="FT"Value "text/hl7v2" |
OBX-5Observation Value | varies | content[3].url | uri | If IF OBX-2="RP" |
OBX-5Observation Value | varies | content[4].data | binary64 | If IF OBX-2="TX" |
OBX-5Observation Value | varies | content[4].contentType | code | If IF OBX-2="TX"Value "application/text" |
To Observation72 rows
| HL7 v2 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
OBX-3Observation Identifier | CWE | code | CodeableConcept | |
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 | varies | valueQuantity.value | quantity | If IF OBX-2 EQUALS "NM" |
OBX-5Observation Value | varies | valueString | string | 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 | varies | valueCodeableConcept[1] | CodeableConcept | If IF OBX-2 EQUALS "CF" |
OBX-5Observation Value | varies | valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "CNE" |
OBX-5Observation Value | varies | valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "CE" |
OBX-5Observation Value | varies | valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "CWE" |
OBX-5Observation Value | varies | valueCodeableConcept | CodeableConcept | If IF OBX-2 EQUALS "IS" |
OBX-5Observation Value | varies | valuePeriod | Period | If IF OBX-2 EQUALS "DR" |
OBX-5Observation Value | varies | valueDateTime | dateTime | If IF OBX-2 IN ("DTM", "DT") |
OBX-5Observation Value | varies | valueRange | Range | If IF OBX-2 EQUALS "NR" |
OBX-5Observation Value | varies | valueString | string | If IF OBX-2 EQUALS "VR"Value OBX-5.1+"-"+OBX-5.2 |
OBX-5Observation Value | varies | valueTime | time | If IF OBX-2 EQUALS "TM" |
OBX-5Observation Value | varies | valueString | string | 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 | varies | valueRatio[1] | Ratio | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/") |
OBX-5Observation Value | varies | valueRange[1] | Range | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-" |
OBX-5Observation Value | varies | valueString | string | 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 | varies | valueQuantity[1] | Quantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 NOT IN (":", "/", "-", "+") |
OBX-5Observation Value | varies | valueString | string | 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 | varies | valueSampedData | SampledData | If IF OBX-2 EQUALS "NA" |
OBX-5Observation Value | varies | extension[1].url | uri | 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 | varies | extension[1].valueAttachment | Attachment | If IF OBX-2 EQUALS "ED" AND IF OBX-5.4 EQUALS "Base64" |
OBX-5Observation Value | varies | extension[1].url | uri | If IF OBX-2 EQUALS "RP"Value "https://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.valueAttachment" |
OBX-5Observation Value | varies | extension[1].valueAttachment | Attachment | If IF OBX-2 EQUALS "RP" |
OBX-6Units | CWE | valueQuantity[1] | Quantity | If IF OBX-2 IN ("NA", "NM") |
OBX-6Units | CWE | valueQuantity[1] | Quantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 NOT IN (":", "/", "-", "+") |
OBX-6Units | CWE | valueRange[1].low | SimpleQuantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-" |
OBX-6Units | CWE | valueRange[1].high | SimpleQuantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 EQUALS "-" |
OBX-6Units | CWE | valueRatio[1].numerator | Quantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/") |
OBX-6Units | CWE | valueRatio[1].denominator | Quantity | If IF OBX-2 EQUALS "SN" AND OBX-5.1 NOT EQUALS "<>" AND OBX-5.3 IN (":", "/") |
OBX-7References Range | ST | referenceRange.text | string | |
OBX-8Interpretation Codes | CWE | interpretation | CodeableConcept | Code map v3-observationinterpretation |
OBX-10Nature Of Abnormal Test | ID | extension[2].uri | uri | Value "http://hl7.org/fhir/StructureDefinition/observation-nature-of-abnormal-test" |
OBX-10Nature Of Abnormal Test | ID | extension[2].valueCodeableConcept | CodeableConcept | Code map v2-0080 |
OBX-11Observation Result Status | ID | status | code | Code map observation-status |
OBX-11Observation Result Status | ID | status.extension[1].url | uri | If IF OBX-11 IS "X"Value "http://hl7.org/fhir/StructureDefinition/alternate-codes" |
OBX-11Observation Result Status | ID | status.extension[1].valueCodeableConcept.coding.code | CodeableConcept | If IF OBX-11 IS "X"Value "X" |
OBX-11Observation Result Status | ID | status.extension[1].valueCodeableConcept.coding.system | string | If IF OBX-11 IS "X"Value "http://terminology.hl7.org/CodeSystem/v2-0085" |
OBX-11Observation Result Status | ID | dataAbsentReason.coding[2].code | If IF OBX-11 IS "N"Value "not-asked" | |
OBX-11Observation Result Status | ID | dataAbsentReason.coding[2].system | If IF OBX-11 IS "N"Value "http://terminology.hl7.org/CodeSystem/data-absent-reason" | |
OBX-14Date/Time Of The Observation | DTM | effectiveDateTime | dateTime | |
OBX-15Producer's Id | CWE | performer[2](Organization) | identifier | |
OBX-15Producer's Id | CWE | performer[2](PractitionerRole) | ||
OBX-16Responsible Observer | XCN | performer[1](PractitionerRole.practitioner(Practitioner)) | Reference(PractitionerRole) | |
OBX-16Responsible Observer | XCN | performer[1](PractitionerRole.code.coding.code) | CodeableConcept | Value "responsibleObserver" |
OBX-16Responsible Observer | XCN | performer[1](PractitionerRole.code.coding.system) | CodeableConcept | Value "http://terminology.hl7.org/CodeSystem/practitioner-role" |
OBX-17Observation Method | CWE | method | CodeableConcept | |
OBX-18Equipment Instance Identifier | EI | device(Device.identifier) | Identifier | |
OBX-19Date/Time Of The Analysis | DTM | extension[2].url | uri | |
OBX-19Date/Time Of The Analysis | DTM | extension[2].valueDateTime | dateTime | |
OBX-20Observation Site | CWE | bodySite | CodeableConcept | |
OBX-21Observation Instance Identifier | EI | identifier | Identifier | |
OBX-21Observation Instance Identifier | EI | identifier.type.coding.code | code | Value "FILL" |
OBX-23Performing Organization Name | XON | performer[2](Organization) | Reference(Organization) | If IF OBX-25 NOT VALUED |
OBX-23Performing Organization Name | XON | performer[2](PractitionerRole[1].organization(Organization)) | Reference(Organization) | If IF OBX-25 VALUED |
OBX-24Performing Organization Address | XAD | performer[2](Organization.address) | Address | If IF OBX-25 NOT VALUED |
OBX-24Performing Organization Address | XAD | performer[2](PractitionerRole[1].organization(Organization.address)) | Address | If IF OBX-25 VALUED |
OBX-25Performing Organization Medical Director | XCN | performer[2](PractitionerRole[1].practitioner) | Reference(PractitionerRole) | |
OBX-25Performing Organization Medical Director | XCN | performer[2](PractitionerRole[1].code.coding.code) | code | Value "MDIR" |
OBX-25Performing Organization Medical Director | XCN | performer[2](PractitionerRole[1].code.coding.system) | Value "http://terminology.hl7.org/CodeSystem/v2-0912" | |
OBX-29 | ID | category[1].coding.code | code | |
OBX-29 | ID | category[1].coding.system | uri | |
OBX-30 | ID | extension[2].url | uri | Value "http://hl7.org/fhir/StructureDefinition/observation-structure-type" |
OBX-30 | ID | extension[2].valueCodeableConcept.coding.code | code | |
OBX-30 | ID | extension[2].valueCodeableConcept.coding.system | uri | Value "http://hl7.org/fhir/StructureDefinition/observation-structure-type" |
OBX-33 | EIP | extension[1].uri | Reference | If IF OBX-33 COUNT>1Value "http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.specimen" |
OBX-33 | EIP | extension[1].valueReference(Group.member.entity(Specimen.identifier[1]) | If IF OBX-33 COUNT>1 | |
OBX-33 | EIP | extension[2].uri | If IF OBX-33 COUNT>1Value "http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.specimen" | |
OBX-33 | EIP | extension[2].valueReference(Group.member.entity(Specimen.identifier[2])) | If IF OBX-33 COUNT>1 | |
OBX-33 | EIP | specimen(Specimen.identifier[1]) | Identifier | If IF OBX-33 COUNT=1 |
OBX-33 | EIP | specimen(Specimen.identifier[2]) | Identifier | If IF OBX-33 COUNT=1 |
