Provider Services API
Setup
Prerequisites
- MuleSoft Direct setup is required. For more information, see the MuleSoft Direct setup guide.
- Connect to the external MDM system and fetch the credentials for establishing a connection.
- To integrate the application with Life Sciences Cloud, set up a Local External Client App in your Salesforce org. When you configure the external client app, select Run as Integration User. You’ll need the credentials from this external app during the MuleSoft Direct setup.
- Make sure the Integration User connected to the external client app has read and write access to all mapped entities and fields in Life Sciences Cloud.
- Create a custom permission set that uses the Life Sciences Commercial license and grants access to all required entities and fields.
- Create a second custom permission set that uses the Salesforce API Integration license, and enable the following System Permissions:
- Modify All Data
- Customize Application
- Assign both custom permission sets and the Life Sciences Medical permission set to the integration user.
- Enable Field-Level Security (FLS) for the integration user profile for all mapped fields.
- If you use the out-of-the-box field mappings, make sure FLS is enabled for the following fields:
- Account
- Phone
- Fax
- PersonBirthDate
- PersonTitle
- PersonHomePhone
- PersonMobilePhone
- ContactPointAddress
- IsActive
- HealthcareProvider
- SourceSystemModifiedDate
- ProfessionalTitle
- IsPrivacyLawEnabled
- OperatingCountryCode
- IsActive
- BusinessLicence
- ContactPointAddressId
- ContactPointBestContactTime
- SourceSystemIdentifier
- DayOfWeek
- IsActive
- ProviderAffiliation
- SourceSystemIdentifier
- IsActive
- HealthcareProviderSpecialty
- Rank
- Account
- Ensure that the IntegrationJobRun.Status picklist values has these values added:
- New
- InProgress
- Completed
- CompletedWithError
- Failure
- AbortInitiated
- Aborted
- Make sure the PrimaryProviderRestriction Salesforce org preference is enabled in the setup page.
- Make sure State and Country/Territory Picklists are enabled.
Setup
- Log into Salesforce and navigate to the Setup page.
- Search for the MuleSoft Direct page.
- Deploying Onekey System API is a prerequisite for deploying this application.
- The Onekey System API is automatically deployed if the Provider Bulk Sync API is already deployed.
- For manual deployment of Onekey System API follow below steps
- Log into Salesforce and navigate to the Setup page.
- Search for the Integrations Setup page.
- Select the Onekey System API application and click Enable.
- Enter the application display name, target business group, and environment for deployment, then click Next.
- Select the Onekey System API tab and enter ‌these details to configure the application properties:
| Key name | Sample value | Description |
|---|---|---|
| Onekey Host | okws.ok.imshealth.com | Onekey Host name |
| Onekey Username | - | Username for Onekey System |
| Onekey Password | - | Password for Onekey System |
| Onekey Connector Identifier | 4812 | Onekey connector ID |
| Salesforce Business Account Record Id | 012SM000000tnBNYAY | Salesforce record type Id for Workplace |
| Salesforce Person Account Record Id | 012SM000000tnCzYAI | Salesforce record type Id for Individual |
- To add any optional configuration, click Add Additional Parameters and enter the required details.
- Click Proceed to deploy the application.
- Select the Provider Services API application and click Enable.
- Enter the application display name, target business group, and environment for deployment, then click Next.
- Select the Provider Services tab and enter ‌these details to configure the application properties:
| Key name | Sample value | Description |
|---|---|---|
| Salesforce Domain URL | test-instance.salesforce.com | Salesforce Life Sciences instance URL |
| Salesforce Consumer Key | - | Connected app Client ID to authenticate to Salesforce |
| Salesforce Consumer Secret | - | Connected app Client Secret to authenticate to Salesforce |
| MDM System API Host | test-system-api.cloudhub.io | MDM System API instance URL |
| Client Id to Access MDM System API | - | Client Id to authenticate to MDM System API |
| Client Secret to Access MDM System API | - | Client Secret to authenticate to MDM System API |
- To add any optional configuration, click Add Additional Parameters and enter the required details.
- Click Proceed to deploy the application.
Post Deployment
- Trigger the MuleSoft endpoints as described in the API documentation.
- To enable/disable Data Change Request Jobs after deployment, follow these steps:
- Log in to Mulesoft Anypoint Platform.
- From the top right corner, select the Organization where the applications are deployed.
- In the Management Center, select Runtime Manager and choose the correct environment where the applications are deployed.
- Search for and select the Provider Services API.
- Navigate to Schedules, select the jobs, and enable or disable them as required.
- The base path for the main app is provider-services/v1. Example URL to search providers : https://{{hostname}}/provider-services/v1/provider/search
- Run the Codes Job in Provider Bulk Sync before you run the Search Before Create or Data Change Requests features to load required dynamic picklist values.
- The OneKey System API retrieves codes based on the configured country list. To enable this, configure the OneKey-supported countries using their two-character country codes in the runtime propertyonekey.download.codesCountryList.
Customizations
- To modify the field mapping, refer to the Onekey System API documentation to make appropriate changes.
Limitations
- When you use the out-of-the-box mapping, the Codes Job supports only the following Salesforce fields. To include additional dynamic enum fields, update the field mapping in the Codes mapping.
- HealthcareProvider.ProfessionalTitle
- ProviderAffiliation.Role
- The Codes Job uses the Salesforce Metadata API to load picklist values. The API has a limit of 1,000 values (active and inactive combined). To exceed this limit, manually add the values in Object Manager using the Fields & Relationships UI.