FHIR Chat · Search appointments by attending practitioner · hapi

Stream: hapi

Topic: Search appointments by attending practitioner


view this post on Zulip Pengyu Wang (Aug 11 2021 at 21:56):

I'd like to search by the attending practitioner on the following Appointment resource:

{
  "resourceType": "Appointment",
  "status": "checked-in",
  "participant": [
    {
      "type": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
              "code": "ATND"
            }
          ]
        }
      ],
      "actor": {
        "reference": "Practitioner/15",
        "type": "Practitioner"
      },
      "required": "required",
      "status": "accepted"
    },
    {
      "type": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
              "code": "REF"
            }
          ]
        }
      ],
      "actor": {
        "reference": "Practitioner/16",
        "type": "Practitioner"
      },
      "required": "required",
      "status": "accepted"
    }
  ]
}

How should I construct my search query so that when I search by Practitioner/15(the attending practitioner) I get the above appointment but when I search by Practitioner/16(the referring practitioner) it returns nothing?

Does FHIR already support search like this? I've tried the :of-type modifier but it didn't work:

/Appointment?practitioner:of-type=http://terminology.hl7.org/CodeSystem/v3-ParticipationType|ATND|15

What's my best approach here?


Last updated: Apr 12 2022 at 19:14 UTC