Responding Payer OIDC Client Setup
This section walks you through the setup needed for configuring your Smile CDR instance as a Responding (Source) Payer. This involves setting up the System to System Data Exchange module to securely receive and respond to data requests from other (requesting) payer systems. This includes defining how your system will handle incoming requests, match patient records, evaluate consent, and securely export the requested health information.
As per the Smile CDR documentation for federated OAuth2/OIDC setup, create a client definition in your SMART Outbound Security module.
smart_auth module for P2PConfigure the client definition with the following settings:
Enter the following (use your specific values as needed):
{
"clientId": "source-payer-p2p-client",
"clientName": "P2P Source Payer Client",
"enabled": true,
"secretRequired": true,
"allowedGrantTypes": ["CLIENT_CREDENTIALS"],
"clientSecrets" : [ {
"pid" : 1,
"secret" : "***",
"description" : "s***",
"expiration" : "2026-05-01T00:00:00.000-04:00",
"activation" : "2025-01-06T00:00:00.000-05:00"
} ],
"scopes": [
"cdr_all_user_authorities",
"openid",
"system/*.read",
"user/Patient.read",
"user/Coverage.read",
"user/ExplanationOfBenefit.read"
]
}
Grant the following permissions to the client:
FHIR_OP_INITIATE_BULK_DATA_EXPORTFHIR_OP_MEMBER_MATCHFHIR_ALL_READFHIR_ALL_WRITEFollowing the Smile CDR federated OAuth2/OIDC pattern, create an authentication callback script:
/**
* P2P Source Payer Authentication Callback Script
* Processes authentication for P2P data requests
*/
function onAuthenticateSuccess(theOutcome, theOutcomeFactory, theContext) {
// Extract business identifier for authorization
theOutcome.addUserData('business-id', 's2sBusId');
// Additional P2P specific authorities can be added here
theOutcome.addAuthority("ROLE_P2P_SOURCE");
return theOutcome;
}
Note: The s2sBusId should be dynamically retrieved either from:
Members who opt-in to payer-to-payer data exchange may choose two types of Consent policy:
Consent.policy.uri =
http://hl7.org/fhir/us/davinci-hrex/StructureDefinition-hrex-consent.html#regularConsent.policy.uri =
http://hl7.org/fhir/us/davinci-hrex/StructureDefinition-hrex-consent.html#sensitiveWhen there is a successful match, the $bulk-member-match operation will:
If there is a single match and the Consent policy can be satisfied, the operation will persist the inbound Consent resource with modifications:
Consent.patient field will be normalized to point to resources created by the source payer systemConsent.performer fields will be normalized to point to resources created by the source payer systemPrimary document linking requester to member's consent is the Consent resource sent as part of $member-match request. In a callback script after successful authentication, reference the Consent to:
Two design options:
Token-Based Design:
FHIR Resource-Based Design:
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.