Send observations


ORU^R01: Send test results and measurements to PKB

Overview

This message can be used to send unsolicited result information to PKB. For example, laboratory reports (whether numerical or textual) can be sent, and will appear in the "Tests" tab in the PKB web interface.

Note that both textual and numerical data can be included in one ORU^R01 message.

In order to be considered a "textual report", the following conditions must be met:

  • There are 1 or more OBX segments
  • All of which contain textual data
  • All of which contain matching test IDs
  • There are at least 2 lines of text

Multiple orders may be sent in one message (repeating order group) each containing a single ORC and OBR segment with multiple OBX segments (results).

The ORU^R01 can also be used to send measurements into PKB, such that they appear in the "Measurements" tab in the PKB web interface. Please speak to us if you would like to do this, as you'll need to send pre-agreed SNOMED code values in OBX-3.1. 

Any OBX-3.3 that specifies SNOMED CT (see table for exact values we match on) will be treated as a measurement, not a lab result, providing that the ID in OBX-3.1 matches one of the predefined measurement IDs we can accept.

Relevant Entities

Please click through to the Data Model to explore the presentation of these entities in the web interface.

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
R01 [[Lab Report]] [[Lab Report.External ID]] as derived from ORC-3.1 or OBR-3.1 Associated [[Lab Result]] entries are individually matched.

Note: if a [[Lab Result]] that was previously provided with the [[Lab Report]] is omitted from this [[Lab Report]], the [[Lab Result]] will be left unmodified. It will not be deleted.
New [[Lab Report]] created.
  [[Lab Result]] Results are matched on the type of test. The type is derived from the test ID (OBX-3) and the units (OBX-6). The existing [[Lab Result]] is replaced in its entirety with the values provided in this message. A partial update is not performed. New [[Lab Result]] created.
  [[Measurement]] There is no unique identifier on a [[Measurement]] submitted via HL7, so they cannot be updated. N/A New [[Measurement]] created.

Definition

Segment

Field

Component

Description

Example

Data Model
(Lab Reports)

Data Model
(Measurements)

MSH



Message header. This conforms to PKB's standard definition.


 

 

PID



Patient identification. This conforms to PKB's standard definition.


 

 

[ ORC ]



Common order. Can optionally be included to specify the filler order number. This will be overridden by OBR-3.1 if present.


 

 


[ ORC-3 ]


Filler order number


 

 



ORC-3.1

Filler order number

MYORDER0001

[[Lab Report.External ID]]

if OBR-3 was not provided

 


[ ORC-13 ]


Enterer's Location


 

 



ORC-13.9

Description

Laboratory 1

[[Lab Report.Enterer Location]]

 

OBR



Observation request


 

 


[ OBR-3 ]


Filler order number. If present, this will override any value in ORC-3.1. Corrections to results in the same lab order will be treated as updates (not new data).


 

 



OBR-3.1

Filler order number

MYORDER0001

[[Lab Report.External ID]]

 


[ OBR-4 ]


Universal service identifier. For textual reports, these values override the ones in OBX-3. If this field is provided, at least the service name must be given. See here for more information on code sets.


If a textual report, these values map into 

[[Lab Report->Lab Result.Test]]

instead of OBX-3




[ OBR-4.1 ]

Service ID

LAB100

If not a textual report, this value is ignored.

 



OBR-4.2

Service name

FBC

[[Lab Report->Lab Result.Service]]

 



[ OBR-4.3 ]

Service coding system

WinPath

If not a textual report, this value is ignored.

 



[ OBR-4.5 ]

Alternative service name

Full Blood Count

[[Lab Report->Lab Result.Service]]

if OBR-4.2 was not provided

 


[ OBR-7 ]


Observation timestamp. This will be used only if there is no timestamp in OBX-14.


 

 



OBR-7.1

Observation timestamp

201505191657

[[Lab Report->Lab Result.Timestamp]]

if OBX-14 was not provided

[[Measurement.Timestamp]]

if OBX-14 was not provided


[ OBR-14 ]


Received timestamp.


 

 



OBR-14.1

Received timestamp

201505191521

[[Lab Report->Received Timestamp]]



[ OBR-16 ]


Ordered by. If present, at least the family name must be given.


[[Lab Report->Lab Result->Source.Source Text]]

[[Measurement->Source.Source Text]]



OBR-16.2

Family name

Foster

 

 



[ OBR-16.3 ]

Given name

John

 

 



[ OBR-16.4 ]

Middle names

Harry

 

 



[ OBR-16.6 ]

Title

Dr

 

 


[ OBR-24 ]


Laboratory discipline.






OBR-24.1

Laboratory discipline.

ICU

 [[Lab Report->Discipline]]

 


[ OBR-25 ]


Result status.

If a value of R is provided: any lab results received previously for this report ID will be marked as deleted. OBX segments are not required and will be ignored.

Otherwise: the report is processed as documented.






OBR-25.1

Result status

F

 

 

{ [ NTE ] }



NTE segments can be used to include comments. NTE segments immediately following the OBR segment will be considered to apply to all results in this message.


 

 


NTE-3


Comment


 

 



NTE-3.1

Comment

This is a comment.

These OBR-level comments will be written to 

[[Lab Report->Lab Result.Comments]]

Any OBX-level comments will be appended to the OBR-level comments.

 

{ OBX }



Observation or result


 

 


OBX-2


Value type.

OBX segments with these value types are silently ignored: AD, CP, DT, DTM, ED, MO, PN, RP, TM, TN, XAD, XCN, XON, XPN, XTN

For SN, a numeric value must be provided in OBX-5.2.

For all other value types, note that:


 

 



OBX-2.1

Value type

NM


 


OBX-3


Observation identifier. See here for more information on code sets.


 

 



OBX-3.1

Test ID

If this is a textual report, this value will be overridden by OBR-4.1

If a measurement is being provided, this must ID must match one of the predefined values which PKB can accept.

777-3

[[Lab Report->Lab Result.Test.Code]]

 



[ OBX-3.2 ]

Test name

Platelets

[[Lab Report->Lab Result.Test.Display Text]]

 



[ OBX-3.3 ]

Test coding system

If this is a textual report, this value will be overridden by OBR-4.3
Note: PKB will only accept a measurement if this value is one of the following:
( sct, snomed-ct, snomed ct, http://snomed.info/sct, 2.16.840.1.113883.6.96 )

LOINC

[[Lab Report->Lab Result->Test.Code System]]

 



[ OBX-3.5 ]

Alternative test name

Platelet count

[[Lab Report->Lab Result.Test.Display Text]]

if OBX-3.2 was not provided

 


OBX-5


Test result value.

If providing an SN value:

  • OBX-5.1 must be one of: >, <, >=, <=, =
    • <> is also valid, but not supported. Results with this comparator will be silently ignored.
  • OBX-5.2 must be a number
  • OBX-5.3 and OBX-5.4 are not supported. Results containing a non-empty value for either of these will be silently ignored.






[ OBX-5.1 ]

Value or comparator.

200

If numerical data, then value set in

[[Lab Report->Lab Result.Value]]

else if textual then value set in

[[Lab Report->Lab Result.Value Text]]

else if a multi-line report then values set in

[[Lab Report->Lab Result.Comments]]

else if SN then map to

[[Lab Report->Lab Result.Comparator]]

[[Measurement.Value]]

If a multi-valued measurement is being supplied, then the next OBX segment will contain the value for 

[[Measurement.Value2]]



[ OBX-5.2 ]

Value

200

If SN, then set in

[[Lab Report->Lab Result.Value]]



[ OBX-6 ]


Units. See here for more information on code sets.



 



[ OBX-6.1 ]

Unit ID

X10TO9L

[[Lab Report->Lab Result.Units.Code]]

if OBX-6.2 was not provided

 



[ OBX-6.2 ]

Mandatory for measurements

Unit name.

If providing a measurement, this must match the corresponding PKB permitted value.

10 to 9 per L

[[Lab Report->Lab Result.Units.Code]]

 


[ OBX-7 ]


Reference range. If this is a numeric report, then this value must be a numeric range. Otherwise, a textual range can be supplied. Numeric ranges in the format a-b, <a, <=a, >b, >=b are all supported.


 

 



OBX-7.1

Reference range

100-300

If a numeric range provided, then the following values will be set appropriately

[[Lab Report->Lab Result.Range Low]]

[[Lab Report->Lab Result.Range Low Inclusive]]

[[Lab Report->Lab Result.Range High]]

[[Lab Report->Lab Result.Range High Inclusive]]

else value set in

[[Lab Report->Lab Result.Textual Range]]

 


OBX-11


Result status. Only values of F and C will be processed. Values of I, O, P or X (which indicate pending or no results) are silently ignored, whilst any other values will cause an error.


 

 



OBX-11.1

Result status

F

 

 


[ OBX-13 ]


Custom access rules for lab results. Currently supported: "{patientDelay:NUMBERdays}" with any whole number in place of "NUMBER" (no spaces).  The patient will see that a lab result has arrived, but the result value will not be revealed until the set number of days past the date/time of observation have passed. If this field is not specified the patient will be able to see their results immediately.


 

 



OBX-13.1

Custom access rules

{patientDelay:3days}

 

 


[ OBX-14 ]


Observation timestamp. If this is not present, OBR-7 is used instead.


 

 



OBX-14.1

Observation timestamp

201505191657

[[Lab Report->Lab Result.Timestamp]]

[[Measurement.Timestamp]]

{ [ NTE ] }



NTE segments can be used to include comments. NTE segments immediately following an OBX segment will be considered to apply only to the immediately preceding result.


 

 


NTE-3


Comment


 

 



NTE-3.1

Comment

This is a comment.

These OBX-level comments will be appended to

[[Lab Report->Lab Result.Comments]]

after any OBR-level comments.

 

[ PV1 ]

This is used to include the Hospital Service Code of the observation
   

[ PV1-10 ]
Hospital service. See here for more information on code sets.
   


PV1-10.1 Hospital service code
[[Lab Report->Lab Result.Specialty]]  

Examples

An example of a lab result message.

MSH|^~\&|Corepoint|TDL|HL7API|PKB|201303080949||ORU^R01|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
OBR|1|12F000005|12F000005|LFT^LIVER PROFILE^WinPath||201303080948|201303080000||||||||SST|E85109||||||201303080949||CHE|F
OBX|1|NM|BILI^Bilirubin^Winpath||5|umol/L|0-20||||F
OBX|2|NM|ALP^Alkaline Phosphatase^Winpath||120|IU/L|40-130||||F|||201303080000
OBX|3|NM|ALT^Alanine Transaminase^Winpath||20|IU/L|10-50||||F||patientDelay:3days|201303080000
PV1|1|||||||||SPEC_01|

An example of a measurement message.

MSH|^~\&|Corepoint|TDL|HL7API|PKB|201303080949||ORU^R01|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
OBR|1||||||||||||||||||||||||F
OBX|1|NM|107647005^^sct||75|^kg^|||||F

Response

PKB will respond with a standard HL7 acknowledgement.

Translating units

PKB translates some units so that results from different laboratories can be charted on the same axes.
The translation happens for mass / volume units e.g. mg / dL is converted to g / L as appropriate for each test. It also happens for moles / volume e.g. mmol / mL is converted to mol / L as appropriate for each test.
No conversions happen from mass to moles e.g. mg / dL is not converted to mmol / mL.

ORU^R01: Send radiology reports to PKB

Overview

Also, the ORU^R01 message can be used to send radiology reports, and will appear in the "Imaging" tab in the PKB web interface.
Radiology reports may be written in HTML, and may provide images as attachments.
Note: we detect radiology data based on MSH-3. It must be "RADIOLOGY", or else another radiology system on our list (let us know what you use and we'll add it to our list).

Relevant Entities

Please click through to the Data Model to explore the presentation of these entities in the web interface.

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
R01 [[Radiology Report]] [[Radiology Report.External ID]] as derived from ORC-3.1 or OBR-3.1 The existing [[Radiology Report]] is replaced in its entirety. A partial update is not performed. New [[Radiology Report]] created.

Definition

Segment

Field

Component

Description

Example

Data Model

MSH



Message header. This conforms to PKB's standard definition.


 

PID



Patient identification. This conforms to PKB's standard definition.


 

[ ORC ]



Common order. Can optionally be included to specify the filler order number. This will be overridden by OBR-3.1 if present.


 


[ ORC-3 ]


Filler order number


 



ORC-3.1

Filler order number

MYORDER0001

[[Radiology Report.External ID]]

if OBR-3 was not provided


[ ORC-13 ]


Enterer's Location


 



ORC-13.9

Description

Laboratory 1

[[Radiology Report.Enterer Location]]

OBR



Observation request


 


[ OBR-3 ]


Filler order number. If present, this will override any value in ORC-3.1. Corrections to results in the same lab order will be treated as updates (not new data).


 



OBR-3.1

Filler order number

MYORDER0001

[[Radiology Report.External ID]]


[ OBR-4 ]


Universal service identifier.

This is used to set the title of the report. If not provided here then the first provided value from an OBX-3 will be used instead. The message will be rejected if neither OBR-4, nor any OBX-3, contains a name.

See here for more information on code sets.





[ OBR-4.2 ]

Service name

CHEST XRAY

[[Radiology Report.Title]]



[ OBR-4.5 ]

Alternative service name

XRAY (CHEST)

[[Radiology Report.Title]]

if OBR-4.2 was not provided


OBR-7


This is mandatory for radiology reports.


 



OBR-7.1

Observation timestamp

201505191657

[[Radiology Report.Timestamp]]


[ OBR-16 ]


Ordered by. If present, at least the family name must be given.


[[Radiology Report->Source.Source Text]]



OBR-16.2

Family name

Foster

 



[ OBR-16.3 ]

Given name

John

 



[ OBR-16.4 ]

Middle names

Harry

 



[ OBR-16.6 ]

Title

Dr

 


[ OBR-25 ]


Result status.

If a value of R is provided: any radiology reports received previously for this report ID will be marked as deleted. OBX segments are not required and will be ignored.

Otherwise: the report is processed as documented.





OBR-25.1

Result status

F

 

{ [ NTE ] }



NTE segments can be used to include comments. NTE segments immediately following the OBR segment will be considered to apply to all results in this message.


 


NTE-3


Comment


 



NTE-3.1

Comment

This is a comment.

These OBR-level comments are set in

[[Radiology Report.Description]]

{ OBX }



Observation or result


 


OBX-2


Value type. Radiology messages only support: FT, TX or ED.


 



OBX-2.1

Value type

ED

 


OBX-3


Observation identifier. Although both names are individually optional, the message will be rejected if neither OBR-4, nor any OBX-3, contains a name.

See here for more information on code sets.


 



[ OBX-3.2 ]

Test name

CHEST XRAY

[[Radiology Report.Title]]

if OBR-4 was not provided and this is the first OBX with a name.

In addition,

[[Radiology Report->Attachment.Filename]]

will be set if an attachment is created. If a test name was not provided, then the attachment filename is set to

radiology<timestamp_in_millis>.<lowercase_OBX-5.3>



[ OBX-3.5 ]

Alternative test name

XRAY (CHEST)

[[Radiology Report.Title]]

if OBR-4 was not provided, this is the first OBX with a name, and OBX-3.2 was not provided.

In addition,

[[Radiology Report->Attachment.Filename]]

will be set if an attachment is created and OBX-3.2 was not provided. If a test name was not provided, then the attachment filename is set to

radiology<timestamp_in_millis>.<lowercase_OBX-5.3>


OBX-5


Test result value. Field contents vary based on value type (OBX-2.1).

Currently, we only support TEXT/HTML and IM/* data types for ED values.





[ OBX-5.1 ]

Application (if OBX-2.1 = ED); Value (otherwise)

APP

If this is a textual report (rather than containing an attachment) then this value is appended to

[[Radiology Report.Description]]



[ OBX-5.2 ]

Data type (if OBX-2.1 = ED)

IM

 



[ OBX-5.3 ]

Sub-data type (if OBX-2.1 = ED)

TIFF

[[Radiology Report->Attachment.Media Type]]



[ OBX-5.4 ]

Encoding (if OBX-2.1 = ED)

Base64

 



[ OBX-5.5 ]

Value (if OBX-2.1 = ED)

JVi0xLjMKJeTjz ...

For ED data, this value is set in

[[Radiology Report->Attachment.Content]]

after being decoded according to OBX-5.4


OBX-11


Result status. Only values of F and C will be processed. Values of I, O, P or X (which indicate pending or no results) are silently ignored, whilst any other values will cause an error.


 



OBX-11.1

Result status

F

 


[ OBX-13 ]


Custom access rules. Currently supported: "{patientDelay:NUMBERdays}" with any whole number in place of "NUMBER" (no spaces). The patient will see that a radiology report has arrived, but the result value will not be revealed until the set number of days past the date/time of observation have passed. If this field is not specified the patient will be able to see their report immediately.


 



OBX-13.1

Custom access rules

{patientDelay:3days}

 

{ [ NTE ] }



NTE segments can be used to include comments. NTE segments immediately following an OBX segment will be considered to apply only to the immediately preceding result.


 


NTE-3


Comment


 



NTE-3.1

Comment

This is a comment.

Finally, any OBX-level comments are also appended to

[[Radiology Report.Description]]

[ PV1 ]

This is used to include the Hospital Service Code of the appointment
 

[ PV1-10 ]
Hospital service. See here for more information on code sets.
 


PV1-10.1 Hospital service code
[[Radiology Report.Specialty]]

Examples

An example message containing a radiology image.


MSH|^~\&|RADIOLOGY|SendingFacility|HL7API|PKB|20160102101112||ORU^R01|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
OBR|1|P123|F123|500^CHEST XRAY^L||201408080948|201408080000||||||||||||||||||F
OBX|1|ED|502^CHEST XRAY^L||^IM^TIFF^Base64^JVi0xLjMKJeTjz9IKNAw (more bytes...)||||||F|||201408080000


Response

PKB will respond with a standard HL7 acknowledgement.

Comments