Transcript
Tool calls and call result
Supported flows
| Patient says | Agent does | cause_of_noncompliance | Medplum |
|---|---|---|---|
| Forgot, busy, missed the time | Acknowledges warmly | FORGOT | — |
| Side effect (headache, burning…) | Records it for the doctor, no advice, follow the prescription | SIDE_EFFECT | escalation (low) |
| Eye pain, vision loss, red painful eye | No advice; 911 / ER if urgent | SIDE_EFFECT or UNKNOWN | escalation (high) |
| Ran out, no refill | Tells them the team will help | LACK_OF_STOCK | escalation (low) |
| "I don't know", unclear | Asks once more, then accepts | UNKNOWN | — |
| Wants a person | Says someone will contact them, carries on | (as above) | escalation (low) |
| Off topic, asks for advice | Stays in role, sends them to doctor/pharmacist | (as above) | — |
| any call | Says goodbye and hangs up | JSON with call_status, cause, user_details, latency and cost → S3 | |
The flow lives in the prompt, so nothing forces the model through it: check the tool calls on every test.
Diagram
loading…
System prompt (prompts/medication_reminder.md)
Tools the model can call
The model never sees the patient id: the server adds it to every call from the login session.