context is answer plus a coarse patient profile. It contextualizes the
answer and surfaces conflicts between the recommendations and the patient —
allergies, interactions with current treatments, pregnancy, age.
Endpoint: POST /v1/context · MCP tool: context
The pseudo-context boundary
The patient profile is deliberately coarse. This is a pre-MDR boundary: the
patient_context contract intentionally does not go more granular. It is a
parameter of this capability, not a separate route.
| Field | Type |
|---|
sex | string |
age | int |
history | string[] |
active_problems | string[] |
allergies | string[] |
current_treatments | string[] |
Request
{
"query": "Quelle antibiothérapie pour cette infection urinaire ?",
"patient_context": {
"sex": "F",
"age": 34,
"active_problems": ["grossesse 24 SA"],
"allergies": ["pénicilline"],
"current_treatments": ["warfarine"]
}
}
Response
Same shape as answer, plus a conflicts array:
{
"answer": "...",
"sources": [{ "reco_id": 900, "reco_title": "...", "source_name": "HAS", "deep_link": "..." }],
"conflicts": [
{
"description": "La molécule recommandée est contre-indiquée pendant la grossesse",
"patient_factor": "grossesse 24 SA",
"reco_id": 900
}
]
}
Example worth knowing: a PSA-screening recommendation that conflicts with a
patient’s active context is surfaced in conflicts rather than buried in prose.
Run it live in the API Reference tab.