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.
Introduction
DataMed provides a Django-based web application API for managing clinical data in sleep apnea programs. The system uses session-based authentication and follows Django’s URL routing conventions.Architecture
The API is organized into several Django applications:- Patients (
/patients/) - Patient records and program entries management - Exams (
/exams/) - Clinical examinations and medical records - Users (
/users/) - Authentication and user management - Dashboard (
/dashboard/) - Analytics and overview data
Base URL
All API endpoints are relative to your deployment URL:URL Structure
The main URL configuration includes:Authentication
All endpoints require authentication via Django’s session-based authentication system. See the Authentication page for details.Request/Response Format
DataMed uses Django’s template rendering system. Most endpoints:- Accept form data via
POSTrequests (Content-Type:application/x-www-form-urlencoded) - Accept query parameters via
GETrequests - Return HTML responses for browser rendering
- Use Django messages framework for user feedback
Common Patterns
Pagination
Many list views implement pagination with 10 items per page:Search Filters
List views support search via query parameters:Resource IDs
Resources are identified by integer primary keys in URL paths:Status Codes
Standard Django responses:- 200 OK - Successful GET or form display
- 302 Found - Successful POST redirect
- 404 Not Found - Resource does not exist
- 403 Forbidden - Authentication required or insufficient permissions
Error Handling
Errors are communicated via Django’s messages framework:- Success messages on successful operations
- Error messages on validation failures or conflicts
Next Steps
Authentication
Learn about session-based authentication
Patients API
Manage patient records and entries
Exams API
Access clinical examination data
Ingresos API
Manage patient program entries