-
-
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.
-
Import synthetic FHIR R4 medication records with source-date grouping and field-level provenance.
-
Teach-back helps patients restate confirmed instructions while excluding unresolved or uncertain items.
Inspiration
Patients leaving a hospital may receive instructions from a discharge team, a specialist, and a pharmacy. These records rarely use identical wording, may arrive on different dates, and can quietly omit or contradict an earlier medication instruction.
A 2020 systematic review covering 54 studies reported a median unintentional medication-discrepancy rate of 50% after hospital discharge in its adult analysis. Patients are often left to determine whether a difference was intentional. We wanted to build a tool that identifies the question they should ask—without pretending to be a doctor.
What it does
CareAlign compares two to five chronological care records supplied as synthetic text or imported from synthetic FHIR R4 medication data.
AI extracts differently worded instructions into a strict structure containing medication, dose, frequency, route, action, confidence, and exact source evidence. Deterministic rules—not another AI call—then check for dose, frequency, route, action, and possible-omission differences.
CareAlign never chooses which instruction is correct. Every potential mismatch remains source-linked and becomes a focused clarification question for a qualified healthcare professional.
Users can:
- compare two to five dated care records;
- import synthetic FHIR R4 Bundle, MedicationRequest, and MedicationStatement data;
- inspect the exact text and FHIR fields supporting each flag;
- copy, print, or download care-team questions;
- record an unverified care-team response in the current browser session; and
- optionally complete teach-back using only confirmed, non-conflicted instructions.
How we built it
CareAlign uses a deliberately bounded hybrid architecture.
The LLM handles semantic extraction because simple string matching cannot reliably understand differently worded medication instructions. Its output must follow a strict Pydantic schema and remain linked to verifiable source evidence.
Safety-critical comparison is handled by deterministic Python code. Unknown medication identity, unsupported schedules, low confidence, invalid evidence, malformed provider output, or service failure produces an explicit review or unavailable state—never false reassurance.
The terminology layer uses a conservative exact-first RxNorm policy while preserving salt and formulation distinctions. The read-only FHIR R4 importer groups medication resources by source date, resolves referenced Medication resources, ignores patient identity fields, and retains resource- and field-level provenance.
Built with
- Next.js 16, React 19, and TypeScript
- FastAPI, Python, and Pydantic
- Anthropic-compatible structured extraction
- NLM RxNorm terminology services
- HL7 FHIR R4 medication resources
- Deterministic comparison and evidence-verification rules
- Pytest, Ruff, Playwright, and GitHub Actions
- Vercel and Render
Challenges
The hardest challenge was preserving the usefulness of AI without allowing it to make a clinical decision.
We addressed this by separating semantic extraction from deterministic comparison, validating every evidence span, retaining unknown and unsupported states, preventing AI from resolving conflicts, and failing closed when analysis cannot be trusted.
FHIR interoperability created another challenge: real healthcare resources may contain referenced medications, several possible date fields, and complex dosage structures. CareAlign refuses to invent missing chronology or simplify unsupported dosing into a potentially misleading instruction.
Evaluation
CareAlign includes 90 versioned synthetic evaluation cases covering conflict detection, unsupported-pattern containment, teach-back paraphrases, adversarial text, and fault injection.
A cost-confirmed live Claude evaluation completed 85 functional cases through 128 provider calls, while five resilience cases were tested through controlled fault injection. The run passed the predeclared engineering release gates.
These results are synthetic and author-labeled. They are not independent clinical validation, and CareAlign does not present them as such.
Accomplishments
- Built and deployed a complete AI-plus-rules medication reconciliation workflow
- Added auditable source evidence for every result
- Implemented conservative RxNorm-assisted normalization
- Added read-only FHIR R4 medication import with field-level provenance
- Created reproducible synthetic evaluation and release-gate infrastructure
- Added human-only resolution and optional teach-back
- Designed fail-closed behavior for provider, evidence, and unsupported-pattern failures
- Prepared formal protocols for future ethics, usability, regulatory, and independent clinical review
What we learned
Healthcare AI requires more than a convincing model response. It needs traceable evidence, explicit uncertainty, deterministic safety boundaries, failure accounting, versioned evaluation, and clear limits on what the system is allowed to claim.
We also learned that interoperability is not simply accepting JSON. Safe FHIR import requires preserving source meaning, provenance, uncertainty, and chronology without silently inventing clinical facts.
What's next
Next steps include:
- independent review by qualified medical professionals;
- formal NUS ethics and privacy determination before user recruitment;
- synthetic formative usability testing;
- qualified US and Singapore regulatory review;
- broader accessibility and multilingual testing;
- consented read-only EHR authorization; and
- continued expansion of clinician-reviewed RxNorm edge cases.
CareAlign remains a synthetic-data research prototype. It is not medical advice, clinically validated, HIPAA compliant, or cleared as a medical device.
Team
OH CHANGSUNG — Solo Builder
Designed and implemented the product strategy, healthcare research, system architecture, AI pipeline, deterministic rules, FHIR and RxNorm integration, frontend, backend, accessibility, evaluation framework, documentation, and deployment.
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.