1. Every report and prescription in one timeline, ready for the next visit
The prescriptions are in a plastic folder in date-ish order. The lab reports are photographs somewhere between a birthday and a holiday. At the next appointment the doctor asks 'what was your HbA1c in March?' and you scroll through eight months of gallery while everyone waits, or you say 'I'll bring it next time' and the visit achieves less than it should have.
Trigger: WhatsApp (photograph a report or prescription) / Email (lab sends a PDF)
How the workflow runs
- Trigger
Send it the moment you get it. A WhatsApp trigger for photographs and an Email trigger for the PDFs labs mail out. Filing happens at the counter, not later — which is the only time it ever actually happens.
- Agent
Transcribe, don't interpret. An Agent node extracts what is printed: test name, value, unit, the lab's own reference range, date, doctor, and for a prescription the drug names and the schedule AS WRITTEN. It transcribes; it does not say whether a number is good or bad.
- Knowledge
Your own health file. A Knowledge node keeps it in your tenant, per family member — this is your records, not a shared health database.
- Tool (MCP)
How old is this reading?. A user-defined SpEL tool labels each entry by age so 'the most recent one' is a fact rather than a memory. It computes a bucket from the input JSON — a formula, nothing else.
- Loop
Build the timeline. A Loop node walks the filed entries for a chosen test and lays out the values in date order — the same numbers the reports carry, side by side, so a doctor can see the sequence at a glance.
- Agent
Prepare, never conclude. A second Agent node writes a one-page visit sheet: current medicines as prescribed, the timeline of the values, and questions worth asking. It never adds an assessment, a trend judgement, or a suggestion.
- Approval
Sharing is your decision. An Approval node gates sending anything to a doctor, a relative, or an insurer — health records don't leave your tenant on the agent's initiative.
- Output
One page you can hand over. An Output node produces the sheet on WhatsApp or Email, in the language you want, ready to hand to the doctor or read on the way in.
Channels & connectors
- Knowledge base
- Approval / HITL
- Sarvam (Indian languages)
- Tool (MCP → a lab or hospital portal, if yours has one)
Outcome
One dated, per-person health timeline built from the reports you already receive, and a one-page visit sheet that turns a scattered folder into a doctor's ten useful minutes.
Why it helps
The mechanism is transcription plus ordering — nothing more, deliberately. The reason a visit underdelivers is that the doctor's questions are about sequence ('has it moved since March?') and your evidence is unordered. Putting the same printed numbers in date order answers that without anyone, human or model, interpreting them.
Build spec
2 agents — 1 transcription agent per report + 1 visit-sheet composer per appointment. No agent ever evaluates a value; the timeline is assembled by a Loop node over filed records. · Pattern: Transcribe-on-arrival → assemble-on-demand, with interpretation excluded by design
System prompt (paste-ready)
(Transcription) You transcribe medical documents for a patient's personal records. Return strict JSON {doc_type (LAB_REPORT|PRESCRIPTION|DISCHARGE|SCAN_REPORT), patient, date, doctor, facility, tests[{name, value, unit, reference_range_as_printed}], medicines[{name_as_written, strength, schedule_as_written, duration}], notes_as_written}. Transcribe EXACTLY what is printed, including the lab's own reference range verbatim. You must NOT say whether a value is normal, high, low, safe, concerning or improved. You must NOT name a condition, suggest a diagnosis, or comment on any medicine or dose. If a field is unreadable, return null and set needs_check=true naming the field — never guess a value, a strength or a schedule. If the document seems to describe an emergency, do not assess it: flag escalate=true so the workflow tells the person to contact their doctor or emergency services.Agent roles & model tiers
Transcriber (per document) — Economy tier — pure structured extraction, and it runs on every report and prescription the family receives
Transcribe exactly what is printed into strict JSON, reference ranges verbatim. No interpretation of any kind. Unreadable fields are null + needs_check, never guessed.
Visit-sheet composer (per appointment) — Standard tier — runs once before a visit; this is where care with wording matters most
Assemble a one-page visit sheet: current medicines exactly as prescribed, the requested test values in date order with the printed reference ranges, and questions the patient may want to ask the doctor. Add NO assessment, NO trend judgement, NO suggestion. Questions must be neutral and open ('what does this trend mean for me?'), never leading ('should my dose be increased?'). End with a line stating that this sheet is a record for the doctor and is not medical advice.
MCP connectors
- Your lab's or hospital's portal, if it has one — via a Tool (MCP) node (no first-party connector); read-only and initiated by you
- WhatsApp / Email — how reports arrive and how the sheet comes back
Built-in tools
- user-defined tool `report_recency` (SpEL): input.daysSinceTest <= 30 ? 'RECENT' : (input.daysSinceTest <= 180 ? 'THIS_HALF' : 'OLDER') — your own definition of what counts as a current reading, so the visit sheet leads with the right one; it is a formula over the input JSON with no method calls and no loops
- knowledge_search (your own filed reports and prescriptions, per family member)
- send_email (the visit sheet to yourself, so it exists outside chat when the phone dies in the waiting room)
Guardrails
- MEDICAL SAFETY, absolute: the agent NEVER diagnoses, NEVER names a condition, NEVER calls a value normal/abnormal/safe/concerning, and NEVER advises on, changes or comments on any medicine or dose. It transcribes, orders, translates and prepares questions — nothing else
- Reference ranges are reproduced verbatim from the lab's own report and are never compared against by the agent — the comparison is the doctor's, not the model's
- Anything suggesting an emergency sets escalate=true and the workflow responds with 'contact your doctor or emergency services now', with no assessment of severity attached
- Unreadable values, strengths and schedules are returned null with needs_check — a guessed dose is the single most dangerous output this workflow could produce, so it is structurally excluded
- PRIVACY: health records stay in your own tenant, filed per family member. Nothing goes to a doctor, relative, employer or insurer without passing the Approval node
- The visit sheet carries an explicit line stating it is a personal record for the doctor, not medical advice
Cost strategy
The transcriber runs on every incoming report, so it belongs on the economy tier with a hard token cap — it is doing structured extraction, not reasoning, and a cheaper model is genuinely the right tool. The composer runs once before an appointment: standard tier, and worth it, because careful non-interpretive wording is exactly what smaller models drift away from. Configure a fallback model on the transcriber so filing never silently stops; the timeline itself is assembled by a Loop node over stored records, which costs nothing per read.
Output & delivery
Each report or prescription is transcribed verbatim into your per-person Knowledge base; the `report_recency` SpEL tool marks how current each reading is; a Loop node lays the requested values out in date order with their printed reference ranges; the composer produces a one-page visit sheet — medicines as prescribed, the timeline, and neutral questions for the doctor — delivered on WhatsApp or Email in your language, with any sharing beyond you gated by the Approval node.