# calculateRenalFunction

**Identifier:** `vidal_calculateRenalFunction`

**Provider:** [VIDAL France](https://kirha.com/providers/vidal.md)

Compute creatinine clearance (Cockcroft-Gault) or GFR (CKD-EPI) with KDIGO stage. Feeds analyzePrescription.patient.creatinineClearanceMlMin.

## Run it with the CLI

```bash
kirha tools run vidal_calculateRenalFunction \
  --input '{
    "formula": "COCKCROFT_GAULT",
    "dateOfBirth": "<dateOfBirth>",
    "gender": "MALE",
    "weightKg": 1
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "vidal_calculateRenalFunction",
  "input": {
    "formula": "COCKCROFT_GAULT",
    "dateOfBirth": "<dateOfBirth>",
    "gender": "MALE",
    "weightKg": 1
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "creatinineClearanceMlMin": {
      "description": "CKD_EPI only — alternative input to back-calculate creatininemia + DFG",
      "exclusiveMinimum": 0,
      "type": "number"
    },
    "dateOfBirth": {
      "description": "YYYY-MM-DD",
      "type": "string"
    },
    "formula": {
      "enum": [
        "COCKCROFT_GAULT",
        "CKD_EPI"
      ],
      "type": "string"
    },
    "gender": {
      "enum": [
        "MALE",
        "FEMALE"
      ],
      "type": "string"
    },
    "heightCm": {
      "exclusiveMinimum": 0,
      "maximum": 250,
      "type": "number"
    },
    "serumCreatinineMicroMolPerL": {
      "description": "Required for COCKCROFT_GAULT and for CKD_EPI if creatinineClearanceMlMin not supplied",
      "exclusiveMinimum": 0,
      "type": "number"
    },
    "weightKg": {
      "exclusiveMinimum": 0,
      "maximum": 300,
      "type": "number"
    }
  },
  "required": [
    "formula",
    "dateOfBirth",
    "gender",
    "weightKg"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "creatinineClearanceMlMin": {
      "type": "number"
    },
    "dfg": {
      "additionalProperties": false,
      "properties": {
        "afroAmericanMlMin173m2": {
          "type": "number"
        },
        "calculationMethod": {
          "type": "string"
        },
        "kdigoStage": {
          "type": "string"
        },
        "nonAfroAmericanMlMin173m2": {
          "type": "number"
        }
      },
      "required": [
        "nonAfroAmericanMlMin173m2",
        "afroAmericanMlMin173m2",
        "kdigoStage",
        "calculationMethod"
      ],
      "type": "object"
    },
    "formula": {
      "enum": [
        "COCKCROFT_GAULT",
        "CKD_EPI"
      ],
      "type": "string"
    },
    "renalInsufficiency": {
      "type": "string"
    },
    "serumCreatinineMicroMolPerL": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "formula",
    "renalInsufficiency"
  ],
  "type": "object"
}
```

## Related tools

Other VIDAL France tools that this tool refers to, or that refer to it.

- [`analyzePrescription`](https://kirha.com/providers/vidal/analyzePrescription.md)

-----

[All VIDAL France tools](https://kirha.com/providers/vidal.md) · [< Back to tools list](https://kirha.com/tools.md)