Manage Consent

 

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.

Enable Manage Consent

Determine the Consent Mechanism Members may opt-out or opt back in to sharing their records. Smile supports two approaches:

  1. Using FHIR Consent Resources
    • Create PDex Provider Access Consent resources in the FHIR repository.
    • In the Attribution workflow, when a member opts out, the Consent resource should trigger a process that excludes the member from Provider Access attributed Group. This is an implementation detail to be implemented based on client's workflow.
    • $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.
    • In the Attestation workflow, $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.
  2. Using an External Attribution (Access) List
    • Member consent and attribution are managed outside Smile.
    • The payer provides a regularly updated external file containing:
      • Member identifiers (Patient/Member ID)
      • Provider system identifiers (NPI, TIN, etc.)
      • Consent status (opt-in / opt-out)
    • A script or automated process parses this file and updates FHIR Group resources:
      • Members with opt-in consent are included in the Group.
      • Members with opt-out consent are removed from the Group.
      • Ensures $davinci-data-export respects current consent and access state.

Notes:

  • Proper consent management is essential to comply with CMS regulations.
  • This configuration ensures provider systems only retrieve authorized member data.

Opt-Out in the Attestation Workflow

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 member
  • category = code provider-access in system http://hl7.org/fhir/us/davinci-pdex/CodeSystem/pdex-consent-api-purpose
  • status = active

The 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.

  • A deny Consent without provision.period.start is ignored.
  • A later 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.
  • The Consent profile is not checked.
  • Members matched without a local Patient resource id (matched at a remote plan) are not checked.
  • This check always runs for $provider-member-match and cannot be disabled. The Support Consent Filtering setting does not affect it.
  • The check needs no Consent module, interceptor or member match setting. If members record their own opt-out through the Patient Access API, they need write access to Consent in their own compartment, for example 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" }
  }
}