FHIR Location resources can have a .partOf property that points to another Location.
Let's say we have locations nested like this. Where each location is partOf the parent Location.
Let's say that an Appoinment has an actor that is a Location.
How do I query for appointments at these various levels, if I just have a Location Id.
For example: How do I query for all appointments at the hospital? Or for all appointments at the building, etc.
Also, it could be that the actor Location is an ID at any one of these levels and we don't know which, at the time of the search.
I'd like to be able to query Appointments filtered by whatever the current location hierarchy level it is, and everything below.
I know I can do /Appointment?location=LOCATION_ID and /Appointment?location.partOf=LOCATION_ID
But, is there any way to do both and everything below in the same search request?
If the server you are using supports it, you should be able to use the :below modifier on the location search:
/Appointment?location:below=LOCATION_ID
See http://hl7.org/fhir/search.html#recursive for the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With