Find Lab Results

Labs may be found from the DiagnosticReport resource. DiagnosticReports with category=LAB may contain one or more results (lab values) as Observation resources. Lab results should be queried by DiagnosticReport rather than from the Observation resource directly in order to:

  • Gain context required to interpret the observation (e.g., observation = ‘glucose’ requires the report to know whether it is a blood glucose or a urine glucose, etc.)
  • Group multiple Observations for a panel of labs (such as a metabolic panel which contains sodium, glucose, BUN, etc.).
  • Include a reference to identify the ordering clinician.
  • Include a document (as a Binary resource) if a lab result is not returned as a discrete field. For detail on how to use Binary resources, see Find a Discharge Summary.

Retrieve Lab Results or Reports via DiagnosticReport

Lab results can be queried via DiagnosticReport. Multiple results, such as from a lab panel, may be grouped within each DiagnosticReport resource.

  • Use DiagnosticReport.category=LAB to limit results to laboratory.
  • Be sure to use _include=DiagnosticReport:result which will return a list of Observation and/or Binary resources.

Retrieve vital signs via Observation

Vital signs (e.g., Blood Pressure, Height, Weight, Temperature, Resipiratory Rate, Oxygen Saturation) can be queried via Observation. Each result will be returned as a separate Observation.

  • To retrieve vital signs via Observation resource, use Observation.category=vital-signs.

Filter by ValueSet

  • DiagnosticReport and Observation resources can be filtered by Value Set by code:in=[ValueSet URI].
  • To use a LOINC value set,
    • First, identify the LOINC Parts which will define your filter. This can be done most easily by identifying a few target codes and noting the attributes which most closely meet your needs on the LOINC search site: https://search.loinc.org/searchLOINC/search.zul.
    • Then, query for https://[YOUR_FHIR_ENDPOINT]/ValueSet?version=[LOINC Part Type]&name=[LOINC Part Value] to retrieve the [ValueSet URI]. The following are are the strings to use for the [LOINC Part Type], aligned with those you’ll see as column headers in the LOINC Search results:
    • Finally, use the fully-specified [ValueSet URI] in the DiagnosticReport or Observation query.
  • Only one value set is required for a query, though multiple can be used.
    • For Union (OR) of value sets, place each [ValueSet URI] within a comma-delimited list, e.g., code:in=[ValueSet URI 1],[ValueSet URI 2],[ValueSet URI 3]
    • For Intersection (AND) of value sets, place each [ValueSet URI] within a separate parameter, e.g., code:in=[ValueSet URI 1]&code:in=[ValueSet URI 2]&code:in=[ValueSet URI 3].
    • A combinatino of Union and Intersection can be used.

Example Lab Test Queries

Test Resource Query Parameters
Cholesterol: Observation ?category=LAB
&code:in=https://rosetta.careevolution.com/subsets/LOINC-Component/Cholesterol [Component]
Glucose: Observation ?category=LAB
&code:in=https://rosetta.careevolution.com/subsets/LOINC-Component/Glucose [Component]
Complete Blood Count (CBC): DiagnosticReport ?category=LAB
&code:in=https://rosetta.careevolution.com/subsets/LOINC-Component/Complete blood count W Differential panel [Component]
Basic Metabolic Panel: DiagnosticReport ?category=LAB
&code:in=https://rosetta.careevolution.com/subsets/LOINC-Component/Basic Metabolic Panel [Component]
Hemoglobin/Hematocrit: Observation ?category=LAB
&code:in=https://rosetta.careevolution.com/subsets/LOINC-Component/Hematocrit [Component],
https://rosetta.careevolution.com/subsets/LOINC-Component/Hematocrit/Hemoglobin [Component],
https://rosetta.careevolution.com/subsets/LOINC-Component/Hemoglobin A/Hemoglobin.total [Component]

Grouping Labs

DiagnosticReport resources can be used to group Lab results into panels. In addition, many clinical use cases group results by Observation.code (where system=http://loinc.org) or Observation.code.text to enable trending over time.

Real-World Data Considerations

  • Lab description/display
    • Use both the DiagnosticReport and Observation to provide sufficient context for users
      • Some source systems send the lab description in the DiagnosticReport and little information in the Observation (e.g., report lists ‘Blood Glucose’ and observation lists ‘CHEMISTRY’)
      • Other source systems send important context in the DiagnosticReport (e.g., report lists ‘presence in urine’ and observation lists ‘glucose’)
      • Often panels are grouped by DiagnosticReport (e.g., report lists ‘complete metabolic panel - blood’ and observations include ‘glucose’, ‘sodium’, etc)
      • Depending on the use case and UI design, you may simplify how the data is presented to users where DiagnosticReport.code and/or .display lists things such as ‘Misc’, ‘Other’, or ‘Observation’ or if there is a single child Observation which has the same .code and/or .display as those in the report
    • When sufficient codes and context are recieved in source data, HIEBus maps labs to LOINC; To make use of LOINC reference mapping, we recommend doing the following to populate user display:
      • First, use DiagnosticReport.code.coding.display and Observation.code.coding.display where userselected=false AND system=http://loinc.org
      • If LOINC mapping is unavailable, use the source descriptions DiagnosticReport.code.coding.display and Observation.code.coding.display where userselected=true
  • Lab Provider - Lab Provider (e.g., Quest, LabCorp) can be found in Observation.performer which gives a Reference(Practitioner).
  • Ordering Clinician - If available, the provider that ordered a lab can be found by
    • Observation.extension('http://careevolution.com/fhirextensions#observation-reportReference')
    • which gives a Reference(DiagnosticReport.basedon)
    • which gives a Reference(ServiceRequest.requester)
    • which gives a Reference(Practitioner)