This message can be used to send unsolicited laboratory results and measurements to PKB.
Laboratory results
Laboratory results will appear in the "Tests" tab in the PKB web interface. A single laboratory report (a.k.a. order) can contain multiple profiles (a.k.a. panels), each of which is reported in its own OBR group.
Measurements
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.
A "content pattern" indicates how PKB will interpret the contents of your message. This provides additional guidance over and above the syntactic requirements of individual segments.
PKB supports two different content patterns for OBR groups. When a (non-radiology) report is received, we will inspect each OBR group to determine which content pattern has been provided.
Single textual laboratory report
PKB uses the following criteria to determine if the OBR group contains a single textual laboratory report:
There are 1 or more OBX segments, which together contain at least 2 lines of text
Each OBX segment declares a textual data type (TX, FT, ST)
All the OBX segments have matching test IDs (OBX-3.1 and OBX-3.3, case sensitive)
The test code information for a textual laboratory report is taken from the OBR segment (OBR-4).
The OBX segments are treated as lines within the report, and do not maintain their own identity. The contents of the OBR group will be kept together, and displayed as originally provided.
NTE segments will be treated as lines of the report, just like OBX segments; their contents will appear in the same location as provided.
Note: when sending a single textual laboratory report, some metadata fields will only be taken from the first OBX segment. Importantly, if you wish to apply a patient delay this must be provided in the first OBX segment.
Collection of individual test results and measurements
If an OBR group does not contain a single textual laboratory report, then it is assumed to contain a collection of individual test results and measurements, each of which is provided in its own OBX segment (with the exception of multi-valued measurements, such as blood pressure).
The test code information for an individual result or measurement is taken from the OBX segment (OBX-3). Test results and measurements are considered to be meaningful even outside the context of the report in which they were provided.
The comments for each test result will be the union of the comments (NTE segments) provided for the OBR group and the comments (NTE segments) provided for the test result specifically.
Comments are not saved for measurements.
PKB processes content of this form in an OBX-centric manner. That is, PKB extracts the test results and measurements from the report and does not guarantee to display them alongside the other test results and measurements with which they were originally provided.
Sometimes, the same test result might be reported as part of more than one profile. This is valid, providing that each OBX segment appears no more than once in any given OBR group. However, since PKB does not include the profile as part of the result identity then all except the first instance of the OBX segment will be silently ignored. It is not valid to provide different results for the same test ID in different profiles within a given laboratory order.
It is valid to provide more than one measurement for the same measurement type (as identified by OBX-3) within any given OBR group. All such measurements will be processed.
Each test result is associated with a test type. Test results of the same type are shown on the same graph.
PKB maintains a curated list of supported [[LOINC Test Type]] entries, each of which is identified by the combination of a LOINC code and a unit value. These are the same types that a user can select from when entering a test result in the web interface. As such, a manually entered test result is associated directly with a [[LOINC Test Type]].
When a lab result is provided via HL7 it is always associated with a [[Local Test Type]] (lab results received before July 2021 worked differently and were sometimes linked directly to a [[LOINC Test Type]] where a supported LOINC code was detected).
The term "local" indicates that this information captures a test type which might be unique to the source organisation; customers often have their own codes for various test types, which may or may not be LOINC codes. As such, the types captured by the [[Local Test Type]] entity are scoped to the source organisation.
Test results from two different sources will never share the same [[Local Test Type]] since these are scoped to the source organisation. By default, this means they have different test types and as such will not appear on the same graph. In order to appear on the same graph the [[Local Test Type]] entries must be mapped to the same supported LOINC test type. This is a process known as LOINC mapping.
When LOINC mapping occurs
When adding a lab result to a medical record, PKB will check to see if the [[Local Test Type]] can be matched to a supported [[LOINC Test Type]]. There are two situations in which a matching type might be found:
LOINC code provided in message. An explicit LOINC code match will happen if the following conditions are true:
The code system matches (case-insensitively) the string "LOINC"
The code value and unit value both match (case-sensitively) one of the LOINC test types supported by PKB
Local code provided in message, LOINC-mapping pre-agreed with customer. If the customer and PKB have agreed mappings from local lab result test types to LOINC test types supported by PKB, then a match will be made if the following conditions are true:
The code system, code and units all match (case-sensitively) one of the entries in the mappings for the source organisation
Impact of LOINC mapping
The key impact of this process is that different result types, from different sources, can be mapped to the same LOINC test type. This allows PKB to treat all results of all types which map to a particular LOINC test type as being safe to group together. As such, we are able to graph them together in the web interface, and return them all from an API call which accepts a LOINC code as a search parameter. We are also able to make more intelligent display decisions, such as showing a translated version of the test name. See our deployment guidance for more information on the benefits of LOINC mapping.
Test result information is used to populate [[Lab Report]] / [[Lab Result]] / [[Local Test Type]] entities
Measurement information is used to populate [[Measurement]] entities
Please click through to the Data Model to explore the presentation of these entities in the web interface.
[[Lab Report]]
Matched on: [[Lab Report.External ID]] as derived from ORC-3.1 or OBR-3.1
When matched: 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.
Particular care should be given to panels: if a panel is provided with a status of R then all [[Lab Result]] entries previously stored for the corresponding [[Lab Report]] will be marked as deleted, regardless of whether they were previously included in the panel being redacted or whether they are provided in the current message. If the message contains multiple panels where some but not all have a status of R, then PKB will first delete all results associated with the report ID before following the usual create or update workflow for lab results provided in panels that do not have a status of R.
When not matched: New [[Lab Report]] created.
[[Lab Result]]
Matched on: Results are matched on the test ID (OBX-3, or OBR-4 for textual reports). The test ID is matched only on the first and third components (code and code system), and matching is case sensitive.
When matched: If PKB detects a meaningful difference between the provided and existing lab result content, then the existing [[Lab Result]] is replaced in its entirety with the values provided in this message. A partial update is not performed.
Note: that the existence of more than one version of a given lab result is what determines whether PKB displays a correction indicator in the web interface. The correction indicator is not driven by the status value declared by the sender (e.g. OBX-11), and sending more than one message for a given lab order is not guaranteed to trigger the correction indicator since PKB dedupes updates that do not meaningfully change the content of the lab result.
When not matched: New [[Lab Result]] created.
[[Local Test Type]]
Matched on: The test type is identified by the Source Organisation (to ensure no namespace clashes) along with test code, test coding system and units (all matched case sensitively).
When matched: If an existing [[Local Test Type]] is found, it will be updated with the latest Test Name and Service Name if they differ from what is currently stored. In this way, callers are able to update the display name for their local test types.
When not matched: A new [[Local Test Type]] is created.
[[Measurement]]
Matched on: There is no unique identifier on a [[Measurement]] submitted via HL7, so they cannot be updated.
When matched: N/A
When not matched: New [[Measurement]] created.
An example of a lab result message.
MSH|^~\&|Corepoint|TDL|HL7API|PKB|201303080949||ORU^R01|ABC0000000001|P|2.4
PID|||9999999999^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||Flat name^1, The Road^London^London^SW1A 1AA^GBR||01234567890^PRN~07123456789^PRS|^NET^^john.smith@company.com~01234098765^WPN||||||||||||||||N|
PV1|1|||||||||SPEC_01|
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
An example of a measurement message.
MSH|^~\&|Corepoint|TDL|HL7API|PKB|201303080949||ORU^R01|ABC0000000001|P|2.4
PID|||9999999999^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||Flat name^1, The Road^London^London^SW1A 1AA^GBR||01234567890^PRN~07123456789^PRS|^NET^^john.smith@company.com~01234098765^WPN||||||||||||||||N|
OBR|1||||||||||||||||||||||||F
OBX|1|NM|107647005^^sct||75|^kg^|||||F|||20200625103943+0100
PKB will respond with a standard HL7 acknowledgement.
An example of a single measurement message.
MSH|^~\&|Corepoint|TDL|HL7API|PKB|201303080949||ORU^R01|ABC0000000001|P|2.4
PID|||9999999999^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||Flat name^1, The Road^London^London^SW1A 1AA^GBR||01234567890^PRN~07123456789^PRS|^NET^^john.smith@company.com~01234098765^WPN||||||||||||||||N|
OBR||||||||||||||||^Ward^Olivia^Elsie^^Ms|||||||||F
OBX||NM|162986007^^sct||7|^bpm|||||F|||20200401140103+0100
When providing a blood pressure reading you must provide an OBX segment containing the SNOMED code of the overall reading type, followed immediately by an OBX segment for each component reading you wish to provide.
Note that it is permitted to provide either a systolic or diastolic reading by itself, but the first OBX containing the overall code of the reading must still be supplied.
An example of a multi measurement message.
MSH|^~\&|Corepoint|TDL|HL7API|PKB|201303080949||ORU^R01|ABC0000000001|P|2.4
PID|||9999999999^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||Flat name^1, The Road^London^London^SW1A 1AA^GBR||01234567890^PRN~07123456789^PRS|^NET^^john.smith@company.com~01234098765^WPN||||||||||||||||N|
OBR||||||||||||||||^Ward^Olivia^Elsie^^Ms|||||||||F
OBX||NM|75367002^^sct|||-|||||F|||20191106091410+0000
OBX||NM|163030003^^sct||190|^mmHg (systolic)|||||F|||20191106091410+0000
OBX||NM|163031004^^sct||59|^mmHg (diastolic)|||||F|||20191106091410+0000