I am investigating using FHIR / HL7 to build a home care software product. While the spec is very well documented, most of the examples and tutorials only cater for simple CRUD operations on a single resource.
Our model, though relatively simple (in SQL) does rely on nested Location resources and Patient -> Location -> Device joins.
I am using Location.partOf to handle references to the parent Location, e.g.
I need to fetch all of the child locations for a resource (zones within rooms within a house). Does anyone know what the query should be, or what my error is with the reference above please?
I have tried several variations of:
GET /Location?partof=9829df72-6a7a-444b-ba57-79cd0a33f32f, along with :contains, :below, etc.
Are there any more advanced tutorials around? It may be that I need to design a GraphDefinition in order to follow child links?
Have you looked into FHIR Search Chaining? https://www.hl7.org/fhir/search.html#chaining
Ex: GET Patient?general-practitioner.name=Joe&general-practitioner.address-state=MN
Here it seems to imply that the specification would allow a SQL Join between Patient and Genera-Practitioner. However, it is not clear what if you also have an extensible attribute that share the same name as the FHIR resource.