Intro to FHIR
#What is FHIR?
FHIR, or Fast Healthcare Interoperability Resources, is a standard for exchanging healthcare information electronically.
FHIR defines a set of resources that represent different aspects of healthcare information, such as patients, medications, and clinical observations.
Each resource is defined using a set of standardized data elements, or "fields", that describe the information being represented.
Flexpa API offers access to healthcare data using the FHIR standard in JSON format.
#How to pull patient data
This guide will walk through the steps required to pull all data on a patient that a payer has made available.
We recommend starting here to gain a sense of the availability and formatting of patient FHIR data.
#Prerequisites
Ensure you have completed the quickstart and obtained a patient access token.
All interactions with the FHIR API require authentication.
#1. Read Patient resource
To begin, make a GET request to the Patient resource.
This request will pull basic data on a patient and will typically include a name, phone, email, member ID, address etc.
#Example request to Patient
ACCESS_TOKEN=flexpa-link-access-token
curl "https://api.flexpa.com/fhir/Patient/$PATIENT_ID" \
-H "Authorization: Bearer $ACCESS_TOKEN"
View a sample response.
#2. Patient $everything
The example request in Step 1 may have returned the referenced resource that you need.
However, you likely will want information beyond just core demographics, such as claims or clinical data.
FHIR defines a useful Patient $everything operation that can enhance our requests by retrieving all of the resources that belong to a patient:
ACCESS_TOKEN=flexpa-link-access-token
curl "https://api.flexpa.com/fhir/Patient/$PATIENT_ID/$everything" \
-H "Authorization: Bearer $ACCESS_TOKEN"
#3. Search other resources
Steps 1 and 2 targeted the Patient resource.
To pull as much data as possible on a patient, we can search for the resources that Patient $everything does not return:
#Example requests to other resources
ACCESS_TOKEN=flexpa-link-access-token
curl "https://api.flexpa.com/fhir/Device" \
-H "Authorization: Bearer $ACCESS_TOKEN"
curl "https://api.flexpa.com/fhir/Location" \
-H "Authorization: Bearer $ACCESS_TOKEN"
curl "https://api.flexpa.com/fhir/Medication" \
-H "Authorization: Bearer $ACCESS_TOKEN"
curl "https://api.flexpa.com/fhir/Organization" \
-H "Authorization: Bearer $ACCESS_TOKEN"
curl "https://api.flexpa.com/fhir/Practitioner" \
-H "Authorization: Bearer $ACCESS_TOKEN"
curl "https://api.flexpa.com/fhir/PractitionerRole" \
-H "Authorization: Bearer $ACCESS_TOKEN"
#Read vs. Search
In the guide above, we demonstrated examples of both Read and Search operations.
#Read
Reading a resource in FHIR refers to retrieving the details of a single resource instance.
For example, you might want to read the details of a patient, medication, or a specific clinical observation.
Reading requires knowledge of the resource ID ahead of time.
See more about reading resources.
#Search
Searching in FHIR allows you to find and retrieve multiple resources based on specific search criteria or filters.
This operation is handy when you want to locate resources that match certain conditions or attributes, such as finding all patients with a specific condition, retrieving all medications prescribed by a particular practitioner, or searching for observations within a specific date range.
Searching does NOT require knowledge of any resource IDs ahead of time.
All of Flexpa's supported FHIR resources are searchable.
See more about searching resources.
#Resources List
The following table lists all the FHIR resources supported by Flexpa.