Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/KevxxAlva/femesalud-zen-flow/llms.txt

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

The Billing and Collections module gives your practice a real-time view of every appointment’s financial standing — from pending invoices to confirmed payments. Staff can set consultation fees, mark appointments as paid with a specific method, add a payment reference for bank transfers or Zelle transactions, and instantly generate a signed PDF receipt that can be handed or sent to the patient.

KPI Cards

At the top of the page, three summary cards give a quick snapshot of the practice’s financial health. Metrics are drawn from the current month and the two preceding months.

Ingresos Totales

The sum of all fees collected from appointments with status = completada and a confirmed payment_method. Displayed in USD alongside the number of billed consultations.

Cuentas por Cobrar

Outstanding balance across all programada appointments that have a price set, plus any completada appointments where payment has not yet been confirmed. Shows count of pending consultations.

Desempeño de Cobranza

A qualitative rating — Perfecto, Excelente, Bueno, or Atención Requerida — calculated from the ratio of pending earnings to total potential income, prompting the team to follow up on unconfirmed payments.

Appointment Table

The billing table lists every appointment in the loaded window (current month plus two prior months), paginated at 15 rows per page.
ColumnDescription
PacientePatient’s full name
Fecha CitaScheduled date and time, formatted as DD Mon YYYY HH:MM
ConceptoAppointment reason; falls back to "Consulta médica general" when blank
MédicoTreating doctor resolved from the doctor map
MontoFee in USD ($0 when no price is set)
EstadoVisual badge: Cobrada (green), Pendiente / Por Cobrar (amber), Cancelada (red)
AccionesEdit icon or Confirmar Pago button, plus a download icon for completed appointments
A Confirmar Pago call-to-action button appears in place of the edit icon specifically for appointments whose status is completada but that still lack a payment_method — the most common scenario after a doctor finalises a visit.

Filters

Use the filter bar to narrow the appointment list before acting on or exporting records.

Search

Free-text search across patient name and appointment reason (case-insensitive).

Status

Filter by Todas, Pendientes (programada), or Cobros Confirmados (completada).

Mes

Month picker built dynamically from the dates present in the loaded appointments, formatted as Mes YYYY (e.g., Enero 2025).

Médico

Visible only when the clinic has more than one registered doctor. Filters to all appointments assigned to the selected physician.

Payment Methods Supported

When confirming a payment, staff can choose from the following methods:
ValueDisplay Label
efectivoEfectivo
zelleZelle
pago_movilPago Móvil
transferenciaTransferencia Bancaria
tarjeta_debitoTarjeta de Débito (Punto)
tarjeta_creditoTarjeta de Crédito
seguroSeguro

Confirming a Payment

Clicking the pencil icon — or the Confirmar Pago button — on any appointment opens the payment dialog. The dialog is pre-populated with the appointment’s current values.
FieldRequiredNotes
Monto (USD)YesMust be ≥ 0. Decimals accepted (step = 0.01).
EstadoYesprogramada, completada, or cancelada.
Método de PagoYes, when completadaSelecting completada reveals the payment details section.
ReferenciaNoFree-text field for transaction IDs, Zelle confirmation codes, etc.
payment_method is mandatory when setting status to completada. Attempting to save without selecting a payment method will show the error: “Debe seleccionar un método de pago para marcar como completada” and block the save. Setting the appointment to cancelada or reverting to programada clears both the method and the reference from the record.

Payment Confirmation Flow

1

Appointment Created as Programada

When a consultation is booked through the Appointments module, it is saved with status = programada. It immediately appears in the billing table under the Pendientes filter. You can set the consultation fee at this stage.
2

Set the Consultation Fee

Open the edit dialog and enter the amount in USD. The fee is saved independently of the status, so the balance visible in the Cuentas por Cobrar KPI updates right away.
3

Mark as Completada and Select Payment Method

After the patient is attended, open the dialog again, change Estado to Completada, and select the payment method from the dropdown. Optionally add a payment reference (bank transfer number, Zelle confirmation, etc.). Click Registrar Pago to save. The appointment status badge turns green — Cobrada — and the amount moves from Cuentas por Cobrar to Ingresos Totales.
4

Export the PDF Receipt

The download icon becomes active on all completada appointments. Click it to generate and download the receipt instantly.

Exporting a PDF Receipt

Clicking the download icon on any Cobrada appointment triggers exportInvoice(), which generates a single-page A4 PDF receipt using the clinic’s registered information and the treating doctor’s profile.

Receipt contents

SectionDetails
Clinic headerAddress lines, phone number, and RIF (if set in clinic settings)
SubtitleConsultorio Ginecológico Obstétrico + clinic trade name
Receipt numberFS-[first 8 characters of appointment ID, uppercased] (e.g., FS-A1B2C3D4)
Issue dateTaken from scheduled_at
Patient dataFull name, service concept (appointment reason or Consulta Ginecológica / Obstétrica)
Payment detailsMethod and reference number (when provided)
Service tableDescription, amount in USD, total
Doctor signatureTreating doctor’s full name and specialty, centred below a dashed signature line
WatermarkClinic logo at 4% opacity centred on the page
The file is saved locally as Recibo_[PatientName].pdf.
The receipt reflects the doctor who is currently logged in at the time of export. If a receptionist exports the receipt, the clinic’s default doctor name (Médico Tratante) and specialty (Ginecólogo Obstetra) will appear on the signature line unless the logged-in profile has a full_name and specialty set.

Monthly Billing Report

The Exportar Reporte button in the filter bar generates a full tabular PDF report via exportMonthlyReport(). The report respects the active month and doctor filters. The exported PDF includes:
  • Clinic header and report title (e.g., Reporte de Facturación - Enero 2025)
  • Financial summary: total collected, total outstanding, and record count
  • Full appointments table with columns: Fecha, Paciente, Concepto, Monto, Estado, Método, Referencia
  • Status cells colour-coded: green for Cobrada, amber for Pendiente / Por Cobrar, red for Cancelada
The file is saved as Reporte_Facturacion_[YYYY-MM].pdf (or Reporte_Facturacion_General.pdf when no month filter is active).

Build docs developers (and LLMs) love