Skip to main content

Diagnostics · Report notifications

WorkflowDiagnostic labs

Telling patients their lab report is ready, without putting results in a message

Labs take calls all day from patients asking if their report is ready. This architecture sends one message when the lab releases a report, with a link to the lab’s own portal, no results and a button that puts a person on the phone.

Valnora & Elric team6 min read

The lab system signals a released report. A workflow checks consent and the lab’s hold flag, sends a WhatsApp template with a portal link and no results, and logs it. Call-back requests go to a staff queue with a monitor on its age.

A patient gives a blood sample on Monday morning. By Tuesday they have called twice to ask whether the report is ready, and the front desk has looked it up twice. Multiply that by every patient across every branch and a large part of the day goes on one question.

The fix is to tell patients when the report is ready. The design rule is just as important: the message says the report is ready and where to read it, and nothing else. This post shows the architecture for a diagnostic lab in Agent Serve. Names and figures are illustrative.

From a released report to a patient notified and a call-back queued

Workflow 1 · Report released

  1. 01Lab information systemReached through the API block with a key stored as a workspace secret. No lab or EHR integration ships.
  2. 02Webhook or scheduleA Webhook trigger if the lab system can push release events, or a 15-minute schedule that pulls them.
  3. 03Consent and hold checksSkips patients without messaging consent and reports the lab has marked for personal communication.
  4. 04Report-ready messageApproved WhatsApp template with a portal link button and a call-back button, or a Twilio SMS.
  5. 05Notifications tableOrder reference, channel, sent time and delivery status. No result values, ever.

Workflow 2 · Replies and call-backs

  1. 06Patient replyThe WhatsApp webhook trigger or the Twilio SMS-received trigger.
  2. 07Call-back queueEvery call-back request and every free-text reply, with the time it arrived.
  3. 08Lab staff call backStaff answer questions about the report or refer the patient to their doctor.

Dashboard · Operations

  1. 09Notifications dashboardReports released, messages sent and delivered, open call-backs by branch.
  2. 10Call-back age monitorAlerts the duty lead when any call-back has waited longer than the agreed time.

Three choices keep results out of messages:

  • The workflow never asks for results. The API call to the lab system requests release status, order reference, branch, patient first name, phone, consent and the hold flag. Result values never enter the run, so they cannot leak into a message, a log or a table.
  • The message names no test. "Your report for order LB-48213 is ready" says enough. A test name alone can reveal a condition to anyone who sees the phone.
  • The portal does the identity check. The link opens the lab’s own patient portal, where the patient verifies their identity before the report opens. Agent Serve does not host reports.

Workflow 1: from release to message

No lab or EHR integration ships with Agent Serve, so the lab information system is reached through the generic API block, with its key stored as a workspace secret.

  1. Trigger. If the lab system can send an event when a report is released after sign-off, point it at a workflow Webhook trigger. If not, a Schedule trigger runs every 15 minutes and the API block pulls reports released since the last run. Either way, the workflow only acts on reports the lab has already released.
  2. Checks. A Condition block skips patients without messaging consent and any report carrying the lab’s hold flag. Held reports go straight to the staff queue, so a person decides how the patient hears.
  3. Send. WhatsApp patients get an approved template through Send Template, with a link button to the portal and a quick-reply button to request a call back. SMS-only patients get a Twilio text with the portal link and "reply CALL for a call back".
  4. Record. A row goes into a notifications table in Tables: order reference, branch, channel and sent time. Delivery statuses from WhatsApp and the Twilio SMS status trigger update it later. Failed deliveries land in the staff queue for a phone call.

Workflow 2: every call-back goes to a person

What the solution produces

Report-ready WhatsApp message (illustrative)

Message

Hello Meera, your report for order LB-48213 from Northside Diagnostics is ready.

View it securely on our patient portal. You will be asked to verify your details before it opens.

[View report] [Request a call back]

Approved WhatsApp template · no test names or results

Call-back queue entry (illustrative)

Record
Order
LB-48213 · Northside branch
Request
Call-back button pressed at 11:42
Patient wrote
Can someone explain one of the values to me
Holding reply sent
A member of our team will call you between 9:00 and 18:00.
Owner
Duty patient-care executive, Northside
Not done
No result was read, interpreted or sent by the workflow.
Call-back queue · waiting for staff

A second workflow starts on the WhatsApp webhook trigger and the Twilio SMS-received trigger. It does one thing with every reply, whether it is the call-back button or free text such as "is this value high": it writes the request to a call-back queue table and sends a holding reply with the hours staff will call.

It does not interpret the report or answer questions about it. Staff call the patient back, explain what the lab is able to explain and refer them to their doctor for anything clinical. The queue row records who called and when.

The dashboard and the monitor

A dashboard on the two tables shows reports released, messages sent and delivered, failed deliveries and open call-backs by branch. Because the workflows write rows as events happen, the panels update as rows land.

A monitor re-checks the queue as often as every 5 minutes and alerts the duty lead by email, in the app or in Slack when a call-back has waited longer than the time you agreed, such as four working hours. A second monitor watches failed deliveries per branch, which often points to a wrong number captured at registration.

Records and access

Controls and governance

Run logs

Every workflow run records each block’s inputs, outputs and errors, so a reviewer can trace how a result was reached.

PII detection

A Guardrails block detects personal data and blocks or masks it before text reaches the next step.

Deployed versions

Workflows run from a deployed version, so a change is reviewed before it reaches production runs.

Row-level access

Row-level policies narrow what each person sees in tables, dashboards, exports and scheduled reports.

Self-hosting

Run Agent Serve in your own cloud or data centre, next to the systems it reads.

Roles and permission groups

Admin, write and read roles per workspace, plus permission groups that limit which models, blocks and integrations a team can use.

More on how Agent Serve handles access, data and audit on the security page.

Every run is in Logs, block by block, which answers "did we message this patient, and when" in one search. PII redaction in Settings → Data retention masks phone numbers and names in logs and block outputs. Row-level access keeps each branch to its own queue. Labs that need patient data to stay on their own infrastructure can run Agent Serve self-hosted. Agent Serve makes no compliance certification claims, so confirm the health-data and messaging rules where you operate with your counsel.

Rolling it out

Start with one branch and routine reports while the front desk keeps answering calls. Check a week of notifications against the lab system: every released report should have one message or one skip reason, and no held report should have a message. Then add branches, and review the call-back queue each week to see which questions patients ask most. Those questions often belong on the portal page itself.

Questions teams ask

Could the message include normal results to save the patient a step?

Not in this design. The workflow never requests result values from the lab system, so it cannot send them. Even a test name can reveal a condition, so the message names the lab and an order reference only.

What if a report needs a doctor or counsellor to speak to the patient first?

The lab marks it in its own system, as it does today. The workflow reads that hold flag, sends nothing and adds the order to the staff queue. Lab staff decide when and how the patient hears.

Does Agent Serve integrate with our lab software?

No lab or EHR integration ships. If your lab system has an API, the generic API block calls it with the key stored as a workspace secret. Without an API, this design does not fit.

Before you start

What you need

  • A lab information system with an API or webhooks that expose report release status
  • A secure patient portal where patients verify their identity before a report opens
  • Messaging consent per patient and channel, captured at registration
  • A WhatsApp Business account with an approved template that has a link button and a call-back button
  • A Twilio number for SMS fallback
  • The lab’s hold flag for reports that need personal communication, set by lab staff
  • Named staff and hours for call-backs, and an agreed maximum wait

Written by the Valnora & Elric team.

Figures, dashboards and sample outputs in this article are illustrative examples, not customer results. This article is for information only and isn't legal or regulatory advice.

Enterprise access

Put AI agents to work across your team

Agent Serve is available to teams by invitation. Tell us what you want to build and we will set up your workspace with you.