The expedientes section covers two pages: a paginated list for browsing and searching all docente dossiers, and a full-detail view for reviewing documents, OCR output, and validation state for a single docente.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gcapella0/agente-inteligente-expedientes/llms.txt
Use this file to discover all available pages before exploring further.
Dossier list — expedientes.html
The list page is the main entry point for dossier management. On load it calls GET /docentes/buscar?limit=20 and displays results in a table with cursor-based pagination.
Search and filters
| Control | Behaviour |
|---|---|
| Search bar | Queries GET /docentes/buscar?q=<text> — matches against apellido, nombre, and cédula. Debounced 300 ms. |
| Estado filter | Filters by status: activo, inactivo, or retirado. Sent as &status=<value>. |
| Completitud filter | Client-side filter applied after the API response: baja (< 50 %), media (50–80 %), alta (> 80 %). |
| Limpiar button | Resets all three filters and re-fetches from page 1. |
Pagination
Pagination is cursor-based (not page-number based). The API returns acursor_siguiente token when more records exist. The UI maintains a cursorStack array so “Anterior” / “Siguiente” buttons can navigate back and forward without re-fetching all records.
Table columns
Each row shows: Cédula (monospaced), Nombre (nombres + apellidos), Departamento, Completitud (colour-coded badge), and an Acciones cell with Ver, Editar, and Eliminar links. Clicking Ver navigates to/ui/expediente.html?cedula=<cédula>.
Clicking Eliminar shows a confirm() dialog and calls DELETE /expedientes/{cedula} on confirmation.
Dossier detail — expediente.html
Loaded via URL parameter ?cedula=XXXXXXXX. On init the page fetches both GET /expediente/{cedula} (docente + documents) and GET /validacion/expediente/{cedula} (validation summary) in parallel.
Header and KPI cards
The header shows full name, cédula, department, and sede. Four metric cards display:- Completitud — percentage score rounded to the nearest integer.
- Documentos — count of uploaded documents out of the 10 required (e.g.
7/10). - Validación — overall validation state badge:
apto(green),requiere_atencion(yellow), orcritico(red). - Último update —
fecha_actualizacionformatted as a locale date string.
Required documents (10 total)
The completeness percentage is based on how many of these document types are present in the dossier:Documents table
Columns: Tipo (monospaced), Formato (uppercased extension), Tamaño (human-readable KB/MB), Estado (validation badge), and Acciones. Actions per row:| Button | Action |
|---|---|
| Ver OCR | Opens the document viewer modal for this document. |
| Estado | Opens the validation-state picker modal. |
| Eliminar | Shows confirm() and calls DELETE /documentos/{documento_id}. |
Document viewer modal
The viewer modal has two tabs:Documento
Renders the file inline. JPG/JPEG/PNG files are displayed as
<img> tags. PDFs show an “Abrir PDF” link (opens in new tab) and a “Descargar” link. Unknown formats show a plain download link. All URLs include ?token=<jwt> for authenticated access via the /archivo endpoint.JSON OCR
Shows the raw OCR output as pretty-printed JSON, including
procesado, motor, confianza_promedio, paginas, idioma_detectado, campos_extraidos, and texto_completo. Useful for debugging extraction quality.Validation state management
Click Estado on any document row to open the state picker. Available states:pendiente— default, no review performed yetaprobado— document reviewed and acceptedrechazado— document rejectedrequiere_revision— flagged for further review
PATCH /documentos/{documento_id}/validacion with { "estado": "<value>" }.
Export
The header area includes an Exportar dropdown that links directly to the API export endpoint with?formato=json, ?formato=xml, or ?formato=csv. These are plain <a href> links served by GET /expedientes/{cedula}/exportar.
Editing a dossier
Bothexpedientes.html (list) and expediente.html (detail) provide an edit modal.
From the detail page
Click the Editar button in the header. The modal contains 11 fields arranged in a responsive grid:| Field name | Type |
|---|---|
nombres | text |
apellidos | text |
email_personal | |
email_institucional | |
telefono_principal | text |
telefono_secundario | text |
direccion_completa | textarea |
departamento | text |
sede | text |
estado_civil | text |
nacionalidad | text |
PUT /expedientes/{cedula} with only the non-empty fields in the request body, then reloads the dossier data.
From the list page
The quick edit modal inexpedientes.html covers a subset of 6 fields: nombres, apellidos, email, teléfono, departamento, and sede. It also calls PUT /expedientes/{cedula}.