Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pabloeferreyra/Turnero/llms.txt

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

Turnero’s medical records system is structured as a set of independent sub-modules, each covering one clinical domain. All sub-modules share a common design: they are scoped to a single Patient, accessible only to users with the Medico role (unless noted otherwise), and rendered as DataTables panels embedded within the patient detail page. Data is submitted and retrieved through dedicated controllers. This page describes every sub-module, its data model, and the HTTP endpoints that drive it.

Clinical Visits

A Visit captures the full clinical encounter between a doctor and a patient: why the patient came, what the diagnosis was, what treatment was prescribed, and any follow-up notes or study results.

Field reference

FieldTypeDescription
IdGuidAuto-generated primary key
VisitDateDateTimeDate and time of the clinical encounter
ReasonstringChief complaint / reason for the visit
DiagnosisstringClinical diagnosis code or label
DiagDescriptionstringFree-text elaboration of the diagnosis
TreatmentstringPrescribed treatment plan
EvolutionNotesstringProgress or evolution notes at follow-up
LabResultsstringLaboratory results narrative or reference
OtherStudiesstringImaging, ECG, or other ancillary study results
ObservationsstringGeneral observations by the attending physician
MedicIdGuidFK — doctor who recorded the visit (set server-side)
PatientIdGuidFK — patient this visit belongs to
MedicId is resolved on the server from the authenticated user’s identity — it is never accepted from the client form. This prevents a doctor from recording a visit under a colleague’s credentials.

Endpoints

# Load the DataTables visits panel for a patient
GET /Visits/Index?id={patientId}

# Populate the visits table (DataTables AJAX)
POST /Visits/InitializeVisits?patientId={patientId}

# Load the create visit form (partial view)
GET /Visits/Create?id={patientId}

# Submit a new visit
POST /Visits/Create
Content-Type: application/x-www-form-urlencoded

PatientId=3fa85f64-...&VisitDate=2025-06-15T09:30:00
&Reason=Control+anual&Diagnosis=Z00.0&DiagDescription=Examen+de+salud+rutinario
&Treatment=Sin+indicaciones&EvolutionNotes=Paciente+en+buen+estado

# View a single visit
GET /Visits/Details/{id}
All endpoints require the Medico role (VisitsController is decorated with [Authorize(Roles = "Medico")]). The POST /Visits/Create endpoint requires the anti-forgery token.

Allergies

The allergies sub-module records each known allergen for a patient along with clinical metadata: when it first appeared, how severe it is, how often reactions occur, and its category (food, medication, environmental, etc.).

Field reference

FieldTypeDescription
IdGuidAuto-generated primary key
NamestringAllergen name (required)
PatientIdGuidFK — owning patient
BeginDateOnlyDate the allergy was first identified
EndDateOnly?Date the allergy resolved (null if ongoing)
DescriptionstringClinical description of the reaction
SeveritySeverityEnum — reaction severity level
TypeAllergyTypeEnum — allergen category
OccurrencyOccurrencyEnum — how frequently reactions occur
CommentsstringAdditional clinical comments

Enum values

Severity
ValueMeaning
NingunaNone
MinimaMinimal
BajaLow
MediaModerate
AltaHigh
SeveraSevere
CriticaCritical
FatalFatal
AllergyType
ValueMeaning
ComidaFood
MedicinaMedication
AmbientalEnvironmental
InsectoInsect
OtraOther
Occurrency
ValueMeaning
UnaOnce
SporadicaSporadic
FrequenteFrequent
ConstanteConstant

Endpoints

# Load the allergies DataTables panel
GET /Allergies/Index?id={patientId}

# Populate the table (DataTables AJAX)
POST /Allergies/InitializeAllergies?patientId={patientId}

# Load the create allergy form
GET /Allergies/Create?id={patientId}

# Submit a new allergy (anti-forgery token required)
POST /Allergies/Create
Content-Type: application/x-www-form-urlencoded

PatientId=3fa85f64-...&Name=Penicilina&Begin=2020-03-01
&Severity=4&Type=1&Occurrency=2&Description=Rash+generalizado&Comments=Evitar+betalactámicos

# Load the edit form
GET /Allergies/Edit/{id}

# Save edits (anti-forgery token required)
POST /Allergies/Edit
Content-Type: application/x-www-form-urlencoded

Id=...&PatientId=3fa85f64-...&Name=Penicilina&Begin=2020-03-01&Severity=4&Type=1&Occurrency=2

# Delete an allergy
DELETE /Allergies/Delete/{id}

# View a single allergy
GET /Allergies/Details/{id}
AllergiesController does not carry a class-level [Authorize(Roles)] attribute. All endpoints require an authenticated user (enforced by the global AuthorizeFilter registered in Program.cs), but no specific role is required at the controller level.
Severity, AllergyType, and Occurrency are submitted as their integer enum values. The create/edit form dropdowns are populated server-side with Enum.GetValues<T>() so the integers and labels stay in sync automatically.

Vaccines

The vaccines sub-module tracks immunisations administered to the patient. Each record stores the vaccine type, an optional free-text description for custom vaccines, and the date it was applied.

Model fields

FieldTypeDescription
IdGuidAuto-generated primary key
DescriptionstringResolved vaccine name (stored after VaccinesDto processing)
DateAppliedDateOnly?Date the vaccine was administered
PatientIdGuidFK — owning patient
The VaccinesDto transfer object adds an OtherDescription field for free-text input when the selected vaccine is VaccinesEnum.Otra:
DTO fieldTypeDescription
DescriptionstringSelected enum member name (e.g. "BCG", "HepatitisB")
OtherDescriptionstringFree-text name when Description is "Otra"
DateAppliedDateOnly?Date of administration
PatientIdGuidFK

VaccinesEnum values

ValueNotes
BCGBacillus Calmette-Guérin (TB)
SabinOral polio vaccine
HepatitisBHepatitis B
DPTDiphtheria, Pertussis, Tetanus
HIBHaemophilus influenzae type B
PRSMeasles, Rubella, Mumps (triple viral)
DTaAcellular diphtheria-tetanus booster
HepatitisAHepatitis A
Otra (-1)Other — requires OtherDescription

Endpoints

# Load the vaccines DataTables panel
GET /Vaccines/Index?id={patientId}

# Populate the table (DataTables AJAX)
POST /Vaccines/InitializeVaccines?patientId={patientId}

# Load the create vaccine form
GET /Vaccines/Create?id={patientId}

# Submit a new vaccine (anti-forgery token required)
POST /Vaccines/Create
Content-Type: application/x-www-form-urlencoded

PatientId=3fa85f64-...&Description=HepatitisB&DateApplied=2025-01-10

# Load the edit form
GET /Vaccines/Edit/{id}

# Save edits (anti-forgery token required)
POST /Vaccines/Edit
Content-Type: application/x-www-form-urlencoded

Id=...&PatientId=3fa85f64-...&Description=Otra&OtherDescription=VacunaXYZ&DateApplied=2025-03-20

# Delete a vaccine
DELETE /Vaccines/Delete/{id}
All endpoints require the Medico role (VaccinesController is decorated with [Authorize(Roles = "Medico")]).

Growth Charts

Growth charts record longitudinal anthropometric measurements at each clinical encounter, enabling the doctor to track a child’s physical development over time. Each entry stores age, weight, height, head circumference, their respective percentiles, and BMI.

Field reference

FieldTypePrecisionDescription
IdGuidAuto-generated primary key
Agedecimal[Precision(6, 3)]Patient age at measurement (e.g. 1.500 = 1.5 years)
TimestringTime label or visit descriptor
Weightdecimal[Precision(13, 3)]Body weight in kg
WPercstringWeight-for-age percentile string
Heightdecimal[Precision(13, 3)]Body height / length in cm
HPercstringHeight-for-age percentile string
HeadCircumferencedecimal[Precision(13, 3)]Head circumference in cm
HCPercstringHead circumference percentile string
Bmidecimal[Precision(13, 3)]Body Mass Index
PatientIdGuidFK — owning patient
Percentile values (WPerc, HPerc, HCPerc) are stored as free-form strings rather than computed values, giving the clinician flexibility to enter percentile ranges (e.g. "P25-P50") or narrative annotations.

Endpoints

# Load the growth chart DataTables panel
GET /GrowthChart/Index?id={patientId}

# Populate the table (DataTables AJAX)
POST /GrowthChart/Initialize?patientId={patientId}

# Load the create measurement form
GET /GrowthChart/Create?id={patientId}

# Submit a new measurement (anti-forgery token required)
POST /GrowthChart/Create
Content-Type: application/x-www-form-urlencoded

PatientId=3fa85f64-...&Age=1.500&Time=18+meses
&Weight=11.200&WPerc=P50&Height=81.500&HPerc=P50
&HeadCircumference=47.000&HCPerc=P50&Bmi=16.910

# Load the edit form
GET /GrowthChart/Edit/{id}

# Save edits (anti-forgery token required)
POST /GrowthChart/Edit

# Delete a measurement
DELETE /GrowthChart/Delete/{id}
All endpoints require the Medico role (GrowthChartController is decorated with [Authorize(Roles = "Medico")]).

Permanent Medications

Permanent medications (medicación permanente) track chronic or ongoing prescriptions that the patient takes indefinitely. Each entry is intentionally minimal: a free-text description and the patient it belongs to.

Model fields

FieldTypeDescription
IdGuidAuto-generated primary key
DescriptionstringMedication name, dosage, and/or frequency
PatientIdGuidFK — owning patient

Endpoints

# Load the permanent medications DataTables panel
GET /PermMed/Index?id={patientId}

# Populate the table (DataTables AJAX)
POST /PermMed/Initialize?patientId={patientId}

# Load the create form
GET /PermMed/Create?id={patientId}

# Submit a new permanent medication (anti-forgery token required)
POST /PermMed/Create
Content-Type: application/x-www-form-urlencoded

PatientId=3fa85f64-...&Description=Salbutamol+2+puffs+c/8h

# Delete a permanent medication
DELETE /PermMed/Delete/{id}
There is no edit endpoint for PermMed. To correct an entry, delete it and create a new one.
All endpoints require the Medico role (PermMedController is decorated with [Authorize(Roles = "Medico")]).

Personal Background

The personal background (antecedentes personales) record captures a patient’s medical history as a set of boolean flags covering common childhood and chronic conditions, plus a free-text Other field for anything not covered by the predefined list.
FieldC# typeDisplay label
AsthmaboolAsma
AllergyboolAlergias
PulmonologistboolNeumonológicos
PneumoniaboolNeumonías
MumpsboolPaperas
PsicologicalsboolPsicologicos
AccidentsboolAccidentes
HematOncboolHematooncológicos
RubellaboolRubeola
OtitisboolOtítis
MeaslesboolSarampión
ChickenpoxboolVaricela
UrinaryInfectionsboolInfec. Urinarias
SurgeriesboolCirugías
DiabetesboolDiabetes
DigestiveboolDigestivos
OtherstringOtros - Especificar
PersonalBackground inherits from PatientFKEntity and is linked one-to-one with its Patient. Only a single record exists per patient.

Perinatal Background

The perinatal background (antecedentes perinatales) captures data from the patient’s birth and the mother’s obstetric history. All numeric fields store integer measurements.
FieldTypeDisplay labelDescription
FeatintGestaGestational count (number of pregnancies)
DeliveryintPartoNumber of vaginal deliveries
CesareanintCesáreaNumber of caesarean sections
AbortintAbortoNumber of abortions/miscarriages
WeightintPesoBirth weight (grams)
HeightintTallaBirth length (mm or cm — entered by clinician)
CefPerintPerimetro CefálicoCephalic perimeter at birth (mm)
Apgar1intApgar 1′Apgar score at 1 minute
Apgar5intApgar 5′Apgar score at 5 minutes
GestAgeintEdad GestacionalGestational age in weeks
PathologiesstringPatologíasFree-text description of maternal or neonatal pathologies
CongErrorsstringErrores CongénitosFree-text reference to congenital errors noted at birth
PerinatalBackground inherits from PatientFKEntity and is linked one-to-one with its Patient.

Congenital Errors (Neonatal Screening)

The congenital errors (errores congénitos) record stores the results of Argentina’s mandatory neonatal metabolic screening panel. Each condition is represented by a boolean flag (was it tested?) and a companion string for the result value.

Model fields

Condition flagResult fieldDisplay label
CongHypothyroidismResultHypothyroidismHipotiroidismo congénito
PhenylalanineResultPhenylalanineFenilcetonuria
FQPResultFQPFibrosis quística del páncreas
BiotinidaseResultBiotinidaseDeficiencia de biotinidasa
GalactosemiaResultGalactosemiaGalactosemia
OHPResultOHP17O Hidroxiprogesterona Neo
OtherOtras (free text)

Result values

The CongErrorsResults constants class defines the three valid result strings:
ConstantValueMeaning
CongErrorsResults.NA"-"Not applicable / not tested
CongErrorsResults.Normal"Normal"Screening result normal
CongErrorsResults.Patological"Patológico"Screening result abnormal / pathological
CongErrors inherits from PatientFKEntity and is linked one-to-one with its Patient.

Parents Data

The parents data (datos de los padres) record stores demographic information about the patient’s biological parents and the number of siblings. This record is surfaced in the patient detail view via ViewBag.ParentsData.
FieldTypeDisplay labelDescription
FatherNamestringNombre del padreFather’s full name
FatherBirthDateDateOnlyFecha de nacimiento del padreFather’s date of birth
FatherBloodTypeBloodTypeTipo sanguineo del padreFather’s ABO/Rh blood group
FatherWorkstringTrabajo del padreFather’s occupation
MotherNamestringNombre de la madreMother’s full name
MotherBirthDateDateOnlyFecha de nacimiento de la madreMother’s date of birth
MotherBloodTypeBloodTypeTipo sanguineo de la madreMother’s ABO/Rh blood group
MotherWorkstringTrabajo de la madreMother’s occupation
BrothersCountintCantidad de hermanosNumber of siblings
ParentsData inherits from PatientFKEntity and is linked one-to-one with its Patient. The BloodType enum values are identical to those used on the patient profile — see the Patients page for the full list.

Build docs developers (and LLMs) love