Blog

    FHIR Observation Resource

    By GauravNovember 13, 202610 mins read
    On this page

    A potassium result, a blood pressure, and a risk score are the same kind of FHIR object and three different shapes. Teams that force all three into one flat value lose the panel, the pair of numbers, or the link back to the inputs.

    The FHIR Observation resource is how you exchange a measurement or a point-in-time assertion: labs, vital signs, and scores. This guide covers the fields a result needs, when to use component versus hasMember versus derivedFrom, and the US Core floor for a laboratory result. A diagnosis a clinician records is a different resource. So is the visit. This page stays on the result.

    What is a FHIR Observation, and what should it not hold?

    Modeling labs and vitals in FHIR?

    Agnotic Technologies builds Observation APIs for labs, vitals, and scores, mapped to US Core and LOINC.

    A FHIR Observation is one measured or asserted result: a lab value, a vital sign, or a score, tied to a patient, a code, and a time. It is not the diagnosis and not the visit. Panels use hasMember or component. Calculated results point back with derivedFrom. LOINC usually supplies the code.

    Put a serum potassium on Observation. If a clinician later records hyperkalemia as a problem, that problem is not a second copy of the potassium stuffed into Observation.code. The result can stand on its own when nobody has recorded a problem, and the problem can exist when the result has already been amended. Mixing them makes both the flowsheet and the problem list wrong.

    Which fields does every result need?

    FHIR R4 requires Observation.status and Observation.code. Everything a clinician trusts, the value, the time, and the patient, is required by the profiles you claim even when the base resource leaves them optional.

    • status: registered, preliminary, final, amended, corrected, cancelled, entered-in-error, or unknown. Final means this is the value of record. Entered-in-error retires a result you must not delete.
    • code: What was measured. For labs and vitals this is usually a LOINC code, plus a text display.
    • subject: The Patient. A result with no subject cannot be filed on a chart.
    • effective[x]: When the specimen was taken or the vital was measured, not when the interface ran.
    • value[x] or a reason it is missing: A number, a code, a string, or dataAbsentReason. Do not send a value and a data-absent reason together.

    Category tells a caller whether this is a laboratory result, a vital sign, an exam finding, or a survey score. Search and US Core profiles both depend on it. A potassium with no category will not show on a lab query that filters to laboratory, even if the LOINC code is right.

    How do labs, vitals, and scores use category, code, and value?

    Labs, vitals, and scores share status, code, and subject, then diverge on category and on how the value is shaped. Pick the shape from the kind of result, not from whichever example you saw first.

    • Laboratory: category laboratory, LOINC on code, valueQuantity with a UCUM unit for numeric results, or a coded value when the result is pos or neg.
    • Vital signs: category vital-signs, a vital LOINC, and the same discipline on units. Blood pressure is a panel, not a single string like 120/80.
    • Scores: A LOINC or a documented local code for the instrument, valueInteger or valueQuantity, and derivedFrom when the score is computed from answers you also store.
    • Narrative: valueString only when the result truly is text. Do not hide a number in a sentence because the source system did.

    When do you use component, hasMember, and derivedFrom?

    Use component when several values belong on one observation, hasMember when several observations form a group, and derivedFrom when this result was calculated from other results. Using the wrong one breaks both display and search.

    The US Core Blood Pressure profile is the component case: the observation code is the panel, and systolic and diastolic are components, each with its own LOINC code and value. The profile's panel code is LOINC 85354-9. The components use 8480-6 for systolic and 8462-4 for diastolic. A single valueQuantity of '120/80' will not satisfy that profile and will not chart on a flowsheet that expects two numbers.

    • component: Blood pressure, and some lab methods that report related numbers on one row. Each component has a code and a value. The parent usually has no value of its own.
    • hasMember: A panel such as a metabolic set, where each analyte is its own Observation and the panel observation references them. Members can be queried and trended alone.
    • derivedFrom: Body mass index pointing at the height and weight observations, or a score pointing at the responses. Keep the inputs. Do not only store the output.
    • Do not nest by accident: A member that also copies the full panel value duplicates the result in every search.

    What does US Core require for a laboratory result?

    US Core's laboratory profile is the floor for a US lab result on FHIR. It is stricter than base Observation, and a result that ignores it will fail partners who validate against US Core.

    The US Core Laboratory Result Observation profile says each observation must have a category code of laboratory and a laboratory LOINC code when one is available. It must support a value when the lab has one: UCUM if the value is a quantity, SNOMED CT if the value is coded. It must also support interpretation, a reference range, and a specimen type. The profile sits with the US Core diagnostic report for laboratory results: the report groups the observations, and each observation is one analyte, a nested panel via hasMember, or, less often, a component result. Send the report when the lab sends a panel. Do not flatten the panel into one observation with a long text blob.

    How should units, ranges, and missing values be sent?

    Send a numeric result as valueQuantity with a UCUM unit, a reference range when the lab provided one, and dataAbsentReason when there is no value. A blank value with status final is not a result. It is a hole.

    • UCUM: mg/dL stays mg/dL as a coded unit, not as a display string glued to the number. A unit the profile cannot recognize will fail validation even if a human can read it.
    • Interpretation: High, low, and the other codes from the interpretation value set, in interpretation. Do not encode H in the value.
    • referenceRange: Low and high as the lab stated them for this method. Do not copy a textbook range over the lab's own.
    • dataAbsentReason: Use it when the analyte was ordered and not resulted. Omit value[x]. FHIR does not want both.
    • Specimen: Serum, plasma, or urine when you have it. The same LOINC can mean different things if the specimen is dropped.

    Where do observation interfaces fail?

    They fail on time, identity, and status. The number itself is often the easy part. The result files on the wrong patient, at the interface time, as preliminary forever.

    • Clock: effectiveDateTime is the file-drop time. Yesterday's lab looks like it was drawn today.
    • Patient: The filler number matched and the Patient reference did not. The value is correct on the wrong chart.
    • Status stuck: Corrected results arrive as extra finals. The flowsheet shows both with no amended flag.
    • Panel flattened: Members are concatenated into valueString. Trending and decision support cannot see the potassium.
    • Local codes only: No LOINC, so every downstream map is a one-off spreadsheet.
    • Entered-in-error deleted: The resource is removed. Clients that stored the id now error, and the audit of the bad value is gone.

    How do you search observations without dumping the chart?

    Search by patient, then narrow with category, code, and date. A search that returns every observation for a patient is a chart dump, and it will time out the day the history gets long.

    • patient plus category=laboratory plus date: The recent lab list.
    • patient plus code: One analyte across time, which is the trend a flowsheet needs.
    • patient plus category=vital-signs: The vital list, separate from labs that share the same patient.
    • id when you already have it: A single result for a correction. Do not re-query the entire panel to amend one member.
    • Paging: Honor the server's page size. A client that follows only the first bundle will show a partial panel as if it were complete.

    Confirm the search parameters in the CapabilityStatement for the US Core version you implement. Advertising a code search you did not index is how a partner's first week in production looks like a slow server.

    Plan the status path as carefully as the value path. A preliminary result should be visible and labeled preliminary. When the lab corrects it, send the same logical result forward as amended or corrected, not as a second final with no link to the first. Flowsheets that plot every final will show two potassiums and a clinician will not know which one was withdrawn. Pair that with the DiagnosticReport for a panel: the report lists the members, and each member Observation remains the thing you trend. A report with no members, or members that are not on the report, is an incomplete panel even if every number is individually valid. For vitals, keep the measurement time on effectiveDateTime and the device on the device reference when you have it. A blood pressure taken by a cuff and one typed from a home log are different observations even when the numbers match. Category vital-signs plus the LOINC code is what lets a flowsheet find them without also pulling the morning chemistry. Do not convert units in the interface unless the source and the profile disagree and you have a tested conversion. A silent change from mg/dL to mmol/L looks like a normal result when it is not. If you must convert, keep the original quantity in a note or in a component the chart can audit, and say which system performed the conversion.

    How Agnotic can help

    Agnotic Technologies builds Observation interfaces for laboratories, device gateways, and EHR facades. Agnotic maps source codes to LOINC, shapes panels with hasMember or component, keeps derived scores linked to their inputs, and validates against the US Core lab and vital profiles you are required to meet. We include the correction and entered-in-error paths, not only the first final result.

    We also wire the DiagnosticReport that groups a lab panel, so the chart can open the panel and the analyte can still be trended on its own.

    Review your Observation model

    Walk labs, vitals, and scores with an engineer, or read more FHIR guides.

    Related reading on Agnotic

    US Core, the Patient resource, FHIR integration, and mapping older messages.

    Sources

    Frequently Asked Questions

    No. A potassium of a given value at a given time is an Observation. A problem the clinician records is a different resource. Do not put the diagnosis in Observation.code just because both can carry a clinical concept.

    Talk to an engineer about your project

    We model FHIR Observation for labs, vitals, and scores, with LOINC, US Core profiles, and corrections that do not delete history.