Inspiration

Hospital discharge summaries are written for clinical billing and chart continuity rather than patient comprehension. The average discharge packet reads at a 12th- to 16th-grade level, dense with Latin dosing shorthand (PO BID q12h PRN), uncontextualized renal and glycemic lab markers (eGFR 52 mL/min/1.73m2, HbA1c 7.8%), and silent pharmacokinetic hazards when combined with everyday over-the-counter items in a home medicine cabinet. At the same time, patients and families rightfully hesitate to paste private clinical notes into cloud AI chatbots because doing so transmits protected health information (PHI) to third-party servers. I built ClinNote to solve both problems at once: a deterministic, bilingual (EN / ES) clinical discharge translator and 24-hour medication safety workbench that executes 100% locally inside the browser with a strict connect-src 'none' Content Security Policy.

What it does

ClinNote (https://aariv.me/clinnote/) transforms dense hospital discharge instructions into an actionable, Grade 5-6 patient care plan:

  1. Deterministic Bilingual (EN / ES) Clinical NLP De-Jargonizer: Translates 38 high-risk clinical abbreviations, routes, frequencies, and medical terms (PO, BID, TID, QID, QD, QAM, QHS, q4h, q6h, q12h, PRN, NPO, AC, PC, MDI, titrate, contraindicated, dyspnea, intercostal retractions, orthostatic hypotension, nephrotoxicity, eGFR, HbA1c, SpO2, melena, hemoptysis, epistaxis, chelation, postprandial, hypoglycemia, hyperkalemia) into plain English and Spanish instructions.
  2. Live Readability Telemetry: Calculates Flesch-Kincaid Grade Level before and after translation, Syllable-per-Word Density, Jargon Term Count eliminated, and Comprehension Clarity Gain (%) on both 4 realistic clinical scenarios (Post-ER Acute Bronchospasm, Type 2 Diabetes & CKD Stage 3a, Post-Op Knee Arthroplasty & Anticoagulation, Hypertensive Urgency & Fasting Thyroid Sync) and any custom text pasted by the user.
  3. 24-Hour Medication Clock & OTC Pharmacokinetic Collision Matrix: Maps 7 daily dosing checkpoints (06:00 to 22:00) on an interactive SVG timeline and lets users simulate adding common home cabinet items (Ibuprofen 400 mg NSAID, Calcium 600 mg + Iron Supplement, Diphenhydramine 25 mg, Grapefruit Juice). It deterministically flags CRITICALCONTRAINDICATION (Apixaban + Ibuprofen hemorrhage risk, Grapefruit Juice CYP3A4 inhibition), RENAL_TRIPLE_WHAMMY (Lisinopril + Empagliflozin + Ibuprofen in Stage 3a CKD), ABSORPTION_CHELATION (Levothyroxine + Calcium/Iron), and SEDATION_STACK (Oxycodone + Diphenhydramine).
  4. Red-Flag Symptom Triage & 1-Page Printable Refrigerator Sheet: Evaluates observed post-discharge symptoms into ROUTINE HOME CARE, SAME-DAY CLINIC CALL, or IMMEDIATE EMERGENCY DEPARTMENT dispositions and formats a bilingual @media print refrigerator medication schedule.

How we built it

  • Pure ES Module Clinical & Pharmacokinetic Engine (js/clinnote-engine.js): Built with zero external runtime dependencies so the entire lexicon, syllable counter, Flesch-Kincaid calculator, and 24-hour collision matrix run deterministically in both the browser and Node.js test runners.
  • Swiss Medical Editorial Interface (index.html, styles.css, js/app.js): Designed on a warm archival medical ivory palette (#F7F5F0 ground, #111820 slate ink, #0D7A5F clinical emerald, #C8640A caution amber, #C92A2A contraindication crimson) with Instrument Serif, Plus Jakarta Sans, and JetBrains Mono (tabular-nums).
  • Automated Verification (tests/clinnote.test.js): Backed by 51 unit tests and a 25-point planted-defect mutation harness achieving a 100% catch rate.
  • AI Transparency & Attribution: Built for the STEM2Connect AI Hackathon 2026. AI coding and illustration tools (Claude / Gemini) assisted with scaffolding, bilingual lexicon verification, and the custom editorial workbench illustration, with all pharmacokinetic rules and readability formulas deterministically verified.

Challenges we ran into

Avoiding false replacements on short clinical tokens like PO, AC, and PC inside normal English or Spanish words required strict word-boundary regex tokenization and longest-phrase-first sorting (intercostal retractions and orthostatic hypotension before single tokens). Designing the 24-hour SVG medication clock so that multi-drug collisions at 08:00, 20:00, and 22:00 immediately re-color the timeline nodes without layout shift also required careful coordinate geometry.

Accomplishments that we're proud of

  • 83% Readability Clarity Gain: Reduces complex hospital discharge summaries from Grade 16.5 down to Grade 5.7 while preserving every clinical dosage, timing rule, and safety warning.
  • Zero-Cloud PHI Guarantee: Enforces connect-src 'none' in the Content Security Policy so sensitive patient text never leaves the browser tab.
  • 51/51 Unit Tests & 100% Mutation Catch Rate: Every clinical abbreviation, Flesch-Kincaid boundary, OTC drug collision, and red-flag symptom triage pathway is covered by automated tests.

What we learned

Building ClinNote showed how deterministic client-side NLP and pharmacokinetic rule engines can deliver high-reliability healthcare communication without trading away patient privacy or risking generative hallucination on medication dosages.

What's next for ClinNote

Next, I plan to expand the OTC and herbal supplement collision matrix (adding St. John's Wort, magnesium antacids, and decongestants), add Web Speech API voice read-aloud for low-vision patients, and support QR-code export for the printable refrigerator schedule.

Built With

Share this project:

Updates

Submission history