This repository is a companion to Flexpa's Quickstart guide which provides a detailed explanation of how this code example works.
This quickstart showcases how to obtain a patient's claims history from a health plan using Flexpa's consent flow and coverage network.
The quickstart assumes you have Node.js and npm already installed. The project is built on Next.js.
Your Flexpa API keys can be found in our Developer Portal. Please contact support@flexpa.com if you need keys.
First, clone the quickstart repository.
git clone https://github.com/flexpa/quickstart.git
Copy the .env.example
file to .env
and add your API keys.
cp .env.example .env
You must generate a random value for SESSION_SECRET
in .env
. One way is to use the following command:
openssl rand -base64 32
To run the project:
# Install dependencies
npm install
# Run the development server
npm run dev
The application will be available at http://localhost:3000.
To test the quickstart app:
- Open http://localhost:3000 in your browser
- Click the "Connect your health plan with Flexpa Link" to open the Flexpa Link modal
- Select any health plan payer from the list
- When directed to the provider's site, authenticate using a test mode login
- When Flexpa Link indicates success, click "Continue"
Upon successful authentication, the application will automatically exchange the public token for an access token and perform a FHIR request to demonstrate the connection.