I’m using fhir’s search and i want to seach for a appointment with some enconter’s attributes. We decided to use a reverse chaining and i dont know if we are doing the seach correctly, for example:
Appoitments with encounter finished
Appoitments with encounter finished and any type code
We are in the right way or have we done something wrong?
Still talking about reverse chaining, how to search the appoitments with encounter’s type especifying code and system together? Should it be something like this
There shouldn’t be a ‘/’ before the ‘?’. Also, why are you saying status:text? status is a code, so it’ll never have a display name or text to match against. What you should have is:
i.e. Find Encounters whose ‘appointment’ search criteria matches on this appointment and that have a status of finished.
Your second example would be:
Keep in mind though that there’s no requirement that the Encounters that satisfy each of those ‘has’ clauses be the same. So long as you presume that only one Encounter can point to a given appointment you’re fine, but if it’s possible there could be more than one, you’ll get a match if one is finished and the other has a matching type.