Overview
The Patient Mobile Access system (AccesoMovil) provides patients with secure, read-only access to their personal dental records through a mobile-friendly interface. This feature enhances patient engagement and reduces administrative burden by allowing patients to self-serve basic information.Patient access is optional and must be explicitly created by clinic staff. Not all patients will have mobile access by default.
Key Characteristics
Mobile-First Design
Optimized for smartphone and tablet access
Read-Only Access
Patients can view but not modify their records
Token-Based Auth
Secure authentication using tokens with expiration
Self-Service Portal
View appointments, treatments, and personal information
Database Schema
Patient access credentials are stored in theacceso_movil table:
| Field | Type | Description |
|---|---|---|
id_acceso | INT (PK) | Primary key |
id_paciente | INT (FK) | Foreign key to patient record |
usuario_movil | VARCHAR | Patient’s username for mobile login |
password | VARCHAR | Hashed password (hidden) |
token | VARCHAR | Session token for API access (hidden) |
fecha_expiracion | DATETIME | Token expiration date |
estatus | ENUM | ’activo’ or ‘inactivo’ |
created_at | TIMESTAMP | Account creation date |
updated_at | TIMESTAMP | Last modification date |
app/Models/AccesoMovil.php:10
Model Relationships
app/Models/AccesoMovil.php:33, app/Models/Paciente.php:57
Security Features
Password Hashing
Passwords are automatically hashed when set:app/Models/AccesoMovil.php:39
Hidden Fields
Sensitive fields are hidden from JSON responses:app/Models/AccesoMovil.php:26
Token Expiration
Access tokens have an expiration date (fecha_expiracion) to ensure sessions don’t remain active indefinitely.
What Patients Can Access
Personal Information
Personal Information
Read-only access to:
- Name and demographics
- Contact information (phone, address)
- Date of birth and age
- CURP and identification
Appointment History
Appointment History
Can view:
- Upcoming appointments (date, time, dentist)
- Past appointment history
- Appointment status (scheduled, completed, cancelled)
- Schedule new appointments (must call clinic)
- Cancel or reschedule appointments
- View other patients’ appointments
Treatment Information
Treatment Information
Can view:
- Active treatment plans
- Completed treatments
- Treatment descriptions and procedures
- Treatment dates
- Detailed clinical notes from dentists
- Internal diagnosis codes
- Pricing information (optional, depends on implementation)
Clinical Records
Clinical Records
Limited access to:
- Basic medical history they provided
- Allergies and medications
- General health questionnaire responses
- Dentist’s private notes
- Detailed diagnostic evaluations
- X-ray interpretations
- Treatment recommendations (unless explicitly shared)
Permission Boundaries
Strict Read-Only Access
Patients can only view their own data. They cannot:
- Modify any personal information
- Edit treatment plans
- Add or remove appointments
- Access other patients’ data
- View clinic staff information
- Access administrative functions
Data Scope Restrictions
All patient queries must be filtered byid_paciente to ensure patients only see their own data:
Creating Patient Access
Patient access accounts should be created by clinic staff (Dentist or Assistant) when:- A patient requests mobile access
- The clinic wants to provide digital records
- The patient needs to monitor their treatment progress
Account Creation Process
Recommended Username Format
Consider using a consistent format for patient usernames:- Email address:
juan.perez@email.com - Phone number:
5551234567 - Custom format:
paciente_12345orjperez_clinic123
Authentication Flow
Account Status Management
Active Status
Patients withestatus = 'activo' can log in and access their data.
Inactive Status
Patients withestatus = 'inactivo' cannot log in. Use this to:
- Temporarily disable access
- Suspend patients who haven’t paid
- Deactivate accounts for patients who left the clinic
Reactivation
Clinic staff can toggle the status back to ‘activo’ at any time.Privacy & Compliance
HIPAA/Privacy Considerations
When implementing patient mobile access:
- Data Encryption: Use HTTPS/TLS for all API communications
- Access Logs: Track when patients access their records
- Password Requirements: Enforce strong passwords
- Session Timeouts: Auto-logout after inactivity
- Two-Factor Auth: Consider adding 2FA for sensitive data
Best Practices
- Token Rotation: Regenerate tokens periodically (e.g., every 90 days)
- Password Reset: Provide a secure password reset mechanism
- Session Management: Implement proper session timeout (e.g., 15-30 minutes of inactivity)
- Audit Trail: Log all patient access to sensitive data
- Data Minimization: Only expose necessary information; hide internal codes and staff notes
- Terms of Service: Require patients to accept terms before first access
Mobile App Features
The patient mobile app (when developed) should include:Dashboard
- Next appointment
- Recent activity
- Pending treatments
Appointments
- View upcoming appointments
- See appointment history
- Get directions to clinic
Treatments
- Active treatment plans
- Treatment progress
- Completed procedures
Profile
- Personal information
- Contact details
- Medical history
API Endpoints (Future)
When the mobile API is implemented, typical endpoints will include:Error Handling
Invalid Credentials
Invalid Credentials
Response: 401 UnauthorizedMessage: “Invalid username or password”Action: Limit login attempts to prevent brute force
Inactive Account
Inactive Account
Response: 403 ForbiddenMessage: “Your account has been deactivated. Please contact the clinic.”Action: Direct patient to call clinic
Expired Token
Expired Token
Response: 401 UnauthorizedMessage: “Your session has expired. Please log in again.”Action: Redirect to login page
Comparison with Staff Roles
| Feature | Super Admin | Dentist | Assistant | Patient |
|---|---|---|---|---|
| Access Scope | All clinics | Own clinic | Own clinic | Own data only |
| Data Modification | Full | Full (clinic) | Limited | None |
| View Clinical Notes | Stats only | Full | No | Limited |
| Appointments | Stats | Full | Scheduling | View only |
| Authentication | Web portal | Web portal | Web portal | Mobile app |
| Platform | Desktop | Desktop | Desktop | Mobile |
Related Documentation
- Super Admin Role - Platform management
- Dentist Role - Clinical management
- Assistant Role - Scheduling management
- Patient Management - Managing patient records
- Authentication - Login and authentication reference