Healthcare (U.S. — HIPAA)

Start with selected HIPAA controls for protected health information, minimum-necessary access, retention and clinical review.

Industry starter · Regulated SaaS, Clinical zero-retention

What it checks

Policies in the Healthcare (U.S. — HIPAA) template, in the order the gateway runs them
PolicyOnChecksAction
prompt-injectionRequestSimilarity threshold 0.70Block
rbacRequestRequires the X-User-ID, X-Org-ID and X-User-Role headersBlock
hipaa-phi-detectorRequestAdds HIPAA-style PHI checks to the shared redaction pipelineRedact
pii-detectorRequestHealthcare identifiers; 11 custom identifier patternsRedact
dlp-filterRequest4 blocked terms such as “export all patients” and “download patient database”; 7 custom patternsBlock
healthcare-complianceResponse13 blocked phrases such as “diagnosis:” and “you likely have”; adds 2 disclaimers; FDA class IIBlock, add disclaimers
citation-verifierResponseRequires cited sources; confidence ≥ 0.90Flag
quality-scorerResponseAccuracy ≥ 0.92; combined score ≥ 0.85; healthcare profileBlock
audit-loggerRequestAdds an allow-only audit marker to the decisionRecord
Policy YAML
pack:
  id: "cfg_demo_healthcare_us_hipaa"
  name: "demo-healthcare-us-hipaa"
  version: "0.2.0"
  enabled: true
  author: "local"
  description: "HIPAA Privacy & Security Rule compliance for US healthcare AI systems"

# HIPAA §164.312(b) — audit controls require logging all access
history:
  capture:
    enabled: true
    mode: redacted

# Rate limiting prevents bulk PHI extraction attempts
distributed_rate_limit:
  backend: valkey
  url_env: VERDICTAN_REDIS_URL

policies:
  chain:
    - "prompt-injection"
    - "rbac"
    - "hipaa-phi-detector"
    - "pii-detector"
    - "dlp-filter"
    - "healthcare-compliance"
    - "citation-verifier"
    - "quality-scorer"
    - "audit-logger"

policy:
  prompt-injection:
    embedding_threshold: 0.70
    response:
      action: "block"

  rbac:
    # §164.312(a)(1) — access control: require authenticated user identity
    deny_if_missing:
      - "X-User-ID"
      - "X-Org-ID"
      - "X-User-Role"

  hipaa-phi-detector:
    # Safe Harbor method (§164.514(b)(2)) — all 18 HIPAA identifiers
    action: redact

  pii-detector:
    healthcare_mode: true
    action: redact
    detect_patterns:
      - "(?i)(?:mrn|mr#|medical\\s+record)\\s*(?:#|:|number)?\\s*[:#-]?\\s*[A-Z0-9-]{6,12}"
      - "(?i)(?:patient\\s*id|patient\\s*#|pt\\s*id)\\s*[:#-]?\\s*[A-Z0-9-]{6,16}"
      - "(?i)(?:insurance|member|policy)\\s*(?:id|#|number)\\s*[:#-]?\\s*[A-Z0-9-]{6,20}"
      - "(?i)\\bmedicare\\s*(?:id|#|number|beneficiary)?\\s*[:#-]?\\s*[A-Z0-9-]{6,20}"
      - "(?i)\\bmedicaid\\s*(?:id|#|number)?\\s*[:#-]?\\s*[A-Z0-9-]{6,20}"
      - "(?i)\\bnpi\\s*[:#-]?\\s*\\d{10}\\b"
      - "(?i)\\bdea\\s*[#-]?\\s*[A-Z]{2}\\d{7}\\b"
      - "(?i)(?:device|unit|asset)\\s+serial\\s*(?:#|number)?\\s*[:#-]?\\s*[A-Z0-9-]{4,24}"
      - "(?i)\\bbiometric\\s*(?:id|identifier|template)\\s*[:#-]?\\s*[A-Z0-9-]{4,40}"
      - "(?i)\\b(?:facial\\s+image|face\\s+photo|portrait)\\b"
      - "(?i)(?:vehicle|unit|fleet)\\s*(?:id|#|number)\\s*[:#-]?\\s*[A-Z0-9-]{4,20}"

  dlp-filter:
    # Prevent bulk extraction of clinical data
    detect_patterns:
      - "(?i)\\bpatient\\s+(?:list|roster|census)\\b"
      - "(?i)\\bcensus[_\\s-]+report\\b"
      - "(?i)\\bdischarge\\s+summary\\b"
      - "(?i)\\boperative\\s+note\\b"
      - "(?i)\\bpathology\\s+report\\b"
      - "(?i)\\bradiology\\s+report\\b"
      - "(?i)\\bpharmacy\\s+(?:record|profile|history)\\b"
    action: block
    blocked_terms:
      - "export all patients"
      - "download patient database"
      - "list all records"
      - "bulk extract"

  healthcare-compliance:
    # Prevent AI from providing clinical advice (practicing medicine)
    blocked_patterns:
      - "diagnosis:"
      - "you likely have"
      - "you are suffering from"
      - "your diagnosis is"
      - "i diagnose you"
      - "prescribe"
      - "take this medication"
      - "increase your dosage"
      - "stop taking"
      - "discontinue"
      - "your prognosis is"
      - "you will recover"
      - "you have cancer"
    required_disclaimers:
      - "This is not medical advice"
      - "Consult your healthcare provider"
    fda_class: "II"

  citation-verifier:
    require_sources: true
    min_confidence: 0.90

  quality-scorer:
    industry: healthcare
    thresholds:
      min_aggregate: 0.85
      min_accuracy: 0.92

  audit-logger: {}