Blog

    Building EHR Consent Management

    By GauravNovember 26, 20268 mins read
    On this page

    Consent in many EHRs is a scanned form in the documents tab. It proves a patient signed something, but no system can act on it: the interface engine still sends records, the portal still shares, and nobody notices when the patient withdraws.

    This post covers how to build consent as data the EHR can enforce. It walks through capture, storage, enforcement and revocation, and the special cases that make consent harder than a yes or no checkbox. The focus is the software; what your consent forms must say is a question for your privacy officer and counsel.

    Building identity and consent into a product?

    Our patient identity and consent page covers the consent records and enforcement we build.

    EHR consent management is the part of the record that captures what a patient has agreed to, stores it as structured data, and checks it before data is used or shared. Agnotic Technologies builds it so the interface engine, portal and analytics jobs all read the same consent record, instead of each keeping its own flag.

    A consent that is stored but never checked is only paperwork.

    Consent covers more than treatment. List the types your product touches before designing the model.

    • Treatment: agreement to a procedure or a care program.
    • Sharing: who may receive records, such as another provider, a family member or an exchange.
    • Restrictions: limits the patient asks for on specific uses or recipients.
    • Research: permission to use data for a study.
    • Communication: channels the patient agrees to, such as text messages.

    Store each consent as a record with a scope, the parties, the actions allowed or denied, a time period and a status. Keep the signed document too, linked to the record, as evidence.

    In HL7 FHIR R4, the Consent resource is a record of a healthcare consumer's choices that permits or denies identified recipients or recipient roles to perform one or more actions within a given policy context, for specific purposes and periods of time.

    Using the FHIR Consent shape for your internal model makes it easier to exchange consent with other systems later, even if you do not expose it as an API on day one.

    Capture consent where the patient already is, and record enough context to defend it later: who consented, to which version of the form, how, when and who witnessed it.

    • Front desk: a tablet form that writes the structured record and the signed document at the same time.
    • Portal: an electronic signature after the patient has signed in, with the form text shown in full.
    • Verbal: recorded by staff with the date, the staff member and the exact choice, for consents where verbal agreement is allowed.
    • Proxies: a parent, guardian or authorized representative, recorded as the person who consented, with their relationship to the patient.

    Version every form. When the wording changes, existing consents still point at the text the patient actually saw.

    Enforcement belongs at every point where data leaves its original context. Put one policy check service in front of them, so a change in consent applies everywhere at once.

    • Outbound interfaces: before the engine sends a message or document.
    • Portal and proxy access: before a family member sees a record.
    • Exchange queries: before responding to another organization.
    • Analytics and research extracts: before data enters a dataset.

    How should the policy check service work?

    The policy check takes a request and returns a decision with a reason. Every caller sends the same inputs: the patient, the recipient, the purpose, and the labels on the data about to leave.

    • Decisions: permit, deny, or permit with some records removed, so one restricted note does not block a whole referral packet.
    • Reasons: the consent record and rule that produced the decision, returned to the caller and written to the audit log.
    • No consent found: apply the default your privacy officer has approved for that purpose, and log that a default was used.
    • Service down: fail closed for disclosures outside the organization, and queue the request rather than sending it unchecked.
    • Caching: callers may cache a decision only briefly, and must drop the cache when a consent change event arrives.

    Keep the rules in configuration the privacy team can read, with version numbers, so a decision made last year can be explained with last year's rules.

    How should expiry and renewal work?

    Give every consent an end condition, even if it is open-ended, and let the system act on it. A consent that quietly outlives its period is as risky as one that was never recorded.

    • Expiry dates: the policy service treats an expired consent as absent, and the chart shows it as expired, not active.
    • Renewal prompts: list upcoming expiries for the front desk and the portal, so renewal happens at the next visit.
    • Form changes: when the privacy team says a new form version needs fresh agreement, flag patients on the old version.
    • Age changes: when a minor reaches adulthood, end the guardian's proxy consent and ask the patient directly.

    The privacy officer owns the rules; engineering owns the code that applies them. Mixing the two leads to policy decisions made in pull requests.

    Agree a change process: the privacy officer writes the rule change in plain language, engineering turns it into configuration and test patients, and the privacy officer signs off the test results before release.

    Some records carry stricter rules, and some requests the provider must honor even when the default would be to share.

    42 CFR Part 2 restricts the use and disclosure of substance use disorder patient records maintained by federally assisted Part 2 programs, separately from the HIPAA Privacy Rule.

    Under 45 CFR 164.522(a)(1)(vi), a covered entity must agree to a request to restrict disclosure to a health plan for payment or health care operations, when not otherwise required by law, if the information relates solely to an item or service that has been paid for in full.

    Both cases need data labels on the records they cover, so the policy check knows which notes, results or claims are affected.

    How should revocation work?

    Revocation should take effect from the moment it is recorded, for every system that checks consent. It cannot pull back data already disclosed under a valid consent, so record what was shared and when.

    • Record it: status changes to revoked, with the date and who recorded it.
    • Propagate it: the policy service stops future disclosures immediately.
    • Notify: tell downstream systems that cache consent to refresh.
    • Show it: staff see the current status on the chart, not only in a document.

    When data leaves your system, the receiving organization needs to know what limits apply to it. Otherwise a restriction honored in your EHR disappears one hop later.

    • Labels with the data: send security labels or notices with restricted records, so the receiver's system can apply them.
    • Consent with the request: for exchange queries, check consent before answering and record which consent allowed the response.
    • Standard format: use the FHIR Consent shape when you share consent records themselves, so the receiver does not have to interpret a PDF.

    Agree these rules with each exchange partner during onboarding, and test them with a restricted test patient before real data flows.

    With test patients built to break it. Create one patient for each consent case, then run every outbound path against them.

    • A patient who refused sharing with one named recipient.
    • A patient with a restriction on disclosure to their health plan.
    • A patient with records covered by a stricter rule, mixed with ordinary records.
    • A minor with a guardian proxy, and the same patient after reaching adulthood.
    • A patient who consented and then revoked.

    Every path should behave as the consent says, and every check should leave an audit entry. Run the suite again whenever a new interface or export is added.

    • Consent as a checkbox: a yes or no flag with no scope, recipient or expiry.
    • Copies per system: the portal, engine and data warehouse each keep their own flag.
    • No labels: sensitive records not marked, so the check cannot tell them apart.
    • Paper only: the signed form scanned, the structured record never created.

    Keep one consent record per decision, one policy service that every outbound path calls, labels on sensitive data, and an audit trail of each check. Test revocation end to end: record a withdrawal and confirm every channel stops sharing.

    How Agnotic can help

    Agnotic builds consent capture, storage and enforcement for EHRs and patient-facing products, including the policy service, data labels and FHIR Consent exchange. We usually start by tracing every path data takes out of your system and finding where a consent check is missing.

    Build consent management with Agnotic

    We design the consent model and put one policy check in front of every outbound path.

    Related reading on Agnotic

    Patient access, data security and minimum necessary access.

    Sources

    Frequently Asked Questions

    It captures what a patient has agreed to as structured data and checks that record before information is used or shared.

    Talk to an engineer about your project

    Show us where your data leaves the EHR. We will find the paths with no consent check.