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.

Every PDF document generated by FemeSalud — prescriptions, rest certificates, medical cards, and consultation summaries — includes a clinic header drawn from the clinic_info table. Keeping this data accurate ensures every printed or exported document reaches patients and third parties with the correct institutional details. Clinic settings are managed by admins only; doctors see the same data on their generated documents but cannot modify it.

Clinic Info Fields

The ClinicInfo interface in src/lib/api/clinic.ts maps directly to the clinic_info database table. The platform always reads the single row where id = 1.
export interface ClinicInfo {
  id: number;
  name: string;          // Clinic's commercial name, e.g. "Femesalud"
  address_line1: string; // Street address, number, and reference points
  address_line2: string; // City and state, e.g. "Valle de la Pascua, Estado Guárico"
  phone: string;         // One or more contact numbers
  rif: string;           // Venezuelan tax identifier, e.g. "J-12345678-9"
  updated_at: string;    // ISO timestamp, set automatically on every update
}

name

The commercial name of the clinic. Appears as the primary heading in all generated PDFs.

address_line1

Full street address including street name, cross streets, and building number.

address_line2

City and state. Rendered on a second line beneath the street address.

phone

Contact phone numbers. You can include multiple numbers separated by spaces or slashes, e.g. 0412/8299890 0424/4609387.

rif

Venezuelan Registro de Información Fiscal identifier. Optional — leave blank if not applicable to your practice type.

updated_at

Automatically set to the current UTC timestamp on every save. Read-only; managed by useUpdateClinicInfo().

How to Update Clinic Settings

1

Open Configuración

Click Configuración in the sidebar. The page loads with two tabs: Mi Perfil and Datos de la Clínica. The clinic tab is visible and enabled only for users with the admin role.
2

Select Datos de la Clínica

Click the Datos de la Clínica tab. The form pre-populates with values fetched by useClinicInfo(), which queries clinic_info where id = 1.
3

Edit the fields

Update any combination of: Nombre Comercial, Dirección (Línea 1), Dirección (Línea 2), Teléfonos de Contacto, and RIF.
4

Save

Click Guardar Datos Clínicos. The form calls useUpdateClinicInfo(), which PATCHes the row at id = 1 and appends the current UTC timestamp to updated_at. On success, the clinic_info TanStack Query cache is invalidated, so any component subscribed to useClinicInfo() immediately reflects the new values.

Doctor Profile Settings

Each doctor manages their own profile from the Mi Perfil tab in Configuración. Profile data is stored in the profiles table and surfaces in the signature block of generated PDF documents — including prescriptions (récipes), rest certificates (constancias de reposo), and medical cards.
export interface Profile {
  id: string;
  full_name: string;
  email: string;
  specialty: string | null;
  avatar_url: string | null;
  university?: string | null;
  mpps?: string | null; // Ministerio del Poder Popular para la Salud reg. number
  cmc?: string | null;  // Colegio de Médicos y Cirujanos reg. number
}
FieldDescription
full_nameDoctor’s full name as it should appear on documents, e.g. Dra. Carli Solé Aquino
emailAccount email — read-only in the profile form
specialtyMedical specialty or role title, e.g. Ginecología y Obstetricia
avatar_urlProfile picture URL stored in Supabase Storage
universityDegree-granting institution or college abbreviation, e.g. UC-CHET
mppsMPPS registration number issued by the Ministerio del Poder Popular para la Salud
cmcCMC registration number issued by the Colegio de Médicos y Cirujanos
Profile changes are saved via useUpdateProfile(), which PATCHes the profiles row matching the current user’s id and invalidates the profile, profiles_with_roles, and doctors query caches.
The mpps and cmc numbers are printed in the signature block of rest certificates and medical cards. Fill them in before generating any official documents to avoid having blank credential fields on issued paperwork.

Dark Mode

FemeSalud includes a theme toggle powered by the useTheme hook. The selected theme (light or dark) is persisted in localStorage under the key femesalud-theme and applied to the entire UI on load. The toggle is accessible from the sidebar footer on all pages and does not require a page reload. Theme preference is per-browser and is not synced to the user’s profile in Supabase.

Build docs developers (and LLMs) love