As a developer integrating with Epic FHIR's API to access scheduled appointments, ensuring secure authentication through OAuth 2.0 is paramount. Scheduled appointments denote critical patient interactions within the healthcare ecosystem, necessitating precise retrieval mechanisms. Having successfully acquired client credentials and authenticated via OAuth 2.0 in the Epic FHIR sandbox environment, the current endeavor is to fetch appointment lists pertaining to specific physical locations such as hospitals or clinics while also obtaining comprehensive participant details, including doctors, clinicians, and patients.
How can I enhance the request payload or introduce additional parameters to retrieve the scheduled appointment list for a specified physical location, such as a hospital or clinic, while also capturing detailed participant information such as doctors, clinicians, and patients, utilizing the Epic FHIR API?
The developed application effectively procures client credentials and conducts OAuth 2.0 authentication via the Epic FHIR API endpoint (https://fhir.epic.com/interconnect-fhir-oauth/oauth2/token). Despite possessing a valid access token, challenges persist in acquiring appointment lists tailored to particular physical locations, such as hospitals or clinics. Additionally, there's a need to incorporate participant details like doctors, clinicians, and patients within the retrieved appointment data.
Request Payload Example:
{
"resourceType": "Parameters",
"parameter": [
{
"name": "patient",
"resource": {
"resourceType": "Patient",
"active": true,
"communication": [
{
"language": {
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/languages",
"code": "en",
"display": "English"
}
],
"text": "English"
},
"preferred": "true"
}
]
}
},
{
"name": "startTime",
"valueDateTime": "2024-01-01T00:00:00Z"
},
{
"name": "endTime",
"valueDateTime": "2024-09-01T23:59:59Z"
},
{
"name": "serviceType",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:1.2.840.114350.1.13.0.1.7.3.808267.11",
"code": "95014",
"display": "Office Visit"
}
]
}
},
{
"name": "indications"
},
{
"name": "location-reference",
"valueReference": {
"reference": "https://apporchard.epic.com/interconnect-aocurprd-oauth/api/FHIR/STU3/Location/e4W4rmGe9QzuGm2Dy4NBqVc0KDe6yGld6HW95UuN-Qd03"
}
}
]
}
Insights or recommendations on incorporating location-specific filters or parameters within the request payload would be highly beneficial. Furthermore, guidance on leveraging Epic FHIR API functionalities to accurately target appointment lists associated with participant details and particular hospital or clinic locations would be greatly appreciated.
The function of and supported inputs for Epic's FHIR API for searching for available appointment slots (Appointment.$find) is highly dependent on the configuration within the Epic system you are connecting to. The exact way to filter your initial request is going to depend on that configuration. Your best approach would be to work with a health system to understand their configuration and available options.
In the Epic on FHIR sandbox, you can use the
location-referenceandserviceTypeelements in the request payload, as you have shown in your sample. Details about the specific schedule, slot, practitioner, etc. are available through the respective Read APIs (e.g., Schedule.Read, Slot.Read, Practitioner.Read) and the FHIR IDs for those resources will be in the response to the Appointment.$find operation.