Near Real Time Profile Insert or Update Following a Onekey VR Response Through DCR Process
Feature
This feature is to enhance the process of availability of profiles/changes in Reltio when Onekey approves a DCR. With V1 process, currently the DCR gets approved but the actual profile is received during the daily delta cycle once in a day. This feature is intended to reduce the amount of time for profile availability in case of new profiles and changes in case of existing profile in MDM and hence in downstream systems.
Process
When Onekey VR response includes the following information:
For HCP:
-
Validated HCP OK ID (Onekey ID of the profile as it is validated by Onekey)
-
Validated HCO OK ID (Onekey ID of the profile as it is validated by Onekey) in case the HCP DCR required a new Organization to be created
-
Validated Activity OK ID (Onekey ID of the Activity affiliation as it is validated by Onekey)
For HCO:
-
Validated HCO OK ID (Onekey ID of the profile as it is validated by Onekey)
When the process receives an accepted VR from Onekey, it downloads the validated profiles using Onekey API and pushes them into Reltio. This results in immediately updating the existing profiles and/or inserting the new ones.
Technical Assumptions
-
Existing Address in the profile are not affected in case a create entity/activity DCR is accepted and the address of the new entity/relation is an existing one, the corresponding location entity cannot be touched by the process.
-
In case of a create entity / create Activity DCR, the profiles might still not be present in Onekey, in this case the process keeps searching the profiles on scheduled intervals until they are retrieved. This is because of the delay in synchronization of the profile in OneKey
-
By default OK API returns codes in format CODBASE.LIST.CODE (example: WUS.SP.01) while F14 flat file format uses LIST.CODBASE.CODE (ex.: SP.WUS.01). We need to ask Onekey to provide code values in the F14 formats and also ensure that we build the codes in the F14 format when loading data from the OK JSON returned by OKWS
-
OneKey connector team must be informed to apply the "Reset" setting to ensure they can always send a record involved in a DCR, whether or not it has been modified and/or the DCR has been accepted. This way, even if we load incomplete data, the Onekey process can always update the profile with the proper values.
-
This process can rely on Onekey API to retrieve data in near real time, while IDP process loads data from F14 flat files. To minimize the possible discrepancies between information loaded with the two different methods and to improve the performance, the attributes has been limited to be updated via this API process. The product specified attributes configured, can be extended as well based on the necessary requirements.
Supported Use Cases
Scenario |
Sub Scenario |
OneKey Response |
Global |
US |
Possibility |
---|---|---|---|---|---|
Create HCO DCR |
|||||
Profile Already in Reltio and in OK Subscription |
OneKey approves and send the same OneKeyid of HCO in the response |
No Change is sent to Reltio, but DCR approved only. |
No Change is sent to Reltio, but DCR approved only. |
Medium |
|
Profile Not Present in Reltio |
OneKey approves and send the OneKeyid of HCO in the response |
Fields marked as Product Baseline is sent to Reltio. |
Fields marked as Product Baseline is sent to Reltio. |
High |
|
Update HCO DCR |
|||||
Profile Already in Reltio and in OK Subscription |
OneKey approves and send the same OneKeyid of HCO and Address in the response present in Reltio |
If any change happened in the Product Baseline Attributes, it is updated. Rest is taken care by the nightly batch load via F14. |
If any change happened in the Product Baseline Attributes, it is updated. Rest is taken care by the nightly batch load. |
Medium |
|
OneKey approves and send the same OneKeyid of HCO and different Address Id in the response |
The new address is inserted into the profile without touching the current address. |
The new address is inserted into the profile without touching the current address. |
Low |
||
Create HCP DCR |
|||||
Profile Already in Reltio and in OK Subscription |
OneKey approves and send the same OneKeyid of HCP in the response |
No Change is sent to Reltio, but DCR approved only. |
No Change is sent to Reltio, but DCR approved only. |
Medium |
|
Profile Not Present in Reltio |
OneKey approves and send the OneKeyid of HCP in the response |
Fields marked as Product Baseline is sent to Reltio. |
Fields marked as Product Baseline is sent to Reltio. |
High |
|
Update HCP DCR |
|||||
Update HCP Demographics |
OneKey approves and send the same OneKeyid of HCP in the response |
If any change happened in the Product Baseline Attributes, it is updated. Rest is taken care by the nightly batch load. |
If any change happened in the Product Baseline Attributes, it is updated. Rest is taken care by the nightly batch load. |
High |
|
Add Affiliation |
OneKey approves and send the same OneKeyid of HCP, HCO and affiliation in the response |
If any change happened in the Product Baseline Attributes, it is updated. Rest is taken care by the nightly batch load. If a new address is added, which is not present in Reltio already, then it is added to the profile. The address is a non-primary address. Otherwise the address cannot be touched. If a new affiliation/relation is added, then it can also be added to the profile. |
If any change happened in the Product Baseline Attributes, it is updated. Rest is taken care by the nightly batch load. If a new address is added, which is not present in Reltio already, then it is added to the profile. The address is a non-primary address. Otherwise the address cannot be touched. For US the profile can contain both direct and indirect address. Any change in the direct address can also be added to the profile. If a new affiliation/relation is added, then it can also be added to the profile. |
High |
Data Mapping
HCP
OK WS Field |
Reltio Field |
Note |
OK LOV |
MDM LOV |
---|---|---|---|---|
country |
configuration/entityTypes/HCP/attributes/Country |
LKUP_IMS_COUNTRY_CODE |
||
individual.firstName |
configuration/entityTypes/HCP/attributes/FirstName |
|||
individual.lastName |
configuration/entityTypes/HCP/attributes/LastName |
|||
individual.statusCode |
configuration/entityTypes/HCP/attributes/ValidationStatus |
STA |
LKUP_IMS_VAL_STATUS |
|
individual.stateCode |
configuration/entityTypes/HCP/attributes/StateCode |
STE |
LKUP_IMS_PROFILE_STATE |
|
configuration/entityTypes/HCP/attributes/SourceName |
Always this attribute value is set to 'OK' |
|||
individual.prefixNameCode |
configuration/entityTypes/HCP/attributes/Prefix |
APP |
LKUP_IMS_PREFIX |
|
individual.titleCode |
configuration/entityTypes/HCP/attributes/Title |
TIT |
LKUP_IMS_PROF_TITLE |
|
individual.typeCode |
configuration/entityTypes/HCP/attributes/SubTypeCode |
TYP |
LKUP_IMS_HCP_SUBTYPE |
|
individual.externalKeys.*.number |
configuration/entityTypes/HCP/attributes/Identifiers/attributes/Order |
|||
individual.externalKeys.*.typeCode |
configuration/entityTypes/HCP/attributes/Identifiers/attributes/Type |
REX |
LKUP_IMS_HCP_IDENTIFIER_TYPE |
|
individual.externalKeys.*.value |
configuration/entityTypes/HCP/attributes/Identifiers/attributes/ID |
|||
individual.ada.(SP,*).code |
configuration/entityTypes/HCP/attributes/Specialities/attributes/Specialty |
SP |
LKUP_IMS_SPECIALTY |
|
individual.ada.(SP,*).listCode |
configuration/entityTypes/HCP/attributes/Specialities/attributes/SpecialtyType |
SPEC |
LKUP_IMS_SPECIALTY_TYPE |
|
individual.ada.(SP,*).rank |
configuration/entityTypes/HCP/attributes/Specialities/attributes/Rank configuration/entityTypes/HCP/attributes/Specialities/attributes/SortOrder |
|||
ACTIVITY.workplace.workplaceAddresses.*.rank ACTIVITY.activity.isMainActivity ACTIVITY.workplace.workplaceAddresses.*.typeCode |
configuration/relationTypes/HasAddress/attributes/PrimaryAffiliation |
Yes or No. Below is applicable to indirect addresses only. If the type of the indirect address is 'P', activity is a main activity and rank of the indirect address is '1' then this attribute is set with Yes otherwise No. |
LKUP_IMS_YES_NO |
|
ACTIVITY.individual.individualAddresses or INDIVIDUAL.individual.individualAddresses or ACTIVITY.workplace.workplaceAddresses |
configuration/relationTypes/HasAddress/attributes/derivedAddress |
Set to '0' for direct address and '1' for indirect addresses. |
||
individualAddresses.*.address.addressEid |
configuration/relationTypes/HasAddress/attributes/SourceAddressID configuration/relationTypes/HasAddress/attributes/SourceAddressInfo/attributes/SourceLocationId |
Onekey address id. |
||
individualAddresses.*.address.addressLongLabel or individualAddresses.*.address.addressShortLabel |
configuration/entityTypes/Location/attributes/AddressLine1 |
addressLongLabel field value is used to map AddressLine1. If this field is not available or the value of this field is NULL then addressShortLabel field value is used to map AddressLine1. |
||
individualAddresses.*.address.extensionLabel |
configuration/entityTypes/Location/attributes/AddressLine2 |
|||
individualAddresses.*.address.locationCode (for direct address) or workplaceAddresses.*.typeCode (for indirect address) |
configuration/relationTypes/HasAddress/attributes/AddressType |
Example. Indirect address=WUS.ADDR_LOCATION.2 Direct address= WUS.TYS.P |
ADDR_LOCATION |
LKUP_IMS_ADDR_TYPE |
individualAddresses.*.confidenceIndicatorCode |
configuration/relationTypes/HasAddress/attributes/LocConfInd |
ADC |
LKUP_IMS_LOCATION_CONFIDENCE |
|
address.postalTownReference.villageLabel |
configuration/entityTypes/Location/attributes/City |
|||
address.postalTownReference.country |
configuration/entityTypes/Location/attributes/Country |
LKUP_IMS_COUNTRY_CODE |
||
Address.refRelation.type |
"configuration/relationTypes/HasAddress" |
|||
Address.refRelation.crosswalks.type |
"configuration/sources/OK" |
|||
ACTIVITY.workplace.usualName |
configuration/relationTypes/HasAddress/attributes/HcoName |
|||
individualAddresses.*.address.isBestAddress |
configuration/relationTypes/HasAddress/attributes/BestRecord |
|||
workplaceAddresses.*.rank |
configuration/relationTypes/HasAddress/attributes/AddressRank |
|||
individualAddresses.*.rankCode |
configuration/relationTypes/HasAddress/attributes/AddressRank |
Only for direct addresses. |
ADDR_RNK |
|
individualAddresses.*.address.longPostalCode |
configuration/entityTypes/Location/attributes/Zip/attributes/Zip5 |
longPostalCode contains two values each value separated by a space. First value is used as Zip5. |
||
(individual.individualEid + individual.individualAddresses.*.address.addressEid) for direct addresses. (activity.activityEid + workplace.workplaceEid + workplace.workplaceAddresses.*.address.addressEid) for indirect addresses. |
Address.refRelation.crosswalks.value |
|||
postalTownReference.subdivisions.SUB.3.externalId |
configuration/entityTypes/Location/attributes/StateProvinceCode |
LKUP_IMS_STATE |
||
postalTownReference.subdivisions.SUB.3.longLocalizedLabel |
configuration/entityTypes/Location/attributes/StateProvince |
HCO
OK WS Field |
Reltio Field |
Note |
OK LOV |
MDM LOV |
---|---|---|---|---|
WORKPLACE.country |
configuration/entityTypes/HCO/attributes/Country |
LKUP_IMS_COUNTRY_CODE |
||
workplace.usualName |
configuration/entityTypes/HCO/attributes/Name |
|||
configuration/entityTypes/HCO/attributes/SourceName |
Always this attribute value is set to 'OK' |
|||
workplace.statusCode |
configuration/entityTypes/HCO/attributes/ValidationStatus |
STA |
LKUP_IMS_VAL_STATUS |
|
workplace.stateCode |
configuration/entityTypes/HCO/attributes/StateCode |
HCO crosswalk is end dated for the following scenarios 1. statusCode is "9" or 2. stateCode is CLO (Closed) or INA (Inactive) |
STE |
LKUP_IMS_PROFILE_STATE |
externalKeys.number |
configuration/entityTypes/HCO/attributes/Identifiers/attributes/Order |
|||
externalKeys.typeCode |
configuration/entityTypes/HCO/attributes/Identifiers/attributes/Type |
REX |
LKUP_IMS_HCO_IDENTIFIER_TYPE |
|
externalKeys.value |
configuration/entityTypes/HCO/attributes/Identifiers/attributes/ID |
|||
workplace.activityLocationCode |
configuration/entityTypes/HCO/attributes/ClassofTradeN/attributes/Classification |
LEX |
LKUP_IMS_HCO_CLASSOFTRADEN_CLASSIFICATION |
|
workplace.typeCode |
configuration/entityTypes/HCO/attributes/ClassofTradeN/attributes/FacilityType |
TET |
LKUP_IMS_HCO_CLASSOFTRADEN_FACILITYTYPE |
|
configuration/entityTypes/HCO/attributes/Specialities/attributes/SpecialtyType |
SPEC |
LKUP_IMS_SPECIALTY_TYPE |
||
workplace.ada.{SP_WKP,*}.code |
configuration/entityTypes/HCO/attributes/Specialities/attributes/Specialty |
SP_WKP |
LKUP_IMS_SPECIALTY |
|
workplace.ada.{SP_WKP,*}.rank |
configuration/entityTypes/HCO/attributes/Specialities/attributes/Rank configuration/entityTypes/HCO/attributes/Specialities/attributes/SortOrder |
|||
telephones.callNumberForDisplay |
configuration/entityTypes/HCO/attributes/Phone/attributes/Number |
|||
telephones.officeNumber |
configuration/entityTypes/HCO/attributes/Phone/attributes/Extension |
|||
telephones.rank |
configuration/entityTypes/HCO/attributes/Phone/attributes/Rank |
|||
telephones.typeCode |
configuration/entityTypes/HCO/attributes/Phone/attributes/TypeIMS |
TEL |
LKUP_IMS_COMMUNICATION_TYPE |
|
configuration/entityTypes/HCO/attributes/Phone/attributes/CountryCode |
Workplace country is mapped to this field. |
LKUP_IMS_COUNTRY_CODE |
||
WORKPLACE.workplace.workplaceAddresses |
configuration/relationTypes/HasAddress/attributes/derivedAddress |
Set to '0'. |
||
workplaceAddresses.*.address.addressEid |
configuration/relationTypes/HasAddress/attributes/SourceAddressID configuration/relationTypes/HasAddress/attributes/SourceAddressInfo/attributes/SourceLocationId |
Onekey address id. |
||
configuration/relationTypes/HasAddress/attributes/SourceAddressInfo/attributes/SourceName |
Value is set to 'OK' |
|||
workplaceAddresses.*.address.addressLongLabel or workplaceAddresses.*.address.addressShortLabel |
configuration/entityTypes/Location/attributes/AddressLine1 |
addressLongLabel field value is used to map AddressLine1. If this field is not available or the value of this field is NULL then addressShortLabel field value is used to map AddressLine1. |
||
workplaceAddresses.*.address.extensionLabel |
configuration/entityTypes/Location/attributes/AddressLine2 |
|||
workplaceAddresses.*.typeCode |
configuration/relationTypes/HasAddress/attributes/AddressType |
TYS |
LKUP_IMS_ADDR_TYPE |
|
workplaceAddresses.*.confidenceIndicatorCode |
configuration/relationTypes/HasAddress/attributes/LocConfInd |
ADC |
LKUP_IMS_LOCATION_CONFIDENCE |
|
address.postalTownReference.villageLabel |
configuration/entityTypes/Location/attributes/City |
|||
address.postalTownReference.country |
configuration/entityTypes/Location/attributes/Country |
LKUP_IMS_COUNTRY_CODE |
||
postalTownReference.dispatchLabel |
configuration/entityTypes/Location/attributes/PostalCity |
|||
postalTownReference.subdivisions.SUB.3.externalId |
configuration/entityTypes/Location/attributes/StateProvinceCode |
LKUP_IMS_STATE_CODE |
||
postalTownReference.subdivisions.SUB.3.longLocalizedLabel |
configuration/entityTypes/Location/attributes/StateProvince |
|||
individualAddresses.*.address.longPostalCode |
configuration/entityTypes/Location/attributes/Zip/attributes/Zip5 |
longPostalCode contains two values each value separated by a space. First value is used as Zip5. |
||
workplaceAddresses.*.rank |
configuration/relationTypes/HasAddress/attributes/AddressRank |
|||
Address.refRelation.type |
"configuration/relationTypes/HasAddress" |
|||
Address.refRelation.crosswalks.type |
"configuration/sources/OK" |
|||
workplace.workplaceEid + workplace.workplaceAddresses.*.address.addressEid |
Address.refRelation.crosswalks.value |
Activity
OK WS Field |
Reltio Field |
Note |
OK LOV |
MDM LOV |
---|---|---|---|---|
activity.creationDate |
configuration/relationTypes/Activity/attributes/RelationshipCreateDate |
|||
activity.activityEndDate |
configuration/relationTypes/Activity/attributes/RelationshipEndDate |
|||
activity.activityStartDate |
configuration/relationTypes/Activity/attributes/RelationshipStartDate |
|||
activity.isMainActivity |
configuration/relationTypes/Activity/attributes/PrimaryAffiliationIndicator |
|||
activity.statusCode |
configuration/relationTypes/Activity/attributes/ValidationStatus configuration/relationTypes/Activity/attributes/ActValidationStatus |
STA |
LKUP_IMS_VAL_STATUS |
|
activity.country |
configuration/relationTypes/Activity/attributes/Country |
LKUP_IMS_COUNTRY_CODE |
Prerequisites
The following are the prerequisite conditions:
-
As per the V2 process, Onekey data load happens via F14 flat files. This feature needs API access to Onekey. Please raise request to Onekey team and ensure the enablement of the Web Service fields as defined in the data mapping section.
-
To enable the process, check the Enablement Process section on how to deploy the default configuration through Monitor Stream.
-
The process need configuration to be deployed via Postman Collection as shown below. The data is loaded in ODP_CORE_STREAM.DCR_CONFIGURATION table as shown below This is one time configuration deployment which deploys the configuration script, until it need to be changes and redeployed as part of the requirements. Details on how to changes is part the of the below section.
Enablement Process
To Enable the Process:
-
The Monitor stream must be deployed with the below configuration.
-
If the feature is not required, then it can be stopped with either persistOKProfReltioEnabled = No or leave it as empty.
-
There are 2 templates provided as part of the baseline and data mapping. USOKTransformTemplate & GLOBALOKTransformTemplate contains the configurable script to convert Onekey json to Reltio model. Details of how to change and deploy has been provided in the below section.
Attribute Names
Description
event-created-before-hours
After the DCR sent to OneKey, the monitor process can start to look trace after 4 hours. Change according to the needs. 4hours is default value.
run-interval-in-ms
DCR Trace Run Interval
persistOKProfReltioEnabled
This is the config setting to enable this feature. If No or Blank,
templateUSOKConversion
Name of the template for Onekey to Reltio conversion for US
templateGBLOKConversion
Name of the template for Onekey to Reltio conversion for Non - US /Global
approvedProfileWaitTimeMilis
Time to retry for profile to be available in OneKey after DCR approval. If it is more than a day(24hrs), then it completes the process and move towards approving the DCR.
persistAdditionalAttributes
Once the traced profile is posted to reltio, this can enable the process to append additional attributes from non OK sources to reltio. This is applicable to create DCRs only.
additionalAttributes
-
attributeName: attributes from external sources that should be appended to the profile.
-
sourceName: source that should be considered for persistAdditionalAttributes. When value is 'ALL', all the soucrces is considered.
waitForOkOvBeforeAccept
when enabled, trace process can complete only when profile exists in reltio
-
-
If the DCR is Traced for an Approved DCR from Onekey, it stores the details in ODP_CORE_STREAM.DCR_TRACE table.
-
The process creates an entry in the ODP_CORE_STREAM.EVENT_VALIDATION table for the streams to pick up and approve the DCR in Reltio and also updates ODP_CORE_STREAM.DCR_VALIDATION table with status = 'TRACED' if the persist to Reltio is success.
-
If the DCR tried over approvedProfileWaitTimeMilis, then it can stop the persisting of the profile and can proceed to trace the DCR assuming that the profile is already present with the Batch Load via F14 file format.
Columns
Description
Example
EVENT_ID
Primary Key of the table
VENDOR
vendor code for dcr
OK
OBJECT_ID
change request id from mdm
3FHJHbH9
ENT_REQ_PAYLOAD
request payload to search from vendor
base64 encoded payload. Use base64_decode_string function to see the values
ENT_RES_PAYLOAD
response payload from vendor
base64 encoded payload. Use base64_decode_string function to see the values
MDM_TRANSFORM_PAYLOAD
transformed payload in from vendor to mdm format
base64 encoded payload. Use base64_decode_string function to see the values
OK_CONNECT_ID
connector id for onekey
Onekey Connector Id
MDM_TENANT
mdm tenant id
MDM Tenant Id
STATUS
process status
OK-Search:SUCCESS->OK-Transform:SUCCESS→MDM_Post_HCO:SUCCESS, shows the process flow
STATUS_DESCR
description of status
If error then error is populated here
MDM_URI
mdm unique keys of entity in the dcr
WORKPLACE:"entities/200i5o0t",INDIVIDUAL:"entities/17if3Bj0",ACTIVITY:"relations/24z2Lcfv"
MDM_OBJECT_TYPE
entity type for which this dcr was raised
ACTIVITY/WORKPLACE
Data Flow Chart
Below process describes the overall process of the feature:
Onekey payload Conversion to Reltio
The payload conversion from Onekey to Reltio is configurable through a scripting language easier to develop and change:
-
Open https://www.base64decode.org/ and decode the CONFIG_OBJECT in the DCR_CONFIGURATION table to see the base code as per the country.
-
Use the playground https://datasonnet.ms3-inc.com/ to view and modify the script. Don't delete the product provided script as they are part of baseline.
-
The output of the script should create a json having individual,workplace and activity as sample provided below to let the conversion work.
-
Input payload: Should contain an array of elements.
-
The first element in the array contains the search payload return from Reltio. The search is done via POST: <Reltio Api>/entities/_byCrosswalks/?select=uri,attributes.Address&ovOptions=true where the crosswalk value is OK id for HCP (in case of HCP DCR only).Otherwise the first element is empty.
-
The second element in the array is the search result from OneKey.
Product Specified Deployed Templates
USDataSonnetTemplate.html
GlobalDataSonnetTemplate.html
In case we are moving from V1.0 to V2.0 and want to retain the same Onekey code formats like codebase.lookupCode.sourceattr in Reltio then open the templates provided and change the below ones and redeploy the template with a separate name and use the same in the Monitor Streams.
CopyCode Block
local lookupAttr(sourceattr, codebase, lookup) = {
//value: codebase+"."+lookup+"."+sourceattr -- This is V1 code format
value: lookup+"."+codebase+"."+sourceattr -- This is V2 code format
};
-
Troubleshooting
OneKey API
Trace:
POST: https://okws.ok.imshealth.com/vr/trace/<connectorId>
Search OK to trace DCR id status
{
"isoCod2":"CA",
"withDetails": true,
"validation.clientRequestIds": ["1K8GBBKJ"]
}
Search:
POST: https://okws.ok.imshealth.com/ok/search/<connectorId>
Search Request to OK with HCP Id
{
"resultSize": "10",
"entityType": "Activity",
"isoCod2" : "DE",
"fields": [
{
"name": "individual.individualEid",
"method": "EXACT",
"values": [
"WDEM01521592"
]
},
{
"name": "workplace.workplaceEid",
"method": "EXACT",
"values": [
"WDEH04042283"
]
},
{
"name": "activity.activityEid",
"method": "EXACT",
"values": [
"WDEM0152159201"
]
}
]
}
Search Request to OK with HCO Id
{
"resultSize": "10",
"entityType": "Workplace",
"isoCod2" : "DE",
"fields": [
{
"name": "workplace.workplaceEid",
"method": "EXACT",
"values": [
"WDEH04042283"
]
}
]
}