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 exam tracking system helps clinical staff monitor which examinations and interventions have been completed for each patient throughout their 18-month capita cycle, ensuring comprehensive care and program compliance.All exam tracking is organized by active Ingreso (admission cycle). Historical exams from previous cycles are preserved separately.
Exam Types Tracked
The system tracks completion of seven clinical examination categories:Diagnostic Studies
- Baseline Polysomnography (PSG Basal)
- Titration Polysomnography (PSG Titulación)
Technical Assessments
- Technical Monitoring (Adaptación)
- Medical Equipment Assignment
Multidisciplinary Care
- Psychology Sessions
- Nutrition Consultations
- Pulmonology Consultations
Follow-Up Documentation
- Adaptation Follow-up Notes
- General Follow-up Appointments (Seguimiento)
Clinical Record Dashboard
The clinical record view (patient_clinical.html) serves as the central tracking interface for all patient examinations.
Accessing the Dashboard
Data Loading Logic
The system uses cycle-specific filtering to display only relevant exams:Key Design Decision: By filtering exams by
ingreso=ingreso_actual, the system ensures that when a patient starts a new 18-month cycle (Mes 1), they begin with a clean exam history. Previous cycle data remains in the database but isn’t displayed, preventing confusion.Exam Completion Indicators
The clinical dashboard provides visual indicators for exam completion status:- Completed Exams
- Missing Exams
- Last Follow-Up
Each exam type displays:
- Count: Number of times exam has been performed this cycle
- Latest Date: Most recent exam date
- Chronological List: All instances ordered by creation date (newest first)
- Details: Key metrics from each exam
Standard Exam Schedule
While DataMed doesn’t enforce a strict exam schedule, typical sleep apnea programs follow this pattern:Initial Phase (Months 1-3)
Month 1: Diagnosis
Required Exams:
- ✅ Baseline Polysomnography
- ✅ Initial Psychology Assessment
- ✅ Initial Nutrition Assessment
- ✅ Pulmonology Consultation
Maintenance Phase (Months 3-18)
Quarterly Reviews
Every 3 months:
- Technical Monitoring
- Psychology (as needed)
- Nutrition (as needed)
Ongoing Support
As needed:
- Follow-up notes
- Equipment adjustments
- Pulmonology consults
Tracking by Capita Month
The system calculates the current capita month for scheduling:Capita Month Tracking Examples
Capita Month Tracking Examples
Scenario 1: New Patient
- Admission date: January 15, 2026
- Current date: January 20, 2026
- Capita month: 1
- Expected exams: Baseline PSG, initial assessments
- Admission date: July 1, 2025
- Current date: January 15, 2026
- Capita month: 7
- Expected exams: Quarterly monitoring
- Admission date: August 1, 2024
- Current date: March 1, 2026
- Capita month: 18 (capped)
- Action needed: Close cycle or extend
Quick Registration Actions
From the clinical dashboard, staff can quickly register new exams:Register Basal PSG
Route:
/exams/register-basal/<patient_id>/Register Titulation
Route:
/exams/register-titulacion/<patient_id>/Register Monitoring
Route:
/exams/register-monitoreo/<patient_id>/Register Psychology
Route:
/exams/register-psicologia/<patient_id>/Register Nutrition
Route:
/exams/register-nutricion/<patient_id>/Register Pulmonology
Route:
/exams/register-neumologia/<patient_id>/Assign Equipment
Route:
/exams/register-equipo-medico/<patient_id>/Auto-linking to Active Admission
All exam registration forms automatically link records to the active admission:- Form Processing
- Safety Checks
The
commit=False pattern is critical - it prevents immediate database save, allowing the view to set the ingreso relationship and registrado_por audit field before saving.Exam History Preservation
When a patient completes an 18-month cycle and starts a new one:Querying Historical Exams
Querying Historical Exams
To retrieve exams from all cycles (not just active):
Completion Reporting
While DataMed doesn’t currently have built-in completion reports, the data structure supports queries like:- Patient Exam Summary
- Cohort Completion Rates
- Exam Volume by Month
Best Practices
Check exam status before each patient visit
Check exam status before each patient visit
Before any clinical encounter, review the clinical dashboard to identify:
- Which exams are overdue
- Which exams can be scheduled
- What data is needed for treatment decisions
Register exams promptly
Register exams promptly
Enter exam data immediately after completion to:
- Maintain accurate tracking
- Enable data-driven follow-up decisions
- Ensure audit trail integrity
Use capita month for scheduling
Use capita month for scheduling
Schedule exams based on the patient’s current capita month:
- Months 1-3: Intensive evaluation phase
- Months 4-18: Maintenance monitoring
Verify active admission before registration
Verify active admission before registration
Always confirm the patient has an active admission before attempting to register exams. The system requires an active cycle for data association.
Next Steps
Clinical Records
Deep dive into each exam type and registration process
Follow-Up System
Learn how to track and manage patient follow-ups