How to query location resource hierarchy? #3941
-
Hi all, I am using version 4 of the FHIR standards and as an example I have a location hierarchy of referenced resources. Given the example below - Location 1 - 006b7615-7f41-47af-af1d-c4299924f224 is a hospital These are connected through the Is it possible to query using the ID of the hospital I have experimented with the following and seem to only get one layer of references and I cant go beyond one level.
I have seen the following warning and came across #2137.
Any advise please? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
My colleague managed to figure out what we needed - for anyone else having a similar issue Starting at the top of the tree (Location 1 from my example)
This returns the hospital and Location B and Location C. Starting at the bottom of the tree (Location 3 from my example)
This returns the room and Location B and Location C. |
Beta Was this translation helpful? Give feedback.
-
Could we extend the Azure FHIR documentations to provide this example on how to use the |
Beta Was this translation helpful? Give feedback.
My colleague managed to figure out what we needed - for anyone else having a similar issue
Starting at the top of the tree (Location 1 from my example)
https://{host}/Location?_revinclude=Location:partof&_revinclude:iterate=Location:partof&_id=006b7615-7f41-47af-af1d-c4299924f224
This returns the hospital and Location B and Location C.
Starting at the bottom of the tree (Location 3 from my example)
https://{host}/Location?_include=Location:partof&_include:iterate=Location:partof&_id=07238beb-e53d-4225-9320-9f8b6668864f
This returns the room and Location B and Location C.