Flexpa gateway is a unified FHIR API + request proxy
- Thin HTTP request proxy layer for FHIR APIs such as Patent Access APIs
- Automatically routes FHIR queries to the right baseURL directly from patient auth
- Deployable with access to OCI Container Registry Beta (use the deployed sandbox)
- Actively monitored dependency chain integrity
- Audit and compliance friendly
How it works
HTTP requests to FHIR APIs are proxied and routed through a single HTTP proxy server.
- Requests arrive with an
Authorization
header set to a JSON Web Tokens issued by Flexpa Login (see also the Health plan login guide). JWTs are verified according to a public key shared between the Gateway and SMART client confidential server implemented for Flexpa Login. - Supports FHIR requests for Resources such as
Coverage
,MedicationRequest
,ExplanationOfBenefit
and more (see API) - Deployable at edge, distributed via OCI Container Registry, versioned on Node LTS
How to use
A sandbox example is deployed at https://api.sandbox.flexpa.com/fhir/
The simplest implementation of fetching Coverage
resources by querying a FHIR API directly with a JWT from Flexpa Login. Generate an example JWT.
We can make a full example search request for Coverage
resources with the following:
- Flexpa Gateway hostname ex. https://api.sandbox.flexpa.com/fhir/
- Top-level FHIR Resource path ex.
/Coverage
- Sending an
Authorization
header ex.example-flexpa-login-jwt
- a JWT produced by Flexpa Login which abstracts an original SMART Auth exchange code response. You can generate an example with the docs.
Putting this together as a curl
request:
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
curl "$GATEWAY/Coverage" \
-H "Authorization: $JWT"
API
Coverage
GET /Coverage
- Coverage is a base FHIR Resource
- Commonly available via the C4BB Coverage Profile.
Sample curl
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
PATIENT_ID=Patient/A000123
curl "$GATEWAY/Coverage?patient=$PATIENT_ID" \
-H "Authorization: $JWT"
ExplanationOfBenefit
GET /ExplanationOfBenefit
- ExplanationOfBenefit is a base FHIR Resource ( JSON example)
- Commonly available via C4BB ExplanationOfBenefit Inpatient Institutional ( JSON example), C4BB ExplanationOfBenefit Outpatient Institutional ( JSON example), C4BB ExplanationOfBenefit Pharmacy ( JSON example), C4BB ExplanationOfBenefit Professional NonClinician ( JSON example)
Sample curl
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
PATIENT_ID=Patient/A000123
curl "$GATEWAY/ExplanationOfBenefit?patient=$PATIENT_ID" \
-H "Authorization: $JWT"
MedicationRequest
GET /MedicationRequest
- MedicationRequest is a base FHIR Resource
- Commonly available via US Core MedicationRequest Profile
Sample curl
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
PATIENT_ID=Patient/A000123
curl "$GATEWAY/MedicationRequest?patient=$PATIENT_ID" \
-H "Authorization: $JWT"
Procedure
GET /Procedure
- Procedure is a base FHIR Resource
- Commonly available via US Core Procedure Profile
Sample curl
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
PATIENT_ID=Patient/A000123
curl "$GATEWAY/Procedure?patient=$PATIENT_ID" \
-H "Authorization: $JWT"
Observation
GET /Observation
- Observation is a base FHIR Resource
- Commonly available via US Core Vital Signs Profile
Sample curl
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
PATIENT_ID=Patient/A000123
curl "$GATEWAY/Observation?patient=$PATIENT_ID" \
-H "Authorization: $JWT"
We can also request Observations(and any other resources) that conform to a specific profile
Sample curl
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
PATIENT_ID=Patient/A000123
PROFILE=http://hl7.org/fhir/us/core/StructureDefinition/us-core-vital-signs
curl "$GATEWAY/Observation?patient=$PATIENT_ID&_profile=$PROFILE" \
-H "Authorization: $JWT"
Encounter
GET /Encounter
- Encounter is a base FHIR Resource
- Commonly available via US Core Encounter Profile
Sample curl
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
PATIENT_ID=Patient/A000123
curl "$GATEWAY/Encounter?patient=$PATIENT_ID" \
-H "Authorization: $JWT"
Condition
GET /Condition
- Condition is a base FHIR Resource ( JSON example)
- Commonly available via US Core Encounter Profile ( JSON example)
Sample curl
GATEWAY=https://api.sandbox.flexpa.com/fhir/
JWT=flexpa-login-generated-jwt
PATIENT_ID=Patient/A000123
curl "$GATEWAY/Condition?patient=$PATIENT_ID" \
-H "Authorization: $JWT"