Skip to content
ELXR

ELXR

An agentic clinical operating system for Indian OP

Created on 8th August 2026

•

ELXR

ELXR

An agentic clinical operating system for Indian OP

What is the problem your project solves?

A physician in a public or private OPD sees 100–300 patients per shift, at 1–2 minutes each. The overwhelming majority of those consultations end in a handwritten slip the patient carries home and eventually loses. The overwhelming majority of Indian health records and prescriptions are never digitised at all — no structured diagnosis, no coded medication history, nothing that survives to the next visit or transfers to another clinic.

The obvious fix makes the immediate problem worse. Conventional EMR software turns a 90-second consultation into a data-entry session: click through a diagnosis picker, type the drug name, select frequency from a dropdown, fill mandatory vendor fields. Studies of physician time have found roughly two hours on electronic records and desk work per hour of direct patient care (US data — Sinsky et al., Annals of Internal Medicine, 2016). Transplant that overhead into a clinic running at three minutes per patient and it does not fit. So it doesn't get used, or it gets used badly — records filled in at the end of the day from memory.

Doctors are choosing paper rationally. Paper is fast and invisible; EMR is visible and slow. The system that captures the data costs the thing the clinic has least of.

And it collapses entirely when the clinic is short-staffed, which is the normal case. The administrative work an OPD generates does not disappear when there is nobody to do it. Queue management, stock reconciliation, billing and follow-up calls are the first things dropped. Drugs run out because nobody checked the register. Patients wait hours because nobody re-sorted the queue when a chest-pain case walked in. Nobody is reminded to come back, so a treatable condition returns as an emergency.

The record-keeping problem and the operations problem are the same problem: there are not enough people, and every existing tool asks for more of their time, not less.

How you are solving it?

The core idea
ELXR is not a dictation app. The transcript is an input, not the product.

A doctor speaks one sentence of Hinglish. The clinic then operates itself around it: a structured SOAP note is generated, ICD-11 codes are resolved from the live WHO index, pharmacy stock is checked and reserved, an itemised bill is produced, the queue advances to the next patient, a FHIR R4 bundle is emitted, and a follow-up SMS is drafted in the patient's own language. The doctor hears a six-second spoken confirmation and moves on.

Two consequences follow directly from the problem:

Digitisation becomes a byproduct, not a task. The doctor was going to speak to the patient anyway. Nothing is added to the consultation — no typing, no dropdown, no extra minute. This is the only way the digitisation gap closes: not by asking overworked physicians for more time, but for none.

Agents absorb the work that understaffing drops. In most clinics, nobody is doing the queue triage, stock reconciliation or follow-up calls. These agents are not assisting a person doing that work — there is no such person.

What was built
Seven Claude agents in three modes, which is the architectural point:

Reactive (doctor speaks, they run): orchestrator running a tool loop over the OPD modules, plus soapAgent, rxAgent and icdAgent doing parallel structured extraction.
Autonomous (the clock triggers them, nobody is in the room): queue-supervisor re-triages, flags no-shows and rebalances patients across doctors; pharmacy-supervisor reviews stock and raises purchase-order drafts.
Human-gated: follow-up drafts a patient reminder in the consultation's language and cannot send it.
Also built: a native SwiftUI iOS client (live WebSocket, AAC capture, raw PCM playback), a kiosk registration and OPD console, deterministic queue / inventory / billing modules, a FHIR R4 adapter, CSV export, and 40 tests.

The engineering that matters: what agents are not allowed to do
Models never touch arithmetic. Billing, stock and queue positions are plain deterministic TypeScript. When consultation_fee was briefly exposed as a tool parameter, the model invented ₹500 against a configured ₹200. It came straight back out of the tool surface.
The bill refuses to charge for undispensed drugs. Found by testing an out-of-stock scenario: the patient was being billed ₹66 for Azithromycin that never left the shelf.
The pharmacy agent cannot buy anything. It raises DRAFT purchase orders. An unattended agent with spending authority can empty a clinic's account on a bad inference.
The follow-up agent cannot send. There is no send() function in the module — not disabled, absent. A model writing to a patient's phone with no clinician in between is the one action here that could cause direct harm.
ICD codes are never generated by a model. The agent proposes a search term; the WHO ICD-11 API returns the code. A hallucinated ICD code is well-formatted, plausible, and invisible on review.
The kiosk never self-triages. A patient typing "I think I'm having a heart attack" is anxiety, not triage. Escalation is the supervisor's call.
Every autonomous action is logged with its reasoning and shown on the console.
India-first specifics
Hinglish is preserved verbatim — the STT prompt is pinned against translation, so pet dukhna survives into the audit record and Claude does the clinical interpretation downstream. Dosing shorthand is decoded as actually spoken (teen baar, subah shaam, khali pet → TDS, BD, on empty stomach). Phone number is the patient identity, because an OPD walk-in rarely has anything else, and a returning patient keeps one ID with an incrementing visit count. ABHA numbers are captured and validated. FHIR R4 output means any ABDM-linked PHR can consume it.

Verified, not claimed
A live run: Hinglish audio in → verbatim transcript → SOAP note → four real WHO ICD-11 codes (DA42.Z, DA61, MG26, MD81.4) → stock decremented → ₹253 itemised bill → queue advanced → FHIR bundle with 10 resources → spoken Hinglish confirmation. ~20 seconds end to end.

The queue supervisor, unprompted, escalated a chest-pain patient to EMERGENCY and caught that a cough patient had been assigned to Cardiology purely on load — a speciality mismatch a deterministic rule would have needed a complaint-to-speciality mapping table, in Hinglish, to catch.

How Did You Use Claude?

Claude is used two ways here: as the product's reasoning engine, and as the development environment.

  1. As the runtime — seven agents, all Claude Sonnet 5
    Every agent in ELXR is Claude, via the Anthropic SDK with native tool use.

Structured extraction via forced tool calls. soapAgent, rxAgent and icdAgent each use tool_choice: {type: "tool"} to force emission against a JSON Schema projected from Zod, then validate the result with Zod again (because the JSON Schema projection is lossy for refinements and defaults). Asking for "JSON in the response text" fails often enough to lose a demo.

A genuine tool loop for operations. The orchestrator gets three tools (check_inventory, generate_bill, update_queue_status) and decides which a given consultation warrants. It infers things nobody told it: REFERRED rather than COMPLETED when the plan sends a patient onward, and skipping check_inventory entirely when nothing was prescribed. Tool errors are handed back to the model as is_error results so it can adapt instead of crashing.

Unattended agents with narrow powers. The queue and pharmacy supervisors run on a timer with no human present. Their tool surfaces are deliberately small, they cannot touch money or dispensing, and each action is logged with the model's own stated reasoning.

Deliberate parallelism. SOAP and Rx have no interdependency, and ICD coding shares no inputs with the OPD tools, so those run concurrently. That plus batching the orchestrator's three tool calls into one turn took a consultation from 40s to ~20s.

Prompt engineering as a safety boundary. The orchestrator is capped at 12 words of spoken output and told to write "rupees 253" so TTS pronounces it. The follow-up agent is forbidden from adding any clinical content the doctor did not say. The queue supervisor is told explicitly that "doing nothing is the correct and common outcome."

  1. As the build environment — Claude Code
    The entire project was built in Claude Code over the hackathon, and it found real bugs by running the system rather than reading it:

zod-to-json-schema's openApi3 target emits exclusiveMinimum as a boolean, which the Anthropic API rejects (it requires JSON Schema 2020-12, where that keyword is a number). The existing tools only passed because none had a numeric constraint.
Bun.serve defaults to a 10-second idle timeout, so a supervisor run completed server-side while the client received nothing.
Maya's TTS returns audio/L16 that is actually little-endian, despite RFC 2586 specifying big-endian — decoding by the spec produces static.
Taking submission screenshots revealed that the escalated EMERGENCY patient showed as plain "Waiting" on the doctor's phone, because the iOS model lacked the triage field.

Used Claude Code to build the whole project:

image

What is the deployed URL for this project?

https://github.com/elviric/elxr-push2prod

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion

Builders also viewed

See more projects on Devfolio