EMR Integration in Real Time Using Generic FHIR Client
Setup
Pre-requisites
Customers must understand the FHIR servers' connection policies. They must connect to and get the appropriate credentials for connection. Almost all FHIR servers support OAuth 2.0-based connectivity.
Setup
- Log in to Salesforce and navigate to the Setup page.
- Search for the ‘Integrations Setup’ page.
- Select the Generic FHIR Client application and click Enable.
- Enter the application display name, target business group, environment for deployment, and Update Deployment Target, then click Next.
- Select the appropriate Authorization protocol with the external FHIR server.
- Enter the required parameters as per the authorization protocol chosen.
- If adding additional parameters as required by the FHIR server, for example, scope, click Add Additional parameters and enter the following details to configure the application properties:
- Application property name(Key name) : for example,
scope
- Sample value : for example,
system/Observation.read system/Patient.read
- Description : for example,
Scopes required to send to an external FHIR server
- Application property name(Key name) : for example,
Serial Number | Application property name(Key name) | Sample value | Description |
---|---|---|---|
1 | scope | system/Patient.read system/Condition.read | Scopes to access resources in the FHIR server |
2 | lob.JWT.algorithm | RS256 | Preferred algorithm for JWT Authentication. Default value: RS256. Supported Algorithms: RS256, RS384, RS512 |
3 | lob.JWT.exp | 5 | Expiration time for JWT (In Minutes) Default: 5 |
4 | lob.JWT.kid | - | Key Identifier for JWT |
- Click Proceed to deploy the application.
Post-Deployment
You can deploy multiple instances of the application , each one connecting to a different FHIR server.
However, if you want to deploy just one instance of the integration and decide at run time which FHIR server to route to, you can pass the FHIR server credentials in the header parameters.
The credentials passed in the header parameters precede the authorization protocol chosen during setup.
Refer to the API Spec for more details.
To edit the app locally:
1. Download the JAR from Exchange.
2. Import the JAR into Anypoint Studio.
3. Extract the generic FHIR client JAR.
4. Look for the authorization library JAR within "repository" > "org" > "mule" > "examples"
.
5. Import the authorization library as a dependent plugin.
6. Use the Postman collection from the src.test.resources
folder to test the application.