Skip to main content

Body parameters

This section details the body parameters, taking into account the structuring within the query.

Query construction protocol​

These rules are general: they apply to every sending center, whatever hospital information system produces the data.

  • Data window — every dated record (diagnoses, medications, scales, labs, weights, BMI) covers the last 2 years, counted back from the query date.
  • Care settings — episode-derived data (icd, inpatientAdmissions, emergencyAdmissions, stayDays) is built from the patient's admissions to the emergency, intermediate-care and hospitalisation (inpatient) units. Intermediate care counts as inpatient.
  • Completeness — send all the records available in the window: every scale assessment (e.g. every Barthel, MNA, MNA Short Form), every diagnosis, and the full active interval for each medication — never only the most recent record. Fields marked Mandatory are rejected if absent; fields marked Highly recommended are not rejected, but should always be sent when available — the more complete the history, the better the risk assessment.
  • Pseudonymity — id is a center-generated pseudonymous identifier; under no circumstance may it correspond to the patient's real clinical-history identifier (see Id).

Id​

⚠️ Mandatory field

ParameterData typeDescriptionValid Values
idintPseudonymous patient identifier, generated by the sending center, provided as an integer value. It must not be the patient's real clinical-record identifier.Range: 0-999999
Pseudonymous identifier — never the real one

The id must be a pseudonymous identifier generated by the sending center for this integration. Under no circumstance may it correspond to — or be derivable from — the patient's real clinical-history identifier (medical record number / NHC, CIP, national ID, insurance number, etc.). If the center needs a re-identification mapping, that mapping must remain exclusively at the center and is never sent to AIMS.

Format in query:​

[{
"id": 35
}]

Age​

⚠️ Mandatory field

ParameterData typeDescriptionValid Values
ageintThe patient's age (years) at the query date, as an integer. The risk model is validated for geriatric patients only: ages below 65 are rejected.Range: 65-130

Format in query:​

[{
"age": 74
}]

Sex​

⚠️ Mandatory field

ParameterData typeDescriptionValid Values
sexstrPatient gender must be indicated as either 'female' (F) or 'male' (M).F, M

Format in query:​

[{
"sex": "M"
}]

Inpatient Admissions​

⚠️ Mandatory field

ParameterData typeDescriptionValid Values
inpatientAdmissionsintThe number of admissions to the inpatient ward (including intermediate-care units) from the last 2 years.Range: 0-200

Format in query:​

[{
"inpatientAdmissions": 4
}]

Emergency Admissions​

⚠️ Mandatory field

ParameterData typeDescriptionValid Values
emergencyAdmissionsintThe number of admissions to the emergency department from the last 2 years.Range: 0-500

Format in query:​

[{
"emergencyAdmissions": 1
}]

Stay Days​

⚠️ Mandatory field

ParameterData typeDescriptionValid Values
stayDaysintNumber of days of hospital stay from the last 2 years, summed per episode as discharge date minus admission date over inpatient and intermediate-care episodes. Emergency visits add no stay days.Range: 0-4000

Format in query:​

[{
"stayDays": 14
}]

Weights​

Highly recommended

ParameterData typeDescriptionValid Values
datedatetimeThe date of the weights recorded. Only weights from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) format.YYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
weightsfloatRecords the weight of the patient during different measurements.Range: 20.0-202.0

Format in query:​

[{
"weights": [{
"date": "25-08-2023",
"value": 75.0
}]
}]

BMI​

Highly recommended

ParameterData typeDescriptionValid Values
datedatetimeThe date of the BMI recorded. Only BMIs from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) format.YYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
bmifloatBody Mass Index of the patient.Range: 10-150

Format in query:​

[{
"bmi": [{
"date": "25-08-2023",
"value": 22.5
}]
}]

ICD (International Classification of Diseases) Codes​

⚠️ Mandatory field

The ICD (International Classification of Diseases) codes are alphanumeric codes that classify various diseases and health conditions. These codes provide a standardized system for healthcare professionals to document and categorize specific diagnoses.

The ICD codes we receive can be ICD-9 or ICD-10. Queries containing ICD-9 and ICD-10 codes can be submitted interchangeably, and we will treat and process this mix of codes appropriately later.

Construction rule: include all the diagnoses (principal and secondary) recorded in the patient's admissions over the last 2 years to the emergency, intermediate-care and hospitalisation (inpatient) units. Each diagnosis is dated at the discharge of the episode where it was coded.

Below are some examples of ICD-9 and ICD-10 codes, along with a brief description of each:

ICD-9 Examples codes:

  • 366.9: Unspecified cataract.
  • 457.2: Postmastectomy lymphedema syndrome.
  • 293.0: Delirium due to conditions classified elsewhere.
  • 787.20: Dysphagia, unspecified.

ICD-10 Examples codes:

  • I63.311: Cerebral infarction due to unspecified occlusion or stenosis of the right carotid artery.
  • J03.221: Streptococcal pharyngitis.
  • Z51.5: Palliative care involving the use of respiratory support.
  • I11.0: Hypertensive heart disease with heart failure.
ParameterData typeDescriptionValid Values
datedatetimeThe date the diagnosis was recorded. Only diagnoses from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) format.YYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
valuestrThe ICD code of the diagnosis.e.g., "366.9", "I11.0"
versionintThe version of the ICD code (9 for ICD-9, 10 for ICD-10).9, 10

Format in query:​

[{
"icd": [{
"date": "31-10-2022",
"value": "366.9",
"version": 9
},
{
"date": "14-09-2024",
"value": "R069010",
"version": 10
}]
}]
tip

Please note that to ensure the ICD-9 and ICD-10 codes validity, the dates of admission and discharge should be before or equal to the current date. On the other hand, it is necessary to send ICD codes divided into primary and secondary codes for each patient care.

ATC (Anatomical Therapeutic Chemical) Codes​

⚠️ Mandatory field

The ATC (Anatomical Therapeutic Chemical) codes are alphanumeric codes used to classify pharmaceutical substances. These codes provide a standardized system for categorizing medications based on their therapeutic and chemical properties. Below are some examples of ATC codes, along with a brief description of each:

  • N02BE: Other analgesics and antipyretics, non-opioids.
  • J01CR: Combinations of penicillins, including beta-lactamase inhibitors.
  • B05BA: Amino acids and derivatives.
  • N03AX: Other antiepileptic.

Construction rule: send one entry per medication with its active interval: date is the day the treatment started, endDate the day it ended (both inclusive). A treatment still active at query time leaves endDate empty (open-ended, active up to the query date). Only the portion of the interval that falls within the last 2 years is relevant. A row without endDate (or with endDate equal to date) is a single active day.

ParameterData typeDescriptionValid Values
datedatetimeThe day the medication became active (interval start). Only intervals overlapping the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) format.YYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
valuestrThe ATC code of the pharmaceutical substance.e.g., "N02BE", "J01CR", "B05BA", "N03AX"
endDatedatetimeThe day the medication stopped being active (interval end, inclusive). Empty when the treatment is still active at query time. Same accepted formats as date.YYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY, or empty

Format in query:​

[{
"atc": [{
"date": "02-06-2026",
"value": "N02AX02",
"endDate": "10-06-2026"
},
{
"date": "22-06-2026",
"value": "R05CB01",
"endDate": ""
},
{
"date": "22-06-2026",
"value": "J01DC02",
"endDate": ""
}]
}]
tip

Please note that all the provided ATC codes have the required minimum of 5 digits. Additionally, these codes are intended for the classification of pharmaceutical substances and should not be used for any other purpose. WHO Collaborating Centre for Drug Statistics Methodology - ATC/DDD Index

Barthel Index​

Highly recommended

The Barthel Index is an ordinal scale used to measure functional independence in patients with chronic, disabling conditions, particularly in rehabilitation settings. It comes in two versions: the original 10-item form and the expanded 15-item version. The 10-item version is more commonly used and assesses independence in various activities related to personal care and mobility. Each item is scored based on the level of independence, and the total score reflects the overall level of independence.

Construction rule: include all the Barthel assessments performed in the last 2 years, each dated with its assessment date — not only the most recent one. The same rule applies to every other clinical scale in the query (MNA, MNA Short Form, Emina, Canadian Scale).

Activities and Scores​

ParameterData typeDescriptionValid Values
datedatetimeDate on which the Barthel code was recorded. Only Barthels from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) format.YYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
feedingintFeeding0 = unable / 5 = needs help or modified diet / 10 = independent
bathingintBathing0 = dependent / 5 = independent (or in shower)
groomingintGrooming0 = needs help with personal care / 5 = independent with implements provided
dressingintDressing0 = dependent / 5 = needs help but can do about half unaided / 10 = independent
bowelsintBowels0 = incontinent or needs enemas / 5 = occasional accident / 10 = continent
bladderControlintBladder0 = incontinent, or catheterized and unable to manage alone / 5 = occasional accident / 10 = continent
toiletUseintToilet Use0 = dependent / 5 = needs some help, but can do something alone / 10 = independent
chairTransfersintTransfers (bed to chair and back)0 = unable, no sitting balance / 5 = major help, can sit / 10 = minor help / 15 = independent
mobilityintMobility (on level surfaces)0 = immobile or < 50 yards / 5 = wheelchair independent, including corners, >50 yards / 10 = walks with help of one person >50 yards / 15 = independent with aid >50 yards
stairClimbingintStairs0 = unable / 5 = needs help / 10 = independent
totalintTotalThe overall Barthel screening score.

The total score is obtained by summing the scores of all the items, with higher scores indicating higher levels of independence. The Barthel Index is valuable for assessing disability and monitoring changes in disability over time.

Format in query:​

[{
"barthel": [{
"date": "25-08-2024",
"toiletUse": 10,
"bathing": 5,
"feeding": 10,
"dressing": 10,
"bowels": 0,
"chairTransfers": 5,
"mobility": 15,
"grooming": 5,
"bladderControl": 10,
"stairClimbing": 10,
"total": 80
}]
}]

MNA​

Highly recommended

The MNA® is a validated nutrition screening and assessment tool that can identify geriatric patients age 65 and above who are malnourished or at risk of malnutrition. The MNA® has developed nearly 20 years ago and is the most well-validated nutrition screening tool for the elderly. Originally comprised of 18 questions, the current MNA® now consists of 6 questions and streamlines the screening process. The current MNA® retains the validity and accuracy of the original MNA® in identifying older adults who are malnourished or at risk of malnutrition. The revised MNA® Short Form makes the link to intervention easier and quicker and is now the preferred form of the MNA® for clinical use. MNA (Mini Nutritional Assessment) Website

caution

Please make sure to follow the guidelines below to ensure a successful and accurate query in the evaluation of the MNA scale. If the fields and values are sent in a different way than specified in the table or if the values are outside the set range, the API will return a formatting error (the types of errors are explained in a later section). In addition, if the data types sent do not match those specified in the table, an error will also be generated.

ParameterData typeDescriptionValid Values
datedatetimeThe date of the MNA evaluation. Only MNAs from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) formatYYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
bmiintBody mass index (BMI) is a measure of body fat based on weight in kg divided by height in m2.0, 1, 2, 3
reduceFoodIntakeintAssesses if there is a reduction in food intake.0, 1, 2
weightLossintMeasures recent weight loss, which can indicate malnutrition.0, 1, 2, 3
mobilityintAssesses the patient's mobility and ability to move around.0, 1, 2
acuteDiseaseintDetermines if the patient has any acute diseases or medical conditions.0, 2
neuropsychologicalProblemsintAssesses for any neuropsychological problems, such as cognitive issues or mental health.0, 1, 2
autonomousLivingintMeasures the patient's ability to live independently.0, 1
medicationintAssesses if the patient is on any medications that may affect their nutritional status.0, 1
pressureSoresintDetermines the presence of pressure sores, indicating possible malnutrition and immobility.0, 1
foodIntakeintAssesses overall food intake.0, 1, 2
proteinIntakefloatMeasures the patient's protein intake.0.0, 0.5, 1.0
fruitAndVegetablesintAssesses the consumption of fruits and vegetables.0, 1
fluidIntakefloatMeasures the patient's fluid intake.0.0, 0.5, 1.0
feedingModeintDetermines the patient's feeding mode.0, 1, 2
selfNutritionalStatusintAssesses the patient's self-perceived nutritional status.0, 1, 2
healthStatusfloatMeasures the patient's overall health status.0.0, 0.5, 1.0, 2.0
armCircumferencefloatMeasures the patient's arm circumference, indicating muscle mass and malnutrition.0.0, 0.5, 1.0
calfCircumferenceintMeasures the patient's calf circumference, indicating muscle mass and malnutrition.0, 1
totalfloatThe overall MNA screening score obtained by adding up the scores from each parameter.Range: 0.0-31.0

Format in query:​

[{
"mna": [{
"date": "11-07-2024",
"reduceFoodIntake": 2,
"weightLoss": 2,
"mobility": 0,
"acuteDisease": 2,
"neuropsychologicalProblems": 1,
"bmi": 1,
"autonomousLiving": 0,
"medication": 0,
"pressureSores": 0,
"foodIntake": 0,
"proteinIntake": 0,
"fruitAndVegetables": 0,
"fluidIntake": 0,
"feedingMode": 0,
"selfNutritionalStatus": 0,
"healthStatus": 0,
"armCircumference": 0,
"calfCircumference": 0,
"total": 8.0
}]
}]

MNA Short Form (shortMna)​

Highly recommended

The MNA Short Form (MNA-SF) is the abbreviated, 6-item version of the MNA® used as a first-line nutrition screening. Send it through the dedicated shortMna field when the center only administers the Short Form, instead of forcing the full 18-item mna above.

ParameterData typeDescriptionValid Values
datedatetimeThe date of the MNA-SF evaluation. Only assessments from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) format.YYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
reduceFoodIntakeintDecline in food intake over the past 3 months due to appetite loss, digestive problems, chewing or swallowing difficulties.0, 1, 2
weightLossintWeight loss during the last 3 months.0, 1, 2, 3
mobilityintThe patient's mobility.0, 1, 2
acuteDiseaseintAcute disease or psychological stress in the past 3 months.0, 2
neuropsychologicalProblemsintPresence of dementia or depression.0, 1, 2
bmiintBody mass index score. Send this or calfCircumference, not both.0, 1, 2, 3
calfCircumferenceintCalf circumference score, sent instead of bmi when BMI is unavailable.0, 1, 2, 3
totalintThe overall MNA-SF screening score: 12-14 normal, 8-11 at risk, 0-7 malnourished.Range: 0-14

Format in query:​

[{
"shortMna": [{
"date": "11-07-2024",
"reduceFoodIntake": 2,
"weightLoss": 2,
"mobility": 1,
"acuteDisease": 2,
"neuropsychologicalProblems": 1,
"bmi": 1,
"total": 9
}]
}]

Emina​

Highly recommended

The Emina Scale assessment evaluates different aspects related to a patient's activity level, mental state, environmental conditions, mobility, and nutritional status. Each parameter is scored on a scale from 0 to 3, and the overall Emina score provides an assessment of the patient's condition.

caution

Please make sure to follow the guidelines below to ensure a successful and accurate query in the evaluation of the Emina scale. If the fields and values are sent in a different way than specified in the table or if the values are outside the set range, the API will return a formatting error (the types of errors are explained in a later section). In addition, if the data types sent do not match those specified in the table, an error will also be generated.

ParameterData typeDescriptionValid Values
datedatetimeThe date of the Emina evaluation. Only Eminas from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) formatYYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
activityintAssesses the patient's activity level.0: Bedridden or immobile 1: Limited activity 2: Moderate activity 3: Active
mentalStateintMeasures the patient's mental state and cognitive function.0: Confused or disoriented 1: Forgetfulness or mild cognitive impairment 2: Alert and oriented
humidityintAssesses the humidity level in the patient's environment.0: Poor humidity conditions 1: Moderate humidity conditions 2: Good humidity conditions 3: Excellent humidity conditions
mobilityintMeasures the patient's mobility and ability to move around.0: Completely immobile or bedridden 1: Limited mobility 2: Moderate mobility 3: Independent mobility
nutritionintAssesses the patient's nutritional status.0: Severely malnourished 1: Moderately malnourished 2: Mildly malnourished 3: Well-nourished
totalintThe overall Emina score obtained by adding up the scores from each parameter.Range: 0-15

Format in query:​

[{
"emina": [{
"date": "11-07-2024",
"mentalState": 0,
"mobility": 3,
"humidity": 3,
"nutrition": 1,
"activity": 3,
"total": 10
}]
}]

Canadian Scale​

Highly recommended

The Canadian Scale is an assessment tool used to measure functional independence in patients with chronic, disabling conditions, particularly in rehabilitation settings. It evaluates various aspects related to a patient's level of consciousness, orientation, speech, facial movements, and mobility in the arms and legs. Each parameter is scored based on specific values, and the overall Canadian Scale score reflects the patient's level of functional independence.

caution

Please make sure to follow the guidelines below to ensure a successful and accurate query in the evaluation of the Canadian scale. If the fields and values are sent in a different way than specified in the table or if the values are outside the set range, the API will return a formatting error (the types of errors explained in a later section). In addition, if the data types sent do not match those specified in the table, an error will also be generated.

ParameterData typeDescriptionValid Values
datedatetimeThe date of the Canadian Scale assessment. Only Canadian Scale from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) formatYYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
consciencefloatAssesses the patient's level of consciousness.1.5, 3.0
orientationintMeasures the patient's level of orientation.0, 1
speechfloatAssesses the patient's speech abilities.0.0, 0.5, 1.0
facefloatMeasures the patient's facial movements.0.0, 0.5
armProximalfloatAssesses the patient's proximal arm movements.0.0, 0.5, 1.0, 1.5
armDistalfloatMeasures the patient's distal arm movements.0.0, 0.5, 1.0, 1.5
legfloatAssesses the patient's leg movements.0.0, 0.5, 1.0, 1.5
deficitFacefloatMeasures the presence of deficits in facial movements.0.0, 0.5
deficitArmsfloatAssesses the presence of deficits in arm movements.0.0, 1.5
deficitLegsfloatMeasures the presence of deficits in leg movements.0.0, 1.5
totalfloatThe overall score obtained from the Canadian Scale assessment.0.0 - 10.0

Format in query:​

[{
"canadianScale": [{
"date": "25-12-2023",
"conscience": 3,
"orientation": 0,
"speech": 1,
"face": 0,
"armProximal": 0,
"armDistal": 0,
"leg": 1,
"deficitFace": 0,
"deficitArms": 0,
"deficitLegs": 0,
"total": 6.0
}]
}]

LabResults​

Highly recommended

The LabResults include the structured data of laboratory tests conducted. Each entry encapsulates essential information regarding a specific test, including the date the test was conducted, the name of the test, the LOINC code where applicable and the result value. Using LOINC codes facilitates a standardized representation and interoperability of the lab data across different systems, ensuring that the conveyed information remains precise and consistent.

caution

Please make sure to follow the guidelines below to ensure a successful and accurate query in the evaluation of lab results. Laboratory results should be recorded according to LOINC codes as specified. If the healthcare facility sends a laboratory test that does not correspond to any LOINC code, the name of the test should be specified without a code. If the fields and values are sent differently than specified in the table or if the values are outside the set range, the API will return a formatting error (the types of errors are explained in a later section).

ParameterData typeDescriptionValid Values
datedatetimeThe date the test was conducted. Only tests from the last 2 years. Accepts ISO (YYYY-MM-DD), European dash (DD-MM-YYYY) or American slash (MM/DD/YYYY) formatYYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY
namestrName of the laboratory test. If the test corresponds to a LOINC code, include it in square brackets following the test name.e.g., "Acetylcholine [Mass/volume] in Serum"
loincstrThe LOINC code corresponding to the laboratory test. If no LOINC code is available, this field should be left empty.e.g., "1707-9"
valuefloatThe result value of the laboratory test.Varies based on test

Format in query:​

[{
"labs": [{
"date": "18-11-2023",
"name": "Acetylcholine [Mass/volume] in Serum",
"loinc": "1707-9",
"value": 3.0
},
{
"date": "20-07-2024",
"name": "TotalBilirubinSerum",
"loinc": "",
"value": 5.0
}]
}]

Center​

⚠️ Mandatory field

ParameterData typeDescriptionValid Values
centerstringHospital from where the consultation takes placee.g., "Hospital de Mataró"

Format in query:​

[{
"center": "Hospital de Mataró"
}]

Servei​

Highly recommended

ParameterData typeDescriptionValid Values
serveistringThe care unit or service where the patient is currently located, within center (e.g. an assisted-living residence unit, a geriatric-care unit). Sent verbatim, as the center names it.e.g., "Resd.Assistida", "Atenció geriàtrica"

Format in query:​

[{
"servei": "Atenció geriàtrica"
}]