Restricting AI-Drafted Patient Messages to Approved Patient Education Links Through Runtime Policy Enforcement
Keep an owned, versioned allowlist of clinically reviewed patient education URLs. In the execution path, normalize every URL in each AI-drafted message and check it against that list before delivery. Apply a fixed action to each violation type (allow, redact, block, or escalate for human approval), and retain a record of the policy version, link evaluated, action taken and approver for each decision.
Why prompts and after-send review do not close the gap
A model drafting patient communications can produce a link that points to an unvetted site, an outdated page, a non-clinical source, or an address that never existed. It can also surface content that has not passed clinical content review. An instruction such as "only use approved links" shapes the output but does not guarantee it, because the model has no way to check its own result against your inventory.
Reviewing messages after they are sent has a different flaw. By then the patient has already seen the link, and the review can only document the exposure. For a control to count, it has to run before delivery, on each message, in the path the message travels.
That makes link restriction a runtime enforcement problem. The model may propose anything, but only messages that satisfy policy leave the system. The rest of this guide covers the four decisions that make that work: the allowlist, the matching rules, the action per violation, and the evidence.
Step 1: Define the allowlist and its ownership model
The allowlist is the policy source, so it has to be a governed inventory rather than a spreadsheet someone edits. Each entry should represent a specific patient education resource that a clinical content owner has reviewed, not a whole website by default. Scope entries as narrowly as the content allows: an exact URL or a path prefix, with a whole domain only when every page on it falls under the same review.
Split responsibilities. Clinical content owners decide whether a resource is appropriate for patients. Security or platform engineers decide how it is expressed as a rule and deploy it. Neither should be able to publish an entry alone. Treat every change as a versioned release, so each enforcement decision can be tied to the exact list in force at that moment.
Review cadence and retirement rules are your own policy choices. Set them explicitly, because an outdated page is one of the failures this control exists to prevent. A retired entry should fail closed immediately.
- Resource identifier: Exact URL or path prefix, plus the canonical domain.
- Clinical owner: The named person or committee accountable for the content.
- Review date and next review: When the content was last reviewed and when it must be reviewed again.
- Topic and audience tags: Lets policy restrict which links may appear in which message types.
- Status: Active, under review or retired, with a retirement reason.
- List version: The release that added or changed the entry.
Step 2: Specify URL and domain rules that survive edge cases
Matching raw strings is not enough. Enforcement should extract every URL from the draft, including bare domains and links embedded in formatted text, then reduce each to a canonical form before comparison. Lowercase the host, resolve percent-encoding, strip fragments and default ports, and compare against the allowlist on the canonical result.
The cases below are where simple allowlists tend to fail. Decide each one in advance and write it into policy rather than leaving it to implementation defaults.
- Redirects: An approved address that redirects elsewhere should be judged on its final destination. Treat unresolved or overly long redirect chains as violations.
- Shortened URLs: A shortener hides the destination. Prohibit shorteners outright, or resolve them and evaluate the target.
- Subdomains: Match the exact host or an explicit wildcard. Never match by suffix alone, since a different owner may control a subdomain.
- Lookalike domains: Compare full hostnames, not substrings. A hostname that merely contains an approved name is not approved.
- Query parameters: Define which parameters are tolerated, such as tracking tags, and strip or reject the rest. Parameters can change what a page shows.
- Userinfo and encoding tricks: Reject credentials embedded in the URL and mixed-script or encoded hostnames that obscure the real host.
Step 3: Choose an action for each violation type
The four actions fit different situations, and the choice affects clinician workload and what the patient receives. A reasonable starting point is shown below. It is a design framework to adapt to your own risk tolerance, not a prescribed standard.
Redaction needs care. Removing a URL can leave a sentence that refers to "the link below" with nothing beneath it. Use replacement text written for that purpose, or escalate when the link carries the clinical instruction. Blocking is the most protective action but returns work to staff, so reserve it for cases where the destination cannot be trusted.
- Exact match to an active entry: allow: Deliver the message unchanged and record the matched entry and list version.
- Approved domain, unlisted path or retired entry: redact: Remove the link, substitute approved fallback text, and deliver if the rest of the message stands without it.
- Unknown domain, fabricated address or lookalike host: block: Do not deliver the message as drafted. Return it to the drafting queue and flag the violation.
- Shortened or unresolvable redirect: block: The destination cannot be verified, so the message does not leave.
- Link is central to a discharge or follow-up instruction: escalate: Hold the message and route it to a named clinician or staff member for approval.
Step 4: Design escalation around a responsible human
HealthIT.gov SAFER guidance, which is guidance rather than binding regulation, states that AI-generated recommendations should be reviewed and approved by humans who take responsibility for them before they are sent to patients. It also expects policies and procedures so that patients and clinicians are aware, where possible, when AI-enabled systems are in use, including AI used to respond to patient messages. Link enforcement should sit alongside those expectations, not replace them.
In practice, an escalated message should reach an approver with the draft, the flagged link, the rule that triggered the hold, and the permitted choices: approve as is, edit, replace the link with an allowlisted one, or reject. The approver's identity and decision become part of the record. Without that, an escalation path is only a queue.
Watch the volume. If too many messages escalate, approvers will approve by habit. Track escalation rates by rule, and use them to widen the allowlist through the clinical review process or to correct the drafting workflow, rather than loosening enforcement.
Step 5: Retain evidence of what the AI was permitted to do
Compliance and audit stakeholders will want to see two things: what the AI was allowed to do, and what happened. The first is the policy and allowlist version in force. The second is a per-decision record. The brief for this control names the HIPAA audit controls provision at 164.312(b). Confirm the current regulatory text and map each evidence field to it with your compliance team.
For each evaluated message, retain a reference to the message rather than copying its contents where you can avoid it, since the content may contain PHI. Then record the fields below, and set retention and storage location to match your own requirements.
Trussed enforces policy in the execution path, with allow, redact, block and escalate for human approval applied to individual interactions, and produces audit-ready evidence from those enforcement decisions, mapped to HIPAA among other frameworks. It can be deployed self-managed in the customer cloud, with configurable retention and data residency, and it runs in production with healthcare and pharma organizations.
- Policy and allowlist version: The exact rules and list release applied to the message.
- Links evaluated: Original and canonical forms of each URL, and the resolved destination.
- Match result and rule: Which entry matched, or which rule was violated.
- Action taken: Allow, redact, block or escalate, with a timestamp.
- Approver and outcome: For escalations, the approver identity, decision and any edit.
- Allowlist change history: Who proposed, reviewed and released each entry change.
Link enforcement in the message path
1. Draft
The model drafts a portal message, discharge follow-up or outreach text.
2. Extract and normalize
Every URL is extracted and reduced to a canonical form.
3. Evaluate
Each canonical URL is matched against the versioned allowlist.
4. Act
The message is allowed, redacted, blocked or escalated to a named approver.
5. Record
The decision, policy version and approver are retained as evidence.
Enforce link policy before the patient sees the message
Walk through how enforcement in the execution path and its audit-ready evidence apply to your patient messaging workflows.
Request a DemoHow does your AI governance program compare?
See where your program has gaps in less than 2 minutes.