# calculatePrescriptionCost

**Identifier:** `vidal_calculatePrescriptionCost`

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

Estimate prescription cost in EUR (UCD price × dose/day × duration per line, min/max totals). Same body shape as analyzePrescription.

## Run it with the CLI

```bash
kirha tools run vidal_calculatePrescriptionCost \
  --input '{
    "prescriptionLines": [
      {
        "drugUri": "<drugUri>",
        "durationType": "MINUTE"
      }
    ]
  }'
```

`--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_calculatePrescriptionCost",
  "input": {
    "prescriptionLines": [
      {
        "drugUri": "<drugUri>",
        "durationType": "MINUTE"
      }
    ]
  }
}'
```

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": {
    "patient": {
      "default": {},
      "properties": {
        "allergyUris": {
          "default": [],
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "breastFeedingStartDate": {
          "type": "string"
        },
        "creatinineClearanceMlMin": {
          "maximum": 300,
          "minimum": 1,
          "type": "number"
        },
        "dateOfBirth": {
          "type": "string"
        },
        "gender": {
          "enum": [
            "MALE",
            "FEMALE",
            "UNKNOWN"
          ],
          "type": "string"
        },
        "heightCm": {
          "maximum": 250,
          "minimum": 30,
          "type": "number"
        },
        "hepaticInsufficiency": {
          "enum": [
            "NONE",
            "MODERATE",
            "SEVERE"
          ],
          "type": "string"
        },
        "pathologyUris": {
          "default": [],
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "weeksOfAmenorrhea": {
          "maximum": 60,
          "minimum": 0,
          "type": "number"
        },
        "weightKg": {
          "maximum": 300,
          "minimum": 0.1,
          "type": "number"
        }
      },
      "type": "object"
    },
    "prescriptionLines": {
      "items": {
        "properties": {
          "dose": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "drugUri": {
            "type": "string"
          },
          "durationType": {
            "enum": [
              "MINUTE",
              "HOUR",
              "DAY",
              "WEEK",
              "MONTH",
              "YEAR"
            ],
            "type": "string"
          },
          "durationValue": {
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          },
          "endDate": {
            "type": "string"
          },
          "frequencyType": {
            "default": "PER_DAY",
            "enum": [
              "THIS_DAY",
              "PER_DAY",
              "PER_24_HOURS"
            ],
            "type": "string"
          },
          "indicationUris": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "routeUri": {
            "type": "string"
          },
          "startDate": {
            "type": "string"
          },
          "unitId": {
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "drugUri",
          "durationType"
        ],
        "type": "object"
      },
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "prescriptionLines"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "evaluatedPrescriptionLineCount": {
      "type": "number"
    },
    "ignoredPrescriptionLineCount": {
      "type": "number"
    },
    "maxTotalEur": {
      "type": "number"
    },
    "minTotalEur": {
      "type": "number"
    },
    "perLine": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "dose": {
            "type": "number"
          },
          "drugName": {
            "type": "string"
          },
          "drugUri": {
            "type": "string"
          },
          "durationType": {
            "type": "string"
          },
          "durationValue": {
            "type": "number"
          },
          "frequencyType": {
            "type": "string"
          },
          "maxEur": {
            "type": "number"
          },
          "minEur": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "minEur",
          "maxEur"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "evaluatedPrescriptionLineCount",
    "ignoredPrescriptionLineCount",
    "minTotalEur",
    "maxTotalEur",
    "perLine"
  ],
  "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)