Epic Workflow System API - Implementation Template
Prerequisites
The following describes how to configure the Epic API.
Setting up the certificate for JWS
- Use the SMART Backend Services approach which uses signed JWT to get the access token.
- Generate a new public-private key pair and get the certificate(s) in the appropriate format:
# generate a new public-private key pair
openssl genrsa -out Anypoint_Mulesoft.pem 2048
# export the public key to a base64 encoded X.509 certificate
openssl req -new -x509 -key Anypoint_Mulesoft.pem -out Anypoint_PublicKey.pem -subj '/CN=Anypoint' -days 365
# export the keystore in pkcs12
openssl pkcs12 -export -in Anypoint_PublicKey.pem -inkey Anypoint_Mulesoft.pem -out Anypoint_Keystore.p12
Creating an app in Epic
- Log in to Epic and click Build Apps:
- Click Create and enter your app details. Upload the public key store (Anypoint_PublicKey.pem) file generated in the previous steps and then click Save.
After the Client ID and Non-Production Client ID are generated for the created app, do the following:
- Select the SMART on FHIR Version as R4,
- Enter the summary,
- Accept the terms of usage, and
- Click Save & Ready for Sandbox and/or Save & Ready for Production.