An always-on agentic layer over fragmented Caribbean healthcare. One immutable event ledger, two coordinating agent families, one human-reviewed queue. Agents wake on ledger events — they do not poll — and never decide; they flag, explain, and route to a clinician.
Every status change in a HelenisCare module lands on the append-only ledger. A database trigger wakes a dispatcher; a deterministic check runs first; the expensive model runs only when something is worth reasoning about.
Both families emit onto one ledger and land in one queue. Numbered because each is a genuine sequence a judge can watch end to end.
Deterministic → reasoning → human. Never blocks, never prescribes.
prescription.issued lands on the ledger.medication_flag obligation appears with rationale; the pharmacist clears or escalates.On the real referral + federation substrate. The "front door."
referral.stalled.referral_escalation obligation in the same queue.The order is non-negotiable and it is the pitch: an authoritative dataset decides what is true, the model only interprets, and a human always owns the decision. Framed the way the founder thinks — in accounting terms.
It reads widely for context and writes narrowly — only ever the ledger, obligations, follow-up messages, and human-confirmed referral status. It never mutates a clinical record directly.
| Module | Wakes agent on | Agent reads | Agent writes |
|---|---|---|---|
| Referrals / FederationReferrals.jsx · referrals broker · hub | referral.* | status, timeline, chain, pathways, vitals snapshot | stalled event, follow-up, escalation obligation; status via broker (human-confirmed) |
| Pharmacy / Prescriptionsmedications · drug_catalogue · dispensing_log | prescription.issued | patient meds, active diagnoses, age | medication_flag obligation + rationale |
| Triagetriage_records | — | latest vitals for context | read-only |
| Patientspatients · diagnoses | — | demographics, active conditions | read-only |
| Outpatient / Labsoutpatient · lab_results | — | recent results for reasoning context | read-only |
| Auditaudit_log · logAudit · agent_runs | — | — | every agent turn + tool call (telemetry) |
| Review Queuenew HIS surface · reuses referral-inbox pattern | — | open obligations | human decisions → ledger events |
| Existing CDSdifferential-dx | — | — | pattern reused, not a runtime dependency |
The rubric rewards systems that are efficient by design. Two mechanisms keep model calls rare and deliberate.
A database trigger fires pg_net the instant an event lands. No cron
loops scanning the whole table on a schedule.
The authoritative check runs first, cheaply. The expensive model is invoked only when there is genuinely something worth reasoning about.
Live build status for the Agentic Care Coordination Layer sprint. Rendered from tasks.json — updated as work lands.
Loading tasks…