Stream: implementers
Topic: FHIRPath id or extension reference expression
Sean McIlvenna (Jan 10 2022 at 19:35):
Anyone know how to construct FHIRPath that returns either
extension[url = "some-extension-url"].valueReference.reference
or
id
if the extension is not found?
Sean McIlvenna (Jan 10 2022 at 19:36):
in XPath it might be something like:
fhir:extension[@url = 'some-extension-url']/fhir:valueReference/fhir:reference/@value | fhir:id/@value
Sean McIlvenna (Jan 10 2022 at 19:44):
actually, this is more like it:
if (fhir:extension[@url = '...']) then fhir:extension[@url = '...']/fhir:valueReference/fhir:reference/@value else fhir:id/@value
Brian Postlethwaite (Jan 10 2022 at 20:52):
Sean McIlvenna (Jan 10 2022 at 21:24):
@Brian Postlethwaite this is great. this will get me most of the way there.
Can you tell me, how did you efficiently test this FHIRPath? With XPath, I would open up OxygenXML and pull up the XPath Builder... but, not sure of a good/efficient way to test FHIRPath like this against a HAPI server\
Brian Postlethwaite (Jan 10 2022 at 21:27):
HAPI also has a similar operation too.
James pointed that out in a topic only in the last few days...
http://hapi.fhir.org/baseR4/Observation/1574881?_fhirpath=Observation.component.where(code.coding.code%20=%20%278462-4%27).value
Brian Postlethwaite (Jan 10 2022 at 21:27):
And I also use my fhirpath tester tool which is in the windows app store.
Sean McIlvenna (Jan 11 2022 at 15:00):
Between the HAPI _fhirpath
, the FHIRPath Tester tool, and your example @Brian Postlethwaite... I got what I needed. Thanks so much!
Last updated: Apr 12 2022 at 19:14 UTC