An ORU_R01 message is responsible for transmitting patient results.
In OpenMRS, A ORU_R01 message will model one or many encounters, each which may contain one or many Observations (results)
An ORu_r01 message may contain the following segments (Refer http://www.corepointhealth.com/resource-center/hl7-resources/hl7-oru-message)
...
SEGMENT/GROUP
...
NAME
...
OPTIONAL/REPEATABLE?
...
MSH
...
Message header Required
...
...
ResultsGroup – Repeatable group, includes groups that follow (unless otherwise noted):
...
...
...
PatientGroup – Optional group
...
...
...
PID
...
Patient identification
...
Required
...
PID1
...
Patient demographics
...
Optional
...
NTE
...
Notes and comments
...
Optional, Repeatable
...
PatientVisitGroup – Optional group, part of PatientGroup
...
...
...
PV1
...
Patient visit
...
Required
...
PV2
...
Patient visit – additional info
...
Optional
...
OrderGroup – Repeatable group
...
...
...
ORC
...
Common order
...
Optional
...
OBR
...
Observation request
...
Required
...
An ORU_R01 message is responsible for transmitting patient results.
In OpenMRS, A ORU_R01 message will model one or many encounters, each which may contain one or many Observations (results)
An ORu_r01 message may contain the following segments (Refer http://www.corepointhealth.com/resource-center/hl7-resources/hl7-oru-message)
SEGMENT/GROUP | NAME | OPTIONAL/REPEATABLE? | |
MSH | Message header Required |
| |
ResultsGroup – Repeatable group, includes groups that follow (unless otherwise noted): |
|
| |
PatientGroup – Optional group |
|
| |
PID | Patient identification | Required | |
PID1 | Patient demographics | Optional | |
NTE | Notes and comments | Optional, Repeatable | |
ObservationGroup –Repeatable PatientVisitGroup – Optional group, part of OrderGroupPatientGroup |
|
| |
OBX PV1 | Observation Optional Patient visit | Required | |
NTE-2 | Notes and comments PV2 | Patient visit – additional info | Optional , Repeatable |
OrderGroup continued– Repeatable group |
|
| |
CTI | Clinical trial identification ORC | Common order | Optional |
OBR | Observation request | Required | |
NTE-1 | Notes and comments | Optional, Repeatable | |
Additional segment, not part of a group: |
|
| |
DSC | Continuation pointer segment | Optional |
However, not all of these segments are importaint.
Important segments are-
MSH
PID
PVI
ORC
OBR
OBX
The MSH segment
The MSH Segment transmits the message’s source, purpose, destination, and certain syntax specifics.
It does not contain any patient centric data.
For a more detailed description, see here (http://www.corepointhealth.com/resource-center/hl7-resources/hl7-msh-message-header)
A sample MSH segment may look as follows :
...
language | html/xml |
---|
...
ObservationGroup --Repeatable group, part of OrderGroup |
|
|
OBX | Observation Optional |
|
NTE-2 | Notes and comments | Optional, Repeatable |
OrderGroup continued |
|
|
CTI | Clinical trial identification | Optional, Repeatable |
Additional segment, not part of a group: |
|
|
DSC | Continuation pointer segment | Optional |
However, not all of these segments are importaint.
Based on Grahame Grieve's recommendation, important segments for our messages would be-
MSH
PID
PV1
OBR, (OBX)* )*
The MSH segment
The MSH Segment transmits the message’s source, purpose, destination, and certain syntax specifics.
It does not contain any patient centric data.
For a more detailed description, see here (http://www.corepointhealth.com/resource-center/hl7-resources/hl7-msh-message-header)
A sample MSH segment may look as follows :
Code Block | ||
---|---|---|
| ||
<MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> Sending Application </MSH.3> <MSH.4> <HD.1>Sending Facility</HD.1> </MSH.4> <MSH.5> Receiving Application </MSH.5> <MSH.6> <HD.1>Receiving Facility</HD.1> <MSH.1>|</MSH.1>6> <MSH.2>^~\&</MSH.2>7> <TS.1>Date/Time of Message</TS.1> <MSH.3> </MSH.7> <MSH.9> Sending Application <<MSG.1>ORU</MSH.3>MSG.1> <MSH.4><MSG.2>R01</MSG.2> <HD.1>Sending Facility</HD.1><MSG.3>ORU_R01</MSG.3> </MSH.4>9> <MSH.5>10>Message Control Id</MSH.10> <MSH.11> Receiving Application <<PT.1>D</MSHPT.5>1> <MSH.6> <PT.2></PT.2> <!-- original value 'C' removed based on <HD.1>Receiving Facility</HD.1>Grahame's recommendation --> </MSH.6>11> <MSH.7>12> <TS<VID.1>2.1>Date/Time of Message</TS5</VID.1> </MSH.7> <VID.2> <MSH.9> <MSG<CE.1>ORU<1>RWA</MSGCE.1> <MSG<CE.2>R01<2>HL70399</MSGCE.2> <!-- Added on Grahame's recommendation --> </VID.2> <MSG.3>ORU_R01</MSG.3></MSH.12> </MSH.9> <MSH.10>Message Control Id</MSH.10> <MSH.11> <PT.1>D</PT.1> <PT.2>C</PT.2> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> </MSH> |
Comments from Grahame Grieve:
- MSH.11.2: "C" is not valid - "T" would be valid but it's more usual to leave it blank
- MSH.11.1: "D" for debugging - sure?
- MSH.12.2: CE.2 should have value HL70399 in this case.
- It's hard to tell which are fixed values, and which are meant to vary. it would be easy to miss that RWA is Rwanda
The PID Segment
The PID (patient identification) segment contains a host of patient information such as patient ID number, patient sex, address, marital status and citizenship.
For a more detailed description, see here (http://www.corepointhealth.com/resource-center/hl7-resources/hl7-pid-segment)
Code Block | ||
---|---|---|
| ||
<PID> <VID.2> <CE.1>RWA</CE<PID.1>1</PID.1> <!-- Added </VID.2> on Grahame's recommendation --> </MSH.12> </MSH> |
The PID Segment
The PID (patient identification) segment contains a host of patient information such as patient ID number, patient sex, address, marital status and citizenship.
For a more detailed description, see here (http://www.corepointhealth.com/resource-center/hl7-resources/hl7-pid-segment)
Code Block | ||
---|---|---|
| ||
<PID.3> <!-- PID.3 fields can be repeated. They represent patient identifier and identifier type pairs --> <CX.1>1234</CX.1> <CX.5>ECID</CX.5> <PID> <PID</PID.3> <!-- PID.3 segments can be repeated. They represent patient identifier and identifier type pairs --> <PID.3> <CX.1>1234<1>1235</CX.1> <CX.5>ECID<5>PID</CX.5> </PID.3> <PID.3> 5> <CX.1>1235</CX.1> <CX.5>PID</CX.5> <!-- PID.5 fields can be repeated. They represent patient names. Since each patient can have many names, each PID.5 segment can contain one of these --> </PID.3> <XPN.1> <PID.5> <!-- PID.5 segments can be repeated. They represent patient names. Since each patient can have many names, each PID.5 segment can contain one of these --> <FN.1>Patient</FN.1> </XPN.1> <XPN.1> <XPN.2>John</XPN.2> <FN.1>Patient<</FNPID.1>5> </XPN.1> !-- PID.6 Date of birth --> <XPN.2>John</XPN.2> <!-- </PID.5>PID.7 Patients sex --> <!-- PID.611 DatePatient ofaddress birth --> <!-- PID.7 Patients sex --> <!-- PID.11 Patient address --></PID> |
Grahame's comments:
- The two provided codes for CX.5 are not legal
- it's usual, and good, when repeating PID.5, to provide codes so that receiving systems can figure out why more than one name is provided, and which to use for a particular purpose
- PID-1 value should be "1" (it's not actually required, but it's good practice)
- Address - there's more to say about this?
The PV1 segment
The PV1 Segment contains information on patient visits
Code Block | ||
---|---|---|
| ||
<PV1> <PID.1>1</PID.1> </PID> |
The PV1 segment
The PV1 Segment contains information on patient visits
Code Block | ||
---|---|---|
| ||
<PV1>!-- Added on Grahame's recomendation --> <PV1.2>0</PV1.2> <PV1.3> <PL.1>1</PL.1> <PL.4> <HD.1>Unknown Location</HD.1> </PL.4> </PV1.3>.3> <PV1.4>ADULTINITIAL</PV1.4> <PV1.7> <PV1<XCN.4>ADULTINITIAL<1>2</PV1.4>XCN.1> <PV1.7><XCN.2> <XCN<FN.1>2<1>Hornblower</XCNFN.1> <XCN</XCN.2> <FN.1>Hornblower</FN.1> <XCN.3>Horatio</XCN.3> </XCNPV1.2>7> <PV1.44> <XCN.3>Horatio</XCN.3> </PV1.7><TS.1>201206270137</TS.1> <PV1</PV1.44> <TS.1>201206270137</TS.1> </PV1.44> </PV1> </PV1> |
Grahame's comments:
- PV1-1 - also good to have the value "1"
- PV1-2 - "0" is not a valid value. I/E/O are the common values for inpatient/outpatient/emergency, thought the notion of emergency as distinct to inpatient is variable around the world
- PV1-3 - that's weird. location is "1", which is unknown? still, it's valid, but the PV1-3-4 HD feels wrong shouldn't this be PV1-9?
Next come the ORC, OBR and OBX segments.
One ORU_R01 mesage can contain only a single ORC segment. (Grahame, umm, no, not according to HL7)
An OBX segment represents a single Observation.
OBR segments can be used to group observations.
Therefore, an ORU_R01 message which contains an encounter with two grouped observations can be represented with the following structure -
Code Block |
---|
<!-- Updated Structure --> <ORC> <!-- One ORC segment per each ORU_R01 --> <OBR> <!-- OBR for the obs grouping -- > <OBX> <!-- two obs which belong to the Obs group --> <OBR> -- two obs which belong to the Obs group --> <OBR> |
Grahame - no, OBR cannot contain an OBR. technically, this structure and the next one are valid, but that's because an OBR doesn't have to have an OBX after it. The structures are misleading because the interpretation is wrong - there should only be two OBRs in the next example
An Encounter with two pairs of Observation groupings can be represented as follows -
...
Code Block | ||
---|---|---|
| ||
<OBX> <OBX> <OBX.1>6</OBX.1> <OBX.1>6<2>NM</OBX.1>2> <OBX.2>NM</OBX.2>3> <OBX.3><CE.1>1234</CE.1> <CE.1>1234<2>NEUTROPHILS</CE.1>2> <CE.2>NEUTROPHILS<3>LOCAL</CE.2>3> </OBX.3> <CE<OBX.5>45.3>LOCAL<0</CEOBX.3>5> <OBX.6> </OBX.3> <OBX<CE.5>45.0<1>%</OBX.5>CE.1> <OBX.6> <CE.3>UCUM</CE.3> <!-- Updated value --> <CE.1>%<</CEOBX.1>6> <OBX.14> <CE.3>ucum</CE.3> <<TS.1>20120627013717</OBXTS.6>1> <OBX</OBX.14> <TS.1>20120627013717</TS.1> </OBX.14> </OBX> </OBX> |
Grahame's comments:
- OBX-3-5 should be "L" not "local"
- OBX-6-3 should be "UCUM" not "ucum"
Suranga's comments:
- In this case, 'LOCAL' and 'ucum' are both user inputs. 'ucum' is the 'unit' entered when creating an Observation, while 'LOCAL' is the concept mapping name
the ID {belongs to. These values will depend sorely on what the user inputs when creating an Obs