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.
- Go to Setup and click Data Cloud Setup.
- Click on Ingestion API, and then click New.
- Name the Ingestion API
EMRClinical
, and click SAVE. - Upload the schema and save it.
- Click on the App launcher and select Data Cloud.
- Click Data Streams and click NEW.
- Select the Ingestion API box and click on Next.
- 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.
- Select each object and choose category appropriately.
- After all the objects and their fields have been selected, click Next.
- On the next page, verify the details like the Data stream name and object, and then click Deploy.
- Follow this link for setting up a connected app.
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 algoritm for JWT Authentication. Default value: RS384. Supported Algorithms: RS256, RS384, RS512 |
- Select
Generic FHIR Client
tab and select Authorization protocol as appropriate. - Below is an example for JWT Authorization Protocol with Cerner sandbox for 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}
- Method: DELETE
- The main app requires minimum of 0.2 vCores and additional 0.1 vCore for Generic FHIR Client app.