Quickstart
Start collecting medical records in under 5 minutes
Introduction
Let’s get you started with Fasten Connect!
This guide will walk you through the process of setting up your Fasten Connect account, configuring your API credentials, and requesting a patient’s medical records. You’ll need API keys, which you can receive by signing up in the Developer Portal.
Fasten Connect API Modes
The Fasten Connect API has two modes: test
and live
. Test mode is used for development and testing, while live mode is used for production.
Test mode secret keys have the prefix private_test_
and live mode secret keys have the prefix private_live_
.
API Key Prefix | Description |
---|---|
public_test_ | Test mode client-side key that uniquely identifies your app |
private_test_ | Test mode server-side key allows you to make authenticated requests. Must be kept secret |
Create API Credentials
- Sign up for a Fasten Connect account in the Developer Portal.
- Click the Developer tab and then the
Create Credentials
button. You must provide aRedirect URL
, which is the URL that Fasten Connect will redirect the user to after they have successfully linked their account. - Make note of the public id and private key generated for you.
The private key is only shown once, so make sure to save it in a secure location.
Webhook Configuration
- In the Developer Portal, click the
Create Webhook
button. You must provide aWebhook URL
, which is the URL that Fasten Connect will send events to. If you do not have a public URL to use, you can use a service like smee.io or requestbin.com to create a temporary public URL for testing.
Fasten Stitch configuration
Fasten Stitch is the client-side component that your users will interact with in order to link their accounts to Fasten Connect and allow you to access their accounts via the Fasten Connect API.
To get started, you’ll need to add the Fasten Stitch component to your website. You can do this by adding the following
code snippet to your website’s HTML. Replace public_test_123456324234234
with your own public key, which you can find
in the Developer Portal.
The fasten-stitch
HTML element will render a button that your users can click to link their accounts to Fasten Connect.
Initial Connection
When the user clicks the button, they will be shown a search box and being the process to authenticate and authorize your app to access their data.
Redirect to Patient Portal
After selecting health system, you will be redirected to a patient portal where you can login with patient credentials (username + password).
Test Patient Credentials
In test
mode, you can use the following credentials to test the Fasten Stitch component:
Once the user has successfully linked their account, your user will be redirected to your application and you will receive a org_connection_id
identifier that
you can use to make requests to the Fasten Connect API.
Parse Querystring Parameters
In your backend code extract and process the org_connection_id
query string parameter in the URL.
Requesting Patient Bulk Export
Fasten Connect allows you to request a bulk export of a patient’s medical records. To do this, you’ll need to make a POST
request to the /bridge/fhir/ehi-export
endpoint with the org_connection_id
of the patient whose records you want to export.
This process is asynchronous, so you can wait for the webhook event to be sent to your webhook URL, or you can poll the
/bridge/fhir/ehi-export/{org_connection_id}
endpoint to check the status of the export.
Request to the /bridge/fhir/ehi-export
endpoint must be authenticated with your private key. Here’s an example using curl
:
Async Webhook Event
When the export is complete, Fasten Connect will POST
a webhook event to the URL you provided when creating the webhook.
The event will contain the task_id
and the download_link
of the export that was completed.
The export is only stored for 24h, so make sure to download the export as soon as you receive the webhook event.
Downloading the Export
Once you recieve the webhook event, you can use the download_link
to download the export. The export will be a JSONL file
containing the patient’s medical records in FHIR format.
This method requires authentication with your private key. Make sure to keep your private key secure and do not expose it in your client-side code.
The download link will redirect to a signed URL that is only valid for a short period of time (10 minutes). You can request a new signed URL by making another authenticated request to the download endpoint.
View Patient EHI Export Example
Click here to download an example EHI Export file in JSONL format.
It was previously generated via the Fasten Connect API and contains medical records from the Epic Sandbox in FHIR format.