# analyzePrescription

**Identifier:** `vidal_analyzePrescription`

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

Submit a patient + prescription lines to VIDAL Sécurisation (CE-marked) and receive structured clinical alerts: interactions, contraindications, posology, allergy, pregnancy, physico-chemical, redundancy, food, surveillance, side-effects, regulatory. Resolve inputs with searchDrugs, searchPatientTerms, and calculateRenalFunction.

## Run it with the CLI

```bash
kirha tools run vidal_analyzePrescription \
  --input '{
    "prescriptionLines": [
      {
        "drugUri": "<drugUri>"
      }
    ]
  }'
```

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

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": {
    "alertTypes": {
      "description": "Restrict returned alert types. If omitted, defaults to actionable safety classes (contraindication, interaction, allergy, posology, precaution, warning, surveillance, food, etc.) — SIDE_EFFECT and EXONERATION are excluded by default because they typically add 100+ informational entries. Pass SIDE_EFFECT explicitly to retrieve them.",
      "items": {
        "enum": [
          "CONTRA_INDICATION",
          "DRUG_INTERACTION",
          "ALLERGY",
          "POSOLOGY",
          "PRECAUTION",
          "PHYSICO_CHEMICAL_INTERACTION",
          "REDUNDANT_ACTIVE_INGREDIENT",
          "SAME_DRUG",
          "WARNING",
          "SURVEILLANCE",
          "SIDE_EFFECT",
          "FOOD_INTERACTION",
          "DISPENSING_RISK",
          "EXONERATION",
          "INDICATOR",
          "PRESCRIPTION_CONTEXT",
          "FOCUS",
          "HAS"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "patient": {
      "default": {},
      "properties": {
        "allergyUris": {
          "default": [],
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "breastFeedingStartDate": {
          "description": "YYYY-MM-DD",
          "type": "string"
        },
        "creatinineClearanceMlMin": {
          "maximum": 300,
          "minimum": 1,
          "type": "number"
        },
        "dateOfBirth": {
          "description": "YYYY-MM-DD",
          "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": {
          "aldCode": {
            "type": "string"
          },
          "aldWithinScope": {
            "type": "boolean"
          },
          "dose": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "drugUri": {
            "description": "vidal://product|package|ucd|vmp|prescribable/<id>",
            "type": "string"
          },
          "durationType": {
            "enum": [
              "MINUTE",
              "HOUR",
              "DAY",
              "WEEK",
              "MONTH",
              "YEAR"
            ],
            "type": "string"
          },
          "durationValue": {
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          },
          "endDate": {
            "type": "string"
          },
          "frequencyType": {
            "enum": [
              "THIS_DAY",
              "PER_DAY",
              "PER_24_HOURS"
            ],
            "type": "string"
          },
          "indicationUris": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "routeUri": {
            "description": "vidal://route/<id>",
            "type": "string"
          },
          "startDate": {
            "type": "string"
          },
          "status": {
            "enum": [
              "ACTIVE",
              "COMPLETED"
            ],
            "type": "string"
          },
          "unitId": {
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "drugUri"
        ],
        "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": {
    "alertCountsByType": {
      "additionalProperties": {
        "type": "number"
      },
      "propertyNames": {
        "type": "string"
      },
      "type": "object"
    },
    "alerts": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "acknowledgment": {
            "type": "boolean"
          },
          "alertType": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "interactionClasses": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "severity": {
            "type": "string"
          },
          "source": {
            "additionalProperties": false,
            "properties": {
              "date": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "subType": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "triggeredByDrug": {
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string"
              },
              "uri": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "triggeredByType": {
            "type": "string"
          }
        },
        "required": [
          "alertType",
          "severity",
          "title"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "analyzedAt": {
      "type": "string"
    },
    "context": {
      "type": "string"
    },
    "severitySummary": {
      "additionalProperties": false,
      "properties": {
        "allergy": {
          "additionalProperties": false,
          "properties": {
            "label": {
              "type": "string"
            },
            "severity": {
              "enum": [
                "NO_ALERT",
                "INFO",
                "LEVEL_1",
                "LEVEL_2",
                "LEVEL_3",
                "LEVEL_4"
              ],
              "type": "string"
            }
          },
          "required": [
            "severity"
          ],
          "type": "object"
        },
        "contraIndication": {
          "additionalProperties": false,
          "properties": {
            "label": {
              "type": "string"
            },
            "severity": {
              "enum": [
                "NO_ALERT",
                "INFO",
                "LEVEL_1",
                "LEVEL_2",
                "LEVEL_3",
                "LEVEL_4"
              ],
              "type": "string"
            }
          },
          "required": [
            "severity"
          ],
          "type": "object"
        },
        "drugDrugInteraction": {
          "additionalProperties": false,
          "properties": {
            "label": {
              "type": "string"
            },
            "severity": {
              "enum": [
                "NO_ALERT",
                "INFO",
                "LEVEL_1",
                "LEVEL_2",
                "LEVEL_3",
                "LEVEL_4"
              ],
              "type": "string"
            }
          },
          "required": [
            "severity"
          ],
          "type": "object"
        },
        "physicoChemical": {
          "additionalProperties": false,
          "properties": {
            "label": {
              "type": "string"
            },
            "severity": {
              "enum": [
                "NO_ALERT",
                "INFO",
                "LEVEL_1",
                "LEVEL_2",
                "LEVEL_3",
                "LEVEL_4"
              ],
              "type": "string"
            }
          },
          "required": [
            "severity"
          ],
          "type": "object"
        },
        "posology": {
          "additionalProperties": false,
          "properties": {
            "label": {
              "type": "string"
            },
            "severity": {
              "enum": [
                "NO_ALERT",
                "INFO",
                "LEVEL_1",
                "LEVEL_2",
                "LEVEL_3",
                "LEVEL_4"
              ],
              "type": "string"
            }
          },
          "required": [
            "severity"
          ],
          "type": "object"
        },
        "precaution": {
          "additionalProperties": false,
          "properties": {
            "label": {
              "type": "string"
            },
            "severity": {
              "enum": [
                "NO_ALERT",
                "INFO",
                "LEVEL_1",
                "LEVEL_2",
                "LEVEL_3",
                "LEVEL_4"
              ],
              "type": "string"
            }
          },
          "required": [
            "severity"
          ],
          "type": "object"
        },
        "procreation": {
          "additionalProperties": false,
          "properties": {
            "label": {
              "type": "string"
            },
            "severity": {
              "enum": [
                "NO_ALERT",
                "INFO",
                "LEVEL_1",
                "LEVEL_2",
                "LEVEL_3",
                "LEVEL_4"
              ],
              "type": "string"
            }
          },
          "required": [
            "severity"
          ],
          "type": "object"
        },
        "redundantInteractions": {
          "additionalProperties": false,
          "properties": {
            "label": {
              "type": "string"
            },
            "severity": {
              "enum": [
                "NO_ALERT",
                "INFO",
                "LEVEL_1",
                "LEVEL_2",
                "LEVEL_3",
                "LEVEL_4"
              ],
              "type": "string"
            }
          },
          "required": [
            "severity"
          ],
          "type": "object"
        }
      },
      "type": "object"
    },
    "unsecuredDrugs": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "vidalVersion": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "analyzedAt",
    "alerts",
    "alertCountsByType",
    "unsecuredDrugs"
  ],
  "type": "object"
}
```

## Related tools

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

- [`calculateRenalFunction`](https://kirha.com/providers/vidal/calculateRenalFunction.md)
- [`searchPatientTerms`](https://kirha.com/providers/vidal/searchPatientTerms.md)
- [`searchDrugs`](https://kirha.com/providers/vidal/searchDrugs.md)
- [`calculatePrescriptionCost`](https://kirha.com/providers/vidal/calculatePrescriptionCost.md)
- [`searchTherapeutics`](https://kirha.com/providers/vidal/searchTherapeutics.md)
- [`getDrugAllergies`](https://kirha.com/providers/vidal/getDrugAllergies.md)
- [`getPosologyDescriptors`](https://kirha.com/providers/vidal/getPosologyDescriptors.md)
- [`getDrugInteractions`](https://kirha.com/providers/vidal/getDrugInteractions.md)
- [`getCompanyPortfolio`](https://kirha.com/providers/vidal/getCompanyPortfolio.md)
- [`searchPrescribable`](https://kirha.com/providers/vidal/searchPrescribable.md)

-----

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