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.

Tariffs (tarifarios) are negotiated price lists that define what a clinic will charge — or be reimbursed for — when rendering services to patients covered by a specific insurance provider (SEGUS). Each CVN_TARIFARIO_SEGUS record represents a single billable service or procedure, identified by an internal SEGUS code and optionally a SUSALUD regulatory code, and associates it with a classification, a price type, and operational parameters such as the number of assistant physicians (n_ayudante), instrumentalists (n_instrumentista), and authorized days (n_dias). Payment-category prices (CVN_CATEGORIA_PAGO_PRECIO) then layer concrete monetary values — in Soles (n_precio_sol) and US Dollars (n_precio_usd) — on top of each tariff item for each insurance payment category. Supporting catalog endpoints for currencies, price types, and SUSALUD/SEGUS classifications are documented in this page alongside the main tariff controllers.

Common Response Envelope

All endpoints return the shared JsonResponse wrapper:
{
  "Success": true,
  "Warning": false,
  "Message": "...",
  "Data": { ... }
}
When Success: true is returned together with Warning: true, the business operation was blocked by a rule (e.g., duplicate detection). No data was written. Always read Message to understand the reason.

CVN_TARIFARIO_SEGUS Endpoints

Creates a new SEGUS tariff record. The business layer runs CVN_TARIFARIO_SEGUSBL.Instancia.Exists() before inserting to prevent duplicates.Request bodyCVN_TARIFARIO_SEGUSDTO
c_codigo
string
required
Internal SEGUS service/procedure code.
c_codigo_susalud
string
SUSALUD regulatory code for cross-referencing with the national health regulator.
t_descripcion_esp
string
required
Service description in Spanish.
t_descripcion_eng
string
Service description in English (optional, for bilingual reporting).
t_observacion
string
Free-text observation or notes.
id_clasificacion_segus
integer
required
Classification ID from the CVN_CLASIFICACION_SEGUS catalog.
id_clasificacion_susalud
integer
Primary SUSALUD classification ID from the CVN_CLASIFICACION_SUSALUD catalog.
id_clasificacion_susalud_od
integer
Secondary (OD) SUSALUD classification ID.
id_centro_costo
integer
Cost-center ID to which this tariff item is charged.
id_cuenta_contable
integer
Chart-of-accounts (cuenta contable) ID for accounting integration.
id_tipo_precio
integer
required
Price type ID from the CVN_TIPO_PRECIO catalog.
n_unidad
decimal
Unit multiplier applied when calculating the tariff value.
n_ayudante
integer
Number of assistant physicians authorized for this procedure.
n_instrumentista
integer
Number of instrumentalists authorized for this procedure.
n_dias
integer
Number of authorized days covered by this tariff item.
n_porcentaje
decimal
Percentage factor applied in price calculations.
f_estado
integer
required
Status flag: 1 = active, 0 = inactive.
UsuarioCreacion
string
required
Audit: username of the record creator.
Example request
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS/Add \
  -H "Content-Type: application/json" \
  -d '{
    "c_codigo": "TAR-CONS-001",
    "c_codigo_susalud": "SUS-001",
    "t_descripcion_esp": "Consulta Médica General",
    "t_descripcion_eng": "General Medical Consultation",
    "id_clasificacion_segus": 2,
    "id_clasificacion_susalud": 5,
    "id_tipo_precio": 1,
    "n_unidad": 1.00,
    "n_ayudante": 0,
    "n_instrumentista": 0,
    "n_dias": 1,
    "n_porcentaje": 100.00,
    "f_estado": 1,
    "UsuarioCreacion": "admin",
    "id_usuarioCreacion": 1
  }'
Example response
{
  "Success": true,
  "Warning": false,
  "Message": "Registro Satisfactorio",
  "Data": null
}
Returns a filtered list of tariff records. Pass any CVN_TARIFARIO_SEGUSDTO fields as criteria; unset fields are ignored.
valorRequest
string
Free-text search string applied across code and description columns.
f_estado
integer
Filter by status: 1 active, 0 inactive.
id_clasificacion_segus
integer
Filter by SEGUS classification.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS/GetAllFilters \
  -H "Content-Type: application/json" \
  -d '{ "valorRequest": "Consulta", "f_estado": 1 }'
Returns the complete list of active tariff items mapped to CVN_TARIFARIO_LISTADTO. Send an empty body {}.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS/GetAllActives \
  -H "Content-Type: application/json" \
  -d '{}'
Retrieves a single tariff record by its primary key.
id_tarifario_segus
integer
required
Primary key of the tariff record to retrieve.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS/GetById \
  -H "Content-Type: application/json" \
  -d '{ "id_tarifario_segus": 10 }'
Updates an existing tariff record. Include the id_tarifario_segus primary key and audit modifier fields.
id_tarifario_segus
integer
required
Primary key of the tariff to update.
UsuarioModificacion
string
required
Audit: username of the user performing the update.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS/Update \
  -H "Content-Type: application/json" \
  -d '{
    "id_tarifario_segus": 10,
    "t_descripcion_esp": "Consulta Médica General (Revisado)",
    "n_unidad": 1.00,
    "f_estado": 1,
    "UsuarioModificacion": "admin",
    "id_usuarioModifica": 1
  }'
Deletes a tariff record by its primary key.
id_tarifario_segus
integer
required
Primary key of the tariff record to delete.
UsuarioModificacion
string
required
Audit: username of the user performing the deletion.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS/Delete \
  -H "Content-Type: application/json" \
  -d '{
    "id_tarifario_segus": 10,
    "UsuarioModificacion": "admin",
    "id_usuarioModifica": 1
  }'
Returns the calculated price(s) for one or more tariff items, resolving values for a given payment category, search value, and language. This is the main pricing query used at point-of-service.Request bodyCVN_TARIFARIO_SEGUS_PRICEReqDTO
id_categoria_pago
integer
required
Payment category ID used to look up the correct negotiated price tier.
valor
string
required
Search value (code or description fragment) to locate the tariff item(s).
c_idioma
string
Language code for description resolution: "ESP" for Spanish, "ENG" for English.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS/GetPrice \
  -H "Content-Type: application/json" \
  -d '{
    "id_categoria_pago": 2,
    "valor": "TAR-CONS-001",
    "c_idioma": "ESP"
  }'
Example response
{
  "Success": true,
  "Warning": false,
  "Message": null,
  "Data": [
    {
      "id_tarifario_segus": 10,
      "c_codigo": "TAR-CONS-001",
      "t_descripcion_esp": "Consulta Médica General",
      "n_precio": 85.00
    }
  ]
}

CVN_TARIFARIO_SEGUS Response Fields

id_tarifario_segus
integer
Auto-generated primary key of the tariff record.
c_codigo
string
Internal SEGUS service/procedure code.
c_codigo_susalud
string
SUSALUD regulatory code.
t_descripcion_esp
string
Spanish description of the service.
t_descripcion_eng
string
English description of the service.
id_clasificacion_segus
integer
Foreign key to CVN_CLASIFICACION_SEGUS.
t_clasificacion
string
Resolved classification name (denormalized for display).
id_tipo_precio
integer
Foreign key to CVN_TIPO_PRECIO.
n_unidad
decimal
Unit multiplier.
n_ayudante
integer
Number of authorized assistant physicians.
n_instrumentista
integer
Number of authorized instrumentalists.
n_dias
integer
Number of authorized days.
n_porcentaje
decimal
Price calculation percentage.
estado
string
Human-readable status ("Activo" / "Inactivo").

CVN_TARIFARIO_SEGUS_PARTICIPANTE Endpoints

Participants represent linked (child) tariff items that are associated with a parent tariff — for example, a surgical procedure (id_tarifario_segus) might reference several sub-procedures (id_tarifario_segus_referencia) as participant items. This allows hierarchical pricing bundles.
Adds a child tariff reference to a parent tariff. Performs a duplicate check before inserting; returns the new id_tarifario_segus_participante in Data.
id_tarifario_segus
integer
required
Parent tariff ID.
id_tarifario_segus_referencia
integer
required
Child (participant) tariff ID to link to the parent.
UsuarioCreacion
string
required
Audit: username of the record creator.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS_PARTICIPANTE/Add \
  -H "Content-Type: application/json" \
  -d '{
    "id_tarifario_segus": 10,
    "id_tarifario_segus_referencia": 22,
    "UsuarioCreacion": "admin",
    "id_usuarioCreacion": 1
  }'
Removes a participant link from a parent tariff.
id_tarifario_segus_participante
integer
required
Primary key of the participant record to delete.
UsuarioModificacion
string
required
Audit: username of the user performing the deletion.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS_PARTICIPANTE/Delete \
  -H "Content-Type: application/json" \
  -d '{
    "id_tarifario_segus_participante": 5,
    "UsuarioModificacion": "admin",
    "id_usuarioModifica": 1
  }'
Returns all active participant links for a given parent tariff.
id_tarifario_segus
integer
required
Parent tariff ID whose participant links should be returned.
curl -X POST https://{host}/api/CVN_TARIFARIO_SEGUS_PARTICIPANTE/GetAllActivesFilters \
  -H "Content-Type: application/json" \
  -d '{ "id_tarifario_segus": 10 }'
Example response
{
  "Success": true,
  "Data": [
    {
      "id_tarifario_segus_participante": 5,
      "id_tarifario_segus": 10,
      "id_tarifario_segus_referencia": 22,
      "c_codigo": "TAR-ANS-001",
      "t_descripcion_esp": "Anestesia General"
    }
  ]
}

CVN_CATEGORIA_PAGO Endpoints

Payment categories (categorías de pago) define the pricing tier that applies to a specific insurance plan or patient class. Each category can define service and procedure pricing factors plus a pharmacy discount rate.
c_codigo
string
required
Short code for the payment category.
t_descripcion
string
required
Description of the payment category.
t_observacion
string
Optional observations.
d_fecha_i_vigencia
string (ISO 8601 date)
Validity start date.
d_fecha_f_vigencia
string (ISO 8601 date)
Validity end date.
n_factor_servicio
decimal
Pricing factor applied to service tariff items.
n_factor_procedimiento
decimal
Pricing factor applied to procedure tariff items.
n_dscto_farmacia
decimal
Pharmacy discount rate (as a fraction, e.g., 0.15 for 15%).
f_estado
integer
required
Status flag: 1 = active, 0 = inactive.
curl -X POST https://{host}/api/CVN_CATEGORIA_PAGO/Add \
  -H "Content-Type: application/json" \
  -d '{
    "c_codigo": "CAT-RIM-A",
    "t_descripcion": "Rímac Categoría A",
    "n_factor_servicio": 1.00,
    "n_factor_procedimiento": 0.90,
    "n_dscto_farmacia": 0.15,
    "d_fecha_i_vigencia": "2024-01-01",
    "d_fecha_f_vigencia": "2024-12-31",
    "f_estado": 1,
    "UsuarioCreacion": "admin",
    "id_usuarioCreacion": 1
  }'
id_categoria_pago
integer
required
Primary key of the payment category to update.
UsuarioModificacion
string
required
Audit: username of the modifier.
id_categoria_pago
integer
required
Primary key of the payment category to delete.
id_categoria_pago
integer
required
Primary key of the payment category to retrieve. Returns Warning: true with "Registro no existe" if not found.
Returns all active payment categories. The body is a CVN_CATEGORIA_PAGODTO object but no filters are applied; send {}.
curl -X POST https://{host}/api/CVN_CATEGORIA_PAGO/GetAllActives \
  -H "Content-Type: application/json" \
  -d '{}'
valorConsulta
string
Free-text search applied across code and description.
f_estado
integer
Filter by status.

CVN_CATEGORIA_PAGO_PRECIO Endpoints

Category prices store the concrete monetary values for each tariff item under each payment category, in both Peruvian Soles (n_precio_sol) and US Dollars (n_precio_usd).
CVN_CATEGORIA_PAGO_PRECIO is the child table of both CVN_TARIFARIO_SEGUS (via id_tarifario_segus) and CVN_CATEGORIA_PAGO (via id_categoria_pago). A price record exists for each tariff ✕ payment-category combination.
id_tarifario_segus
integer
required
Parent tariff item ID (from CVN_TARIFARIO_SEGUS).
id_categoria_pago
integer
required
Payment category ID that this price row applies to.
c_codigo
string
Optional code for the price record.
t_descripcion
string
Optional description for the price record.
n_precio_sol
decimal
required
Price in Peruvian Soles (PEN).
n_precio_usd
decimal
required
Price in US Dollars (USD).
UsuarioCreacion
string
required
Audit: username of the record creator.
curl -X POST https://{host}/api/CVN_CATEGORIA_PAGO_PRECIO/Add \
  -H "Content-Type: application/json" \
  -d '{
    "id_tarifario_segus": 10,
    "id_categoria_pago": 2,
    "n_precio_sol": 85.00,
    "n_precio_usd": 23.50,
    "UsuarioCreacion": "admin",
    "id_usuarioCreacion": 1
  }'
id_categoria_pago_precio
integer
required
Primary key of the price record to delete.
UsuarioModificacion
string
required
Audit: username of the user performing the deletion.
Returns all active price records for a given tariff item and/or payment category.
id_tarifario_segus
integer
Filter by parent tariff item ID.
id_categoria_pago
integer
Filter by payment category ID.
curl -X POST https://{host}/api/CVN_CATEGORIA_PAGO_PRECIO/GetAllActivesFilters \
  -H "Content-Type: application/json" \
  -d '{ "id_tarifario_segus": 10 }'
Example response
{
  "Success": true,
  "Data": [
    {
      "id_categoria_pago_precio": 33,
      "id_tarifario_segus": 10,
      "id_categoria_pago": 2,
      "n_precio_sol": 85.00,
      "n_precio_usd": 23.50
    }
  ]
}

Supporting Catalog Endpoints

The following endpoints provide read-only reference data used when creating and displaying tariff records.

CVN_MONEDA — Currency Catalog

Returns all active currency records. Send an empty body {}.
curl -X POST https://{host}/api/CVN_MONEDA/GetAllActives \
  -H "Content-Type: application/json" \
  -d '{}'
Example response
{
  "Success": true,
  "Data": [
    { "id_moneda": 1, "c_codigo": "PEN", "t_descripcion": "Sol Peruano" },
    { "id_moneda": 2, "c_codigo": "USD", "t_descripcion": "Dólar Americano" }
  ]
}
id_moneda
integer
Primary key of the currency record.
c_codigo
string
ISO 4217 currency code (e.g., PEN, USD).
t_descripcion
string
Full currency name in Spanish.

CVN_TIPO_PRECIO — Price Type Catalog

Returns all active price type records. The body is a CVN_TIPO_PRECIODTO object; send {} to retrieve all.
curl -X POST https://{host}/api/CVN_TIPO_PRECIO/GetAllActives \
  -H "Content-Type: application/json" \
  -d '{}'
Price types define how a tariff value is expressed — for example, as a fixed amount, a unit-based calculation, or a percentage of a reference base. Use the returned IDs when creating or updating CVN_TARIFARIO_SEGUS records.

CVN_CLASIFICACION_SUSALUD — SUSALUD Classification Catalog

Returns all active SUSALUD regulatory classification records. The request body is a CVN_CLASIFICACION_SUSALUDDTO; the filter is ignored — all actives are returned.
curl -X POST https://{host}/api/CVN_CLASIFICACION_SUSALUD/GetAllActives \
  -H "Content-Type: application/json" \
  -d '{}'
SUSALUD classifications align with the official Peruvian national health regulatory framework. Use the codes returned here when assigning id_clasificacion_susalud on a tariff record to ensure compliant reporting to the Superintendencia Nacional de Salud.

CVN_CLASIFICACION_SEGUS — SEGUS Classification Catalog

Returns all active SEGUS (insurance provider) classification records. The request body is a CVN_CLASIFICACION_SEGUSDTO; the filter is ignored — all actives are returned.
curl -X POST https://{host}/api/CVN_CLASIFICACION_SEGUS/GetAllActives \
  -H "Content-Type: application/json" \
  -d '{}'

CVN_CLASIFICACION_SUSALUD_OD — SUSALUD OD Classification Catalog

Returns all active SUSALUD OD (Otras Denominaciones) classification records. The request body is a CVN_CLASIFICACION_SUSALUD_ODDTO; the filter is ignored — all actives are returned. Use the returned IDs when assigning id_clasificacion_susalud_od on a tariff record.
curl -X POST https://{host}/api/CVN_CLASIFICACION_SUSALUD_OD/GetAllActives \
  -H "Content-Type: application/json" \
  -d '{}'

Build docs developers (and LLMs) love