Evaluation & Form Components
Relevant source files
The following files were used as context for generating this wiki page:
- artifacts/mobile/app/evaluation.tsx
- artifacts/mobile/components/evaluation/EvaluationResultsView.tsx
- artifacts/mobile/components/evaluation/EvaluationPainScale.tsx
- artifacts/mobile/services/evaluationEngine.ts
- artifacts/mobile/app/hospice-interview.tsx
- attached_assets/Pasted-Refactor-the-hospice-evaluation-screen-into-smaller-reu_1774840262150.txt
The Evaluation & Form Components system provides a structured framework for caregivers to assess hospice readiness and evaluate hospice providers. The system is primarily composed of the Hospice Evaluation Engine, which uses clinical indicators to provide informational readiness guidance, and the Hospice Interview Scorecard, a multi-step form used to evaluate potential hospice agencies based on ownership, care commitment, and crisis readiness.
These components are designed to be highly interactive, utilizing haptic feedback and a consistent visual language to reduce cognitive load for users who may be emotionally overwhelmed. The evaluation logic is strictly informational, serving as an educational navigation tool rather than a clinical determination.
Sources: attached_assets/Pasted-Build-a-production-ready-native-iPhone-mobile-app-using_1773627288076.txt, artifacts/mobile/services/evaluationEngine.ts:4-6
Hospice Readiness Evaluation
The readiness evaluation system uses a local rules engine to calculate a score based on a patient's diagnosis and clinical factors. The system orchestrates state at the screen level while delegating specific UI patterns to reusable components.
Evaluation Logic and Scoring
The runEvaluation function processes EvaluationInput to generate an EvaluationResult. It applies base scores depending on the diagnosis and increments the score based on performance status, weight loss, recent hospitalizations, and decline rates.
| Clinical Factor | Scoring Logic |
|---|---|
| Diagnosis | Base scores: Cancer (40), CHF (30), COPD (28), Dementia (25), Liver Disease (32). |
| Performance Status | +20 for level 3+, +10 for level 2, +5 for level 1. |
| Hospitalizations | +15 for 3+, +10 for 2, +5 for 1 within recent months. |
| Decline Rate | +15 for rapid decline, +7 for gradual decline. |
| Pain Level | +10 for scores >= 7, +5 for scores >= 4. |
Sources: artifacts/mobile/services/evaluationEngine.ts:7-40
Technical Workflow
The following diagram illustrates the data flow from user input to the final results view.
The evaluation screen acts as the orchestrator, managing states like toggleCriteria, canSubmit, and handleSubmit.
Sources: attached_assets/Pasted-Refactor-the-hospice-evaluation-screen-into-smaller-reu_1774840262150.txt, artifacts/mobile/services/evaluationEngine.ts
Hospice Interview Scorecard
The Interview Scorecard is a specialized form system used to evaluate hospice providers during or after an interview. It breaks down complex administrative and clinical topics into seven distinct steps.
Multi-Step Data Architecture
The scorecard tracks clinical manager details, ownership types, and specific care commitments. It utilizes a DEFAULT state object to initialize the form and provides educational intros for each section to clarify complex terms like "Private-equity backed" or "General Inpatient Care (GIP)".
Category Breakdown
The system evaluates providers across six primary categories:
- Communication & Transparency: Directness in answering hard questions.
- Routine Care Commitment: Specific numbers for RN and Aide visits.
- Crisis Care Readiness: Credibility of CHC and GIP plans.
- Honesty About Revocation & Discharge: Clarity on patient rights.
- Financial Transparency: Honesty regarding the Medicare Cap.
- First Impression: Relational gut feeling.
Sources: artifacts/mobile/app/hospice-interview.tsx:32-60, artifacts/api-server/src/routes/anthropic/index.ts:257-270
Interview Scoring Sequence
The interview scoring process involves an external call to the intelligence engine (Anthropic/Claude) to analyze the provided interview data.
Component Library
The project utilizes a library of atomic components to ensure visual consistency and haptic feedback across all evaluation forms.
Specialized Inputs
- EvaluationPainScale: Renders a 0-10 scale with specific tap targets and haptic feedback.
- EvaluationCountSelector: Used for hospitalizations; defaults to
[0, 1, 2, 3, 4]where 4 is displayed as "4+". - EvaluationYesNoToggle: A boolean selector ensuring
nullvalue handling for unselected states. - RadioGroup: Used in the Interview Scorecard to provide color-coded flags (green/yellow/red) for specific answers.
Sources: artifacts/mobile/components/evaluation/EvaluationPainScale.tsx, attached_assets/Pasted-Refactor-the-hospice-evaluation-screen-into-smaller-reu_1774840262150.txt, artifacts/mobile/app/hospice-interview.tsx:103-125
Informational and Result Views
- EvaluationCriteriaCard: A collapsible component containing "Official Medicare Hospice Criteria" with links to Medicare.gov.
- EvaluationResultsView: Displays a "Result Hero" with a score bar, key clinical factors, and suggested next steps based on the readiness level (Low, Moderate, High).
- ResultsView (Interview): Displays Ragna's narrative assessment, green/red flags, and follow-up questions to ask the agency.
Sources: attached_assets/Pasted-Refactor-the-hospice-evaluation-screen-into-smaller-reu_1774840262150.txt, artifacts/mobile/components/evaluation/EvaluationResultsView.tsx, artifacts/mobile/app/hospice-interview.tsx:254-325
Summary
Evaluation and Form components within Hospice Roadmap provide a dual-layered approach to end-of-life planning. The readiness engine assesses medical indicators to help families understand when to begin care, while the interview scorecard provides a structured tool to ensure selected providers meet clinical and ethical standards. Both systems prioritize user autonomy and provide actionable data to support informed decision-making.