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.
Contents
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=LABto limit results to laboratory. - Be sure to use
_include=DiagnosticReport:resultwhich will return a list of Observation and/or Binary resources.
It is not recommended to query lab results via the
Observation resource as significant context may be missing for many labs. Additionally, it is recommended to query with DiagnosticReport.category=LAB rather than DiagnosticReport.result.category=laboratory.
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.
Use LOINC value sets to filter queries rather than individual LOINC codes. LOINC value sets are more expansive and they are automatically updated as LOINC codes are introduced or changed. Any given LOINC code may not be specified in source data or reference mappings, while a LOINC value set enables specification of groups of codes relevant to a use case. HIEBus has Value Sets for LOINC Parts, including Class, ClassType, Component, MethodType, Property, ScaleType, System, and TimeAspect.
Filter by ValueSet
DiagnosticReportandObservationresources can be filtered by Value Set bycode: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:- LOINC-Class (e.g., Cardiology, Radiology)
- LOINC-ClassType (1=Laboratory class; 2=Clinical class; 3=Claims attachments; 4=Surveys)
- LOINC-Component (The analyte or attribute being measured or observed. E.g., sodium, body weight.)
- LOINC-MethodType (e.g., Immunoassay, Visual Count)
- LOINC-Property (e.g., Mass, Count, Concentration)
- LOINC-ScaleType (e.g., Quantitative, Narrative, Document)
- LOINC-System (e.g., Blood, Liver)
- LOINC-TimeAspect (e.g., Point in time, 24 Hours)
- 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.
- For Union (OR) of value sets, place each
For more information on how to use value sets and common value set scopes, review the Value Set Tutorial.
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] |
Be sure to replace spaces and special characters with appropriate ASCII coding for URLs.
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
DiagnosticReportandObservationto provide sufficient context for users- Some source systems send the lab description in the
DiagnosticReportand little information in theObservation(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.codeand/or.displaylists things such as ‘Misc’, ‘Other’, or ‘Observation’ or if there is a single childObservationwhich has the same.codeand/or.displayas those in the report
- Some source systems send the lab description in the
- 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.displayandObservation.code.coding.displaywhereuserselected=falseANDsystem=http://loinc.org - If LOINC mapping is unavailable, use the source descriptions
DiagnosticReport.code.coding.displayandObservation.code.coding.displaywhereuserselected=true
- First, use
- Use both the
- Lab Provider - Lab Provider (e.g., Quest, LabCorp) can be found in
Observation.performerwhich gives aReference(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)
Radiology reports will at times be returned with a DiagnosticReport query where
category=LAB, depending on how HIEBus received the source data. Radiology reports, and some lab reports, will be returned as a document in a Binary resource, . For detail on how to use Binary resources, see Discharge Summary