Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FerchoSG/healthcare-web/llms.txt

Use this file to discover all available pages before exploring further.

The electronic medical record (EMR) is the clinical core of CitaBox. Each record captures what happened during a single consultation: the patient’s vitals, the doctor’s diagnosis, a treatment plan, and any prescriptions issued. Records are immutable once saved — each save creates a new record entry linked to the patient, so the full clinical history is preserved chronologically. Specialty modules extend the base record with dental odontograms or gynecological tracking depending on the clinic’s configuration.

Opening the EMR

The EMR panel can be opened from two places:
  • From the Patients view — click “Ver expediente” on any patient row.
  • From the Doctor dashboard — click “Iniciar consulta” next to an appointment. This opens the EMR with consultationActive = true and passes the appointmentId so the system can mark the appointment as COMPLETED when the doctor closes the session.
When the EMR is opened in read-only mode (without an active consultation), all input fields are disabled. Click “Iniciar consulta” inside the EMR header to switch to edit mode.

EMR structure

A medical record (MedicalRecord) stores the following core fields:
FieldDescription
diagnosisFree-text clinical diagnosis entered by the doctor.
treatment_planFree-text treatment plan or follow-up instructions.
vitalsFlexible JSON object for vital signs (blood pressure, temperature, weight, etc.).
prescriptionsArray of prescription objects, each containing a medication list and optional notes.
gynoRecordGynecological module data (present only for gynecology clinics).
dentalRecordsArray of per-tooth records (present only for dental clinics).

Creating an EMR during a consultation

1

Start the consultation

From the Doctor dashboard, click “Iniciar consulta” next to the appointment. The appointment status changes to IN_CONSULTATION and the EMR opens in edit mode.
2

Record the chief complaint and diagnosis

Switch to the “Notas clínicas” tab. Enter the reason for the visit in the chief complaint field and write the diagnosis in the diagnosis textarea.
3

Write the treatment plan

Fill in the treatment_plan field with follow-up instructions, referrals, or procedures to perform.
4

Add specialty data (if applicable)

Switch to the Odontograma or Ginecología tab to record specialty-specific findings (see below).
5

Add prescriptions (if applicable)

Switch to the Recetas tab. Enter each medication’s name, dosage, and frequency, then click “Agregar medicamento”. Add optional notes in the prescription notes field.
6

Save the record

Click “Guardar expediente clínico”. A new MedicalRecord entry is created and linked to the patient and the current appointment.
7

Finish the consultation

Click “Finalizar consulta” in the EMR header. The appointment status is set to COMPLETED and the EMR returns to read-only mode.

Specialty modules

Specialty modules are enabled per clinic via the specialty_modules array on the Clinic object. The available modules are DENTAL and GYNECOLOGY. Clinics without specialty modules use the base GENERAL_MEDICINE and PRESCRIPTIONS tabs only.
The Odontogram tab displays a full FDI two-digit numbering chart with upper (18–28) and lower (48–38) arches.Tooth conditions:
ConditionLabelColor
healthySanoMuted (default)
cariesCariesRed
fillingObturaciónAmber
crownCoronaBlue
missingAusenteGray
extractionExtracciónPurple
Click any tooth to select it. A side panel shows the current condition and lets you pick a new one. A findings summary below the chart lists all non-healthy teeth. The odontogram is saved as an array of dentalRecords, each with tooth_number, condition, and optional surface and estimated_budget fields.

Prescriptions

Prescriptions are created on the Recetas tab. Each prescription contains:
  • medications — an array of { name, dosage, frequency } entries, for example { name: "Amoxicilina", dosage: "500 mg", frequency: "3 veces al día por 7 días" }.
  • additional_notes — free-text instructions for the patient.
Add each medication individually using the form and “Agregar medicamento”. Medications appear in a list and can be removed before saving. Prescriptions are saved as part of the medical record when you click “Guardar expediente clínico”.

PDF export

Click “Generar PDF” on the Recetas tab to download the most recent medical record as a formatted PDF file.
PDF generation is asynchronous. The button triggers a GET /medical-records/{id}/pdf request that renders the document server-side. Depending on server load this may take a few seconds. The button shows “Generando PDF…” while the request is in flight. The PDF is only available after at least one record has been saved — the button is disabled if no records exist yet.
The downloaded file is named expediente-{patient-name}.pdf and is saved directly to the browser’s downloads folder using a temporary object URL that is revoked immediately after the download starts.

Build docs developers (and LLMs) love