FHIR’s ValueSet resource specifies a set of codes drawn from one or more code systems.
In LOINC’s case, we have defined three main types of value sets:
Return the ValueSet definition
The examples below show how to call the ValueSet resource directly to give back the whole resource entry. This returns all of the metadata and definition criteria for a value set, including, for extensional value sets, which terms it includes. For example:
https://fhir.loinc.org/ValueSet/?url=http://loinc.org/vs/LL1162-8Alternatively, you can specify the same value set as:
https://fhir.loinc.org/ValueSet/LL1162-8Get the list of terms in the ValueSet
Use the $expand operation to only return the terms in a given value set (called a value set “expansion”), without the value set metadata.
https://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/LL1162-8Determine if a term is in a given ValueSet
Use the $validate-code operation to verify if a particular term is in the given ValueSet. This example will return a valueBoolean of true.
https://fhir.loinc.org/ValueSet/LG33055-1/$validate-code?system=http://loinc.org&code=8867-4ValueSet versions
You can retrieve the details and members of most ValueSet resources as they existed in previous LOINC versions. The version number is supplied as a named parameter valueSetVersion in addition to the URL.
https://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/LG51018-6&valueSetVersion=2.70https://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/LG51018-6&valueSetVersion=2.71https://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/LG51018-6&valueSetVersion=2.72In responses returned by the previous examples, you can see how constituents of the LG51018-6 Group for SARS-CoV-2 serology tests increased from 28 to 29 to 33 members in each subsequent LOINC version. Again, requests without a version suffix will always return the most current version of the ValueSet.
Note that previous versions of intensionally-defined ValueSet resources are not possible due to their rule-based nature. Versioning of some named collections (as opposed to those identified by a LOINC code) referenced below is not yet enabled.
Public health value sets
We have defined several new subsets of LOINC terms related to SARS-CoV-2/COVID-19 testing and reporting. The first three are LOINC Groups, which we are specifically calling out here so that they will be easily accessible, and the fourth is a value set for LOINC terms related to public health case reporting. These terms may be used in other contexts besides the COVID-19 pandemic.
Each value set is given below with:
- The URL to return its definition; and
- The URL to return its expansion.
Remember, the definition for extensional value sets returns the set of LOINC terms included in that value set.
These FHIR value sets only include published LOINC terms. The full list of released and pre-release LOINC terms related to SARS-CoV-2/COVID-19 is available at https://loinc.org/sars-cov-2-and-covid-19/.
LOINC terms for SARS-CoV-2 laboratory tests
Value set type: extensional.
SARS-CoV-2 detection (including molecular, antigen, and culture)
http://loinc.org/vs/LG51017-8https://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/LG51017-8SARS-CoV-2 molecular detection
http://loinc.org/vs/LG51019-4https://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/LG51019-4SARS-CoV-2 serology tests
http://loinc.org/vs/LG51018-6https://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/LG51018-6LOINC terms related to public health case reporting
Value set type: extensional.
http://loinc.org/vs/loincs-related-to-public-health-case-reportinghttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/loincs-related-to-public-health-case-reportingGeneral collections of LOINC terms
We have defined several key subsets of LOINC terms as ValueSets because they are useful collections for various purposes.
Each value set is given below with:
- The URL to return its definition; and
- The URL to return its expansion.
Remember, the definition for extensional value sets returns the set of LOINC terms included in that value set.
Note that many of these named collections are not available in versions prior to 2.83. A complete list of these URIs is listed separately.
LOINC Document Ontology
Value set type: extensional. More information is available on this collection.
http://loinc.org/vs/loinc-document-ontologyhttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/loinc-document-ontologyFunctional Status
Value set type: extensional. This value set is currently based on the subset of the Centers for Medicare and Medicaid Services’ Standardized Patient Assessment Data Elements (SPADEs) related to functional status.
http://loinc.org/vs/functional-statushttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/functional-statusLOINC/RSNA Radiology Playbook and Playbook Core
Value set type: extensional. More information is available on these collections.
Radiology Playbook
http://loinc.org/vs/loinc-rsna-radiology-playbookhttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/loinc-rsna-radiology-playbookRadiology Playbook Core
http://loinc.org/vs/loinc-rsna-radiology-playbook-corehttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/loinc-rsna-radiology-playbook-coreValid HL7 Attachment Requests and Responses
Value set type: intensional. More information is available on these subsets.
Valid HL7 Attachment Requests
http://loinc.org/vs/valid-hl7-attachment-requestshttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/valid-hl7-attachment-requestsValid HL7 Attachment Responses
http://loinc.org/vs/valid-hl7-attachment-responseshttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/valid-hl7-attachment-responsesValid HL7 Attachment Responses – Implementation Guide Exists
http://loinc.org/vs/valid-hl7-attachment-responses-ig-existshttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/valid-hl7-attachment-responses-ig-existsValid HL7 Attachment Responses – No Implementation Guide Exists
http://loinc.org/vs/valid-hl7-attachment-responses-no-ig-existshttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/valid-hl7-attachment-responses-no-ig-existsDeprecated LOINC Terms
Value set type: intensional.
http://loinc.org/vs/deprecated-loinc-termshttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/deprecated-loinc-termsTop 20,000
Value set type: intensional. Learn more about LOINC code rankings.
https://fhir.loinc.org/ValueSet/?url=http://loinc.org/vs/loinc-top-rankedhttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/loinc-top-rankedTop Lab Orders
Value set type: intensional. Learn more about universal lab order codes.
https://fhir.loinc.org/ValueSet/?url=http://loinc.org/vs/top-lab-ordershttps://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/top-lab-ordersLOINC Answer Lists as Value Sets
LOINC contains links between many of its observation terms and a set of possible answers that could be used as result values. Within LOINC, we have created a structured representation of these answer lists.
LOINC Answer Lists are assigned a non-semantic identifier with a “LL” prefix and a Luhn/mod-10 check digit. The individual answers (called LOINC Answers) within a list are assigned a non-semantic identifier with a “LA” prefix and a mod-10 check digit. The answer codes LOINC assigns are unique by lexical string (ignoring capitalization), and by intention do not distinguish between strings that may have different meanings depending on their contextual use.
LOINC Answer Lists represent collections of coded concepts that can be used as response values to LOINC terms. The canonical URI pattern for identifying the value set defined by a LOINC Answer List is: http://loinc.org/vs/{LOINC Answer List code}.
Get the list of LOINC Answers in a LOINC Answer List as a FHIR Value Set expansion
https://fhir.loinc.org/ValueSet/$expand?url=http://loinc.org/vs/LL1162-8Search for all Answer Lists with “Yes” in their name
https://fhir.loinc.org/ValueSet?name:in=YesDetermine if a LOINC Answer is in an Answer List
https://fhir.loinc.org/ValueSet/LL1162-8/$validate-code?system=http://loinc.org&code=LA15679-6LOINC Groups as Value Sets
LOINC Groups are a technique for rolling up groups of LOINC terms that could be treated as equivalent or useful for various purposes. For example, you may want to aggregate data for displaying on a flowsheet within an electronic health record (EHR) system, retrieve data for quality measure reporting, or process data for research.
Each LOINC Group is assigned a non-semantic identifier with a “LG” prefix. The LG codes serve as a coded value set identifier. As such, they correspond to a particular “definition” of what should be included in the group. Following best practices, LOINC Groups intend to keep the logical definition stable in meaning over time. However, the members of the group may change as the underlying terminology (LOINC) evolves. For example, new concepts may be added that fulfill a group’s definition and are thus included.
LOINC Group as Value Set
https://fhir.loinc.org/ValueSet/?url=http://loinc.org/vs/LG9568-9https://fhir.loinc.org/ValueSet/LG9568-9Confirm a LOINC Code as a member of a Group
https://fhir.loinc.org/ValueSet/LG9568-9/$validate-code?system=http://loinc.org&code=6785-0