Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ttpullima/RomsoftBackEnd2021_v2/llms.txt

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

The Gestión Clínica API exposes a collection of small, stable lookup tables that power dropdown controls, validation rules, and reporting classifiers throughout every clinical module. These catalogs — covering demographic attributes (gender, civil status, blood type, identity documents), administrative classifications (patient types, hospitalisation types, discharge types, affiliation, filiation), geographic codes (ubigeo), and workflow statuses — are typically populated once during system setup and updated only when regulatory requirements change. Frontend applications should load these catalogs at startup or cache them per session to avoid redundant network calls. All endpoints use HTTP POST and require a valid Authorization bearer token.
Most reference-data controllers expose only a GetAllActives action — a no-body POST that returns every active record in the table. The exceptions are ADM_OCUPACION and ADM_UBIGEO, which additionally support filtering, and TIPO_ESTADO, which exposes only a GetAllFilters action (no GetAllActives); those actions are documented within their respective accordions below.
Because these catalogs are rarely updated, consider caching them in your application’s session store or a client-side state manager (Redux, Pinia, Zustand, etc.) right after login. This eliminates dozens of redundant API round-trips during a user’s session.

Standard Response Envelope

Every endpoint documented on this page returns responses wrapped in the same JsonResponse structure:
FieldTypeDescription
Successbooleantrue when the request completed without a server exception.
Dataarray / nullArray of DTO objects on success; null on error.
Messagestring / nullHuman-readable message, populated on warning or error conditions.
Warningbooleantrue when a business-rule condition is met but no hard exception occurred.

Reference Catalog Endpoints

The gender catalog provides the list of gender options available when registering patients and professionals. Extends EntityAuditableDTO.DTO fields — ADM_GENERODTO
FieldTypeDescription
id_generointegerUnique primary key.
c_codigostringShort code (e.g., "M", "F").
t_descripcionstringFull description (e.g., "Masculino", "Femenino").
FechaCreaciondatetime?Audit: creation timestamp.
FechaModificaciondatetime?Audit: last modification timestamp.
UsuarioCreacionstringAudit: creating username.
UsuarioModificacionstringAudit: last modifying username.
POST /api/ADM_GENERO/GetAllActives — returns all active gender options. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_GENERO/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Example response
{
  "Success": true,
  "Data": [
    { "id_genero": 1, "c_codigo": "M", "t_descripcion": "Masculino" },
    { "id_genero": 2, "c_codigo": "F", "t_descripcion": "Femenino" }
  ],
  "Message": null,
  "Warning": false
}
Provides the list of marital/civil status options required for patient registration and used in SUSALUD statistical reports. Extends EntityAuditableDTO.DTO fields — ADM_ESTADO_CIVILDTO
FieldTypeDescription
id_estado_civilintegerUnique primary key.
c_codigostringShort code (e.g., "S" = Soltero, "C" = Casado).
t_descripcionstringFull description (e.g., "Soltero(a)", "Casado(a)", "Divorciado(a)").
FechaCreaciondatetime?Audit: creation timestamp.
FechaModificaciondatetime?Audit: last modification timestamp.
UsuarioCreacionstringAudit: creating username.
UsuarioModificacionstringAudit: last modifying username.
POST /api/ADM_ESTADO_CIVIL/GetAllActives — returns all active civil status options. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_ESTADO_CIVIL/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Example response
{
  "Success": true,
  "Data": [
    { "id_estado_civil": 1, "c_codigo": "S", "t_descripcion": "Soltero(a)" },
    { "id_estado_civil": 2, "c_codigo": "C", "t_descripcion": "Casado(a)" },
    { "id_estado_civil": 3, "c_codigo": "D", "t_descripcion": "Divorciado(a)" },
    { "id_estado_civil": 4, "c_codigo": "V", "t_descripcion": "Viudo(a)" }
  ],
  "Message": null,
  "Warning": false
}
Enumerates the types of identity documents accepted when registering patients and professionals in Peru (DNI, passport, carnet de extranjería, etc.). Extends EntityAuditableDTO.DTO fields — ADM_DOCUMENTO_IDENTIDADDTO
FieldTypeDescription
id_documento_identidadintegerUnique primary key.
c_codigostringShort code (e.g., "DNI", "PAS", "CE").
t_descripcionstringFull document name (e.g., "Documento Nacional de Identidad", "Pasaporte", "Carnet de Extranjería").
FechaCreaciondatetime?Audit: creation timestamp.
FechaModificaciondatetime?Audit: last modification timestamp.
UsuarioCreacionstringAudit: creating username.
UsuarioModificacionstringAudit: last modifying username.
POST /api/ADM_DOCUMENTO_IDENTIDAD/GetAllActives — returns all active identity document types. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_DOCUMENTO_IDENTIDAD/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Example response
{
  "Success": true,
  "Data": [
    { "id_documento_identidad": 1, "c_codigo": "DNI", "t_descripcion": "Documento Nacional de Identidad" },
    { "id_documento_identidad": 2, "c_codigo": "PAS", "t_descripcion": "Pasaporte" },
    { "id_documento_identidad": 3, "c_codigo": "CE",  "t_descripcion": "Carnet de Extranjería" }
  ],
  "Message": null,
  "Warning": false
}
Lists all blood type groups (ABO + Rh factor combinations) available for patient clinical records. Extends EntityAuditableDTO.DTO fields — ADM_GRUPO_SANGUINEODTO
FieldTypeDescription
id_grupo_sanguineointegerUnique primary key.
c_codigostringShort code (e.g., "O+", "A-", "AB+").
t_descripcionstringFull label (e.g., "O Positivo", "A Negativo", "AB Positivo").
FechaCreaciondatetime?Audit: creation timestamp.
FechaModificaciondatetime?Audit: last modification timestamp.
UsuarioCreacionstringAudit: creating username.
UsuarioModificacionstringAudit: last modifying username.
POST /api/ADM_GRUPO_SANGUINEO/GetAllActives — returns all active blood type groups. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_GRUPO_SANGUINEO/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Example response
{
  "Success": true,
  "Data": [
    { "id_grupo_sanguineo": 1, "c_codigo": "O+",  "t_descripcion": "O Positivo" },
    { "id_grupo_sanguineo": 2, "c_codigo": "O-",  "t_descripcion": "O Negativo" },
    { "id_grupo_sanguineo": 3, "c_codigo": "A+",  "t_descripcion": "A Positivo" },
    { "id_grupo_sanguineo": 4, "c_codigo": "A-",  "t_descripcion": "A Negativo" },
    { "id_grupo_sanguineo": 5, "c_codigo": "B+",  "t_descripcion": "B Positivo" },
    { "id_grupo_sanguineo": 6, "c_codigo": "B-",  "t_descripcion": "B Negativo" },
    { "id_grupo_sanguineo": 7, "c_codigo": "AB+", "t_descripcion": "AB Positivo" },
    { "id_grupo_sanguineo": 8, "c_codigo": "AB-", "t_descripcion": "AB Negativo" }
  ],
  "Message": null,
  "Warning": false
}
The occupation catalog is the most fully-featured reference table: it supports create, update, delete, and both filtered and by-ID lookups in addition to the standard GetAllActives. Occupations are recorded on patient registration for statistical and epidemiological reporting. Extends EntityAuditableDTO.DTO fields — ADM_OCUPACIONDTO
FieldTypeDescription
id_ocupacionintegerUnique primary key.
c_codigostringShort occupation code.
t_descripcionstringFull occupation name (e.g., "Agricultor", "Docente", "Ingeniero").
t_observacionstringOptional free-text observations or notes.
f_estadointeger?Numeric status flag (active/inactive).
estadostringHuman-readable status label (e.g., "Activo", "Inactivo").
FechaCreaciondatetime?Audit: creation timestamp.
FechaModificaciondatetime?Audit: last modification timestamp.
UsuarioCreacionstringAudit: creating username (required on Add).
UsuarioModificacionstringAudit: modifying username (required on Update/Delete).
Available actions
EndpointBody requiredDescription
POST /api/ADM_OCUPACION/GetAllActivesNoneReturns all active occupation records.
POST /api/ADM_OCUPACION/GetAllFiltersADM_OCUPACIONDTO (filter fields)Returns filtered records by code, description, or status.
POST /api/ADM_OCUPACION/GetById{ "id_ocupacion": N }Returns a single occupation by its ID.
POST /api/ADM_OCUPACION/AddFull ADM_OCUPACIONDTOCreates a new occupation if one with the same code doesn’t already exist.
POST /api/ADM_OCUPACION/UpdateFull ADM_OCUPACIONDTOUpdates an existing occupation record.
POST /api/ADM_OCUPACION/Delete{ "id_ocupacion": N, "UsuarioModificacion": "..." }Logically deactivates an occupation record.
# Get all active occupations
curl -s -X POST \
  https://{base_url}/api/ADM_OCUPACION/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

# Search by description
curl -s -X POST \
  https://{base_url}/api/ADM_OCUPACION/GetAllFilters \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"t_descripcion": "docente"}'

# Add new occupation
curl -s -X POST \
  https://{base_url}/api/ADM_OCUPACION/Add \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "c_codigo": "DOC",
    "t_descripcion": "Docente",
    "t_observacion": "",
    "UsuarioCreacion": "admUser",
    "id_usuarioCreacion": 1,
    "IdUsuarioActual": 1
  }'
Ubigeo is Peru’s national geographic coding system, maintained by INEI (Instituto Nacional de Estadística e Informática). Each code uniquely identifies a country → department → province → district combination and is required on patient registration for domicile and epidemiological reporting. Extends EntityAuditableDTO.DTO fields — ADM_UBIGEODTO
FieldTypeDescription
id_ubigeointegerUnique primary key.
c_codigostringOfficial INEI ubigeo code (e.g., "150101" = Lima, Lima, Lima).
t_paisstringCountry name (typically "Perú").
t_departamentostringDepartment name (e.g., "Lima", "Arequipa", "Cusco").
t_provinciastringProvince name (e.g., "Lima", "Arequipa", "Cusco").
t_distritostringDistrict name (e.g., "Lima", "Miraflores", "San Isidro").
ValorBusquedastringFree-text search token — used only on GetAllFilters requests.
FechaCreaciondatetime?Audit: creation timestamp.
FechaModificaciondatetime?Audit: last modification timestamp.
UsuarioCreacionstringAudit: creating username.
UsuarioModificacionstringAudit: last modifying username.
Available actions
EndpointBody requiredDescription
POST /api/ADM_UBIGEO/GetAllActivesNoneReturns all ubigeo records.
POST /api/ADM_UBIGEO/GetAllFiltersADM_UBIGEODTO with ValorBusquedaFilters by free-text across department, province, or district.
# Fetch ubigeos matching "miraflores"
curl -s -X POST \
  https://{base_url}/api/ADM_UBIGEO/GetAllFilters \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"ValorBusqueda": "miraflores"}'
Example response
{
  "Success": true,
  "Data": [
    {
      "id_ubigeo": 1042,
      "c_codigo": "150122",
      "t_pais": "Perú",
      "t_departamento": "Lima",
      "t_provincia": "Lima",
      "t_distrito": "Miraflores",
      "ValorBusqueda": null
    }
  ],
  "Message": null,
  "Warning": false
}
The full ubigeo table contains over 1,800 records (all districts in Peru). Always use GetAllFilters with a ValorBusqueda term on user-facing district pickers rather than loading GetAllActives into a dropdown.
Classifies the type of clinical service or care modality rendered during an encounter (e.g., emergency, scheduled outpatient, telemedicine). Used when opening a patient attendance record (ADM_ATENCION).DTO fields — ADM_TIPO_ATENCIONDTO
FieldTypeDescription
id_tipo_atencionintegerUnique primary key.
c_codigostringShort code (e.g., "CE" = Consulta Externa, "EM" = Emergencia).
t_descripcionstringFull label (e.g., "Consulta Externa", "Emergencia", "Hospitalización").
POST /api/ADM_TIPO_ATENCION/GetAllActives — returns all active attendance types. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_TIPO_ATENCION/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Lists the possible discharge (egreso) types that can be assigned when closing a hospitalisation episode — for example, voluntary discharge, transfer, death, or recovery. Required by SUSALUD reporting.DTO fields — ADM_TIPO_EGRESODTO
FieldTypeDescription
id_tipo_egresointegerUnique primary key.
c_codigostringShort code (e.g., "AL" = Alta Médica, "FU" = Fuga, "FA" = Fallecido).
t_descripcionstringFull description (e.g., "Alta Médica", "Fallecido", "Traslado").
POST /api/ADM_TIPO_EGRESO/GetAllActives — returns all active discharge types. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_TIPO_EGRESO/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Defines the category of hospitalisation (e.g., elective surgery, emergency admission, day surgery, ICU). This value is assigned when admitting a patient to a ward and influences workflow and billing rules.DTO fields — ADM_TIPO_HOSPITALIZACIONDTO
FieldTypeDescription
id_tipo_hospitalizacionintegerUnique primary key.
c_codigostringShort code (e.g., "EL" = Electiva, "EM" = Emergencia).
t_descripcionstringFull label (e.g., "Hospitalización Electiva", "Hospitalización por Emergencia").
POST /api/ADM_TIPO_HOSPITALIZACION/GetAllActives — returns all active hospitalisation types. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_TIPO_HOSPITALIZACION/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Patient types determine the financial and coverage classification of a patient at the point of registration — for example, SIS (Seguro Integral de Salud), EsSalud, private payer, or particular (out-of-pocket). The type directly influences copayment rules and billing rates.DTO fields — ADM_TIPO_PACIENTEDTO
FieldTypeDescription
id_tipo_pacienteintegerUnique primary key.
c_codigostringShort code (e.g., "SIS", "ESS", "PAR").
t_descripcionstringFull label (e.g., "Seguro Integral de Salud", "EsSalud", "Particular").
id_monedaintegerFK to currency table — the currency used for copayment amounts.
n_copago_variabledecimalVariable copayment amount for clinical services.
n_copago_variable_fardecimalVariable copayment amount for pharmacy dispensing.
f_sitedsintegerFlag indicating SITEDS (MINSA information system) integration.
POST /api/ADM_TIPO_PACIENTE/GetAllActives — returns all active patient types. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_TIPO_PACIENTE/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Filiation types classify the relationship or origin through which a patient is affiliated to a payer or insurance plan (e.g., titular, beneficiary, dependant). This catalog includes a SUSALUD-specific code field for regulatory reporting.DTO fields — ADM_TIPO_FILIACIONDTO
FieldTypeDescription
id_tipo_filiacionintegerUnique primary key.
c_codigostringInternal short code for the filiation type.
c_codigo_susaludstringSUSALUD-specific code required for regulatory submissions.
t_descripcionstringFull description (e.g., "Titular", "Beneficiario", "Dependiente").
POST /api/ADM_TIPO_FILIACION/GetAllActives — returns all active filiation types. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_TIPO_FILIACION/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
Affiliation types identify the insurance or social-security scheme a patient is enrolled in (e.g., contributory EsSalud, SIS subsidised, private insurer). Used alongside the patient type to determine applicable tariff schedules.DTO fields — ADM_TIPO_AFILIACIONDTO
FieldTypeDescription
id_tipo_afiliacionintegerUnique primary key.
t_descripcionstringFull description of the affiliation scheme (e.g., "EsSalud Contributivo", "SIS Gratuito", "Seguro Privado").
POST /api/ADM_TIPO_AFILIACION/GetAllActives — returns all active affiliation types. No request body required.
curl -s -X POST \
  https://{base_url}/api/ADM_TIPO_AFILIACION/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
The TIPO_ESTADO controller is unique among reference tables because it is cross-table: the same endpoint serves status values for multiple entities by accepting a tabla (table name) filter. This allows a single call to retrieve the valid status values for any given entity type (e.g., patient, attendance, hospitalisation). Extends EntityAuditableDTO.DTO fields — TIPO_ESTADODTO
FieldTypeDescription
tablastringRequired filter. The name of the entity/table whose statuses you want (e.g., "ADM_ATENCION", "ADM_PACIENTE").
id_estadointegerUnique primary key for the status record.
estadostringHuman-readable status label (e.g., "Activo", "Inactivo", "En espera", "Atendido").
FechaCreaciondatetime?Audit: creation timestamp.
FechaModificaciondatetime?Audit: last modification timestamp.
UsuarioCreacionstringAudit: creating username.
UsuarioModificacionstringAudit: last modifying username.
POST /api/TIPO_ESTADO/GetAllFilters — returns status values filtered by the tabla field. Unlike the other reference controllers this action requires a body with at minimum the tabla field set.
# Fetch all statuses applicable to ADM_ATENCION (patient encounters)
curl -s -X POST \
  https://{base_url}/api/TIPO_ESTADO/GetAllFilters \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"tabla": "ADM_ATENCION"}'
Example response
{
  "Success": true,
  "Data": [
    { "id_estado": 1, "estado": "Pendiente", "tabla": "ADM_ATENCION" },
    { "id_estado": 2, "estado": "En Atención", "tabla": "ADM_ATENCION" },
    { "id_estado": 3, "estado": "Atendido",    "tabla": "ADM_ATENCION" },
    { "id_estado": 4, "estado": "Anulado",     "tabla": "ADM_ATENCION" }
  ],
  "Message": null,
  "Warning": false
}
Always pass the tabla parameter when calling GetAllFilters; omitting it may return an empty result set or statuses from multiple tables merged together, which can produce unexpected behaviour in UI dropdowns.

Quick Reference — All Reference Endpoints

ControllerEndpointActions
ADM_GENERO/api/ADM_GENERO/GetAllActivesGetAllActives
ADM_ESTADO_CIVIL/api/ADM_ESTADO_CIVIL/GetAllActivesGetAllActives
ADM_DOCUMENTO_IDENTIDAD/api/ADM_DOCUMENTO_IDENTIDAD/GetAllActivesGetAllActives
ADM_GRUPO_SANGUINEO/api/ADM_GRUPO_SANGUINEO/GetAllActivesGetAllActives
ADM_OCUPACION/api/ADM_OCUPACION/{action}GetAllActives, GetAllFilters, GetById, Add, Update, Delete
ADM_UBIGEO/api/ADM_UBIGEO/{action}GetAllActives, GetAllFilters
ADM_TIPO_ATENCION/api/ADM_TIPO_ATENCION/GetAllActivesGetAllActives
ADM_TIPO_EGRESO/api/ADM_TIPO_EGRESO/GetAllActivesGetAllActives
ADM_TIPO_HOSPITALIZACION/api/ADM_TIPO_HOSPITALIZACION/GetAllActivesGetAllActives
ADM_TIPO_PACIENTE/api/ADM_TIPO_PACIENTE/GetAllActivesGetAllActives
ADM_TIPO_FILIACION/api/ADM_TIPO_FILIACION/GetAllActivesGetAllActives
ADM_TIPO_AFILIACION/api/ADM_TIPO_AFILIACION/GetAllActivesGetAllActives
TIPO_ESTADO/api/TIPO_ESTADO/GetAllFiltersGetAllFilters (requires tabla body param)

Build docs developers (and LLMs) love