This guide will walk you through setting up DataMed and registering your first sleep apnea patient.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.
Prerequisites
Before you begin, ensure you have:- Python 3.9 or higher installed
- pip (Python package manager)
- Git for cloning the repository
Install dependencies
Install all required packages from requirements.txt:
For development, DataMed uses SQLite by default. No additional database setup is required.
Create a superuser
Create an admin account to access the system:Follow the prompts to set up your username, email, and password.
Register Your First Patient
Once the server is running, you can register your first patient in the sleep apnea program.Log in to the system
Navigate to
http://localhost:8000/users/login/ and enter your superuser credentials.After successful login, you’ll be redirected to the dashboard at /dashboard/.Navigate to patient registration
Go to
/patients/create/ or click the patient registration link in the navigation menu.Fill in patient information
The patient registration form includes the following required fields:
The
documento field must be unique across all patients. The system will prevent duplicate registrations.Create a Program Entry
After registering a patient, you need to create an active program entry (ingreso) to track their participation in the sleep apnea program. To create an entry, navigate to:- fecha_inicio: Start date of the program entry
- estado: Status (defaults to ACTIVO)
- motivo: Optional reason/notes for the entry
View the Dashboard
Navigate to/dashboard/ to see:
- Overview of active patients
- Program statistics
- Patient follow-up information
- Quick access to patient records
Next Steps
Installation Guide
Detailed setup for production environments
Patient Management
Learn about patient model fields and relationships
Exam Management
Manage sleep study exams and results
Dashboard Features
Explore analytics and reporting capabilities
Common Issues
Database Connection Error
In development, DataMed uses SQLite by default. Ensure the project has write permissions for creatingdb.sqlite3.
Static Files Not Loading
Runpython manage.py collectstatic to collect static files. In development mode, Django serves static files automatically.
Login Redirects to Wrong Page
Check yourLOGIN_REDIRECT_URL setting in config/settings.py. The default is dashboard.