Flexpa
Developer PortalFeedbackContact usOnboard

Guides

  • Home
  • Quickstart
  • Financial Data

Network

  • Network guide
  • Directory
  • Updates

Consent

  • Link SDK
  • Patient access

Records

  • FHIR API
  • Node SDK
  • FHIR Introduction
    • What is FHIR?
    • How to pull patient data
    • Read vs. Search
    • Resources List
  • Usage
  • Terminology

Misc

  • Changelog
  • Support
  • Flexpa OS
  • We're hiring

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:

  • Device
  • Location
  • Medication
  • Organization
  • Practitioner
  • PractitionerRole

#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.

NameDescriptionJSON example
AllergyIntoleranceRisk of adverse response unique to individual from substance exposure. JSON example
BundleA Bundle is a container for a collection of resources. JSON example
CarePlanA care plan outlines how one or more healthcare providers plan to treat an individual, a group, or a community for a set period, potentially for a specific ailment or set of ailments. JSON example
CareTeamThe Care Team consists of individuals and organizations involved in coordinating and providing care for a patient. JSON example
ConditionA clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern. JSON example
CoverageFinancial instrument which may be used to reimburse or pay for health care products and services. JSON example
DeviceA type of a manufactured item that is used in the provision of healthcare. JSON example
DiagnosticReportDiagnostic reports contain the results and interpretation of tests performed on patients, groups, devices, or specimens. They provide clinical context, including requesting and provider information. JSON example
DocumentReferenceA reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. JSON example
EncounterAn interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. JSON example
ExplanationOfBenefitClaim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. JSON example
GoalDescribes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, meeting a process improvement objective, etc. JSON example
ImmunizationDescribes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party. JSON example
LocationDetails and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated. JSON example
MedicationThis resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use. JSON example
MedicationDispenseIndicates that a medication product is to be or has been dispensed for a named person/patient. JSON example
MedicationRequestAn order or request for both supply of the medication and the instructions for administration of the medication to a patient. JSON example
ObservationMeasurements and simple assertions made about a patient, device or other subject. JSON example
OperationOutcomeAn OperationOutcome resource contains information about the success, failure, or processing issues of an action that occurred in the system. JSON example
OrganizationIncludes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc. JSON example
PatientDemographics and other administrative information about an individual receiving care or other health-related services. JSON example
PractitionerA person who is directly or indirectly involved in the provisioning of healthcare. JSON example
PractitionerRoleA specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. JSON example
ProcedureAn action that is or was performed on or for a patient. JSON example
ProvenanceProvenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. JSON example
Status TwitterGitHub

© 2025 Flexpa. All rights reserved.

On this page
  • What is FHIR?
  • How to pull patient data
  • Prerequisites
  • 1. Read Patient resource
  • Example request to Patient
  • 2. Patient $everything
  • 3. Search other resources
  • Example requests to other resources
  • Read vs. Search
  • Read
  • Search
  • Resources List