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 ADM_PROFESIONAL controller manages the registry of healthcare professionals — doctors, nurses, specialists, and other credentialed staff — whose identities are referenced throughout Gestión Clínica wherever an attending clinician must be recorded. Each professional record carries personal identification data, contact details, college registration numbers, and a foreign key to the ADM_ESPECIALIDAD (medical specialty) catalogue, allowing the system to filter and assign professionals by discipline. The controller currently exposes a GetAllActives endpoint that returns every professional marked as active, providing the source data for selection lists across the attendance and scheduling modules. All requests require a valid JWT bearer token.
The ADM_PROFESIONALController in the current codebase exposes a single action: GetAllActives. Additional CRUD actions (Add, Update, Delete, GetAllFilters) are defined in the shared business logic layer (ADM_PROFESIONALBL) but have not yet been surfaced as controller endpoints. Contact the backend team if you require write access to professional records via the API.

Authentication

Authorization: Bearer <your_jwt_token>
The global TokenValidationHandler validates the JWT signature, issuer, audience, and expiry on every request. A missing or invalid token results in HTTP 401 Unauthorized.

Common Response Envelope

Success
boolean
true when the operation completed without an unhandled exception.
Warning
boolean
true when a business rule blocked the operation.
Message
string
Human-readable status message in Spanish.
Data
array | null
The result payload — an array of ADM_PROFESIONALDTO objects for query endpoints.

ADM_PROFESIONALDTO — Field Reference

ADM_PROFESIONALDTO inherits EntityAuditableDTO, adding audit trail fields to the professional-specific fields below.

Professional–Specialty Relationship

Each professional record carries a single id_especialidad FK that links to the ADM_ESPECIALIDAD table. This one-to-one relationship means a professional is registered under their primary specialty. In the attendance workflow, when a new ADM_ATENCION record is created, id_profesional is set on the attendance; the specialty is then resolved from the professional record for reporting and filtering purposes.
If your clinic employs professionals with dual specialties (e.g. a physician who practices both General Medicine and Cardiology), the recommended approach is to create two separate professional entries — one per specialty — sharing the same c_numero_documento but with different id_especialidad values. Consult your system administrator before doing this, as it affects billing reports that aggregate by professional.

POST /api/ADM_PROFESIONAL/GetAllActives

Returns all professional records with f_estado = 1 (active). This is the primary data-source for professional selection drop-downs in the attendance registration UI and scheduling module. No request body is required.

Request Body

No body required. Send an empty JSON object {} or omit the body entirely.

Response

Data
array
Array of ADM_PROFESIONALDTO objects, one per active professional.
Data[].id_profesional
integer
Surrogate key.
Data[].c_codigo
string
Internal clinic code.
Data[].t_medico
string
Full display name (e.g. "DR. GARCIA TORRES, LUIS").
Data[].t_apellidos
string
Combined surnames.
Data[].t_nombres
string
Given names.
Data[].id_especialidad
integer
Medical specialty FK.
Data[].c_nro_especialidad
string
Specialty registration number.
Data[].c_colegiatura
string
Medical college registration number (CMP / CEP / etc.).
Data[].id_tipo_profesional
integer
Professional type FK.
Data[].id_condicion_profesional
integer
Professional condition FK.
Data[].c_numero_documento
string
Identity document number.
Data[].c_telefono_1
string
Primary phone.
Data[].f_estado
integer
Always 1 for results from this endpoint.

Example

curl -X POST https://your-api-host/api/ADM_PROFESIONAL/GetAllActives \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "Success": true,
  "Warning": false,
  "Message": null,
  "Data": [
    {
      "id_profesional": 7,
      "c_codigo": "MED-007",
      "t_apellidos": "GARCIA TORRES",
      "t_nombres": "LUIS ANTONIO",
      "t_medico": "DR. GARCIA TORRES, LUIS ANTONIO",
      "d_fecha_nace": "1975-08-22T00:00:00",
      "id_genero": 1,
      "id_tipo_documento": 1,
      "c_numero_documento": "07654321",
      "id_especialidad": 4,
      "c_nro_especialidad": "ESP-2019-00234",
      "id_tipo_profesional": 1,
      "c_colegiatura": "CMP-54321",
      "id_condicion_profesional": 2,
      "t_direccion": "Av. Salaverry 2450, Jesús María",
      "c_telefono_1": "01-4512233",
      "c_telefono_2": "998877665",
      "t_observacion": null,
      "f_estado": 1,
      "UsuarioCreacion": "admin",
      "FechaCreacion": "2021-03-10T08:00:00"
    },
    {
      "id_profesional": 12,
      "c_codigo": "ENF-012",
      "t_apellidos": "VARGAS HUANCA",
      "t_nombres": "MARIA ELENA",
      "t_medico": "LIC. VARGAS HUANCA, MARIA ELENA",
      "d_fecha_nace": "1988-02-14T00:00:00",
      "id_genero": 2,
      "id_tipo_documento": 1,
      "c_numero_documento": "43219876",
      "id_especialidad": 9,
      "c_nro_especialidad": null,
      "id_tipo_profesional": 3,
      "c_colegiatura": "CEP-18765",
      "id_condicion_profesional": 1,
      "t_direccion": null,
      "c_telefono_1": "987001122",
      "c_telefono_2": null,
      "t_observacion": null,
      "f_estado": 1,
      "UsuarioCreacion": "admin",
      "FechaCreacion": "2022-01-05T09:15:00"
    }
  ]
}
The endpoint returns all active professionals in a single response with no pagination. In clinics with large professional rosters, consider caching this list on the client side and refreshing periodically rather than calling it on every form load.

Using Professionals in Attendance Records

When creating or updating an ADM_ATENCION record, set the id_profesional field to the value returned by GetAllActives. The attendance record stores only the FK; the resolved profesional name string is computed by the stored procedure and returned in query responses such as GetAtencionAllFilters and GetAllPacienteAtencionFilters.
# 1. Fetch all active professionals
curl -X POST https://your-api-host/api/ADM_PROFESIONAL/GetAllActives \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

# 2. Use id_profesional from the response when registering an attendance
curl -X POST https://your-api-host/api/ADM_ATENCION/Add \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "id_paciente": 1042,
    "id_profesional": 7,
    "id_tipo_atencion": 1,
    "d_fecha_ingreso": "2024-11-20T00:00:00",
    "c_hora_ingreso": "14:30",
    "f_estado": 1,
    "UsuarioCreacion": "jperez"
  }'

Build docs developers (and LLMs) love