FHIR Chat · ObservationDefinition Questions · Orders and Observation WG

Stream: Orders and Observation WG

Topic: ObservationDefinition Questions


view this post on Zulip Grahame Grieve (Jun 24 2020 at 07:25):

I'm working with ObservationDefinition. Several comments:

  • the documentation is silent on what seems like an important question to me: how do you tell if an Observation is related to an ObservationDefinition? By Observation.code = ObservationDefinition.code? If an Observation has multiple codes, it could be related to more than one definition?
  • alternatively, why can it only have one code? What should you do if you have an observation that has LOINC + SNOMED CT codes + more?
  • what is the relationship between an ObservationDefinition.category and the Observation.category for a matching Observation?
  • it should be a MetadataResource (as in, it should inherit from that)
  • it should have a name (computer generatable version of the title)
  • it should follow the order of elements in MetadataResource

@Eric Haas @Hans Buitendijk @Lorraine Constable

view this post on Zulip Eric Haas (Jun 24 2020 at 15:06):

the documentation is silent on what seems like an important question to me: how do you tell if an Observation is related to an ObservationDefinition? By Observation.code = ObservationDefinition.code?

use the Observation extension: http://hl7.org/fhir/StructureDefinition/workflow-instantiatesCanonical

but I agree should be made clear in the doco

view this post on Zulip Eric Haas (Jun 24 2020 at 15:08):

what is the relationship between an ObservationDefinition.category and the Observation.category for a matching Observation?

my assumption was that the category and code should match for the Observation to be an instance of the definition.

view this post on Zulip Eric Haas (Jun 24 2020 at 15:14):

it should be a MetadataResource (as in, it should inherit from that)

it follows the a definitional pattern and are you saying all definitional resources should inherit from metadata ? That was not clear @Lloyd McKenzie ( like @Gino Canessa Topic)

view this post on Zulip Grahame Grieve (Jun 24 2020 at 20:09):

use the Observation extension

I hope that this is not the only way. I agree that this would make it explicit, but is there any expectation that there's a link by code?

view this post on Zulip Grahame Grieve (Jun 24 2020 at 20:09):

my assumption was that the category and code should match for the Observation to be an instance of the definition.

I think that makes sense but it would good to say explicitly that this is the expectation

view this post on Zulip Grahame Grieve (Jun 24 2020 at 20:10):

all definitional resources should inherit from metadata

In general, yes. But more specifically: any resource with a canonical URL must inherit from CanonicalResource

view this post on Zulip Grahame Grieve (Jun 24 2020 at 20:10):

but since ObservationDefinition has all the properties of MetadataResource, it should inherit from that too

view this post on Zulip Grahame Grieve (Jun 26 2020 at 04:21):

I don't understand the Observation.subject as a 'type' when it refers to a group?

view this post on Zulip Grahame Grieve (Jun 26 2020 at 04:50):

All the *valueSet properties should be canonical, not Reference().

view this post on Zulip Grahame Grieve (Jun 26 2020 at 04:50):

you want Jira's for all these?

view this post on Zulip Grahame Grieve (Jun 26 2020 at 05:29):

I don't understand the units bit at all:

  • what is UCUM the "customary unit"? is that the custom unit? or something different?
  • if both UCUM and SI are given, which is the 'right' one?
  • how does both SI and customary units have the same binding?

view this post on Zulip Grahame Grieve (Jun 26 2020 at 05:37):

this pseudo code... does it make sense?

def makeObservationFromDefinition
  Observation obs = make Observation;
  obs.code = def.code;
  obs.category.addAll(def.category);
  if def.bodySite
    obs.bodySite = def.bodySite;
  if def.method
    obs.method = def.method;
  if def.permittedDataType.has(quantity) and def.quantitativeDetails.unit() ||
      and def.quantitativeDetails.unit().hasSystem("http://unitsofmeasure.org"
    with obs.valueQuantity
      .system = "http://unitsofmeasure.org"
      .code = def.quantitativeDetails.unit.getCode("http://unitsofmeasure.org")
  // todo: set up reference ranges
  return obs;

view this post on Zulip François Macary (Jun 26 2020 at 08:02):

Yes, the pseudo code makes sense.
Going back to your initial question @Grahame Grieve we built ObservationDefinition with the purpose of generating Observation out of it, as this pseudo code does. However we did not capture the other way round use case : "From which ObservationDefinition was this particular Observation generated?" . I agree that it seems a valid use case if we don't want folks and programs to mess around by building hybrid Observation instances borrowing from multiple ObservationDefinition instances or adopting off-the-spot characteristics distinct from those written in the Definition.

  • Therefore I agree we should explicitly state this single parent inheritance in ObservationDefinition spec, and in particular state that all Code.coding elements from the Definition should appear in the Observation, likewise for category.
  • customaryUnit and unit: In many countries clinical labs frequently report their quantitative results expressed in two unit systems. For instance fast gluccose 7.2 mmol/L or 1.3 g/L. customaryUnit would be g/L and unit would be mmol/L. This habit has been spread out in Europe's CDA lab reports feeding national PHRs (Austria, France, Switzerland, ...) taking advantage of the PQ.translation feature of V3. In FHIR the same ptractice will end up with two component Observation instances conveying the result, one with the SI units and one with the customary. (If folks think "custom" is clearer than "customary" we coould change that). This is a case where we generate two slightly distinct Observation from a single ObservationDefinition.
  • More generally, various kinds of Observation may be generated from a single ObservationDefinition, each one picking one of the premittedDataType for its value.
  • computable name. We missed it. Should be there. ObservationDefinition silently applies the definition pattern, which does not have a computable name. We need to state this definition pattern explicitly in the resource, unless someone speaks against ObservationDefinition being related to the definition pattern.
  • canonical versus reference. This goes beyond my current knowledge. I take your word on it.
  • Metadata resource. I don't understand what this means.
    In conclusion, there are some changes to bring to ObservationDefinition. Who makes the trackers?

view this post on Zulip Eric Haas (Jun 26 2020 at 16:15):

Grahame Grieve said:

I don't understand the Observation.subject as a 'type' when it refers to a group?

That is to be able to have multiple types of subjects. I'm not sure or plumb forget why not 0..* code instead?

view this post on Zulip Eric Haas (Jun 26 2020 at 16:20):

customaryUnit and unit: In many countries clinical labs frequently report their quantitative results expressed in two unit systems. For instance fast gluccose 7.2 mmol/L or 1.3 g/L. customaryUnit would be g/L and unit would be mmol/L. This habit has been spread out in Europe's CDA lab reports feeding national PHRs (Austria, France, Switzerland, ...) taking advantage of the PQ.translation feature of V3. In FHIR the same ptractice will end up with two component Observation instances conveying the result, one with the SI units and one with the customary. (If folks think "custom" is clearer than "customary" we coould change that). This is a case where we generate two slightly distinct Observation from a single ObservationDefinition.

There is a translation extension for that we should use for that. I'll need to dig it up....

view this post on Zulip Grahame Grieve (Jun 28 2020 at 01:36):

We have a similar pattern here around units here in Australia but I don't think that it's the same. Not that I follow anyway. g/L and mmol?L are both SI and Ucum units; what makes one customary and one not? I think the definitions and the documentation needs some work here.

view this post on Zulip Grahame Grieve (Jun 28 2020 at 01:39):

I think that the extension that Eric referenced above serves the purpose fine for explicitly linking to an observation definition. I think that should be an extension. And I expect that there'll generally be situations where an observation definition collection contains multiple competing definitions for a particular observation - I'm interested in what we should say about implied relationships in this kind of case

view this post on Zulip François Macary (Jun 29 2020 at 13:20):

All units are in UCUM. And yes g/L and mmol/L are both SI. The current good practice dispensed in many medical schools for that kind of parameter is to use substance concentration rather than mass concentration. However, some old school physicians are used to mass concentration ans stick to it. So the intent of "customary unit" is to accommodate old school representation.

view this post on Zulip Grahame Grieve (Jun 29 2020 at 19:37):

so I think these need better documentation, since that's very jurisdiction specific- and also a question specific to concentrations

view this post on Zulip François Macary (Sep 25 2020 at 10:44):

@Grahame Grieve and @Eric Haas I've checked the existing unresolved tickets on ObservationDefinition, complemented some of them, and added new ones. With that, hopefully, all the concerns expressed in this chat are taken care of. And thanks for these concerns. ObservationDefinition really needs improvements.
The tickets are:
26921, 28097, 28096, 26603, 28608, 28609, 28613.

view this post on Zulip Diana_Ovelgoenne (Nov 08 2021 at 13:01):

Originally Grahame was asking for the following:
why can it only have one code? What should you do if you have an observation that has LOINC + SNOMED CT codes + more?
I still see on the R5 Draft a code 1..1
So how do we profile if there are multiple codes for the ObservationDefinition? I also didn't find a JIRA issue addressing this point.

view this post on Zulip Andrea Pitkus, PhD, MLS(ASCP)CM, CSM (Dec 23 2021 at 04:14):

Are you asking about the Observation Definition that would be used in Service/Lab Catalog or reporting on the instance results with Observation (like a culture mapped to LOINC and an organism mapped to SCT?)


Last updated: Apr 12 2022 at 19:14 UTC