-
CareAlign — an AI-powered safety net that aligns care instructions and verifies patient understanding before confusion causes harm.
-
When care instructions conflict, CareAlign finds the mismatch, traces its source, and turns it into a clear question for the care team.
-
AI understands differently worded instructions; deterministic rules verify conflicts, while teach-back confirms patient understanding.
-
A focused solo-build roadmap validates the safety loop first, then adds OCR, FHIR integration, and clinical workflow connectivity.
-
CareAlign targets preventable harm by improving comprehension, reducing unresolved conflicts, and supporting safer care transitions.
-
CareAlign is grounded in evidence on medication discrepancies, patient safety, teach-back, care transitions, and FHIR interoperability.
CareAlign
One conflicting instruction can change a life. CareAlign detects care-plan conflicts and verifies what patients truly understand—before confusion becomes harm.
Inspiration
A patient may leave the hospital with the instruction:
“Take this medication twice daily.”
A month later, the same patient receives a new prescription stating:
“Take this medication once daily.”
Was the dosage intentionally changed? Is the first document outdated? Did one provider have information that another provider did not? Or was something lost during the transition?
For a clinician, this may be a routine clarification. For an older adult managing several medications, a patient with multiple chronic conditions, or a family caregiver trying to coordinate care across different providers, it can become a dangerous decision made without enough context.
Patients frequently receive information from hospitals, specialists, primary-care physicians, pharmacies, discharge teams, and digital portals. Each source may be accurate at the time it was created, but the patient is often left to determine which instruction is current and how the different instructions relate to one another.
Even when the final instruction is correct, another question remains:
Did the patient actually understand it?
CareAlign was inspired by this dual failure in healthcare communication:
- Care instructions may become fragmented or appear inconsistent across time and providers.
- Patient understanding is often assumed rather than verified.
CareAlign is designed as a safety layer between receiving healthcare instructions and acting on them.
The Healthcare Problem
Medication safety is especially vulnerable during transitions of care, including admission, discharge, referral, and movement between providers.
A systematic review reported a median 50% rate of unintentional medication discrepancies among adults following hospital discharge. The World Health Organization identifies medication safety during transitions of care as a major global patient-safety priority.
The WHO also reports that medication-related harm affects approximately 1 in every 30 patients, with more than one quarter of that harm considered severe or life-threatening.
CareAlign does not claim that every discrepancy is an error or that every medication-related injury is caused by communication. Instead, it targets one preventable part of the problem:
Patients receive fragmented instructions, cannot easily determine what changed, and may act before the uncertainty is resolved.
Instruction fragmentation
The same medication instruction may appear differently across documents:
- “Take one tablet twice daily”
- “Take every 12 hours”
- “2 doses per day”
- “Morning and evening”
- “Two divided doses”
A basic keyword search or text-difference algorithm may treat these as different, even when they express the same meaning.
The opposite can also happen. Two instructions may appear nearly identical while containing a clinically important difference:
- 5 mg versus 10 mg
- Once daily versus twice daily
- Continue versus discontinue
- Take with food versus take on an empty stomach
- Use regularly versus use only when needed
Unverified understanding
Patients are often asked, “Do you understand?” A yes-or-no response does not demonstrate that the patient can correctly explain the medication, timing, duration, warning signs, or required follow-up.
The Agency for Healthcare Research and Quality recommends the teach-back method, in which patients explain important instructions in their own words so that misunderstandings can be identified and corrected.
CareAlign combines longitudinal instruction comparison with teach-back verification.
Proposed Solution
CareAlign is an AI-powered care-instruction safety system that performs two connected checks.
Check 1: Do the instructions align?
CareAlign organizes instructions from multiple documents into a structured timeline. It identifies potential changes, omissions, duplications, and inconsistencies while preserving the date and source of every instruction.
It does not decide that a prescription is wrong. Instead, it turns uncertainty into a clear, traceable question such as:
“Your August discharge summary says to take this medication twice daily, while your September prescription says once daily. Was the frequency intentionally changed?”
Check 2: Does the patient understand the confirmed instructions?
Once the correct instruction has been clarified, CareAlign asks the patient to explain it in their own words.
The response is compared with a checklist of essential information:
- Medication
- Dose
- Frequency
- Timing
- Duration
- Special instructions
- Important warning signs
- Required follow-up
Each item is classified as:
- Correct
- Missing
- Contradicted
- Uncertain
Missing or contradicted items trigger a simpler explanation and another teach-back attempt. Unresolved or safety-critical uncertainty is escalated to a caregiver or healthcare professional.
What Makes CareAlign Different
Most patient-facing healthcare tools perform one of the following tasks:
- Display medication lists
- Send medication reminders
- Summarize a document
- Answer health questions
- Provide general medication information
CareAlign is different because it focuses on verification rather than information delivery alone.
It verifies:
- Whether instructions remain consistent across sources and time
- Whether the patient correctly understands the final instruction
This creates a closed safety loop:
Collect → Structure → Compare → Clarify → Teach Back → Verify → Escalate
The system is not designed to replace medication reconciliation by qualified professionals. It is designed to make potential communication gaps visible before the patient must act on them.
Why Both AI and Deterministic Rules Are Necessary
Care instructions are written in natural language and rarely use identical wording. Semantic interpretation is therefore necessary.
However, healthcare safety should not depend entirely on an unconstrained language model.
CareAlign separates responsibilities across multiple layers.
AI layer
The language model is used to:
- Interpret differently worded instructions
- Extract structured medication and care information
- Identify semantic equivalence between instructions
- Interpret patient paraphrases during teach-back
- Generate clear, non-directive clarification questions
- Rewrite instructions in simpler language
Deterministic rule layer
Rules are used to:
- Compare medication names
- Compare dose values and units
- Compare frequency and timing
- Compare start and end dates
- Detect explicit continuation or discontinuation language
- Check whether required teach-back items are present
- Enforce escalation conditions
- Prevent the system from issuing treatment instructions
Source-grounding layer
Every extracted instruction and generated alert remains connected to:
- The original document
- The original text passage
- The document date
- The provider or institution, when available
- The extraction confidence
- The current review status
Human decision layer
CareAlign can identify a potential discrepancy, but only a qualified healthcare professional should determine whether the change is intentional and clinically appropriate.
The principle is simple:
AI interprets meaning. Rules verify critical details. Sources provide traceability. Humans make clinical decisions.
Detailed System Workflow
1. Document collection
For the first prototype, users will enter structured text or paste the contents of:
- Prescriptions
- Discharge instructions
- Medication lists
- Visit summaries
- Pharmacy instructions
- Follow-up care instructions
Later versions can add document upload and OCR.
Each document is stored with metadata:
- Document ID
- Patient ID or synthetic-case ID
- Document type
- Date issued
- Provider or institution
- Source text
- Processing status
2. Instruction extraction
The LLM converts unstructured text into a strict schema.
A simplified record may look like this:
{
"medication": "Example Medication",
"dose": {
"value": 10,
"unit": "mg"
},
"frequency": "twice daily",
"route": "oral",
"duration": "14 days",
"status": "continue",
"warning_signs": [],
"source_document_id": "DOC-002",
"source_text": "Take one 10 mg tablet twice daily.",
"issued_at": "2026-09-01",
"confidence": 0.96
}
The output is validated against the schema before entering the comparison engine. Invalid or incomplete outputs are not silently accepted.
3. Terminology normalization
CareAlign normalizes equivalent expressions into comparable values.
Examples:
- “Twice daily” → frequency: 2 per day
- “Every 12 hours” → frequency: approximately 2 per day
- “Two tablets” → quantity: 2
- “Stop taking” → status: discontinue
- “Only when required” → status: as needed
Original wording is always preserved alongside the normalized value.
4. Timeline construction
Instructions are arranged chronologically so that the system can distinguish between:
- An older instruction
- A newer instruction
- A possible intentional update
- Simultaneous instructions from different sources
- A duplicated instruction
- A missing continuation or discontinuation status
The timeline makes the system longitudinal rather than limited to comparing two isolated documents.
5. Candidate discrepancy detection
The rule engine compares instructions associated with the same medication or care action.
Candidate discrepancy types include:
- Dose changed
- Frequency changed
- Route changed
- Duration changed
- Continue/discontinue conflict
- Duplicate medication
- Missing medication
- Conflicting warning or lifestyle instruction
- Unclear replacement relationship
- Uncertain entity match
A candidate discrepancy is not presented as a confirmed medical error.
6. Semantic review
The LLM reviews cases where language variation prevents a simple deterministic comparison.
For example:
- “One tablet morning and evening”
- “Take twice daily”
These instructions may be semantically equivalent.
The language model proposes an interpretation, but the structured fields and validation rules determine whether the item is treated as equivalent, changed, or uncertain.
7. Clarification-question generation
Potential inconsistencies are converted into concise questions.
The question generator must follow strict constraints:
- Do not diagnose
- Do not recommend changing medication
- Do not identify a provider as being wrong
- Mention both sources
- Mention the relevant dates
- Describe the difference factually
- Ask for professional confirmation
- Use accessible language
Example:
“Your discharge summary dated 12 August lists one tablet twice daily. Your prescription dated 3 September lists one tablet once daily. Please confirm with your care team whether the frequency was intentionally changed.”
8. Teach-back checklist generation
After the instruction is clarified, CareAlign generates a must-know checklist.
For a medication, this could include:
- Correct medication
- Correct dose
- Correct frequency
- Correct timing
- Duration
- What to do if a dose is missed
- Important warning signs
- When to seek help
The patient is asked to explain the instruction naturally rather than repeat it word for word.
9. Patient-response interpretation
The LLM maps the patient’s explanation to checklist concepts.
Example patient response:
“I should take one 10 mg tablet in the morning and another one at night for two weeks.”
Possible structured evaluation:
{
"dose": "correct",
"frequency": "correct",
"timing": "correct",
"duration": "correct",
"warning_signs": "missing"
}
10. Deterministic verification
Rules classify each must-know item:
- Correct: Required meaning is present and consistent
- Missing: Required information was not mentioned
- Contradicted: The patient stated information that conflicts with the confirmed instruction
- Uncertain: The system cannot safely determine whether the response is correct
Missing information triggers targeted re-explanation. Contradicted or uncertain safety-critical information triggers escalation.
11. Re-explanation loop
Instead of repeating the complete document, CareAlign focuses only on the misunderstood item.
Example:
“Let’s check the timing again. The confirmed instruction says to take one dose in the morning and one dose in the evening. Please explain when you will take it.”
The loop continues until:
- The required checklist is completed
- A retry limit is reached
- A safety-critical contradiction occurs
- The user requests human assistance
12. Escalation and audit trail
Escalated cases include:
- The original instruction
- The newer instruction
- The exact difference
- The source documents
- The patient’s teach-back response
- Missing or contradicted checklist items
- The generated clarification question
- The reason for escalation
This creates a concise review package for a caregiver, pharmacist, nurse, or physician.
Proposed Technical Architecture
The first implementation can use the following stack:
User interface
- Streamlit for a rapid, accessible proof of concept
- Separate patient and reviewer views
- Document timeline
- Discrepancy review
- Teach-back interaction
- Source display
Backend
- Python
- FastAPI for structured endpoints
- Pydantic for schema validation
- Service modules for extraction, comparison, verification, and escalation
Data layer
- SQLite for the initial prototype
- Migration path to PostgreSQL for later pilots
- Versioned instruction records
- Source passages
- Teach-back attempts
- Alerts and review outcomes
- Minimal audit events
AI layer
- A language model with structured JSON output
- Prompt constraints limiting the model to extraction, semantic matching, simplification, and question generation
- No autonomous diagnosis or treatment recommendation
- Retry and validation for malformed model output
Rule engine
- Medication-name normalization
- Unit and dosage comparison
- Frequency normalization
- Timeline precedence checks
- Explicit conflict conditions
- Teach-back checklist validation
- Escalation thresholds
Interoperability
Later versions can use HL7 FHIR resources such as:
- MedicationRequest
- MedicationStatement
- MedicationDispense
- CarePlan
- Condition
- AllergyIntolerance
- DocumentReference
- Encounter
FHIR integration is intentionally excluded from the first proof of concept so that the core safety logic can be tested before adding healthcare-system integration complexity.
Data Model
The initial database can contain the following entities:
PatientCase
Represents a synthetic or consented patient scenario.
Fields:
- case_id
- preferred_language
- health-literacy preferences
- accessibility requirements
- consent status
- created_at
SourceDocument
Stores an uploaded or entered care document.
Fields:
- document_id
- case_id
- document_type
- issued_at
- provider
- source_text
- file reference
- processing status
ExtractedInstruction
Stores structured information derived from a source document.
Fields:
- instruction_id
- document_id
- medication or action
- dose
- unit
- route
- frequency
- duration
- status
- normalized value
- source passage
- confidence
DiscrepancyCandidate
Stores a potential inconsistency.
Fields:
- discrepancy_id
- earlier_instruction_id
- later_instruction_id
- discrepancy_type
- rule result
- semantic-review result
- severity tier
- explanation
- review status
ClarificationQuestion
Stores the question generated for the patient or care team.
Fields:
- question_id
- discrepancy_id
- patient-facing text
- clinician-facing text
- generated_at
- resolution
- resolved_at
TeachBackSession
Stores understanding-verification attempts.
Fields:
- session_id
- case_id
- confirmed_instruction_id
- must-know checklist
- patient response
- item-level classifications
- attempt number
- outcome
- escalation reason
AuditEvent
Stores minimal safety-relevant activity.
Fields:
- event_id
- case_id
- event type
- timestamp
- system component
- source reference
- decision result
Safety by Design
CareAlign is designed as a decision-support and communication system—not an autonomous clinical system.
Prohibited system behavior
CareAlign must never:
- Diagnose a condition
- Recommend starting medication
- Recommend stopping medication
- Change dose or frequency
- Determine that one provider is wrong
- Present a discrepancy as a confirmed error
- Hide the source behind a generated statement
- Continue with a high-risk uncertain interpretation
Required system behavior
CareAlign must:
- Preserve original source text
- Display dates and providers when available
- Label discrepancies as potential or unresolved
- Use clear uncertainty language
- Ask for professional confirmation
- Escalate safety-critical ambiguity
- Record why an alert was generated
- Apply retry and confidence thresholds
- Minimize stored personal data
Privacy and Responsible Data Use
The first proof of concept will use synthetic, de-identified care-transition scenarios.
No real patient data is required to validate:
- Instruction extraction
- Normalization
- Timeline comparison
- Discrepancy classification
- Clarification-question generation
- Teach-back checklist matching
A future clinical pilot would require:
- Explicit participant consent
- Institutional and ethical review where applicable
- Data minimization
- Encryption in transit and at rest
- Role-based access controls
- Retention and deletion policies
- Audit logging
- Secure model-provider configuration
- Compliance with applicable health-data regulations
- A process for reporting and reviewing system errors
CareAlign would not claim HIPAA, GDPR, or other regulatory compliance until the architecture, hosting environment, data processing agreements, and operational controls had been independently reviewed.
Detailed Implementation Plan
Phase 1: Evidence and Scenario Design
Goal: Define exactly what the system should and should not detect.
Tasks:
- Review medication-reconciliation and teach-back literature
- Define the first discrepancy taxonomy
- Create synthetic discharge and follow-up documents
- Include equivalent, changed, ambiguous, and contradictory instruction pairs
- Create clinician-style ground-truth labels
- Define must-know teach-back checklists
- Establish safety language and escalation rules
Deliverables:
- Synthetic scenario dataset
- Discrepancy taxonomy
- Teach-back checklist schema
- Safety-policy document
- Baseline keyword comparison
Phase 2: Structured Instruction Extraction
Goal: Convert care instructions into validated structured records.
Tasks:
- Build a Pydantic instruction schema
- Create extraction prompts
- Add JSON validation
- Normalize dose units and frequencies
- Preserve source spans
- Add confidence and missing-field detection
- Test extraction against synthetic scenarios
Deliverables:
- Instruction extraction service
- Normalization module
- Source-linking mechanism
- Extraction test suite
Phase 3: Longitudinal Comparison Engine
Goal: Detect potential discrepancies across time.
Tasks:
- Group instructions by medication or care action
- Order records by date
- Compare safety-critical fields
- Detect continue/discontinue conflicts
- Distinguish duplicates from changes
- Route semantically ambiguous cases to the LLM
- Generate evidence-linked candidate discrepancies
Deliverables:
- Deterministic comparison engine
- Semantic-equivalence module
- Discrepancy candidate records
- Precision and error-analysis report
Phase 4: Clarification Interface
Goal: Turn technical differences into useful questions.
Tasks:
- Create patient-facing question templates
- Create clinician-facing summaries
- Enforce non-directive language
- Display both source passages
- Allow a reviewer to mark the change as intentional, unresolved, or incorrect
- Store the resolution for evaluation
Deliverables:
- Source comparison interface
- Clarification-question generator
- Review and resolution workflow
Phase 5: Teach-Back Verification
Goal: Verify whether the patient understands the confirmed instruction.
Tasks:
- Generate must-know checklists
- Accept natural-language patient responses
- Map responses to checklist items
- Apply Correct, Missing, Contradicted, and Uncertain classifications
- Trigger targeted re-explanation
- Add retry limits and escalation conditions
- Record first and final checklist accuracy
Deliverables:
- Teach-back interaction
- Checklist-matching service
- Re-explanation loop
- Escalation summary
Phase 6: Evaluation
Goal: Determine whether CareAlign is accurate, understandable, and safe enough to justify further development.
Evaluation metrics:
Extraction accuracy
- Medication identification accuracy
- Dose extraction accuracy
- Frequency extraction accuracy
- Source-span accuracy
Conflict-detection performance
- Precision
- Recall
- F1 score
- False-alert rate
- Missed safety-critical discrepancy rate
Teach-back performance
- Item-level classification accuracy
- First-versus-final checklist accuracy
- Contradiction-detection rate
- Unnecessary escalation rate
Usability
- Time required to review an alert
- Patient comprehension improvement
- User confidence in understanding instructions
- Clarity of generated questions
- System Usability Scale score, if appropriate
Safety
- Unsupported medical statements
- Missing source links
- Advice-like outputs
- High-risk cases incorrectly marked safe
- Uncertainty cases that failed to escalate
Phase 7: Controlled Pilot
Goal: Validate the workflow with domain review before any real-world deployment.
Potential pilot structure:
- Small synthetic or retrospectively de-identified dataset
- Review by pharmacists, nurses, or physicians
- Independent labeling of discrepancy candidates
- Comparison between CareAlign and a simple rules-only baseline
- Evaluation of question clarity
- Evaluation of teach-back scoring
- Documented failure analysis
CareAlign would advance only if false negatives, unsupported outputs, and unsafe recommendations remained within predefined safety thresholds.
Phase 8: Future Integration and Scale
After validating the core safety loop, future development may include:
- OCR for scanned prescriptions
- Multilingual patient explanations
- Voice-based teach-back
- Accessibility support
- FHIR integration
- Hospital discharge-system integration
- Pharmacy reconciliation workflows
- Caregiver notifications
- Institution-specific rule configuration
- Monitoring dashboards
- Model-drift and safety-event monitoring
Feasibility for a Solo Builder
CareAlign is intentionally scoped so that the most important idea can be demonstrated without building an entire hospital information system.
The first prototype does not require:
- Real electronic health-record access
- A hospital partnership
- Production-grade OCR
- Real patient data
- Autonomous medical decision-making
- Full FHIR integration
- A mobile application
The initial proof of concept focuses on three core technical capabilities:
- Structured instruction extraction
- Longitudinal discrepancy detection
- Teach-back verification
As a solo builder with experience in Python, LLM pipelines, evidence verification, databases, API-based systems, event-driven architecture, and structured reporting, I can develop and evaluate these components independently before expanding the system.
Challenges
Distinguishing an error from an intentional update
A later prescription may intentionally replace an earlier one. CareAlign addresses this by identifying a potential difference and asking for confirmation rather than declaring an error.
Avoiding excessive alerts
If every wording change produces an alert, patients and clinicians will stop trusting the system. The evaluation will therefore prioritize conflict precision and clinically meaningful alert categories.
Preventing LLM hallucination
All model output must conform to a schema, remain grounded in source text, and pass deterministic validation. Unsupported information is rejected or marked uncertain.
Matching medications across documents
Brand names, generic names, abbreviations, misspellings, and combination medications may make entity matching difficult. The first version will use a limited synthetic medication vocabulary before expanding to validated terminology resources.
Evaluating teach-back fairly
Patients can express correct understanding in many different ways. Exact keyword matching is too rigid, but unconstrained LLM scoring may be inconsistent. CareAlign combines semantic matching with explicit checklist criteria and deterministic final classifications.
Handling incomplete information
A document may omit information because it is recorded elsewhere. Missing information should not automatically be treated as an error. CareAlign will label these cases as unresolved and request confirmation.
Maintaining patient trust
The interface must communicate uncertainty without increasing anxiety. Alerts will use neutral language, show the underlying sources, and emphasize that the patient should confirm changes with the care team.
What I Learned
Designing CareAlign reinforced that responsible healthcare AI is not about allowing a model to make more decisions.
It is about placing AI only where semantic interpretation is useful, surrounding it with deterministic safeguards, and keeping human judgment in control of clinical decisions.
I also learned that medication reconciliation and patient education should not be treated as separate problems.
Instructions are only safe when they are:
- Consistent enough to follow
- Traceable enough to verify
- Clear enough to understand
- Confirmed by the appropriate human professional
The most valuable AI system is not necessarily the one that produces the most answers. In healthcare, it may be the one that recognizes uncertainty early enough to ask a better question.
Expected Impact
For patients
- Clearer understanding of current instructions
- Fewer unresolved questions after discharge
- Greater confidence during transitions of care
- Easier access to source-linked explanations
For caregivers
- One traceable timeline of changing instructions
- Earlier visibility into items requiring confirmation
- Less dependence on memory and scattered documents
For care teams
- Focused questions instead of unstructured confusion
- Original-source context for every alert
- A concise summary of patient misunderstanding
- A measurable teach-back workflow
For healthcare systems
- A framework for reducing communication-related medication risk
- Structured data on recurring clarification gaps
- A path toward more consistent patient education
- Potential reduction in avoidable follow-up burden
Success Measures
CareAlign will initially focus on three primary outcomes:
1. Instruction comprehension
Measured by comparing the patient’s first and final teach-back checklist accuracy.
2. Conflict precision
Measured as:
$$
\text{Conflict Precision}
\frac{\text{Clinician-confirmed clarification alerts}} {\text{Total alerts generated}} $$
3. Clarification resolution
Measured as:
$$
\text{Resolution Rate}
\frac{\text{Questions resolved by the care team}} {\text{Questions submitted for clarification}} $$
Secondary measures will include extraction accuracy, recall, false-alert rate, time to review, user confidence, and unsafe-output rate.
Current Status
CareAlign is currently a Round 1 healthcare innovation proposal.
A fully developed prototype is not required for this stage of Hack2Heal 2.0. The current submission includes:
- A clearly defined healthcare problem
- A proposed user workflow
- A hybrid technical architecture
- Safety and privacy boundaries
- An implementation roadmap
- Evaluation metrics
- Scientific and institutional references
- A plan for a focused solo-built prototype
The next stage is to implement and evaluate the core safety loop using synthetic cases.
Team
OH CHANGSUNG — Solo Builder
Responsibilities:
- Product and problem definition
- Research synthesis
- System architecture
- Backend development
- LLM pipeline design
- Rule-engine development
- Database design
- Evaluation and testing
- Safety and privacy planning
- Presentation and documentation
Research and References
Alqenae FA, Steinke D, Keers RN. Prevalence and Nature of Medication Errors and Medication-Related Harm Following Discharge from Hospital to Community Settings: A Systematic Review. Drug Safety, 2020. PubMed
World Health Organization. Medication Safety in Transitions of Care. Technical Report, 2019. WHO
World Health Organization. Patient Safety: Key Facts. WHO
Agency for Healthcare Research and Quality. Use the Teach-Back Method: Tool 5. AHRQ
Oh S, Choi H, Oh EG, Lee JY. Effectiveness of Discharge Education Using Teach-Back Method on Readmission Among Heart Failure Patients: A Systematic Review and Meta-analysis. Patient Education and Counseling, 2023. DOI
HL7 International. FHIR Overview. HL7 FHIR
Closing
CareAlign is not designed to replace doctors, pharmacists, nurses, or medication-reconciliation teams.
It is designed to catch the moment when a patient is expected to act despite unresolved uncertainty.
One conflicting instruction can change a life. CareAlign helps catch the confusion before it becomes harm.
Built With
- fastapi
- fhir
- hl7
- llm
- natural-language-processing
- ocr
- python
- sql
Log in or sign up for Devpost to join the conversation.