Inferensys

Prompt

Healthcare Disclosure Decision Gate Prompt

A practical prompt playbook for using the Healthcare Disclosure Decision Gate Prompt in production AI workflows to evaluate HIPAA disclosure compliance before data is released.
Compliance officer monitoring AI compliance agent on laptop, policy dashboards visible, modern WeWork desk setup.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the specific job-to-be-done, the ideal user, and the operational boundaries for the Healthcare Disclosure Decision Gate Prompt.

This prompt is an engineering control for health-tech applications that must evaluate a proposed disclosure of protected health information (PHI) before it leaves the system. The ideal user is a backend engineer, an AI product developer, or a compliance architect integrating an LLM into a clinical data pipeline, a patient portal, or a data export service. The prompt's job is not to make the final legal determination but to act as a deterministic, auditable gate that enforces your organization's disclosure policy at the application layer. It expects a structured input containing the proposed content, the recipient's role and authorization status, and the specific HIPAA provision under which the disclosure is requested.

You should use this prompt when your application generates a response, prepares a data export, or services an access request that may contain PHI. It is designed for synchronous, pre-transmission checks where latency is acceptable in exchange for a documented decision. The prompt produces a structured JSON decision with a clear allow, deny, or needs_review status, a minimum necessary determination, and a concise audit trail entry. This output should be logged immutably before any data is released. The prompt is not a replacement for legal counsel or a HIPAA compliance officer; it is a software control that ensures every automated disclosure is evaluated against a consistent policy before execution.

Do not use this prompt for real-time clinical decision support, de-identification of data sets, or as a substitute for a patient's right to access their own records under 45 CFR § 164.524. It is also not designed to interpret complex, multi-party information blocking rules. The prompt's strength is in evaluating a single, well-scoped disclosure request against a provided policy snippet. For any output marked needs_review, you must route the request to a human reviewer and block the automated release. The next section provides the copy-ready prompt template you can adapt to your specific policy language and output schema.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Healthcare Disclosure Decision Gate Prompt works, where it fails, and the operational preconditions required before deploying it in a health-tech product.

01

Good Fit: Structured Disclosure Checks

Use when: the system must decide if a specific AI-generated response or data access request complies with HIPAA disclosure rules. Guardrail: Provide the exact PHI fields, recipient role, and patient authorization status as structured inputs—never rely on the model to infer these from free text.

02

Bad Fit: Clinical Decision Support

Avoid when: the prompt is asked to determine medical necessity, treatment appropriateness, or clinical risk. Guardrail: This prompt gates disclosure, not care. Route clinical questions to a separate, validated clinical review workflow with licensed clinician approval.

03

Required Input: Authorization Evidence

Risk: The model cannot verify whether a patient authorization actually exists. Guardrail: The prompt must receive a boolean or enumerated authorization status from a system of record. Never ask the model to infer authorization from conversation history or document text.

04

Required Input: Minimum Necessary Scope

Risk: The model may approve disclosure of more PHI than is minimally necessary for the stated purpose. Guardrail: Pre-compute the specific data fields requested and pass them as a bounded list. The prompt's job is to validate the scope against the recipient's role and purpose, not to invent it.

05

Operational Risk: Hallucinated Regulatory Citations

Risk: The model may fabricate HIPAA rule references or Safe Harbor method details. Guardrail: The prompt must instruct the model to cite only rule sections provided in the grounding context. Include an eval check that flags any citation not present in the input policy text.

06

Operational Risk: Borderline PHI Exposure

Risk: The model may approve disclosure for de-identified data that still carries re-identification risk. Guardrail: Any decision where the model confidence is below a defined threshold or where the data falls into an expert-determination gray zone must route to a human privacy officer for review before the gate opens.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template with square-bracket placeholders for evaluating AI-generated responses against HIPAA disclosure rules. Wire this directly into your disclosure review pipeline.

This prompt template is designed to be the core decision engine for a healthcare disclosure gate. It forces the model to act as a compliance analyst, evaluating a proposed AI-generated response or data access request against HIPAA's Privacy Rule. The template is structured to produce a machine-readable JSON output that includes a clear decision, a minimum_necessary_determination, and a detailed audit_trail. This structured output is critical for integrating the gate into an automated pipeline where the decision can be parsed and acted upon programmatically.

text
You are a HIPAA compliance analyst. Your task is to evaluate the following proposed disclosure of Protected Health Information (PHI) against the HIPAA Privacy Rule. You must determine if the disclosure is permitted without patient authorization for the stated purpose.

## INPUT DATA
- **Proposed Disclosure:** [PROPOSED_DISCLOSURE_TEXT]
- **Purpose of Disclosure:** [PURPOSE_OF_DISCLOSURE]
- **Patient Authorization Status:** [PATIENT_AUTHORIZATION_STATUS]
- **Relevant Patient Directives:** [PATIENT_DIRECTIVES]
- **State Law Preemption Notes:** [STATE_LAW_NOTES]

## CONSTRAINTS
1.  Apply the **Minimum Necessary Standard**: Only disclose the PHI that is minimally necessary to accomplish the stated purpose.
2.  **Psychotherapy Notes**: If the proposed disclosure contains psychotherapy notes, the decision must be `BLOCK` unless there is specific, separate patient authorization.
3.  **Marketing & Fundraising**: Disclosures for marketing or fundraising purposes without authorization must be `BLOCK`.
4.  **De-identification**: If the text has been de-identified according to the Safe Harbor method, the decision should be `PERMIT`.
5.  **Law Enforcement**: Disclosures to law enforcement are only `PERMIT` if they meet specific conditions (e.g., court order, to identify a suspect). Clearly state the condition in the audit trail.

## OUTPUT SCHEMA
You must respond with a single JSON object conforming to this schema:
{
  "decision": "PERMIT" | "BLOCK" | "NEEDS_HUMAN_REVIEW",
  "minimum_necessary_determination": {
    "is_minimal": boolean,
    "rationale": "string explaining why the data is or is not minimally necessary"
  },
  "phi_categories_identified": ["string"],
  "audit_trail": {
    "rule_applied": "string",
    "reasoning": "string",
    "risk_level": "LOW" | "MEDIUM" | "HIGH"
  },
  "recommended_redactions": ["string"]
}

## EVALUATION INSTRUCTIONS
1.  Analyze the [PROPOSED_DISCLOSURE_TEXT] for any of the 18 HIPAA identifiers.
2.  Check the [PURPOSE_OF_DISCLOSURE] against permitted uses (Treatment, Payment, Operations) and any [PATIENT_DIRECTIVES].
3.  If the [PATIENT_AUTHORIZATION_STATUS] is `VALID`, you may `PERMIT` the disclosure, but still apply the Minimum Necessary Standard.
4.  If any condition is ambiguous or you are uncertain, set the decision to `NEEDS_HUMAN_REVIEW` and explain the ambiguity in the audit trail.
5.  If the decision is `BLOCK`, you must provide a clear, specific reason in the audit trail.

To adapt this template, start by replacing the placeholders with your actual data sources. The [PROPOSED_DISCLOSURE_TEXT] should be the exact output from your AI system. The [PATIENT_AUTHORIZATION_STATUS] should be a boolean or string pulled from your application's consent management database. The most critical adaptation is the OUTPUT SCHEMA; ensure the decision enum values (PERMIT, BLOCK, NEEDS_HUMAN_REVIEW) map directly to the control flow in your application code. Before deploying, run this prompt through a battery of eval cases, including edge cases like disclosures involving minors, deceased patients, or data mixed with state-law-protected categories like HIV/AIDS status, to ensure the NEEDS_HUMAN_REVIEW path is correctly triggered. Never allow a PERMIT decision to bypass a final human review step for any output flagged as MEDIUM or HIGH risk.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the Healthcare Disclosure Decision Gate Prompt needs to work reliably. Validate these before each call to prevent unauthorized PHI exposure and ensure audit trail integrity.

PlaceholderPurposeExampleValidation Notes

[REQUESTED_DATA]

The specific data fields or categories the system wants to disclose

patient_medication_list, last_lab_results, appointment_history

Must be a non-empty string. Map to known data categories before calling. Reject if category is unrecognized or overly broad.

[REQUESTOR_ROLE]

The role or relationship of the entity requesting the data

treating_physician, billing_department, patient, third_party_app

Must match an enumerated role list. Unknown roles must escalate to human review before gate evaluation.

[PATIENT_AUTHORIZATION_STATUS]

The current authorization state for the patient and the specific data scope

full_authorization_on_file, partial_authorization_psychotherapy_notes_excluded, no_authorization, emergency_exception

Must be verified against the system of record, not inferred from context. Null or stale status triggers a blocking decision.

[DISCLOSURE_PURPOSE]

The stated reason for the data disclosure request

treatment_coordination, payment_processing, patient_portal_access, research_with_consent

Must be a non-empty string. Cross-reference against HIPAA-permitted uses. Vague purposes like 'review' or 'analysis' require human clarification.

[MINIMUM_NECESSARY_SCOPE]

The bounded set of data fields deemed necessary for the stated purpose

medication_name, dosage, prescribing_physician, last_fill_date

Must be a subset of [REQUESTED_DATA]. If the requested data exceeds this scope, the gate must recommend reduction. Validate with a set comparison check.

[STATE_LAW_OVERRIDES]

Any applicable state privacy laws that impose stricter rules than HIPAA

California_CMIA_psychotherapy_notes_require_patient_consent, Texas_HB300_training_required

Can be null. If provided, must reference a known state law from a maintained registry. Unknown law names trigger a human review flag.

[AUDIT_TRAIL_ID]

A unique identifier linking this gate decision to the system's audit log

gate_req_2025-06-15_0042_a7f3c

Must be a non-empty string matching the system's audit ID format. Missing or malformed IDs cause a validation failure before the prompt is called.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Healthcare Disclosure Decision Gate Prompt into a production application with validation, retries, logging, and mandatory human review.

The Healthcare Disclosure Decision Gate Prompt is designed to be a synchronous, blocking step in a larger AI pipeline—not a standalone chatbot interaction. The application layer must enforce the gate: if the prompt returns a decision of BLOCK or NEEDS_REVIEW, the downstream disclosure action must be programmatically halted. The prompt itself is an advisory decision engine; the application code is the enforcement mechanism. This separation ensures that even if the model hallucinates a PROCEED decision under adversarial conditions, the surrounding harness can apply additional checks before any protected health information (PHI) is transmitted.

Wire the prompt into a structured API call with explicit JSON mode enabled. The application must supply the required inputs—[DISCLOSURE_REQUEST], [PATIENT_CONTEXT], [DISCLOSURE_POLICY], and [AUDIT_TRAIL_ID]—from trusted upstream sources. After receiving the model response, validate the output against a strict schema: decision must be one of PROCEED, BLOCK, or NEEDS_REVIEW; minimum_necessary_determination must be a non-empty string; patient_authorization_status must be one of AUTHORIZED, NOT_AUTHORIZED, or NOT_APPLICABLE; and audit_trail_entry must be a valid JSON object containing timestamp, decision, rationale, and reviewer fields. If validation fails, retry once with the validation error appended to the prompt as a correction instruction. If the retry also fails, escalate to a human reviewer and log the failure for prompt debugging.

Human review is mandatory for any NEEDS_REVIEW decision and strongly recommended for all PROCEED decisions in high-risk contexts. The application should route NEEDS_REVIEW cases to a designated review queue with the full prompt context, model output, and a pre-formatted approval UI that allows the reviewer to override the decision with a required justification. For PROCEED decisions, implement a sampling-based audit where a configurable percentage of approvals are surfaced for retrospective human review. Log every decision—including the model's raw output, validation results, retry attempts, and human overrides—to an immutable audit store indexed by [AUDIT_TRAIL_ID]. This creates a defensible record for HIPAA compliance and enables ongoing evaluation of the prompt's accuracy and safety.

Model choice matters: use a model with strong instruction-following and low hallucination rates on structured output tasks. GPT-4o, Claude 3.5 Sonnet, or equivalent frontier models are appropriate. Avoid smaller or older models that may conflate NEEDS_REVIEW with PROCEED under ambiguous policy language. Set temperature to 0 or near-zero to maximize deterministic behavior. Do not implement caching on this prompt—each disclosure decision must be evaluated fresh against the current policy and patient context. If latency is a concern, run the gate check in parallel with other pre-disclosure validations, but never allow the disclosure to proceed before the gate returns a valid, non-blocked decision.

Common failure modes in production include: the model approving disclosure when the patient authorization is expired or absent; the model failing to apply the minimum necessary standard and allowing full record access when a subset would suffice; and the model producing a valid JSON structure but with a rationale that contradicts the decision field. Mitigate these by implementing a secondary validation step that checks semantic consistency between the decision and rationale using a lightweight LLM judge prompt. If the judge flags an inconsistency, escalate to human review regardless of the primary decision. Finally, treat the disclosure policy text as a versioned artifact—when the policy changes, run the new prompt version against a golden test set of historical disclosure scenarios before deploying to production.

IMPLEMENTATION TABLE

Expected Output Contract

The model response must conform to this schema. Validate each field before the disclosure decision is logged or acted upon. Any field that fails validation should trigger a retry or escalation to human review.

Field or ElementType or FormatRequiredValidation Rule

disclosure_decision

enum: ALLOW, DENY, NEEDS_REVIEW

Must be exactly one of the three allowed values. Any other string fails.

minimum_necessary_determination

object

Must contain fields_requested (array of strings) and fields_approved (array of strings). fields_approved must be a subset of fields_requested.

patient_authorization_status

enum: VALID, EXPIRED, NOT_REQUIRED, ABSENT

Must match one of the four enum values. If ABSENT and disclosure_decision is ALLOW, flag for human review.

phi_exposure_risk

enum: NONE, LOW, MEDIUM, HIGH

Must be one of the four values. If HIGH and disclosure_decision is not DENY, fail validation and escalate.

audit_trail_entry

string

Must be a non-empty string between 50 and 2000 characters summarizing the decision rationale, evidence reviewed, and PHI determination.

cited_policy_references

array of strings

Each string must match a section identifier from the provided [POLICY_DOCUMENT]. Empty array allowed only if disclosure_decision is DENY with no applicable policy.

requires_human_review

boolean

Must be true if disclosure_decision is NEEDS_REVIEW or phi_exposure_risk is MEDIUM or HIGH. False otherwise.

review_priority

enum: ROUTINE, PRIORITY, URGENT

Required only when requires_human_review is true. Must be URGENT if phi_exposure_risk is HIGH.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when using a Healthcare Disclosure Decision Gate Prompt and how to guard against it.

01

Hallucinated Regulatory Citations

What to watch: The model invents plausible-sounding HIPAA provisions, CFR references, or interpretive guidance that do not exist. This is especially dangerous in compliance contexts where downstream decisions rely on cited authority. Guardrail: Require the prompt to cite only from provided source text. Implement a post-generation validation step that checks any regulatory citation against a known reference list before the output is accepted.

02

Minimum Necessary Over-Disclosure

What to watch: The model approves disclosure of a full record when only a specific data element is required, violating the HIPAA minimum necessary standard. This often occurs when the prompt does not explicitly force field-level reasoning. Guardrail: Structure the output schema to require a field-by-field necessity justification. Add an eval check that flags any decision where the approved fields equal the total requested fields without explicit per-field rationale.

03

Patient Authorization Misinterpretation

What to watch: The model conflates a general consent form with a valid HIPAA-compliant authorization, or fails to detect an expired or revoked authorization. This leads to false approvals for disclosure. Guardrail: The prompt must extract and validate the authorization's expiration date, scope, and signature requirements against a checklist. Route any authorization older than the policy-defined validity window or with ambiguous scope directly to human review.

04

Psychotherapy Notes Mishandling

What to watch: The model treats psychotherapy notes as standard PHI and approves their disclosure under a general authorization, missing the special HIPAA protections that require separate, specific consent. Guardrail: Add a pre-processing classification step that detects the presence of psychotherapy notes. If detected, the gate prompt must require a separate, explicit authorization flag before allowing disclosure, regardless of other permissions.

05

Context Window Truncation of Policy Text

What to watch: Long policy documents or patient consent forms are truncated by the context window, causing the model to make decisions without seeing critical exclusion clauses or revocation statements at the end of the document. Guardrail: Chunk the input policy and consent documents. Run the gate check on each chunk and require a final synthesis step that reconciles all findings. If any chunk is unreadable, the system must default to "needs human review" rather than approving.

06

False Negative on De-Identified Data

What to watch: The model blocks the release of a properly de-identified dataset under the Safe Harbor method, mistaking statistical noise or anonymized IDs for direct identifiers. This creates unnecessary friction for legitimate research or operational use. Guardrail: Include a specific de-identification verification step in the prompt that checks for all 18 HIPAA identifiers. If none are present and the data meets the Safe Harbor standard, the gate must explicitly permit release with a documented rationale.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks against a golden dataset of 50+ labeled disclosure scenarios to validate the Healthcare Disclosure Decision Gate Prompt before production deployment.

CriterionPass StandardFailure SignalTest Method

Minimum Necessary Determination

Correctly identifies the minimum necessary PHI fields for the stated purpose in >= 95% of cases

Prompt approves disclosure of full record when only a subset is needed, or fails to justify field-level inclusion

Compare [DISCLOSURE_DECISION] fields against labeled ground truth for each scenario; measure precision and recall on field-level necessity

Patient Authorization Status

Correctly classifies authorization as valid, expired, missing, or not required in >= 98% of cases

Prompt treats expired authorization as valid, or requires authorization when an exception applies (e.g., treatment, payment, operations)

Run authorization edge cases through prompt; check [AUTHORIZATION_STATUS] against labeled status; flag any false-valid or false-required errors

Disclosure Decision Accuracy

Final [DECISION] matches labeled outcome (allow, deny, escalate) in >= 97% of cases

Prompt allows a disclosure that should be denied, or denies one that should be allowed under a permitted exception

Confusion matrix on [DECISION] vs. labeled outcome; require 0 false-allow errors on high-risk scenarios

Audit Trail Completeness

Every decision includes all required audit fields: [DECISION_RATIONALE], [CITED_REGULATION], [REVIEWER_REQUIRED], [TIMESTAMP]

Missing [CITED_REGULATION] on an allowed disclosure, or missing [REVIEWER_REQUIRED] flag on a borderline case

Schema validation on output; assert all required fields present and non-null for every test case

Borderline PHI Escalation

Flags >= 90% of borderline scenarios with [REVIEWER_REQUIRED] = true and provides specific uncertainty language

Prompt issues confident allow/deny on scenarios labeled as borderline, or escalates without explaining what is uncertain

Run borderline subset; measure escalation rate and check [DECISION_RATIONALE] contains uncertainty markers (e.g., 'unclear whether', 'may constitute')

Regulation Citation Grounding

All cited regulations in [CITED_REGULATION] match the provided [POLICY_CONTEXT] and contain no hallucinated rule numbers

Prompt invents a regulation number not present in [POLICY_CONTEXT], or cites a rule that does not apply to the scenario

String-match [CITED_REGULATION] against [POLICY_CONTEXT] tokens; flag any citation with < 90% substring overlap with provided text

Refusal Handling for Insufficient Context

When [INPUT_CONTEXT] lacks required information, prompt returns [DECISION] = escalate and [MISSING_INFORMATION] populated

Prompt guesses or assumes missing values (e.g., assumes authorization exists) instead of requesting clarification

Run context-stripped scenarios; assert [DECISION] is not allow or deny when critical fields are absent; check [MISSING_INFORMATION] is non-empty

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a frontier model (GPT-4o, Claude 3.5 Sonnet) and lighter validation. Focus on getting the disclosure decision structure right before adding strict schema enforcement. Replace [POLICY_DOCUMENT] with a short inline summary of your HIPAA disclosure rules. Run 10-15 test cases manually and review each output for obvious errors.

Watch for

  • The model producing disclosure decisions without citing specific policy sections
  • Missing the minimum necessary determination entirely
  • Overly permissive decisions when PHI is involved
  • No clear audit trail structure in the output
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.