Healthcare (EU — GDPR)
Map European health-data controls for GDPR Article 9 and EU AI Act risk management with this starter.
What it checks
| Policy | On | Checks | Action |
|---|---|---|---|
| prompt-injection | Request | Similarity threshold 0.75 | Block |
| rbac | Request | Requires the X-User-ID and X-Org-ID headers | Block |
| gdpr-compliance | Request | Requires the X-GDPR-Consent header | Block |
| pii-detector | Request | Healthcare identifiers; 9 custom identifier patterns | Redact |
| dlp-filter | Request | 3 blocked terms such as “export patient data” and “transfer to third country”; 6 custom patterns | Block |
| language-validator | Both | Allowed languages: en, de, fr, es, pt | Block |
| healthcare-compliance | Response | 8 blocked phrases such as “diagnosis:” and “you likely have”; adds 2 disclaimers; FDA class II | Block, add disclaimers |
| citation-verifier | Response | Requires cited sources; confidence ≥ 0.85 | Flag |
| quality-scorer | Response | Accuracy ≥ 0.88; combined score ≥ 0.80; healthcare profile | Block |
| bias-monitor | Response | Bias score threshold 0.85 | Escalate |
| audit-logger | Request | Adds an allow-only audit marker to the decision | Record |
Policy YAML
pack:
id: "cfg_demo_healthcare_eu_gdpr"
name: "demo-healthcare-eu-gdpr"
version: "0.2.0"
enabled: true
author: "local"
description: "EU GDPR Article 9 health data compliance for European healthcare AI systems"
# Capture in redacted mode — data minimization principle (Art. 5(1)(c))
history:
capture:
enabled: true
mode: redacted
distributed_rate_limit:
backend: valkey
url_env: VERDICTAN_REDIS_URL
policies:
chain:
- "prompt-injection"
- "rbac"
- "gdpr-compliance"
- "pii-detector"
- "dlp-filter"
- "language-validator"
- "healthcare-compliance"
- "citation-verifier"
- "quality-scorer"
- "bias-monitor"
- "audit-logger"
policy:
prompt-injection:
embedding_threshold: 0.75
response:
action: "block"
rbac:
# Ensure data subject identification for GDPR rights exercise
deny_if_missing:
- "X-User-ID"
- "X-Org-ID"
gdpr-compliance:
# Article 9 — explicit consent required for health data processing
consent_required: true
consent_header: "X-GDPR-Consent"
data_categories:
- "health"
- "genetic"
- "biometric"
- "clinical_research"
pii-detector:
healthcare_mode: true
action: redact
detect_patterns:
- "(?i)(?:patient\\s*id|patient\\s*#|pt\\s*id)\\s*[:#-]?\\s*[A-Z0-9-]{6,16}"
- "\\b\\d{3}\\s?\\d{3}\\s?\\d{4}\\b"
- "(?i)\\behic\\s*[:#-]?\\s*[A-Z0-9-]{10,20}"
- "\\b\\d{9}\\b"
- "\\b\\d{11}\\b"
- "(?i)\\btessera\\s+sanitaria\\s*[:#-]?\\s*[A-Z0-9-]{4,20}"
- "(?i)\\bcarte\\s+vitale\\s*[:#-]?\\s*[A-Z0-9-]{4,20}"
- "(?i)\\b(?:iban)\\s*[:#-]?\\s*[A-Z]{2}\\d{2}[A-Z0-9]{11,30}\\b"
- "(?i)(?:national\\s*id(?:entifier)?|national\\s+insurance\\s+number|ni\\s+number|nid)\\s*[:#-]?\\s*[A-Z0-9-]{5,20}"
dlp-filter:
detect_patterns:
- "(?i)\\bgenetic\\s+(?:data|information|profile|test\\s+results)\\b"
- "(?i)\\bbiometric\\s+(?:data|template|identifier|record)\\b"
- "(?i)\\bclinical\\s+trial\\s+(?:data|record|results)\\b"
- "(?i)\\bpsychiatric\\s+(?:record|evaluation|note)\\b"
- "(?i)\\bhiv\\s+(?:status|diagnosis|test\\s+result)\\b"
- "(?i)\\bsubstance\\s+use\\s+(?:history|disorder|record)\\b"
action: block
blocked_terms:
- "export patient data"
- "transfer to third country"
- "share with"
language-validator:
# Enforce the currently supported EU deployment languages across request and response paths
allowed_languages:
- "en"
- "de"
- "fr"
- "es"
- "pt"
min_confidence: 0.70
action: block
apply_to: both
healthcare-compliance:
blocked_patterns:
- "diagnosis:"
- "you likely have"
- "you may have"
- "you are suffering from"
- "your diagnosis is"
- "i diagnose you"
- "prescribe"
- "take this medication"
required_disclaimers:
- "consult your healthcare provider"
- "this system does not provide medical diagnoses"
fda_class: "II"
citation-verifier:
require_sources: true
min_confidence: 0.85
quality-scorer:
industry: healthcare
thresholds:
min_aggregate: 0.80
min_accuracy: 0.88
bias-monitor:
# EU AI Act requires bias monitoring for high-risk health AI
threshold: 0.85
audit-logger: {}