Skip to main content
This comprehensive guide covers all administrative functions in Med Agenda, including account setup, managing doctors and patients, overseeing consultations, and maintaining system integrity.

Getting Started as an Administrator

Admin Account Setup

To create your administrator account:
1

Navigate to Admin Registration

Access the registration page at /admin/registerYou’ll see the MedAgenda logo and “Registro de Administrador” (Administrator Registration).
2

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
Use a strong password with a mix of uppercase, lowercase, numbers, and special characters. As an administrator, you have access to sensitive patient and doctor information.
3

Submit Registration

Click “Registrar Administrador” (Register Administrator) to create your account.Upon success, you’ll be redirected to /admin/login.
4

Login to Your Account

At the login page:
  • Enter your registered email
  • Enter your password
  • Optionally check “Lembrar-me” (Remember Me)
  • Click “Login” to access your admin dashboard at /admin/dash
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

1

Access Doctor Management

Navigate to “Gerenciamento de Médicos” (Doctor Management) from your admin dashboard.
2

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)
Professional Details:
  • Specialty: Select from the dropdown menu
  • Telephone: Contact number
  • Consultation Value: Fee in Brazilian Reais (R$)
3

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.
4

Submit Doctor Registration

Click “Cadastrar Médico” (Register Doctor).You’ll see a confirmation message: “Médico cadastrado com sucesso!” (Doctor registered successfully!)

Searching for Doctors

To find and verify doctor information:
1

Enter CRM Number

In the “Buscar Médico por CRM” (Search Doctor by CRM) section:
  • Type the doctor’s CRM number
  • Click “Buscar” (Search)
2

View Doctor Details

The system displays:
  • CRM number
  • Full name
  • Email address
  • Specialty
  • Telephone
  • Consultation value

Updating Doctor Information

To modify a doctor’s profile:
1

Identify the Doctor

First, search for the doctor by CRM to verify their current information.
2

Update via API

Use the endpoint: PUT /doctor/{crm}You can update:
  • Name
  • Email
  • Password
  • Specialty
  • Telephone
  • Consultation value
The CRM number cannot be changed as it’s the unique identifier.
3

Verify Changes

Search for the doctor again to confirm the updates were applied correctly.

Removing Doctors

To remove a doctor from the system:
Deleting a doctor may affect historical consultation records. Ensure you have proper backups and understand the implications before proceeding.
1

Verify Doctor CRM

Confirm you have the correct CRM number for the doctor you want to remove.
2

Delete Doctor

Use the endpoint: DELETE /doctor/{crm}This permanently removes the doctor from the system.
3

Confirm Deletion

Verify the doctor no longer appears in searches or doctor lists.

Managing Patients

Administrators can create, view, update, and manage patient accounts.

Registering a New Patient

1

Access Patient Management

Navigate to “Gerenciamento de Pacientes” (Patient Management) from your admin dashboard.
2

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
Optional Fields:
  • Address: Residential address
  • Medical History: Existing conditions, allergies, medications
The CPF field automatically removes any formatting characters. Just type the numbers.
3

Submit Registration

Click “Cadastrar Paciente” (Register Patient).Success message: “Paciente cadastrado com sucesso!” (Patient registered successfully!)

Searching for Patients

To find patient information:
1

Search by CPF

In the “Buscar Paciente por CPF” section:
  • Enter the patient’s CPF number
  • Click “Buscar” (Search)
2

Review Patient Details

The system displays:
  • CPF
  • Full name
  • Email
  • Date of birth
  • Address
  • Medical history

Updating Patient Information

To modify patient records:
1

Locate the Patient

Search for the patient by CPF to confirm their current information.
2

Update Patient Data

Use the endpoint: PUT /patients/update/{cpf}You can update:
  • Name
  • Email
  • Password
  • Date of birth
  • Address
  • Medical history
The CPF cannot be changed as it’s the unique identifier for patients.
3

Verify Changes

Search for the patient again to ensure updates were saved correctly.

Removing Patients

To delete a patient account:
Deleting a patient will affect their consultation history and medical records. Exercise extreme caution and ensure proper data retention policies are followed.
1

Confirm Patient CPF

Verify you have the correct CPF for the patient to be removed.
2

Delete Patient

Use the endpoint: DELETE /patients/delete/{cpf}
3

Verify Deletion

Confirm the patient no longer appears in system searches.

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:
1

Access Consultation Management

Navigate to “Gerenciamento de Consultas” (Consultation Management).
2

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
3

Submit Consultation

Click “Agendar Consulta” (Schedule Consultation).The system will:
  • Create the consultation record
  • Send email notification to the patient
  • Add appointment to doctor’s agenda
Email notifications are sent automatically when consultations are created.

Viewing All Consultations

To see all consultations in the system:
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

1

Enter Consultation ID

In the “Buscar Consulta por ID” (Search Consultation by ID) section:
  • Type the consultation ID
  • Click “Buscar” (Search)
2

Review Consultation Details

The system displays:
  • Consultation ID
  • Date and time (formatted for pt-BR locale)
  • Patient CPF
  • Doctor CRM
  • Urgent status (Yes/No)
  • Observations

Updating Consultations

To modify an existing consultation:
1

Get Consultation ID

First, search for the consultation to get its ID.
2

Update Consultation

Use the endpoint: PUT /consultations/updateYou can change:
  • Date and time
  • Doctor assignment
  • Urgent status
  • Observations
3

Notify Affected Parties

If you change the date/time or doctor:
  • Inform the patient
  • Notify the doctor(s) involved
  • Update any related records

Canceling Consultations

To cancel an appointment:
1

Identify Consultation

Obtain the consultation ID for the appointment to cancel.
2

Delete Consultation

Use the endpoint: DELETE /consultations/{id}This removes the consultation from the system.
3

Communicate Cancellation

  • Notify the patient
  • Inform the doctor
  • Offer to reschedule if appropriate

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

Ensure your technical team:
  • Backs up the database regularly
  • Tests restoration procedures
  • Stores backups securely
  • Maintains backup retention policies
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
Maintain clean user records:
  • Remove duplicate accounts promptly
  • Update information when notified
  • Verify new doctor credentials
  • Monitor for suspicious activity
Keep appointments organized:
  • Avoid scheduling conflicts
  • Verify patient and doctor information
  • Document any changes
  • Maintain accurate historical records

Administrative Workflows

Onboarding a New Doctor

1

Gather Information

Collect:
  • Full name and CRM
  • Email and phone
  • Specialty
  • Consultation fees
2

Create Account

Register the doctor in the system with all details.
3

Provide Credentials

Share login credentials securely:
  • Email address (username)
  • Initial password
  • Login URL: /doctor/login
4

Verify Setup

Confirm:
  • Doctor can log in successfully
  • Profile information is correct
  • They appear in search results
  • Patients can select them for appointments

Handling Patient Requests

1

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
2

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
3

Scheduling Support

When patients need appointment help:
  • Create consultation on their behalf
  • Verify doctor availability
  • Confirm email notification sent
  • Provide consultation ID for reference

Managing Conflicts

If a doctor is double-booked:
  1. Identify the conflicting consultations
  2. Contact both patients
  3. Reschedule one appointment
  4. Update the consultation record
  5. Send new confirmation emails

API Endpoints Reference

Key endpoints for administrators:

Admin Endpoints

EndpointMethodPurpose
/admin/createPOSTCreate admin account
/admin/loginPOSTAdmin authentication
/admin/{id}GETView admin details
/admin/{id}DELETERemove admin

Doctor Management

EndpointMethodPurpose
/doctor/createPOSTRegister new doctor
/doctor/{crm}PUTUpdate doctor info
/doctor/{crm}DELETERemove doctor
/doctorGETList all doctors
/doctor/searchGETSearch by CRM/name/specialty/email

Patient Management

EndpointMethodPurpose
/patients/createPOSTRegister new patient
/patients/{cpf}GETView patient details
/patients/listGETList all patients
/patients/update/{cpf}PUTUpdate patient info
/patients/delete/{cpf}DELETERemove patient

Consultation Management

EndpointMethodPurpose
/consultations/createPOSTSchedule consultation
/consultations/{id}GETView consultation
/consultations/allGETList all consultations
/consultations/updatePUTModify consultation
/consultations/{id}DELETECancel consultation
/consultations/patient-history/{cpf}GETPatient’s consultations

Troubleshooting

Check:
  • Email server configuration
  • Patient email addresses are correct
  • Spam filters aren’t blocking messages
  • Consultation creation is successful
  • Network connectivity
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
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
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

As an administrator, you have access to sensitive medical and personal information. Follow these security guidelines:

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.

Build docs developers (and LLMs) love