FHIR Chat · How to associate an Observation with ObservationDefinition? · implementers

Stream: implementers

Topic: How to associate an Observation with ObservationDefinition?


view this post on Zulip Torbjørn Torsvik (May 09 2021 at 11:20):

Hi. I'm new to fhir.

Im trying to map a set of lab results in a legacy database to fhir. Originally, each lab result is associated with a "laboratory test type" (eg. s-haemoglobin) which is again associated with a number of reference ranges (eg. this range applies for patients of this age, sex an so on).

The Observation resource (https://www.hl7.org/fhir/observation.html) has a field for referenceRange, and even seems to supports listing ranges that arent particulary relevant for the result in the observation (eg "This reference range would have applied if the subject had been 20 years younger"). I have a lot of results and would prefer not having to redeclare reference ranges for every single observation.

From what i can read on this forum, there are different ways for representing more general observation information. One strategy is to have a "parent observation" which stores all the general information I don't want to repeat (and no result), and have all the individual results referenced as observations linked via the parents hasMember field (or childs derivedFrom?).

Alternatively, you could use the new ObservationDefinition (right?). In the "Boundaries and Relationships" section (https://www.hl7.org/fhir/observationdefinition.html#8.26.2) its stated that it can be referenced in Observation.basedOn. However, I can't find ObservationDefinition listed as a valid reference type in the specs (https://www.hl7.org/fhir/observation-definitions.html#Observation.basedOn). Also, from the description ("A plan, proposal or order that is fulfilled in whole or in part by this event") the basedOn field doesnt really look like a good fit for what I want to use the ObservationDefinition for.

Have I misunderstood what ObservationDefinition is supposed to be used for? How (if ever) do you establish a relationship between Observation and ObservationDefinition?

view this post on Zulip Josh Mandel (May 09 2021 at 13:26):

For compatibility with clients it's quite helpful to populate at least one reference range on lab Observations (specifically: the one that you applied to this patient, resulting in the Interpretation you're assigning to the result.

view this post on Zulip Josh Mandel (May 09 2021 at 13:30):

For a fuller set of reference ranges you could perhaps use an ObservationDefinition, but it's important within an Observation to describe which range applied in this case.

view this post on Zulip Josh Mandel (May 09 2021 at 13:31):

^^ having written this, I don't see how to designate a specific Observation.referenceRange as "the one we applied in determining this Observation.interpretation". Is there a way @Lloyd McKenzie ?

view this post on Zulip Lloyd McKenzie (May 09 2021 at 13:59):

Typically, observation ranges are used to trigger specific Observation.interpretation values (low, critical high, etc.) A single Observation can have multiple interpretations and thus, in theory, can have multiple relevant ranges. If you wanted to tie them together, we'd need an extension - though you could propose a standard extension for that purpose. Keep in mind that sometimes knowing what the ranges were that didn't trigger an interpretation is still relevant - e.g. "you're just below the 'high' range".

You can't presume that a package of Observations will always be kept together, nor that the ObservationDefinition will always be available to someone accessing the Observation, so standard practice is to repeat the "relevant" reference ranges on each Observation. Determination of what's 'relevant' is up to the lab.) Linking from Observation to ObservationDefinition would be done with 'instantiates', though that's only introduced in R5. You'd need to use an extension in R4.

view this post on Zulip Josh Mandel (May 09 2021 at 14:47):

Based on this review, I would recommend publishing observations with at least one reference range that is relevant for the given interpretation; if including more, I'd avoid including multiple reference ranges for a given type (e.g., at most one critical range, at most one normal range, and so on).

view this post on Zulip Torbjørn Torsvik (May 09 2021 at 14:58):

Thanks for the replies! Josh Mandel, I'm really enjoying your guided walk through fhir. Thank you McKenzie, I'm looking into R5.

So to sum up. You should add relevant reference ranges to the observations in order to ensure their usefulness as isolated entities, since no context is guaranteed. Optionally, you can also tie them to an ObservationDefinition, either using an extension in R4 or by using the instantiates field in R5. I do feel like reference ranges for tests are valid concepts that should also exist outside the scope of each individual observation. I now assume that ObservationDefinition is a valid resource for storing such information (and also preferable to a hierarchy of observations)?

view this post on Zulip Josh Mandel (May 09 2021 at 20:32):

(Thanks for the shout-out on my video series @Torbjørn Torsvik -- always feel free to send me a direct message or @-mention me here with any suggestions for topics.)

view this post on Zulip Grahame Grieve (May 09 2021 at 22:00):

also see https://chat.fhir.org/#narrow/stream/179256-Orders-and.20Observation.20WG/topic/ObservationDefinition.20Questions

view this post on Zulip Lloyd McKenzie (May 10 2021 at 02:49):

ObservationDefinition is indeed valid for storing 'definitional' ranges (there are often different ones for different genders, age groups or other circumstances. I don't know that you'd get an ObservationDefinition that applied to a hierarchy of observations - each observation in a panel would have its own definition, each with its own normal ranges, though there might be a parent definition that defined the grouping of the panel

view this post on Zulip Ravishankar P (May 14 2021 at 07:42):

@Grahame Grieve can i get some real examples for StructureMapUtils conversions ??

view this post on Zulip Grahame Grieve (May 14 2021 at 21:20):

look in the test cases?


Last updated: Apr 12 2022 at 19:14 UTC