Overview
The Patient Management system is designed to be the core of ARCA, enabling clinic staff to manage comprehensive patient records throughout treatment. The database schema is fully defined and ready to support patient management features.Database Schema
ThePaciente (Patient) model in ARCA’s database includes the following fields:
Personal Information
- Unique ID (
id_Paciente): Auto-generated UUID - Registered Name (
nomeRegistro): Official full name (up to 150 characters) - Social Name (
nomeSocial): Preferred name for daily use (optional, up to 100 characters) - Birth Date (
dataNascimento): Date of birth - Gender (
id_Genero): Reference to Gender lookup table - Skin Color (
id_CorPele): Reference to Skin Color lookup table - Education Level (
id_Escolaridade): Reference to Education Level lookup table
Contact Information
- Personal Phone (
telefonePessoal): Primary contact number (up to 20 characters) - Emergency Contact (
contatoEmergencia): Alternative contact for emergencies (up to 20 characters)
Address
- Street (
enderecoRua): Street address (up to 255 characters) - Number (
enderecoNumero): Address number (up to 10 characters) - Neighborhood (
enderecoBairro): Neighborhood name (up to 100 characters) - City (
enderecoCidade): City name (up to 100 characters) - State (
enderecoEstado): Two-letter state code (e.g., “SP”, “RJ”) - Postal Code (
enderecoCEP): 8-digit CEP (Brazilian postal code)
Treatment Assignment
- Treatment Start Date (
dataInicioTratamento): When treatment began - Assigned Intern (
id_Estagiario_Responsavel): Reference to the psychology intern responsible for sessions - Assigned Supervisor (
id_Supervisor_Responsavel): Reference to the licensed supervisor overseeing treatment
Relationships
The Patient model has relationships to:- Discharge Reports (
RelatorioAlta): Treatment completion documentation - Audit Logs (
LogAuditoria): Access and modification tracking - Appointments (
Atendimento): Scheduled therapy sessions - Assigned Intern (
Usuario): The intern managing the patient - Assigned Supervisor (
Usuario): The supervisor overseeing care
Planned Features
When fully implemented, the patient management system will enable:Patient Creation
- Add new patients with complete demographic information
- Assign intern and supervisor from active staff
- Set treatment start date
- Validate all contact and address information
Patient Records
- View comprehensive patient information
- Track treatment history and timeline
- Access related appointments and reports
- Review audit trail of record access
Patient Updates
- Modify contact information as needed
- Update address details
- Reassign intern or supervisor if needed
- Maintain change history for compliance
Access Control
- Role-based permissions for viewing patient data
- Audit logging for all patient record access
- LGPD compliance with data protection rules
- Restricted access to sensitive information
Current Implementation
Currently Available:- ✅ Complete database schema (Prisma model)
- ✅ Foreign key relationships to users, appointments, and reports
- ✅ Validation rules for data integrity
- ✅ Audit logging structure
- ⏳ Patient management API endpoints
- ⏳ Patient registration form in dashboard
- ⏳ Patient search and list views
- ⏳ Patient detail and edit pages
- ⏳ Treatment assignment workflows
Database Model Reference
See the Database Schema documentation for the complete Prisma model definition and all field specifications.Related Features
Waitlist Management
Move candidates from waitlist to patient status
User Management
Assign interns and supervisors to patients