Stream: fhirpath
Topic: resolve extension organization.name
Tushar Nair (Aug 13 2021 at 18:14):
Hello,
we have a bundle containing the PractitionerRole resource which also includes the extension for the network organization as a reference and also includes the actual Network Organization resource in it. I am trying to write a fhirpath which returns the network Organization name drilling down from the PractitionerRole resource. When I tried the FHIRPath PractitionerRole.extension.where(url='http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-ParticipatingNetwork-extension'), it returns a set of extension references within PractitnioerRole like this:
{
"resourceType": "Parameters",
"parameter": [ {
"name": "expression",
"valueString": "PractitionerRole.extension.where(url='http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-ParticipatingNetwork-extension')"
}, {
"name": "result",
"valueExtension": {
"url": "http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-ParticipatingNetwork-extension",
"valueReference": {
"reference": "Organization/7029"
}
}
}
But I want to actually resolve a step further where it returns the name of the Organization/7029. I tried various other FhirPath and most probably they were incorrect in terms of the syntax.
e.g. PractitionerRole.extension.where(url='http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-ParticipatingNetwork-extension').name
PractitionerRole.extension.where(url='http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-ParticipatingNetwork-extension').valueReference.resolve()
But these didn't work. Can anybody please shed light on this? In anutshell, is it allowed for an extension which is a reference be resolved using FHIRPath?
Thank you ! @Lloyd McKenzie @Ewout Kramer
Lloyd McKenzie (Aug 14 2021 at 02:58):
I presume you mean the PractitionerRole includes the Organization as at a contained resource. If so, try this:
PractitionerRole.extension('http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-ParticipatingNetwork-extension').value.resolve().name
Tushar Nair (Aug 16 2021 at 00:49):
@Lloyd McKenzie many thanks!
Last updated: Apr 12 2022 at 19:14 UTC