Implementation Guide | Healthcare

    Enforcing a Patient's Opt-Out from AI-Drafted Portal Replies at Runtime

    To enforce a patient opt-out from AI-drafted portal replies, place a policy decision in the execution path before every model call. Resolve the patient's current preference at request time, apply a defined outcome (allow, redact, block, or escalate for human approval), fail closed when the preference cannot be resolved, and write an evidence record for each decision. A preference flag in the EHR or portal alone does not stop a drafting workflow from calling a model.

    1. 1

      Entry points

      Portal, clinician-assist, messaging workflows and tool calls all route through one enforcement point.

    2. 2

      Identity resolution

      Map the request to a canonical patient identifier and an authenticated caller identity.

    3. 3

      Preference resolver

      Reads the opt-out from its system of record, with a defined staleness limit.

    4. 4

      Policy decision point

      Evaluates caller, patient, purpose and opt-out state, then returns an outcome with a reason.

    5. 5

      Enforcement point

      Applies the outcome before the model call, including blocking or holding the request.

    6. 6

      Evidence writer

      Records the decision and the action actually taken for each interaction.

    7. 7

      1. Allow

      No opt-out is in effect and the request is permitted. The model call proceeds under the applicable policy.

    8. 8

      2. Redact

      The request is permitted, but identifiers or clinical details not needed for the drafting purpose are removed from the prompt, consistent with minimum necessary.

    9. 9

      3. Block

      The patient has opted out. No model call is made, and the caller receives a clear reason code.

    10. 10

      4. Route to manual

      Following a block, the message is sent to a manual drafting queue owned by the care team so the patient still gets a reply.

    11. 11

      5. Escalate

      A human approver reviews the request when policy requires it, such as an ambiguous patient match or a defined exception. The approver's decision is recorded.

    What the evidence record should contain

    • Request identifier, timestamp, entry point, and authenticated caller or service identity
    • Pseudonymous patient reference, not raw identifiers or message content
    • Opt-out state used, its source system, and the age of the value at decision time
    • Policy version evaluated, outcome returned, and reason code
    • Action applied: model call made or not, fields redacted, tool call allowed or stopped
    • Approver identity and decision for escalations, plus the retention and residency setting applied

    Why a preference flag is not enforcement

    Most organizations record an AI opt-out as a preference in the EHR or portal. That records the patient's choice. It does not control what happens when a messaging or clinician-assist workflow calls a model. Preference data lives in one system and drafting workflows run in another, so an opt-out can be missed through a stale cache, an alternate entry point, or a tool call that never touches the portal UI.

    The practical fix is to treat the opt-out as a runtime policy decision. The question is asked and answered for each drafting request, inside the path the request takes to the model, and the answer is recorded.

    The regulatory backdrop is general rather than specific to AI drafting. As of November 2026, certified health IT must let patients and their authorized representatives use an internet-based method to request a restriction on data expressed in the 45 CFR 170.213 standards. OCR guidance, as summarized by HHS, names access controls, audit controls and the minimum necessary standard as expected safeguards. CMS states that consent preferences included in a transaction must be shared with all involved parties. None of these makes an AI-drafting opt-out a specific legal mandate, so treat it as an organizational policy commitment that you must be able to demonstrate.

    Resolving the opt-out signal at request time

    The opt-out may be held in a portal-level flag, a consent record in the EHR, or a message that updates downstream systems. Consent directives and ADT messages are both recognized channels for conveying a patient's decision to share, not share or withdraw. Pick one system of record for the AI opt-out and make every other copy derivative.

    Resolve identity before preference. A preference lookup keyed on a loosely matched name or an unverified portal session can return the wrong patient's state. Use the same canonical identifier the EHR uses, and treat an unresolved or ambiguous match as a failed lookup, not as no opt-out.

    Decide on a staleness budget. Caching is acceptable only with an explicit maximum age, and the cache must be invalidated when the system of record changes. Certified health IT must revoke an authorized application's access within 1 hour of a patient's request. That requirement covers app access, not AI opt-outs, but some teams use it as a reference point when setting a propagation target. Whatever limit you choose, record the age of the preference value used in each decision so you can show how current it was.

    Failure modes and PHI in prompts

    The hardest design choice is what happens when the preference lookup is unavailable, times out, or returns an unclear result. Fail-open keeps drafting available but means an opted-out patient's message may reach a model during an outage. Fail-closed protects the patient's choice at the cost of availability. For an opt-out, fail closed. Soften the operational impact by routing failed-lookup requests to the manual workflow, or to human approval where policy allows, rather than returning an error to the clinician.

    Test the failure path deliberately. Simulate an unavailable preference service, a stale cache past its limit, and an unmatched patient identifier. In each case confirm that no model call is made and that an evidence record shows why.

    Treat prompts as a PHI exposure surface. Send only the fields the drafting purpose needs, and apply redaction before the request leaves your boundary. Do the same for tool calls, where an agent may pull chart data the portal UI would never display. Apply the decision point to the tool call itself, not only to the initial request.

    Opt-out enforcement in the execution path

    Request

    A drafting request arrives from the portal, a clinician-assist tool, or a tool call.

    Resolve

    Patient identity and current opt-out state are resolved at request time.

    Decide

    Policy returns allow, redact, block, or escalate before any model call.

    Record

    An evidence record captures the decision and the action applied.

    Apply the opt-out inside the execution path

    Talk through your entry points, failure behavior and evidence requirements with an expert who works on runtime enforcement for regulated enterprises.

    Talk to an Expert
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.