Technical Information (LOINC Mapping)
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:
Standard approach - 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.
Exceptional circumstances- Local code provided in message, LOINC-mapping pre-agreed with customer and undertaken during processing. 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.
Patients Know Best Wiki Hub | Deploy | Developer | Trust Centre | Manual | Research | Education | Release Notes
© Patients Know Best, Ltd. Registered in England and Wales Number: 6517382. VAT Number: GB 944 9739 67.
This API specification and design is licensed under a Creative Commons Attribution 4.0 International License.