Calculators
Introduction
The getCalc
query allows you to perform calculations based on patient information, using mainly the continuous criterions.
Entry point
post/aort/v1/graphql
HTTP headers
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Arguments
Variables | Input field | Type | Description |
---|---|---|---|
calc | calc | Calc | Calculation to choose, see list of calculations |
calc | formula | String | Specific formula to use for a calculation, see list of calculations |
calc | unit | String | Optional unit to convert the output if possible |
patient | sex | Gender | Biological sex of the patient |
patient | ageGroups | AgeGroup[] | AgeGroup of the patient |
patient | birthDate | Date | Patient’s date of birth |
patient | continuousCriteria | ContinuousCriterionInput[] | Patient biological parameters |
ContinuousCriterionInput
Input field | Type | Description |
---|---|---|
type | String | Type of biological parameter |
unit | String | Unit of biological parameter |
min | Float | Lower bound of the biological parameter |
max | Float | Upper bound of the biological parameter |
value | Float | Absolute value of the biological parameter |
Result
The API returns an object of type CalcResult
.
CalcResult
Attributes | Type | Description |
---|---|---|
calc | Calc | Chosen calculation, see list of calculations |
formula | String | Specific formula used for the calculation, determined according to the parameters of the calculation or selected |
foundParameters | Boolean | Specifies if the parameter for the chosen calculation are found |
valueQuantity | Quantity | Result of the calculation if the result is a quantity |
valueDateTime | Date | Result of the calculation if the result is a date |
Example
Calculators
query GetCalc($calc: CalcTarget!, $patient: PatientInput!) {
getCalc(calc: $calc, patient: $patient) {
calc
foundParameters
formula
valueQuantity {
value
code
system
unit
}
}
}
Response
{
"data": {
"getCalc": {
"calc": "GLOMERULAR_FILTRATION_RATE",
"foundParameters": true,
"formula": "EKFC",
"valueQuantity": {
"value": 46.89,
"code": "mL/min",
"system": "ucum",
"unit": "mL/min"
}
}
}
}
Calcul de l’IMC
Calculateur
query GetBMI($calc: CalcTarget!, $patient: PatientInput!) {
getCalc(calc: $calc, patient: $patient) {
valueQuantity {
value
unit
code
system
}
}
}
Calculateur
{
"calc": { "calc": "BODY_MASS_INDEX", "unit": "kg/m²" },
"patient":
{
"continuousCriteria":
[
{ "value": 60, "unit": "kg", "type": "Poids" },
{ "value": 165, "unit": "cm", "type": "Taille" },
],
},
}
Calculateur
{
"getCalc":
{
"valueQuantity":
{ "value": 22.04, unit: "kg/m²", code: "kg/m2", system: "ucum" },
}
}
List of calculators
Code | Calculator type | Formula | Input units accepted | Output unit |
---|---|---|---|---|
GLOMERULAR_FILTRATION_RATE | Glomerular filtration rate | EKFC (Default if > 2 y/o),CKD-EPI ,Schwartz (Default if < 2 y/o) | umol/l , mg/l ,mg/dl | ml/min |
BODY_MASS_INDEX | Body mass index | kg , m , cm | kg/m2 | |
PREGNANCY_DUE_DATE | Pregnancy due date | d , wk , mo , a | date | |
PREGNANCY_WEEKS | Number of pregnancy weeks | d , wk , mo , a | ’wk’ |
Response codes
Code | Description |
---|---|
200 | OK |
400 | One of the parameters passed in the request is invalid |