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.

Before a pharmaceutical product can be registered in the system, its classification attributes must exist in a set of reference tables that make up the pharmacy catalog. These lookup entities define the controlled vocabulary used across the FAR_* module: the INN generic drug name (FAR_GENERICO), the pharmacological class (FAR_CLASE), the therapeutic family (FAR_FAMILIA), the regulatory typification (FAR_TIPIFICACION), the broad product type category (FAR_TIPO_PRODUCTO), and the consignment arrangement (FAR_CONSIGNACION). Each of the six controllers below exposes a GetAllActives endpoint that returns all active records in its respective table — these lists are typically loaded once at application startup or on catalog screens, and their IDs are used as foreign keys when creating or updating FAR_PRODUCTO records.
All catalog endpoints are HTTP POST with no request body (or an ignored body). Responses follow the standard JsonResponse envelope: Success, Message, and Data (array). All require an Authorization: Bearer {token} header.

FAR_GENERICO holds the International Nonproprietary Names (INN) — the official generic names for pharmaceutical substances as designated by the WHO and DIGEMID (Peru’s drug regulatory authority). Each product in the pharmacy catalog is associated with exactly one generic name via id_generico.

POST /api/FAR_GENERICO/GetAllActives

Returns all active generic drug name records.Request body — none required.Response — array of FAR_GENERICODTOSample response
{
  "Success": true,
  "Message": null,
  "Data": [
    { "id_generico": 1,  "c_codigo": "GEN001", "t_descripcion": "PARACETAMOL" },
    { "id_generico": 2,  "c_codigo": "GEN002", "t_descripcion": "AMOXICILINA" },
    { "id_generico": 12, "c_codigo": "GEN012", "t_descripcion": "IBUPROFENO" }
  ]
}
curl example
curl -s -X POST https://{host}/api/FAR_GENERICO/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

FAR_CLASE categorises products by their pharmacological class — the mechanism or chemical grouping that defines how a drug acts (e.g., analgesics, antibiotics, corticosteroids). This level of classification sits above the individual generic name and is used for inventory reports and formulary management.

POST /api/FAR_CLASE/GetAllActives

Returns all active drug class records.Request body — none required.Response — array of FAR_CLASEDTOSample response
{
  "Success": true,
  "Message": null,
  "Data": [
    { "id_clase": 1, "c_codigo": "CLS001", "t_descripcion": "ANALGESICOS" },
    { "id_clase": 2, "c_codigo": "CLS002", "t_descripcion": "ANTIBIOTICOS" },
    { "id_clase": 3, "c_codigo": "CLS003", "t_descripcion": "ANTIINFLAMATORIOS" }
  ]
}
curl example
curl -s -X POST https://{host}/api/FAR_CLASE/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

FAR_FAMILIA groups products into therapeutic families that align broadly with the ATC (Anatomical Therapeutic Chemical) classification used by DIGEMID and the WHO. A family may contain multiple drug classes and represents the highest-level grouping used in the pharmacy module for reporting, purchasing budgets, and clinical formulary design.

POST /api/FAR_FAMILIA/GetAllActives

Returns all active therapeutic family records.Request body — none required.Response — array of FAR_FAMILIADTOSample response
{
  "Success": true,
  "Message": null,
  "Data": [
    { "id_familia": 1, "c_codigo": "FAM001", "t_descripcion": "SISTEMA NERVIOSO CENTRAL" },
    { "id_familia": 2, "c_codigo": "FAM002", "t_descripcion": "ANTIBACTERIANOS DE USO SISTEMICO" },
    { "id_familia": 5, "c_codigo": "FAM005", "t_descripcion": "ANTIINFLAMATORIOS Y ANTIRREUMÁTICOS" }
  ]
}
curl example
curl -s -X POST https://{host}/api/FAR_FAMILIA/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

FAR_TIPIFICACION stores the regulatory typification codes used by DIGEMID for official drug registration filings. In Peru, pharmaceutical products must be classified under a specific typification when obtaining a sanitary registration number (Registro Sanitario). This table ensures that every FAR_PRODUCTO record carries its correct regulatory classification for compliance and audit purposes.

POST /api/FAR_TIPIFICACION/GetAllActives

Returns all active product typification records.Request body — none required.Response — array of FAR_TIPIFICACIONDTOSample response
{
  "Success": true,
  "Message": null,
  "Data": [
    { "id_tipificacion": 1, "c_codigo": "TIP001", "t_descripcion": "VENTA LIBRE" },
    { "id_tipificacion": 2, "c_codigo": "TIP002", "t_descripcion": "VENTA BAJO RECETA MEDICA" },
    { "id_tipificacion": 3, "c_codigo": "TIP003", "t_descripcion": "VENTA BAJO RECETA ESPECIAL" }
  ]
}
curl example
curl -s -X POST https://{host}/api/FAR_TIPIFICACION/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

FAR_TIPO_PRODUCTO is the top-level discriminator for items in the pharmacy catalog. It distinguishes between broad inventory categories such as manufactured medications, medical supplies, equipment, and reagents. The id_tipo_producto on a product record determines how it is treated in dispensing workflows, purchase orders, and financial reporting.

POST /api/FAR_TIPO_PRODUCTO/GetAllActives

Returns all active product type records.Request body — none required.Response — array of FAR_TIPO_PRODUCTODTOSample response
{
  "Success": true,
  "Message": null,
  "Data": [
    { "id_tipo_producto": 1, "c_codigo": "TP001", "t_descripcion": "MEDICAMENTO" },
    { "id_tipo_producto": 2, "c_codigo": "TP002", "t_descripcion": "MATERIAL MEDICO" },
    { "id_tipo_producto": 3, "c_codigo": "TP003", "t_descripcion": "EQUIPO MEDICO" }
  ]
}
curl example
curl -s -X POST https://{host}/api/FAR_TIPO_PRODUCTO/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

FAR_CONSIGNACION tracks named consignment arrangements with suppliers. Under a consignment model, the clinic stores the supplier’s goods and records stock entries against the consignment ID; financial settlement occurs only when units are dispensed and billed. Each FAR_PRODUCTO record optionally references an id_consignacion to indicate that its stock is managed under such an agreement rather than through a standard purchase.

POST /api/FAR_CONSIGNACION/GetAllActives

Returns all active consignment arrangement records.Request body — none required.Response — array of FAR_CONSIGNACIONDTOSample response
{
  "Success": true,
  "Message": null,
  "Data": [
    { "id_consignacion": 1, "c_codigo": "CONS001", "t_descripcion": "CONSIGNACION LABORATORIOS FARMINDUSTRIA" },
    { "id_consignacion": 2, "c_codigo": "CONS002", "t_descripcion": "CONSIGNACION MEDIFARMA S.A." }
  ]
}
curl example
curl -s -X POST https://{host}/api/FAR_CONSIGNACION/GetAllActives \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

Relationship Map

The following table summarises how each catalog entity relates to FAR_PRODUCTO:
Catalog TableFK on FAR_PRODUCTOPurpose
FAR_GENERICOid_genericoINN / generic substance name
FAR_CLASEid_clasePharmacological class / mechanism of action
FAR_FAMILIAid_familiaTherapeutic family / ATC group
FAR_TIPIFICACIONid_tipificacionDIGEMID regulatory typification
FAR_TIPO_PRODUCTOid_tipo_productoBroad item category (medication, supply, etc.)
FAR_CONSIGNACIONid_consignacionConsignment stock arrangement (0 = owned stock)
Load all six catalog lists at the start of a product-registration session so that dropdown controls in your UI are populated without per-keystroke API calls.

Build docs developers (and LLMs) love