The CodeSystem resource specifies a set of codes drawn from one or more code systems. Code systems define which codes (symbols and/or expressions) exist, and how they are understood.
We have created a canonical definition of how to represent LOINC as a CodeSystem in FHIR that extends its representation to include more LOINC-specific features. LOINC’s CodeSystem definition is available for download available at https://loinc.org/fhir/loinc.xml (sourced by this repository on GitHub). With the LOINC 2.68 release, we expanded the LOINC-specific properties available in our FHIR representation to include those that are published in the LoincPartLink_supplementary file, which is available in the Part file.
Note: Over time, we do anticipate updating this canonical definition in collaboration with the FHIR and LOINC community.
The following are identifiers within the LOINC code system. All are included within the LOINC CodeSystem resource.
- LOINC codes, e.g. 21176-3
- LOINC Parts, e.g. LP31755-9
- LOINC Answer Lists, e.g. LL715-4
- LOINC Answers, e.g. LA11165-0
All LOINC fields are represented as Properties
As of the March 2023 TS update, all LOINC fields exist as CodeSystem Properties within this terminology service. Previously only a subset of fields from the LOINC table structure were defined as Properties. This brings parity between the downloadable version of LOINC and the content available from this API.
You can see a list of all CodeSystem Property values, including specialty ones for Radiology and Document Ontology. Alternatively, you can also refer to LOINC’s CodeSystem definition, loinc.xml, included in our downloadable distribution or on GitHub.
Getting properties available for LOINC as a CodeSystem
Use the canonical URI for LOINC, http://loinc.org, to retrieve all the information about LOINC as a CodeSystem in FHIR through this request:
https://fhir.loinc.org/CodeSystem/?url=http://loinc.orgAs indicated above, you can use this example in your web browser along with your LOINC login. Responses are encoded in either JSON or XML.
Get info on an individual LOINC term, Part, Answer List, or Answer string
Use the $lookup operation to see details on any of the LOINC identifiers. As illustrated in the following examples, you can pass the canonical LOINC URI and code to the CodeSystem endpoint to perform the operation.
https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=4544-3https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LP31755-9https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LL1162-8https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LA6751-7Focus the request to return just what you want
Add a third parameter, &&property, to the examples above and you can limit the response to only the property—or properties—needed. As shown in the second example below, you can specify more than one property in a single request.
https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=4544-3&&property=METHOD_TYPhttps://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=4544-3&&property=METHOD_TYP&&property=VersionFirstReleasedCodeSystem versions
Provide a LOINC version identifier (e.g. 2.69) to retrieve previous versions of concepts in LOINC.
https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LP14542-2&version=2.71https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=96595-4&version=2.69https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=96595-4&version=2.70If you examine the responses from the second and third examples above, you will see its CLASS changed from HEM/BC to CHEM. The following request returns an error as expected because the code was not present in version 2.71 of LOINC.
https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=99463-2&version=2.71Find relationships between LOINC terms and Parts
LOINC terms and Parts have relationships via the LOINC Component Hierarchy by System (formerly known as the Multiaxial Hierarchy). These relationships can be found by using the $lookup operation in conjunction with the parent and child properties.
LOINC Parts have a single parent and one or more children.
https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LP14542-2&&property=parenthttps://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LP28725-7&&property=parenthttps://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LP203649-1&&property=childhttps://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LP31448-1&&property=childBecause LOINC terms only exist at the leaf-level in the Component Hierarchy by System, they will have a parent but no children.
https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=30064-0&&property=parenthttps://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=79207-7&&property=parent