Skip to main content

About the project

MedHistory: Autonomous Neuro-Symbolic Clinical Safety Sentinel

Preventable adverse drug events (ADEs) caused by polypharmacy remain one of the most critical hazards in modern healthcare, largely because patient medication histories remain trapped in fragmented, unstructured PDFs and clinical consultation notes. While generative LLMs attempt to process medical text, they introduce unacceptable risks: probabilistic hallucinations, missed contraindications, and Protected Health Information (PHI) leaks over third-party cloud APIs.

MedHistory solves this crisis through a 100% offline, neuro-symbolic clinical safety agent that bridges messy human text and strict pharmacological ground truth:

  • Neural Perception (Local BioBERT): Utilizes an open-weight BioBERT model fine-tuned on the gold-standard BC5CDR biomedical corpus. Operating entirely on-device, a sliding-window token classification pipeline extracts exact character-aligned clinical spans for active drugs, dosages, and conditions without cloud dependency.
  • Symbolic Safety Engine: Completely bypasses LLM hallucination risks by employing a deterministic, rule-based gatekeeper grounded in FDA/BNF guidelines. It autonomously maps brand-to-generic aliases (e.g., Coumadin → Warfarin, Advil → Ibuprofen) and checks both intra-prescription and multi-visit drug-drug interactions (DDIs).
  • Fail-Closed EHR Integrity: Enforces cumulative daily dosage ceilings (e.g., Paracetamol max 4,000 mg/day) and instantly blocks conflicting treatments—surfacing the biological mechanism of risk while keeping patient charts read-only to prevent database corruption.
  • Agent Skill Open Standard: Built under the .agents/skills/ specification (agentskills.io), enabling seamless, modular execution by higher-level clinical orchestrators, LLMs, or autonomous agents via CLI.

MedHistory transforms static, unstandardized medical PDFs into an auditable, privacy-preserving defense against fatal prescribing errors.

Built with

huggingfacepythoncsshtml5geminiopenaiollamapytorchTransformersBioBERTstreamlitpypdfReportLabAgent Skill Open Standardjson

AI tools

Coded withGitHub CopilotGemini 3.8 FlashGPT-6 LunaGPT-5.5Other QwenGemini 3.1 Pro

Prize Categories Entered

  • DigitalOcean

    Best Open-Source AI Project

    Submitted