analyse applies a free-text clinical rule (an “équation type”) to one or
more patient health records, decides which health records match, and attaches a
knowledge-base-grounded recommendation with citations to each match.
Endpoint: POST /v1/analyse · MCP tool: analyse
It is synchronous (non-streamed) and powers punctual or scheduled reviews — a
scheduler simply calls the endpoint on a batch.
How it works
rule ──(compile)──▶ criteria
│
per health record ◀─────┘
├─ deterministic eval (medication present, age, lab staleness…)
└─ LLM judgment (therapeutic class, clinical interpretation)
│
match? ──▶ recommendation via the knowledge base (cited)
The evaluation is hybrid: criteria that map cleanly to a health record field are
checked deterministically; the rest are judged by the model. Health records are passed
inline — Locus stores nothing.
Request
{
"rule": "patient sous anticoagulant oral direct ET DFG non contrôlé depuis plus de 6 mois",
"records": [
{
"id": "patient-4815",
"age": 78,
"medications": ["apixaban 5mg x2/j"],
"recent_labs": [{ "name": "DFG", "value": "48 ml/min", "measured_at": "2024-11-30" }]
}
]
}
Response
{
"rule": "...",
"compiled_criteria": [
{ "id": "c1", "description": "sous AOD", "kind": "judgment" },
{ "id": "c2", "description": "DFG ancien > 6 mois", "kind": "structured",
"field": "lab", "op": "stale", "value": "DFG", "max_age_days": 180 }
],
"findings": [
{
"record_id": "patient-4815",
"matched": true,
"criteria": [
{ "criterion_id": "c1", "met": true, "basis": "judgment", "rationale": "apixaban est un AOD" },
{ "criterion_id": "c2", "met": true, "basis": "deterministic", "rationale": "lab DFG daté de 208 j > 180 j" }
],
"rationale": "...",
"recommendation": "Réévaluer la fonction rénale et adapter la posologie...",
"sources": [{ "reco_id": 412, "reco_title": "...", "source_name": "HAS", "deep_link": "..." }]
}
],
"metadata": { "records_scanned": 1, "matched_count": 1, "processing_ms": 1840 }
}
Latency scales with the number of health records (one judgment call and one
recommendation per match, run concurrently). Requests are bounded per call;
for large cohorts, batch across requests.
Run it live in the API Reference tab.