Skip to content

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

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Arguments

VariablesInput fieldTypeDescription
calccalcCalcCalculation to choose, see list of calculations
calcformulaStringSpecific formula to use for a calculation, see list of calculations
calcunitStringOptional unit to convert the output if possible
patientsexGenderBiological sex of the patient
patientageGroupsAgeGroup[]AgeGroup of the patient
patientbirthDateDatePatient’s date of birth
patientcontinuousCriteriaContinuousCriterionInput[]Patient biological parameters

ContinuousCriterionInput

Input fieldTypeDescription
typeStringType of biological parameter
unitStringUnit of biological parameter
minFloatLower bound of the biological parameter
maxFloatUpper bound of the biological parameter
valueFloatAbsolute value of the biological parameter

Result

The API returns an object of type CalcResult.

CalcResult

AttributesTypeDescription
calcCalcChosen calculation, see list of calculations
formulaStringSpecific formula used for the calculation, determined according to the parameters of the calculation or selected
foundParametersBooleanSpecifies if the parameter for the chosen calculation are found
valueQuantityQuantityResult of the calculation if the result is a quantity
valueDateTimeDateResult 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

CodeCalculator typeFormulaInput units acceptedOutput unit
GLOMERULAR_FILTRATION_RATEGlomerular filtration rateEKFC (Default if > 2 y/o),CKD-EPI,Schwartz (Default if < 2 y/o)umol/l, mg/l,mg/dlml/min
BODY_MASS_INDEXBody mass indexkg, m, cmkg/m2
PREGNANCY_DUE_DATEPregnancy due dated, wk, mo, adate
PREGNANCY_WEEKSNumber of pregnancy weeksd, wk, mo, a’wk’

Response codes

CodeDescription
200OK
400One of the parameters passed in the request is invalid