Consent management ensures that only members who have not opted out are included in any $davinci-data-export operation. This protects member privacy and ensures compliance with CMS regulations.
Determine the Consent Mechanism Members may opt-out or opt back in to sharing their records. Smile supports two approaches:
$davinci-data-export does not check Consent resources itself. To enforce them when data is exported, configure the Consent Module with register_with_persistence on the persistence module behind the Provider Access endpoint, or remove opted-out members from the Group. See the Consent Module tutorial for a Provider Access example.$provider-member-match also checks these Consent resources: a matched member who has opted out is returned in the consent-constrained Group instead of the matched Group, so their data is not exported. See Opt-Out in the Attestation Workflow. This check runs only during the match. If a member opts out after the match, later exports of the matched Group still include them unless the Consent Module is configured.$davinci-data-export respects current consent and access state.Notes:
In the Attestation workflow, the member's PDex Provider Access Consent controls whether $provider-member-match shares their data. A Consent with provision.type = deny opts the member out: they are returned in the consent-constrained Group and their data is not exported. A Consent with provision.type = permit, or no Consent at all, means the member is shared, since sharing is the default.
For each matched member, $provider-member-match searches for Consent resources with:
patient = the matched membercategory = code provider-access in system http://hl7.org/fhir/us/davinci-pdex/CodeSystem/pdex-consent-api-purposestatus = activeThe member has opted out if any of these Consents has provision.type = deny and a provision.period that covers the current time: start is now or earlier, and end is absent or now or later.
deny Consent without provision.period.start is ignored.permit Consent does not revoke an earlier deny. To opt the member back in, change the deny Consent to permit, set its status to inactive, or set provision.period.end.$provider-member-match and cannot be disabled. The Support Consent Filtering setting does not affect it.FHIR_WRITE_TYPE_IN_COMPARTMENT with argument Consent:Patient/[id].Opt-out (deny)
{
"resourceType": "Consent",
"status": "active",
"scope": {
"coding": [ { "system": "http://terminology.hl7.org/CodeSystem/consentscope", "code": "patient-privacy" } ]
},
"category": [
{
"coding": [ { "system": "http://hl7.org/fhir/us/davinci-pdex/CodeSystem/pdex-consent-api-purpose", "code": "provider-access" } ]
}
],
"patient": { "reference": "Patient/1553" },
"provision": {
"type": "deny",
"period": { "start": "2026-01-01" }
}
}
Opt back in (permit)
Update the same Consent rather than creating a new one:
{
"resourceType": "Consent",
"id": "1553-provider-access",
"status": "active",
"scope": {
"coding": [ { "system": "http://terminology.hl7.org/CodeSystem/consentscope", "code": "patient-privacy" } ]
},
"category": [
{
"coding": [ { "system": "http://hl7.org/fhir/us/davinci-pdex/CodeSystem/pdex-consent-api-purpose", "code": "provider-access" } ]
}
],
"patient": { "reference": "Patient/1553" },
"provision": {
"type": "permit",
"period": { "start": "2026-06-01" }
}
}
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.