Stream: fhirpath
Topic: mapping revisions of FHIRPATH to FHIR format
Tim Harsch (Jun 10 2020 at 21:32):
Hello, I am new to this chat server and to FHIR and FHIRPATH, hopefully my noob questions are ok here. I'm curious how the different versions of FHIRPATH map to the different versions of FHIR format. For instance would FHIRPATH STU1 support R4 FHIR? would FHIRPATH N1 support FHIR DSTU2 ? thanks in advance.
Lloyd McKenzie (Jun 10 2020 at 21:38):
FHIRPath syntax is independent of the model you're using it with. (FHIRPath can be used against models that aren't FHIR at all...)
Lloyd McKenzie (Jun 10 2020 at 21:38):
However, tools that support FHIRPath may have limitations on what versions of FHIR they support.
Paul Lynch (Jun 10 2020 at 21:45):
Also, FHIR R4 defines extensions to FHIRPath, and I think those extensions are based on N1 (release 2) of FHIRPath. https://www.hl7.org/fhir/fhirpath.html says: "The FHIR Specification uses FHIRPath (release 2)...."
Paul Lynch (Jun 10 2020 at 21:46):
Lloyd McKenzie said:
However, tools that support FHIRPath may have limitations on what versions of FHIR they support.
For instance, fhirpath.js only has model information for STU3 & R4.
Grahame Grieve (Jun 10 2020 at 21:49):
you can use newer versions of FHIRPath with older versions of FHIR, but not the other way around - R4 depends on N2 of FHIRPath throughout the specification
Tim Harsch (Jun 11 2020 at 18:10):
Paul Lynch said:
Lloyd McKenzie said:
However, tools that support FHIRPath may have limitations on what versions of FHIR they support.
For instance, fhirpath.js only has model information for STU3 & R4.
What does that mean in practical terms if I'm attempting to query DSTU2 with fhirpath.js. I guess I don't understand the role of the model information? will it just make certain operations in FHIRPATH N1 (release 2) not possible? or could I get incorrect results? or path expressions rejected in some cases?
Paul Lynch (Jun 11 2020 at 18:16):
Without the model information, fhirpath.js will still mostly work, but type information will be absent, so things like the "as" operator won't work. Also, choice type support will be lacking, so you won't be able to do Observation.value, but would have to write Observation.valueString (which is the actual field name in the JSON).
Paul Lynch (Jun 11 2020 at 18:22):
FYI, if the FHIR definitions are in the same format for DSTU2 as for STU3 (which I have not checked), it would not be difficult to generate model information for DSTU2 and add that to fhirpath.js. If that is something you need, you could request it by raising the issue on fhirpath.js.
Tim Harsch (Jun 11 2020 at 19:01):
Thank you!
So, my overall objective is to take a code that is currently broken because it seems to have supported a format similar to FHIR, but perhaps not conformant, and fix/replace it to match DSTU2 (what most of our providers are going to give us). So I query for a give resource type out of a DSTU2 server (specifically from running this container https://hub.docker.com/layers/smartonfhir/hapi/r2-smart/images/sha256-080668a9cf3d02b5bb2b38e25c5d910e78d6bacdffea376d42d66154e9f705ad?context=explore ) (NOTE the JSON I shared with you for DanielJohnson was DSTU3 and I'm now working with DSTU2) . So I'm thinking if I could create a fhirpath expression that could extract all the blood pressure readings from an Observation record (for a given patient) then I could feed it to this code that charts the data via some React element <ObservationsTableValueBar value={value} unit={unit} low={low} high={high} />
So I guess the short answer is that I would potentially need the model information for DSTU2 (we will be supporting that for a long time I think). But, for the short term, maybe it's not a show stopper, because if can just get the quoted values I'd probably be OK as I likely wouldn't be doing range queries on the values using FHIRPATH. Long term we would likely use FHIRPATH expressions of varying type on DSTU2.
Last updated: Apr 12 2022 at 19:14 UTC