Overview
The Appointments system (Atendimento) is designed to enable clinic staff to schedule, track, and document all therapy sessions. The database schema is fully defined and ready to support appointment management features.Database Schema
TheAtendimento (Appointment) model in ARCA’s database includes the following fields:
- Unique ID (
id_Atendimento): Auto-generated UUID for tracking - Start Time (
dataHoraInicio): Timestamp when the session begins - End Time (
dataHoraFim): Timestamp when the session ends - Patient (
id_Paciente): Reference to the patient receiving treatment - Executing Intern (
id_Estagiario_Executor): Reference to the intern conducting the session - Supervising Supervisor (
id_Supervisor_Executor): Reference to the supervisor overseeing the session - Status (
id_Status): Reference to StatusAtendimento lookup table - Observations (
observacoes): Clinical notes and session documentation (text field)
Relationships
The Appointment model has relationships to:- Patient (
Paciente): The patient for this appointment (with cascade delete) - Executing Intern (
Usuario): The intern running the session - Supervising Supervisor (
Usuario): The supervisor overseeing the session - Status (
StatusAtendimento): Current appointment status
Appointment Status
The system uses theStatusAtendimento lookup table to track appointment states. Typical statuses include:
- Scheduled
- Confirmed
- In Progress
- Completed
- Cancelled
- No-Show
- Rescheduled
Appointments require both an intern and supervisor assignment, ensuring proper clinical oversight and training supervision for all sessions.
Planned Features
When fully implemented, the appointment management system will enable:Scheduling
- Create new appointments with date and time
- Assign patient, intern, and supervisor
- Set initial status (typically “Scheduled”)
- Avoid scheduling conflicts
Session Tracking
- Update appointment status as it progresses
- Record start and end times
- Document session observations
- Track attendance and no-shows
Clinical Documentation
- Add clinical notes during or after sessions
- Document treatment progress
- Record observations and assessments
- Maintain HIPAA/LGPD compliant records
Reporting
- View appointment history by patient
- Track intern and supervisor workload
- Generate attendance reports
- Monitor treatment frequency
Calendar Views
- Daily, weekly, and monthly calendars
- Filter by intern, supervisor, or patient
- Color-coded status indicators
- Quick appointment creation and editing
Current Implementation
Currently Available:- ✅ Complete database schema (Prisma model)
- ✅ Foreign key relationships to patients and users
- ✅ Status tracking structure
- ✅ Cascade delete rules (appointments deleted with patients)
- ⏳ Appointment management API endpoints
- ⏳ Appointment scheduling forms
- ⏳ Calendar views and navigation
- ⏳ Session documentation interface
- ⏳ Appointment history and reports
Database Model Reference
See the Database Schema documentation for the complete Prisma model definition and all field specifications.Related Features
Patient Management
Appointments are linked to patient records
User Management
Assign interns and supervisors to appointments