Bulk Clinical Data Ingestion from EMR into Data Cloud
Setup
Prerequisites
Sign up for an EMR Account and create a client application in the EMR system.
Set up Data Cloud:
- Log in to your Salesforce Data Cloud instance.
- Install the MuleSoft Direct for Health Data Kit
- Go to Setup and click Data Cloud Setup.
- Click Ingestion API, and then click New.
- Name Ingestion API
EMRClinical
, and click SAVE. - Click on the App launcher and select Data Cloud.
- Click Data Streams and click NEW.
Select Installed Data Kits and Packages.
Select the Ingestion API name from the dropdown (this is the source API name you created in the previous steps), and then select the object names and click Next.
- On the next page, verify the details like the Data stream name and object, and then click Deploy.
- The data streams and the associated mappings to the Data Model Objects are created.
To set up a connected app:
Enable the Username-Password Flow in Setup > OAuth and OpenID Connect Settings > Allow OAuth Username-Password Flows > Enable.
Note: OAuth 2.0 JWT is not supported.
Setup
- Set up Bulk Clinical Data application on MuleSoft:
- Log in to Salesforce and navigate to the Setup page.
- Search for the ‘Integrations Setup’ page, and select the Bulk Data Ingestion from EMR into Data Cloud application, and then click Enable.
- Enter the application display name, target business group, environment for deployment, Update Deployment Target and then click Next.
- Select
Bulk Data Ingestion from EMR into Data Cloud
tab and enter the following details to configure the application properties.
Key name | Sample value | Description | |
---|---|---|---|
1 | Base path for kick-off endpoint | Cerner: /Group/ Epic: /api/FHIR/R4/Group/ | Base path for kick-off endpoint. |
2 | Client ID for DataCloud instance | - | Client ID for DataCloud instance. |
3 | Client secret for DataCloud instance | - | Client secret for DataCloud instance. |
4 | Username for DataCloud instance | - | Username for DataCloud instance. |
5 | Password for DataCloud instance | - | Password for DataCloud instance. |
6 | DataCloud instance Url | https://test-instance.salesforce.com | DataCloud instance URL. |
7 | DataCloud source API name | EMRClinical | Source API Name for DataCloud Objects. |
- To add optional configuration, Click Add Additional parameters and enter the required details. Refer below table for configuration details.
SNo | Application property name(Key name) | Sample value | Description |
---|---|---|---|
1 | emr.scope | - | Scopes to access resources in EMR Default value: system/Patient.read system/Condition.read system/Encounter.read system/Procedure.read system/MedicationRequest.read |
2 | emr.algorithm | RS384 | Preferred algorithm for JWT Authentication. Default value: RS384. Supported Algorithms: RS256, RS384, RS512 |
Select the Generic FHIR Client tab and then select the appropriate Authorization protocol.
This is an example for JWT Authorization Protocol with Cerner sandbox for a generic FHIR client application:
Key name | Sample value | Description | |
---|---|---|---|
1 | Base URL | https://fhir-ehr-code.cerner.com/r4/123abc-5678-9123 | Base URL of the end system. |
2 | Token URL | https://authorization.cerner.com/tenants/123abc-5678-9123/protocols/oauth2/profiles/smart-v1/token | Token URL of the end system. |
3 | Client ID | - | Client ID for the end system. |
4 | Private Key | - | Upload the private key file |
5 | File Password | - | Private Key file password |
- To add optional configuration ,Click Add Additional parameters and enter the required details. Refer below table for configuration details.
SNo | Application property name(Key name) | Sample value | Description |
---|---|---|---|
1 | lob.JWT.exp | 5 | Expiration time for JWT (In Minutes) Default: 5 |
2 | lob.JWT.kid | - | Key Identifier for JWT |
- Click Proceed to deploy the application.
Post Deployment
- MuleSoft endpoints can be triggered as mentioned in the API documentation.
Troubleshooting:
In case the application crashes and Bulk jobs are stuck in the “InProgress” state, the job can be aborted using the Abort functionality.
URL: https://{hostname}/{basePath}/job/{jobID}
- Note: The base path for the URL is:
/data-ingestion-api/v1/
- Note: The base path for the URL is:
Method: DELETE
- The main app requires minimum of 0.2 vCores and additional 0.1 vCore for Generic FHIR Client app.