EMR Workflow Integration Using Clinical Decision Supports Hooks
Setup
Prerequisites:
- Sign up for an EMR Account and create a client application in the EMR system.
- Set up Salesforce:
- Setup the CDS services in Salesforce core.
- Create a user with required permissions.
Steps:
Set up the CDS application on MuleSoft:
- Log in to Salesforce and navigate to the setup page.
- Search for the ‘Mulesoft Direct’ page.
- Select the CDS Hooks API application and click Enable.
- Enter the application display name, target business group, and environment for deployment, and click Next.
- Click CDS Hooks API to add the properties.
| Key name | Sample value | Description | |
|---|---|---|---|
| 1 | sf.instanceURL | login.salesforce.com | Salesforce instance URL |
| 2 | sf.username | - | Username for connecting to Salesforce instance |
| 3 | sf.password | - | Password for connecting to Salesforce instance |
| 4 | sf.IPBasepath | - | Salesforce base path for Integration Procedure Default: /services/apexrest/omnistudio/v1/integrationprocedure |
- Select the
Generic FHIR Clienttab and select the Authorization protocol as appropriate. - Here’s an example of 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 an optional configuration, click the Add Additional parameters and enter the required details. For configuration details, refer to the following table:
| SNo | Application property name(Key name) | Sample value | Description |
|---|---|---|---|
| 1 | lob.JWT.algorithm | RS256 | Preferred algorithm for JWT Authentication. Default value: RS256. Supported Algorithms: RS256, RS384, RS512 |
| 2 | lob.JWT.exp | 5 | Expiration time for JWT (In Minutes) Default: 5 |
| 3 | 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.
Notes:
- The base path for all the endpoints is:
/api/v1/. For example, the URL for the/cds-servicesendpoint is https://{hostname}/{basePath}/cds-services where the base path is ``/api/v1/```. This application connects to the FHIR System Integration in Real Time Using Generic FHIR Client (GFC) and checks the GFC's TLS certificate by default. If your GFC uses its bundled self-signed certificate, the connection fails.
For non-production environments only, you can allow the connection by adding
genericapi.tls.insecure=trueto Additional Properties. This setting turns off certificate validation. Don't use it in production.For production, install a certificate signed by a trusted certificate authority (CA) on the GFC.
Security notice: Configure TLS and the keystore for production
This application includes a sample Java KeyStore (cds-hooks-api-impl-keystore.jks) to help you deploy quickly and test locally. Don't use this keystore in production.
You're responsible for provisioning your production keys. Before you send production traffic to the application, replace the sample keystore with your organization's own private key and certificate.
Follow the steps for your deployment model.
If you deploy to CloudHub 2.0 Private Spaces.
You can manage your certificates at the platform level, without changing the application.
1. In Anypoint Platform, go to Runtime Manager > Private Spaces.
2. Select your private space, and then click Domains & TLS tab.
3. In the TLS context configuration, upload your organization's PEM or JKS file.
4. Enter the passwords and aliases that your organization's certificate requires.
For more information, see CloudHub 2.0 Private Space TLS Documentation.
If you deploy to CloudHub 1.0, Runtime Fabric, or a standalone runtime.
Before you deploy, add your own keystore to the application artifact.
1. Generate a new, organization-specific JKS using your own PKI or the Java keytool.
2. Open the application artifact (or import it into Anypoint Studio), and go to src/main/resources/tls/.
3. Delete the default cds-hooks-api-impl-keystore.jks file, and then add your new .jks file.
4. Update the application's configuration properties to match your new keystore. You can do this on the Properties tab in Runtime Manager or in your YAML configuration file.
tls.keyStoreAlias: tls.keyStoreSecret: * tls.keySecret: 5. Deploy the updated application artifact.
For more information, see MuleSoft TLS Configuration Guide.