Claims (Blue Button) Synchronization with Health Cloud and Data Cloud

(0 reviews)

Setup

Prerequisites:

  1. Enable access to Salesforce Healthcare Industry APIs. Refer to the guide section here
  2. A connected application in the Salesforce with Client Credentials Flow enabled and following Custom OAuth Scopes. Refer to the guide section here user_bundle_write,user_condition_write,user_encounter_write,user_medicationrequest_write,user_practitioner_read,user_practitioner_write,user_procedure_write
  3. A client application in the Payer system.
  4. (optional) PatientSyncJob__C custom object in Salesforce to track job status, history, and watermark.Entity Name: PatientSyncJob
Field LabelFIeld API NameTypeValues
PatientIdPatientId__cText(20)
JobIdJobId__cText(50)
StartTimeStartTime__cDate/Time
StatusStatus__cPicklistNew, InProgress, Completed, Failed, PartiallyCompleted
SummarySummary__cLong Text Area(32768)
ClaimDataStatusClaimDataStatus__cPicklistNew, InProgress, Completed, Failed, PartiallyCompleted
ClaimDataSummaryClaimDataSummary__cLong Text Area(32768)

Data Cloud setup:

  • Log in to your Salesforce DataCloud instance.
  • Go to Setup and click Data Cloud Setup.
  • Click on Ingestion API, and then click New.
  • Name the ingestion API BlueButtonClaim.
  • 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 one by one:
    • For Category, select Profile.
    • For Primary Key, select id.
  • 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:

  • Log in to Salesforce and navigate to the Setup page.
  • Search for the ‘Integrations Setup’ page.
  • Select the Patient Summary - Blue Button Integration application and click the Enable button.
  • Enter the application display name, target business group, and environment for deployment, then click Next.
  • Enter all necessary configurations that are prompted.
  • To add any optional configuration, Click Add Additional parameters and enter the required details. Refer below table for configuration details.
Application property name(Key name)Sample valueDescription
1https.entryPath/blue-button/v2/*Sets the base url of the api. Replace/override as needed when deploying to any environment. Default value is "/blue-button/v2/*"
2bluebuttonapi.hostbluebutton.cms.govPayer system API host name
3hcOrg.tokenUrlhttps://login.salesforce.com/services/oauth2/tokenURL for generating Salesforce access token
4hcOrg.client_id-Client Id to be used for generating Salesforce access token
5hcOrg.client_secret-Client Secret to be used for generating Salesforce access token
6hcOrg.instanceUrlhttps://test.salesforce.com/Salesforce instance URL where patient data needs to be loaded
7bundle.hostapi.healthcloud.salesforce.comSalesforce Healthcare API host name
8bluebuttonapi.eobEndpoint.pageCount50Number of ExplanationOfBenefit records fetched per page.It should ideally be set to 50 to minimise the number of calls to Blue Button API.
9bluebuttonIntegration.batchCount5Number Of ExplanationOfBenefit pages that are synchronized in parallel for a patient
10bluebuttonIntegration.maxConcurrentSyncMessages50Maximum number of patient synchronization jobs that can be processed concurrently
11bluebuttonapi.enablePagination"true"This flag is used to enable/disable pagination parameter. It is set to "true" by default, should be set to "false" for carin systems
12bluebuttonapi.eobEndpoint.typeFilter"false"Flag to enable eob type filter. To be set to 'true' for CMS
13bluebuttonapi.coverageEndpoint.queryParam"beneficiary"Query parameter to search for coverage details. It is set to "beneficiary" by default, needs to be updated based on payer system For E.g. set to "patient" in case of Cigna system
14bluebuttonapi.coverageEndpoint.countAny value between 1-50Maximum number of records fetched per page for coverage endpoint
15bluebuttonapi.eobEndpoint.countAny value between 1-50Maximum number of records fetched per page for EOB endpoint
  • Enter the following properties if claim data ingestion has to be enabled. By default, claim data flag will be disabled and will not be inserted in data cloud.
Application property name(Key name)Sample valueDescription
1claimData.claimDataIngestion"true"To enable claim data ingestion into Data cloud. This can be also be sent in the payload. Flag value in the payload will have the precedence.
2claimData.sourceAPIBlueButtonClaimSource API name in data cloud
3claimData.cdpConfig.urlhttps://dsb0000013utp2ae-dev-ed.develop.test1.my.pc-rnd.salesforce.comUrl of the data cloud instance where claim data needs to be uploaded
4claimData.cdpConfig.userepic.ade7d4580256@salesforce.comUser id to connect to data cloud
5claimData.cdpConfig.password-Password to connect to data cloud
6claimData.cdpConfig.client_id-Client ID to connect to data cloud
7claimData.cdpConfig.client_secret-Client Secret to connect to data cloud
8claimCoverage.payor"CMS"Default value for organization name when organization reference is not resolved. Its defaiult value is "CMS", this need to be changed to respective payor system: like "CMS" for cms system and "CIGNA" for cigna system.
  • Click Proceed to deploy the application

Post-Deployment Steps:

Consumption of the Integration application

For consuming the blue button endpoints and consuming patient data, it is required to get consent that gives access to the patient’s clinical data that is present in the Explanation of Benefit(EOB) records returned by the Blue Button 2.0 API. The consumer needs to follow the following sequence of steps to get consent from each patient.

NOTE: https://sandbox.bluebutton.cms.gov has to be replaced with a production endpoint. i.e. https://bluebutton.cms.gov

Create a Connected App in Blue Button

  1. Login to the blue button portal.
    1. https://bluebutton.cms.gov/home
  2. Click on ADD AN APPLICATION Button. Enter following details
    1. Application Name : Name of your choice
    2. OAuth - Client Type: Confidential
    3. Authorization Grant Type* Authorization code
    4. Callback URLs / Redirect URIs: The callback URL, that will redirect the authorization information after patient consent is done.
    5. Does your application need to collect beneficiary demographic information: Yes
    6. Agree to the terms and conditions and save the application.
  3. After completing the above step, it generates client_id/client_secret that will be used to generate the code.

Persisting the Consent
After the connected app is created from the patient portal, the patient must be redirected to the Blue Button OAuth flow to get the code. This code is a kind of OTP to generate the refresh token.
1. Make sure that in your app, the patient is redirected to the following URL:

             https://sandbox.bluebutton.cms.gov/v2/o/authorize/?response_type=code&client_id=CLIENT_ID&redirect_uri=REDIRECT_URL
  1. After the patient successfully authorizes with their credentials, the patient is then redirected to the REDIRECT_URL, where code is sent as a query parameter.

             {
                 "code": "IDzfq8os2EPZAYU67kfW8VkNUzmmBz",
                 "state": "07MNrjGXGX6ZAjq3IL1AXcAxPSlpIU"
               }
  2. Using this code, another request is sent that retrieves the refresh token, which is then saved in named credentials. This named credential reference will be saved against the patient.

             POST /v2/o/token/ HTTP/1.1
               Host: sandbox.bluebutton.cms.gov
               Content-Type: application/x-www-form-urlencoded
               client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&grant_type=authorization_code&code=<code>
  3. The above request returns the following response upon successful authorization:

             {
                 "access_token": "7PE2ocGbMCtDQpVuhNNEcic4tE8srO",
                 "expires_in": 36000,
                 "token_type": "Bearer",
                 "scope": [
                     "patient/Coverage.read",
                     "patient/ExplanationOfBenefit.read",
                     "patient/Patient.read",
                     "profile"
                 ],
                 "refresh_token": "jPHU2o1cwndiYIGjEpIt7FOZu6PO2g",
                 "expires_at": 1690248292.6342547
                 }

    The received refresh_token can be saved in named credentials.

  4. The generated refresh_token token can be used to generate the access_token and this access token can be used to trigger the Mulesoft endpoints.

              POST /v2/o/token/ HTTP/1.1
                Host: sandbox.bluebutton.cms.gov
                Content-Type: application/x-www-form-urlencoded
    
                client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&grant_type=refresh_token&refresh_token=<refresh_token>
  5. Along with the generation of an access_token, the above request also returns the new refresh_token that must be updated in the named credentials.

Triggering Mulesoft Endpoints

  • Using the generated access token, the Mulesoft endpoints can be triggered as mentioned in the API documentation.

Reviews

TypeApplication
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onJun 13, 2024
Asset overview
Industries CloudHealth
Custom fields

Asset versions for 2.0.x

Asset versions
VersionActions
2.0.1
2.0.0