Ovasight API Documentation
What Ovasight Does
Ovasight performs explainable discharge safety checks by analysing discharge text, prescriptions, and allergies, returning structured safety issues with evidence and suggested actions.
The system is designed to catch common, high-risk discharge errors while minimising alert noise and preserving auditability.
API Overview
Endpoint
POST /safety-check/discharge
Description
Runs discharge safety checks and returns detected safety issues.
Request Schema
{
"discharge_text": "string",
"prescriptions": [
{
"drug": "string",
"dose": 500,
"unit": "mg",
"route": "PO",
"frequency": "BD"
}
],
"allergies": [
{ "substance": "penicillin" }
]
}
Notes
dose,unit,route, andfrequencyare optional- Missing or incomplete fields may trigger safety issues
- Do not submit patient-identifiable information
Response Schema
{
"issues": [
{
"issue_type": "TEXT_CONTRADICTION_STOP",
"severity": "HIGH",
"drug": "metformin",
"evidence": "Discharge text indicates metformin should be stopped.",
"explanation": "Text–prescription contradiction for a high-risk medication.",
"suggested_action": "Confirm intent and update the medication list.",
"risk_score": 0.90,
"snippet": "Metformin was stopped due to AKI",
"start_offset": 0,
"end_offset": 32
}
]
}
Rule Catalogue (v0.1)
TEXT_CONTRADICTION_STOP
Severity: HIGH
Detects when discharge text indicates a medication should be stopped or discontinued but it remains prescribed.
ALLERGY_CONFLICT_DIRECT
Severity: HIGH
Detects a direct match between a documented allergy and a prescribed drug.
ALLERGY_CONFLICT_CLASS
Severity: HIGH
Detects prescriptions that belong to an allergic drug class.
TEXT_MENTIONED_NOT_PRESCRIBED
Severity: MEDIUM
Detects medications mentioned in discharge text that do not appear in the prescription list.
DUPLICATE_THERAPY
Severity: HIGH
Detects multiple medications from the same therapeutic group prescribed simultaneously.
DOSAGE_INCOMPLETE_HIGH_RISK
Severity: MEDIUM–HIGH
Detects high-risk medications missing dose, unit, or frequency information.
Severity and Risk Scoring
- Severity reflects potential clinical impact.
- Risk score is a normalised confidence score between 0 and 1.
- Scores are rule-aware and designed for prioritisation, not diagnosis.
Demo Limits
The public demo enforces the following limits:
- Maximum discharge text length
- Maximum number of prescriptions
- Maximum number of allergies
- Rate limiting applied
These limits exist to ensure fair use and safe evaluation.
Disclaimer
- Evaluation tool only.
- Not medical advice.
- Do not submit patient-identifiable data.