-
CareAlign compares records across time, traces medication conflicts to their sources, and turns uncertainty into the right question.
-
Every potential difference is source-linked, rule-checked, and converted into a focused question for the patient’s care team.
-
Teach-back checks understanding of confirmed instructions while excluding unresolved or uncertain medication changes.
Inspiration
Medication instructions often change as patients move between hospitals, clinics, pharmacies, and home. The same medication may appear with a different dose, frequency, wording, or may disappear from a later document entirely.
A 2020 systematic review reported a median rate of 50% for unintentional medication discrepancies among adult patients after hospital discharge. Yet patients are often left comparing multiple documents on their own.
We built CareAlign to turn those discrepancies into clear, source-linked questions—without allowing AI to decide which instruction is medically correct.
What it does
CareAlign compares two to five synthetic or de-identified care documents as a chronological medication timeline.
It can identify potential differences involving:
- Medication dose
- Administration frequency
- Route
- Start, stop, or continuation instructions
- Possible omissions from later records
Each result includes the supporting source text, document date, rule identifier, and a focused question the patient can ask a qualified healthcare professional.
CareAlign never silently chooses one instruction over another. A user may record the care team’s response in the current browser session, but that response remains clearly labeled as user-entered and does not become a system-verified clinical resolution.
After confirmed instructions are available, an optional teach-back feature lets users explain the plan in their own words. Unresolved or uncertain instructions are excluded from this check.
How we built it
CareAlign uses a hybrid AI and deterministic architecture.
The backend is built with Python, FastAPI, and Pydantic. Anthropic Claude converts differently worded medication instructions into a constrained structured representation. The extracted data is then validated before entering a versioned deterministic rule engine.
The rule engine—not the language model—compares medication identity, dose, frequency, route, action, and temporal position. Every flag remains linked to its original evidence.
The frontend is built with Next.js, React, and TypeScript. It is deployed on Vercel, while the FastAPI service runs on Render.
We also created:
- A versioned synthetic evaluation dataset
- Provider-backed functional evaluation
- Separate fault-injection and containment tests
- Prompt and rule version tracking
- Fail-closed API behavior
- Browser-session-only response storage
- An optional RxNorm integration contract
- Automated backend, frontend, and end-to-end tests
Our live-provider synthetic evaluation contains 90 cases: 85 functional cases and five separate fault-injection cases. These results are engineering evidence, not independent clinical validation.
Challenges we ran into
The hardest challenge was preventing plausible AI output from being mistaken for verified medical truth.
Medication names can be ambiguous, evidence spans can be subtly altered, and apparently simple changes may represent intentional treatment decisions. For example, different metoprolol salt formulations must not be treated as interchangeable identities.
We therefore designed CareAlign to fail closed. If extraction, validation, evidence verification, or the upstream provider fails, the system returns no safety conclusion rather than substituting a demo result or guessing.
We also deliberately separated discrepancy detection from discrepancy resolution. Detecting that two records disagree is a software task; deciding which instruction is correct belongs to a qualified healthcare professional.
Accomplishments that we're proud of
We are proud that CareAlign provides more than an AI-generated summary.
Every result is:
- Traceable to source evidence
- Produced by an auditable rule
- Versioned by model, prompt, and rule set
- Presented as a question rather than medical advice
- Protected by explicit failure and containment behavior
We also deployed a complete working system with a live frontend and backend, rather than presenting only a mockup.
What we learned
We learned that trustworthy healthcare AI depends as much on boundaries as capabilities.
A useful safety system must communicate what it knows, where the evidence came from, what remains uncertain, and which decisions require human judgment. Evaluation results must also be labeled honestly: a synthetic author-labeled benchmark is valuable engineering evidence, but it is not clinical validation.
What's next for CareAlign
Our next steps are:
- Expand medication normalization and validate RxNorm behavior against a frozen terminology contract.
- Add read-only FHIR medication import with complete provenance.
- Conduct structured usability testing with representative users.
- Obtain independent review from pharmacists and other medical professionals.
- Perform formal privacy, security, clinical-safety, and regulatory assessments.
- Evaluate the system on independently labeled datasets before considering any real clinical use.
CareAlign is currently a research prototype. It is not medical advice, a diagnostic system, or a replacement for a qualified healthcare professional.
Built With
- docker
- fastapi
- next.js
- pydantic
- pytest
- python
- react
- render
- rxnorm
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.