FC Buildathon · HelenisCare · status
Future Caribbean · Healthcare Systems & Delivery

The Agentic Care
Coordination Layer

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.

1 event ledger 2 agent families 1 review queue human-in-the-loop wake-on-event · no polling
Provenance: Konte proved the immutable double-entry ledger in production accounting. HelenisCare proved the clinical domain — a working HIS with referrals, pharmacy, an append-only audit spine and a live decision-support feature. This layer is the fresh agentic work that unifies them.
Core information flow

How an event becomes a reviewed decision

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.

Agentic system / ledger Deterministic check / flag Human-in-the-loop / cleared Escalation
HelenisCare modules · event sources
Referrals+ federation hub
Pharmacyprescriptions
Triagevitals context
Consultationsdiagnoses
Laboratoryresults
emit status-changing events
Care event ledger
Append-only · rules block UPDATE / DELETE
The source of truth. Obligations and their resolutions are themselves recorded as events.
referral.created referral.missed referral.stalled prescription.issued prescription.filled obligation.raised obligation.cleared obligation.escalated
AFTER INSERT trigger → pg_net · fire-and-forget
Dispatcher + deterministic pre-filter
Check before you reason
Referral: timeline / stall evaluation.  Prescription: normalize drug name to RxNorm, check the authoritative interaction dataset. The LLM is never the interaction authority.
only flagged events proceed to reasoning
Agent family · backbone
Referral coordination
Monitor stalled states · chase next steps over WhatsApp · escalate. Built on the real referral + federation substrate.
Agent family · flagship
Medication safety
Interpret the deterministic finding in patient context — age, conditions, duplicate therapy, severity — and draft a plain-language explanation.
both call the shared model gateway · raise an attributed obligation
Review queue · human-in-the-loop
Attributed obligation, awaiting a human
Every obligation carries the agent's rationale, its severity, and the deterministic findings behind it. A pharmacist or clinician clears or escalates.
clears / escalates
Decision
Recorded as a ledger event ↺
The human's decision loops back onto the ledger — a closed, fully attributed audit trail.
Outbound · Twilio
WhatsApp follow-up
The coordination channel of Caribbean healthcare — sent to the patient or the referring clinician.
Cross-cutting rails Model gateway — Impala / Claude, one interface Audit — agent_runs + audit_log Twilio — WhatsApp channel
Two end-to-end flows

The same spine, two obligations

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.

Flagship Medication safety

Deterministic → reasoning → human. Never blocks, never prescribes.

  1. 1
    Prescription issued
    A clinician prescribes; prescription.issued lands on the ledger.
  2. 2
    Deterministic check
    Drug name → RxNorm → interaction dataset. A real interaction is found.
  3. 3
    Contextual reasoning
    The agent explains the finding for this patient — age, conditions, timing, severity.
  4. 4
    Pharmacist reviews
    A medication_flag obligation appears with rationale; the pharmacist clears or escalates.
  5. 5
    Decision on the ledger
    The clearance/escalation is recorded as an event — closed loop.

Backbone Referral coordination

On the real referral + federation substrate. The "front door."

  1. 1
    Referral created
    A referral is raised across the network; the ledger records the chain.
  2. 2
    Timeline watch
    The monitor sees no next step past the expected window → referral.stalled.
  3. 3
    WhatsApp follow-up
    The follow-up agent chases the next step over Twilio WhatsApp.
  4. 4
    Escalation raised
    Threshold trips → a referral_escalation obligation in the same queue.
  5. 5
    Clinician resolves
    A human acts; the decision is recorded — the patient no longer falls through the cracks.
The safety model

Three layers, one fixed order

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.

Layer 1
Deterministic
"the chart of accounts"
The authoritative checking core
Drug names normalize to RxNorm; interactions check against an authoritative reference dataset (DDInter / OpenFDA). The LLM is never the source of truth.
Layer 2
Reasoning
"the accountant"
The agent interprets in context
Only when the deterministic layer flags: the model ranks severity, spots duplicate therapy, and drafts a plain-language explanation. The expensive model never runs on every prescription.
Layer 3
Human
"the decision"
A clinician clears or escalates
The agent flags and explains — it never blocks, prescribes, or diagnoses. The human decision is itself a ledger event. Positioning everywhere: clinical decision support.
Module interaction

How the agentic layer touches HelenisCare

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.

ModuleWakes agent onAgent readsAgent 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 rule: reads widely, writes narrowly. The clinical record stays under human control; the agentic layer only ever appends to the ledger, raises obligations, sends follow-ups, and applies human-confirmed referral status.
Why it is efficient

Thoughtful, not compute-heavy

The rubric rewards systems that are efficient by design. Two mechanisms keep model calls rare and deliberate.

01 Wake on events, don't poll

A database trigger fires pg_net the instant an event lands. No cron loops scanning the whole table on a schedule.

before HelenisCare polls daily via pg_cron now agents wake the moment an event is written
02 Deterministic pre-filter

The authoritative check runs first, cheaply. The expensive model is invoked only when there is genuinely something worth reasoning about.

naive model on every prescription here model only on a flagged interaction