FHIR Chat · Multi-level, hierarchical ValueSets · implementers

Stream: implementers

Topic: Multi-level, hierarchical ValueSets


view this post on Zulip Matt Zajack (Jul 18 2019 at 16:53):

How does FHIR handle multi-level hierarchy ValueSets? What is the best way to represent them for data consumers? Should it be in the data or referenced only through the ValueSet?
Specifically, I am working referencing Observation.interpretation (Abnormal flag for lab test). I want to use the recommended ValueSet https://www.hl7.org/fhir/valueset-observation-interpretation.html. This ValueSet contains multiple levels; e.g. Level 1 is A = abnormal, Level 2 is AA = critical abnormal, Level 3 is HH = critical high. If I have a test with a flag HH, how do I best represent in the Observation.interpretation that the HH is actual part of A (at level 1) and AA (at level 2)? This might be important for consumers of the data like my analytics practitioners or business users, so that they can search for anything "abnormal" (anything under Level 1 A) instead of having to specify matching A or AA or HH, etc.

I think the best way is to capture all applicable levels in the Observation.interpretation (since it allows multiple entries). That way A, AA, and HH are all present in the field. It will require me to create a crosswalk based on the ValueSet so I can capture the hierarchy from the single abnormal value provided on the lab, but that is a trivial effort since we have the complete ValueSet. What do you all think?

view this post on Zulip Eric Haas (Jul 18 2019 at 17:23):

the code system is heirarchical already?: https://www.hl7.org/fhir/v3/ObservationInterpretation/cs.html#definition

view this post on Zulip Eric Haas (Jul 18 2019 at 17:23):

so to answer your question - that is how it is done. can read the docs on value sets and code systems too

view this post on Zulip Lloyd McKenzie (Jul 18 2019 at 17:23):

Value sets reflect what codes are permitted. Code Systems reflect the hierarchy/relationships.

view this post on Zulip Matt Zajack (Jul 18 2019 at 18:39):

I understand the code system has the hierarchy defined and the value sets are permitted codes. But I am still confused on how the hierarchy is represented and consumed. Maybe this is an Analytics on FHIR question, but it affects the implementation.

Let's say I have an "HH" abnormal flag value in the source ORU that I am converting to FHIR Observation.interpretation. I also know I will have a data scientist who wants to consume the FHIR JSON to find all possible "Abnormal" flags. What is the best way to enable the data scientist to grab abnormals?

1) Should I take the code system and programmatically add all higher level codes to the Observation.interpretation, like the code below?

 "interpretation": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
          "code": "A",
          "display": "Abnormal"
        }, {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
          "code": "AA",
          "display": "Critical abnormal"
        }, {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
          "code": "HH",
          "display": "Critical high"
        }
      ]
    }

2) Or do I only enter the "HH" code and tell the data scientist to look at the code system to create his/her own code to pull all "abnormal" values?

Method 1 seems like the easiest for my data scientist who consumes FHIR, but Method 2 seems more conformant to FHIR best practices. Is 1) a bad idea from a FHIR conformance perspective?

view this post on Zulip Lloyd McKenzie (Jul 18 2019 at 19:29):

When you do a search, you can use the :below qualifier to do subsumption based matching (on servers that support that). So a search for Observation?interpretation:below=A would return those with H or HH as well. Note that 'interpretation isn't currently a standard search criteria. (@Eric Haas That seems like a significant omission to me - wouldn't searching for high/low/improved/sensitive/etc. be a pretty common use-case?)

view this post on Zulip Matt Zajack (Jul 18 2019 at 21:11):

@Lloyd McKenzie That is exactly what I was looking for! The FHIR server would do the work to read the Code System and provide the lower values. Just brilliant. However, we do not have a FHIR server in our implementation, so it makes it have much more leg work. But, this is another business case to bring in the FHIR server sooner. Thank you!
Just to recap: Use Method 2, only record the value from the message. Specifying the correct code system will allow the FHIR server to do the work to find the correct hierarchy when searched using the modifier :below (in this case).
And... I cannot comment on how often Observation.interpretation is used, but it would sure be nice if it were part of the standard search criteria.

view this post on Zulip Matt Zajack (Jul 18 2019 at 21:12):

BTW- subsumption is my new word of the day.

view this post on Zulip Rob Hausam (Jul 19 2019 at 12:29):

I agree that it makes sense for 'interpretation' to be a standard search parameter. It seems that it would be very useful to be able to search for all of the "abnormal" results for a test, etc.

view this post on Zulip Michael Lawley (Jul 19 2019 at 22:07):

@Matt Zajack for more complex retrieval cases you could use the :in modifier. So a search for Observation?interpretation:in=http://acme.org/vs/unusual-interpretations would match those that had a code in the expansion of the ValueSet with the URI http://acme.org/vs/unusual-interpretations

view this post on Zulip Michael Lawley (Jul 19 2019 at 22:08):

When defining such a ValueSet you can filter / select based on the hierarchy and other properties of the codes.


Last updated: Apr 12 2022 at 19:14 UTC