Getting Started as an Administrator
Admin Account Setup
To create your administrator account:Navigate to Admin Registration
Access the registration page at
/admin/registerYou’ll see the MedAgenda logo and “Registro de Administrador” (Administrator Registration).Fill in Your Information
Complete the registration form with:
- Name: Your full name
- Email: Your administrative email address (used for login)
- Password: Create a secure password
Submit Registration
Click “Registrar Administrador” (Register Administrator) to create your account.Upon success, you’ll be redirected to
/admin/login.Unlike doctors and patients, administrators can self-register. However, in production environments, you may want to restrict this to authorized personnel only.
Managing Doctors
As an administrator, you have full control over doctor accounts in the system.Adding a New Doctor
Access Doctor Management
Navigate to “Gerenciamento de Médicos” (Doctor Management) from your admin dashboard.
Complete the Doctor Registration Form
Under “Cadastrar Novo Médico” (Register New Doctor), fill in all required fields:Personal Information:
- Name: Doctor’s full legal name
- CRM: Medical registration number (unique identifier)
- Email: Professional email for login
- Password: Initial password (doctor should change after first login)
- Specialty: Select from the dropdown menu
- Telephone: Contact number
- Consultation Value: Fee in Brazilian Reais (R$)
Select Medical Specialty
Choose from available specialties such as:
- Cardiology (Cardiologia)
- Dermatology (Dermatologia)
- Pediatrics (Pediatria)
- Orthopedics (Ortopedia)
- General Practice (Clínico Geral)
- And many more…
Specialties are loaded from
/doctor/specialties.json. Contact your technical team to add new specialties.Searching for Doctors
To find and verify doctor information:- Search by CRM
- Search by Other Criteria
Updating Doctor Information
To modify a doctor’s profile:Update via API
Use the endpoint:
PUT /doctor/{crm}You can update:- Name
- Password
- Specialty
- Telephone
- Consultation value
The CRM number cannot be changed as it’s the unique identifier.
Removing Doctors
To remove a doctor from the system:Delete Doctor
Use the endpoint:
DELETE /doctor/{crm}This permanently removes the doctor from the system.Managing Patients
Administrators can create, view, update, and manage patient accounts.Registering a New Patient
Access Patient Management
Navigate to “Gerenciamento de Pacientes” (Patient Management) from your admin dashboard.
Fill Out Patient Form
Under “Cadastrar Novo Paciente” (Register New Patient), enter:Required Fields:
- Name: Patient’s full name
- CPF: Patient’s CPF number (numbers only)
- Date of Birth: Select from date picker
- Email: Patient’s email address
- Password: Initial password for patient login
- Address: Residential address
- Medical History: Existing conditions, allergies, medications
Searching for Patients
To find patient information:Search by CPF
In the “Buscar Paciente por CPF” section:
- Enter the patient’s CPF number
- Click “Buscar” (Search)
- Individual Search
- List All Patients
Use the search form to find one patient at a time by CPF.
Updating Patient Information
To modify patient records:Update Patient Data
Use the endpoint:
PUT /patients/update/{cpf}You can update:- Name
- Password
- Date of birth
- Address
- Medical history
Removing Patients
To delete a patient account:Managing Consultations
As an administrator, you have full oversight of all consultations in the system.Creating Consultations
Administrators can schedule appointments on behalf of patients:Fill Consultation Details
Under “Agendar Nova Consulta” (Schedule New Consultation):
- Date and Time: Select using the datetime picker
- Patient CPF: Enter the patient’s CPF
- Doctor CRM: Enter the doctor’s CRM
- Urgent: Check if this is an urgent consultation
- Observations: Add any relevant notes
Viewing All Consultations
To see all consultations in the system:- List All Consultations
- Search Specific Consultation
- Patient History
Use the endpoint:
GET /consultations/allThis returns every consultation with:- Consultation ID
- Date and time
- Patient CPF
- Doctor CRM
- Urgent status
- Observations
Searching for Consultations
Enter Consultation ID
In the “Buscar Consulta por ID” (Search Consultation by ID) section:
- Type the consultation ID
- Click “Buscar” (Search)
Updating Consultations
To modify an existing consultation:Update Consultation
Use the endpoint:
PUT /consultations/updateYou can change:- Date and time
- Doctor assignment
- Urgent status
- Observations
Canceling Consultations
To cancel an appointment:Delete Consultation
Use the endpoint:
DELETE /consultations/{id}This removes the consultation from the system.System Oversight and Administration
Dashboard Overview
Your admin dashboard (/admin/dash) provides:
- Quick access to all management functions
- System statistics and metrics
- Navigation to doctors, patients, and consultations
- Administrative tools and settings
Monitoring System Activity
Doctor Activity
Monitor:
- Number of doctors in system
- Specialties available
- Doctor schedules and availability
- Consultation completion rates
Patient Activity
Track:
- Total registered patients
- Appointment scheduling patterns
- Patient history utilization
- Email notification delivery
Consultations
Oversee:
- Total consultations scheduled
- Urgent vs. routine appointments
- Cancellation rates
- Appointment distribution by doctor
System Health
Ensure:
- Email notifications are working
- Database integrity
- User account security
- API endpoint availability
Data Management Best Practices
Regular Backups
Regular Backups
Ensure your technical team:
- Backs up the database regularly
- Tests restoration procedures
- Stores backups securely
- Maintains backup retention policies
Data Privacy
Data Privacy
Protect sensitive information:
- Follow LGPD (Lei Geral de Proteção de Dados) guidelines
- Limit access to patient records
- Use secure passwords
- Log administrative actions
- Never share credentials
User Management
User Management
Maintain clean user records:
- Remove duplicate accounts promptly
- Update information when notified
- Verify new doctor credentials
- Monitor for suspicious activity
Consultation Integrity
Consultation Integrity
Keep appointments organized:
- Avoid scheduling conflicts
- Verify patient and doctor information
- Document any changes
- Maintain accurate historical records
Administrative Workflows
Onboarding a New Doctor
Provide Credentials
Share login credentials securely:
- Email address (username)
- Initial password
- Login URL:
/doctor/login
Handling Patient Requests
Registration Assistance
When patients need help registering:
- Create their account as an admin
- Verify all information is accurate
- Provide login credentials securely
- Guide them through first login
Account Issues
For login or access problems:
- Verify account exists (search by CPF)
- Reset password if needed
- Update email if changed
- Test login after changes
Managing Conflicts
- Double Booking
- Patient Cancellations
If a doctor is double-booked:
- Identify the conflicting consultations
- Contact both patients
- Reschedule one appointment
- Update the consultation record
- Send new confirmation emails
API Endpoints Reference
Key endpoints for administrators:Admin Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/admin/create | POST | Create admin account |
/admin/login | POST | Admin authentication |
/admin/{id} | GET | View admin details |
/admin/{id} | DELETE | Remove admin |
Doctor Management
| Endpoint | Method | Purpose |
|---|---|---|
/doctor/create | POST | Register new doctor |
/doctor/{crm} | PUT | Update doctor info |
/doctor/{crm} | DELETE | Remove doctor |
/doctor | GET | List all doctors |
/doctor/search | GET | Search by CRM/name/specialty/email |
Patient Management
| Endpoint | Method | Purpose |
|---|---|---|
/patients/create | POST | Register new patient |
/patients/{cpf} | GET | View patient details |
/patients/list | GET | List all patients |
/patients/update/{cpf} | PUT | Update patient info |
/patients/delete/{cpf} | DELETE | Remove patient |
Consultation Management
| Endpoint | Method | Purpose |
|---|---|---|
/consultations/create | POST | Schedule consultation |
/consultations/{id} | GET | View consultation |
/consultations/all | GET | List all consultations |
/consultations/update | PUT | Modify consultation |
/consultations/{id} | DELETE | Cancel consultation |
/consultations/patient-history/{cpf} | GET | Patient’s consultations |
Troubleshooting
Email notifications aren't being sent
Email notifications aren't being sent
Check:
- Email server configuration
- Patient email addresses are correct
- Spam filters aren’t blocking messages
- Consultation creation is successful
- Network connectivity
Cannot create doctor with specific specialty
Cannot create doctor with specific specialty
Solution:
- Verify specialty exists in
/doctor/specialties.json - Check spelling matches exactly
- Contact technical team to add new specialties
- Try selecting from dropdown instead of typing
Patient can't log in after registration
Patient can't log in after registration
Verify:
- Account was created successfully
- Email address is correct
- Password meets requirements
- Patient is using
/patient/login(not admin or doctor login) - Try resetting the password
Consultation doesn't appear in doctor's agenda
Consultation doesn't appear in doctor's agenda
Check:
- CRM number is correct
- Consultation was created successfully
- Doctor is logged in with correct account
- Refresh the doctor’s agenda page
- Verify consultation date is in the future
Security Best Practices
Password Security
- Use strong, unique passwords
- Change passwords regularly
- Never share admin credentials
- Use password managers
Access Control
- Log out when leaving workstation
- Use private browsing on shared computers
- Limit admin account creation
- Monitor for unauthorized access
Data Protection
- Follow LGPD compliance
- Only access necessary records
- Don’t share patient information
- Use secure connections (HTTPS)
Audit Trail
- Document significant changes
- Keep records of account modifications
- Note why data was deleted
- Maintain communication logs
Getting Help
For administrator support:- Technical Issues: Contact your IT department or system developers
- Feature Requests: Document needs and submit to development team
- Training: Request additional training materials or sessions
- Emergency Support: Establish emergency contact procedures
Keep contact information for technical support readily available for quick issue resolution.