feat(healthcare): coherent patient, drug-interaction check, contraindication gate#55
Merged
Merged
Conversation
…ication gate Deepen the clinical realism of the healthcare example while keeping the FDA/NHS/MOH jurisdiction variants untouched. - Replace the thin canned EHR data with one coherent patient: ICD-10-coded diagnoses, medications with dosing, documented allergies and labs. The clinical_decision_support differential now matches the record. - Add ehr.drug_interaction_check, which screens a proposed treatment against the patient's current medications and allergies. The agent passes its result into the write call. - Add a medication-contraindication forbid: a severe interaction or allergy contraindication blocks the treatment-plan write, alongside the existing EU AI Act Art. 14 high-risk human-oversight rule. - Three scenarios (standard / high-risk / contraindication), each with a signed TRACE record regenerated from a real run. - New clinical_engine module + unit tests and a CI job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
imran-siddique
force-pushed
the
feat/healthcare-clinical-realism
branch
from
July 21, 2026 18:10
565ff57 to
09bcd1b
Compare
CodeQL py/clear-text-logging-sensitive-data flagged the patient id printed in the agent banner. For a PHI-handling demo the identifier should not be written to stdout in clear text anyway; it travels in the tool arguments and the signed TRACE record. Redact it in the banner and align the README output sample. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Deepens the clinical realism of the
healthcareexample. Third of three per-example realism PRs (financial-services #53, multi-tenant-saas #54). The FDA/NHS/MOH jurisdiction variants are left untouched (they're self-contained policy/doc variants).Why
The mock EHR returned generic canned data and the differential didn't relate to the record. A clinician would not recognise it as a real case.
Changes
clinical_decision_supportdifferential now matches the record.ehr.drug_interaction_checkscreens a proposed treatment against the patient's current medications and allergies, and the agent feeds its result into the write call.--scenario standard|high-risk|contraindication), each with a signed TRACE record regenerated from a real run.clinical_engine.pymodule,tests/test_clinical_engine.py, and a CI job.Verification
python -m unittest discover -s tests -v→ 6 passcmcp verifypasses schema, signature and audit chain on each record (hardware attestation fails in software-only dev mode, as expected)standard) scenario exits 0, so thesmoke (healthcare)job stays greendefinition_hashvalues recomputed and self-checked🤖 Generated with Claude Code