6Accessing the LOINC Ontology from a FHIR Terminology Server

When working with the LOINC Ontology, leveraging a FHIR terminology server can simplify access and management. The server allows you to handle the content as a specific CodeSystem version, providing access to all FHIR Terminology operations.

LOINC Extension FHIR URIsing

The SNOMED International URI standard specifies that identify unversioned editions (i.e. editions) and versioned editions (i.e. versions) take the following respective forms:

These URIs apply to the 'version' element of codes and the 'URL' parameter in FHIR Operations. The 'system" element value is always 'http://snomed.info/sct' for all SNOMED editions. For more information on the URI Specification, please refer to the URI Standard document.

Examples

The following table shows some examples of URIs for editions and versions relevant when working with the LOINC Ontology.

Resource

URI

SNOMED CT International Edition

SNOMED CT International Edition, 20250101

FHIR Operations

The following table lists a few key requests relevant for retrieving content from the LOINC Ontology using the FHIR Terminology services API.

Service Name and Status

Input

Output

$lookup

A conceptId and a CodeSystem url

  • Concept metadata, including status, designations, etc.

$expand

Get all members of the reference set

REQUIRED

  • A reference set specified by its refsetId, in this case the identifiers for the set of Orderable and Observable LOINC Terms:

635111010000100

LOINC Orderable Reference Set

$validate-code

Test if a concept or description is a member of a specified reference set

REQUIRED

  • A reference set specified by its refsetId

  • A candidate concept.id

  • If the candidate concept is a member of the reference set: TRUE

  • Otherwise: FALSE

Please refer to the SNOMED CT Terminology Services Guide for a comprehensive guidance on SNOMED CT enabled terminology services.

Example FHIR Requests

These examples use the concept 635111010000100 |LOINC Orderable Reference Set| as the refsetId.

Service Name

API Call

Result

Get concept metadata

GET fhir]/ValueSet/$expand
?url=http://snomed.info/sct?fhir_vs=refset/[refsetId]
&code=537131010000109

Returns a JSON representation of concept metadata

Get all members of the reference set

GET [fhir]/ValueSet/$expand
?url=http://snomed.info/sct?fhir_vs=refset/[refsetId]
&count=10

for example

GET [fhir]/ValueSet/$expand
?url=http%3A%2F%2Fsnomed.info%2Fsct%3Ffhir_vs%3Drefset%2F635111010000100&count=10

An alternative solution is to use the expression constraint language, as shown here:

GET [fhir]/ValueSet/$expand
?url=http%3A%2F%2Fsnomed.info%2Fsct%3Ffhir_vs%3Decl%2F%5E%5B635111010000100%5D
&count=10
GET [fhir]/ValueSet/$expand
?url=http%3A%2F%2Fsnomed.info%2Fsct%3Ffhir_vs%3Decl%2F%5E635111010000100&count=10

Returns a JSON representation of data about each of the reference set member.

The data returned for each concept includes:

  • code: the conceptId of the reference set member

  • display: the preferred term for the reference set member

Also returns the total number of reference set members

As some reference sets have very large numbers of children, this service is paged. Requests parameters include:

  • count to restrict the number of members returned.

  • offset to specify the start in the results (in multiples of the limit).

Test if a concept is a member of the reference set

GET [fhir]/ValueSet/$validate-code
?system=http://snomed.info/sct&code=537131010000109 &url=http://snomed.info/sct/[moduleId]/version/[effectiveTime]?fhir_vs=refset/[refsetId]

for example

GET [fhir]/ValueSet/$validate-code
?system=http://snomed.info/sct&code=537131010000109 &url=http://snomed.info/sct/900000000000207008/version/20200131?fhir_vs=refset/635111010000100

Returns a JSON object with a "Parameters" resource, including a "result" parameter with a boolean value (true/false) indicating whether the member validated OK or not against the reference set.

Provide Feedback

Last updated