Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FHIR Appointment search filtered by location and all its partOf locations

Tags:

hl7-fhir

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.

  • hospital
    • building
      • clinic
        • exam room

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?

like image 508
Henrik Joreteg Avatar asked Oct 21 '25 04:10

Henrik Joreteg


1 Answers

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.

like image 106
Mirjam Baltus Avatar answered Oct 27 '25 05:10

Mirjam Baltus