FHIR Adaptor
About FHIR
FHIR stands for Fast Healthcare Interoperability Resources. It is a standard for representing and exchanging healthcare data electronically.
This adaptor is very basic and generic, used mostly to integrate demo FHIR servers. It's a work-in-progress, so share questions and feedback on community.openfn.org.
FHIR version-specific adaptors (e.g., fhir-r4
) with enhanced functionality are coming soon to fast-track integration setup with more helper functions, templates, and docs than this simple adaptor. See the Adaptors Wiki for how to build an adaptor specific to your FHIR Implementation Guide.
Integration Options
1. Rest API: The FHIR specification includes a REST API that enables external services like OpenFn to pull data from the FHIR server, or push data from external apps to FHIR servers. This option is suited for scheduled, bulk syncs or workflows that must update data with external information. See functions for more on how to use this adaptor to work with the API.
2. Webhook: The FHIR specification does not inherently define a webhook or data-forwarding mechanism. However, many FHIR implementations and platforms offer extensions or configurations that support similar functionality. This option is suited for real-time, event-based data integration. Check out the FHIR Subscription
resource documentation to learn more about one way this might be implemented.
Authentication
The FHIR standard does not directly prescribe authentication and authorization methods. Instead, it provides security guidelines and leaves the choice of implementation to the developers of FHIR servers and clients. See the FHIR docs for the latest security-related recommendations. Depending on the FHIR systems being integrated via OpenFn, you might employ a Basic Auth, API key, or OAuth authentication scheme.
See this adaptor's Configuration docs for more on the required authentication parameters.
See platform docs on managing credentials for how to configure a credential in OpenFn. If working locally or if using a Raw JSON credential type, then your configuration will look something like this to define your target endpoint and FHIR version:
{
"baseUrl": "https://hapi.fhir.org", //fhir endpoint
"apiPath": "baseR4" //fhir version
}
Helpful Links
- API documentation
- Digital Square on FHIR
- Basic guide to interacting with FHIR Server
- Creating your first FHIR resource
- Google's Open Health Stack tooling for working with FHIR
Have resources or links to share? Submit a PR to edit this page or post on community.openfn.org.