The Romsoft Gestión Clínica backend is organized as a single Visual Studio solution (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.
Romsoft.GESTIONCLINICA.sln) containing six C# projects. Each project maps cleanly to one architectural layer — there are no circular dependencies and no project that “does everything.” Understanding which project owns which responsibility is the fastest way to navigate the codebase when adding a new clinical module or debugging a production issue.
Solution Layout
Project Responsibilities
Romsoft.GESTIONCLINICA.WebApi
The sole IIS-hosted project. It owns:
- Route registration — the
api/{controller}/{action}/{id?}template defined inWebApiConfig.cs - Authentication pipeline —
TokenValidationHandlerregistered as aDelegatingHandler - Swagger —
SwaggerConfig.csenables/swaggerwith JWT header support - Bootstrap —
Global.asax.cscalls log4net config, AutoMapper config, and Web API config - Shared strings —
Core/Mensajes.csholds all user-visible response messages in Spanish
Romsoft.GESTIONCLINICA.Business.Logic
Contains exactly one BL class per domain entity plus LogBL. Every BL class:
- Extends
Singleton<T>so callers useXxxBL.Instancia— no dependency injection container is used - Implements
ILogic<T>(or a domain-specific interface) to enforce a standard CRUD contract - May add domain-specific methods beyond the interface (e.g.,
ADM_ATENCIONBL.GetAtencionPending)
Romsoft.GESTIONCLINICA.DataAccess
Issues all SQL through the Microsoft Enterprise Library Data Application Block v6. Repository classes call DatabaseFactory.CreateDatabase(ConectionStringRepository.ConnectionStringNameSQL) and execute stored procedures in the Romsoft. schema. The static ConectionStringRepository.EsquemaName property returns "Romsoft." as a consistent prefix.
Romsoft.GESTIONCLINICA.Entidades
Plain C# POCO classes. They match database table columns one-to-one and carry no framework dependencies. Folder names match the entity prefix (e.g., ADM_PACIENTE/, FAR_PRODUCTO/).
Romsoft.GESTIONCLINICA.DTO
Mirror classes of Entidades with properties suitable for external consumers (camel-case, nullable types for optional fields). AutoMapper profiles are the only place where entity ↔ DTO property mappings are declared.
Romsoft.GESTIONCLINICA.Common
Shared across all layers. Key types:
| Type | Purpose |
|---|---|
JsonResponse | Universal HTTP response envelope returned by every controller action |
PaginationParameter | Carries Start, CurrentPage, AmountRows, OrderBy, WhereFilter for paginated queries |
Singleton<T> | Thread-safe (mutex-guarded) generic singleton base class |
CryptoHelper | AES/MD5 helpers for password and token hashing |
Romsoft.GESTIONCLINICA.Presentacion / .Presentacion.Configuracion
WinForms desktop application that consumes the Web API. Not deployed to IIS. Contains HTTP client wrappers under ApiService/ that mirror each controller’s endpoints.
Controller Naming Conventions
Controllers are named with a two- or three-letter module prefix that identifies the clinical domain:| Prefix | Module | Examples |
|---|---|---|
ADM_ | Admissions & clinical master data | ADM_PACIENTEController, ADM_ATENCIONController |
CVN_ | Insurance / Convenios | CVN_PLAN_SEGUROController, CVN_BENEFICIOController |
FAR_ | Pharmacy / Farmacia | FAR_PRODUCTOController, FAR_GENERICOController |
FAC_ | Billing / Facturación | FAC_DOCUMENTO_PAGOController |
CON_ | Accounting / Contabilidad | CON_CUENTA_CONTABLEController, CON_CONTACTOController |
SEG_ | Security / Seguridad | SEG_USUARIOController, SEG_ROLController |
The
AccountController (no prefix) is the authentication endpoint. It carries [AllowAnonymous] on its login action so that TokenValidationHandler does not reject unauthenticated callers before they can obtain a token.