Documentation Index
Fetch the complete documentation index at: https://mintlify.com/diegolozadev/DataMed/llms.txt
Use this file to discover all available pages before exploring further.
Overview
DataMed’s follow-up system tracks patient engagement across the 18-month capita cycle, automatically identifies patients without recent contact, and manages transitions between admission states (ACTIVO, SUSPENDIDO, TERMINADO).The follow-up system operates on a 15-day alert threshold - patients without contact in 15 days appear in the dashboard alert list.
Follow-Up Manager
The Follow-Up Manager (followups_manager) provides a centralized view of all patients with their admission history and state management controls.
Accessing the Follow-Up Manager
Navigate to Follow-Ups
From the main menu, select Patients → Follow-Up Manager or Gestión de Seguimientos
View Patient List
The manager displays all patients (regardless of state) with:
- Patient demographic information
- All admission cycles (Ingresos) with states
- Current capita month for active admissions
- State change actions
Data Loading
Performance Optimization
Performance Optimization
The view uses
prefetch_related('ingresos') to load all admission cycles in a single query, preventing the N+1 query problem when displaying multiple patients with their admission histories.Admission States
Each patient admission (Ingreso) has one of three states:ACTIVO
Patient actively receiving treatment
- Conta months progress automatically
- Clinical records can be registered
- Appears in active patient lists
SUSPENDIDO
Treatment temporarily paused
- Common reasons: equipment issues, patient travel, medical contraindications
- Capita clock continues running
- No clinical activity expected
TERMINADO
Admission cycle completed
- Requires end date and reason
- Capita cycle closed
- Patient can start new cycle if needed
State Model
Changing Admission States
Marking as TERMINADO
Closing an admission cycle requires additional information:Access State Change
In the Follow-Up Manager, locate the patient’s active admission and click the Terminate or Terminar button
Enter Closure Details
A modal form appears requesting:
- fecha_terminacion: End date of the cycle
- motivo_estado: Reason for termination
- Completed 18-month cycle
- Patient deceased
- Patient transferred to another facility
- Patient non-compliant
- Health plan changed
Once an admission is marked TERMINADO, all associated clinical records are preserved but no longer visible in the active clinical dashboard. This ensures clean separation between cycles.
Creating a New Admission Cycle
After completing an 18-month cycle, patients can start a new cycle:Verify Previous Cycle Closure
Before creating a new cycle, ensure the previous admission is TERMINADO:
Why Prevent Overlapping Cycles?
Why Prevent Overlapping Cycles?
The system prevents creating a new cycle while an existing cycle is ACTIVO or SUSPENDIDO because:
- Clinical Clarity: Staff should only work with one active cycle at a time
- Data Integrity: All clinical records must unambiguously belong to a single cycle
- Financial Accounting: Capita payments are tied to specific admission periods
- Compliance: Healthcare regulations require clear episode boundaries
Dashboard Alerts
The main dashboard automatically identifies patients needing follow-up attention:15-Day Alert Logic
- Alert Criteria
- Alert Display
- Follow-Up Model
A patient appears in the alert list if they have an ACTIVO admission AND:Scenario 1: No Follow-Up Recorded
- Admission date is more than 15 days ago
- No
Seguimientorecords exist for this cycle
- Last
fecha_atencionis more than 15 days ago - Patient needs re-engagement
The
Seguimiento model is distinct from SeguimientoAdaptacion.- Seguimiento: General follow-up appointments (face-to-face, phone calls)
- SeguimientoAdaptacion: Adaptation notes associated with technical monitoring
Follow-Up Workflows
Recording a Follow-Up Contact
While DataMed doesn’t currently have a dedicated follow-up registration form, follow-ups are typically recorded through:Clinical Record Entry
When registering any clinical exam (monitoring, psychology, etc.), a follow-up contact is implicitly recorded via the exam timestamp
Adaptation Notes
Use the Contact Notes tab in the monitoring form to document phone or in-person follow-ups:
Recommended Follow-Up Schedule
Follow-Up Frequency by Capita Month
Follow-Up Frequency by Capita Month
Months 1-3: Intensive Phase
- Week 2: Initial adaptation check (phone)
- Week 4: First monthly review (in-person)
- Month 2: Adjustment visit (in-person)
- Month 3: Quarterly assessment (in-person)
- Every 3 months: Quarterly review (in-person or phone)
- As needed: Troubleshooting visits
- Final assessment (in-person)
- Equipment return (if applicable)
- Cycle closure decision
Capita Distribution Tracking
The dashboard includes a visual distribution of active patients by capita month:- Chart Purpose
- Interpreting Patterns
The capita distribution chart helps identify:
- Cohort Size: How many patients at each stage
- Bottlenecks: Unusual concentrations at specific months
- Capacity Planning: Upcoming workload predictions
- Program Health: Steady flow vs. clustering
Patient Engagement Strategies
Proactive Outreach
Use the dashboard alert list daily to:
- Call patients before they reach 15 days
- Schedule appointments proactively
- Address barriers to engagement
Automated Reminders
Future enhancement opportunity:
- SMS reminders at 10 days
- Email notifications
- WhatsApp integration
Dropout Prevention
Flag patients at risk:
- Multiple missed appointments
- Low CPAP adherence
- Consistently > 30 days between contacts
State Transitions
Use SUSPENDIDO appropriately:
- Patient traveling (temporary)
- Equipment repair needed
- Medical contraindication
Pagination and Performance
Both the Follow-Up Manager and Dashboard alerts use pagination:Why 10 Patients Per Page?
Why 10 Patients Per Page?
The system uses 10-patient pagination to:
- Optimize page load times (especially on Render.com hosting)
- Reduce memory usage with large patient databases
- Improve mobile responsiveness
- Maintain consistent UI performance
Best Practices
Check dashboard alerts daily
Check dashboard alerts daily
Make the dashboard your first stop each day to identify patients needing immediate attention. The 15-day threshold ensures timely intervention.
Document all patient contacts
Document all patient contacts
Record every interaction, even brief phone calls, to:
- Reset the 15-day alert timer
- Maintain audit trail
- Track engagement patterns
Use SUSPENDIDO appropriately
Use SUSPENDIDO appropriately
When patients need a temporary treatment pause:
- Mark admission as SUSPENDIDO (not TERMINADO)
- Document reason in motivo field
- Set expected resumption date in notes
- Monitor for return to ACTIVO status
Close cycles properly
Close cycles properly
Always provide end date and reason when marking TERMINADO:
- Ensures accurate capita tracking
- Supports financial reconciliation
- Enables outcome analysis
Plan for Month 18 transitions
Plan for Month 18 transitions
When patients approach Month 18:
- Schedule closure assessment
- Determine if new cycle is medically indicated
- Coordinate equipment return/reassignment
- Complete final documentation
Next Steps
Dashboard Overview
Explore all dashboard features and statistics
Patient Management
Learn about patient lifecycle and capita cycles