Patient refill requests in Zendesk routed to prescribers with the Healthie chart
Matches a patient's emailed or web form refill request to their Healthie chart, adds the medication list and visits to the ticket, and books a visit request when the prescriber asks for one.
The prompt
When a new ticket comes into Zendesk, skip the ones our pharmacy fax and referral flows open. Read the rest, and if a patient or someone writing for them is asking for a prescription refill, note the patient's name, date of birth, the medications they want refilled and any pharmacy they name. Look for the patient in Healthie by name and date of birth. If exactly one chart matches, add an internal note to the ticket with a link to the chart, the medication list, any requested medication that isn't on it, and the last and next visits, then route the ticket to our prescriber group. If no chart matches exactly, or more than one does, or they gave no birth date, tag the ticket for a chart check and add a note listing the charts that might be the patient, so a person sorts it out. Then watch the routed ticket. If a prescriber tags it visit_needed, add an appointment request in Healthie and reply to the patient that their prescriber needs to see them first and our scheduling team will contact them. Don't tell the patient anything else. If the ticket is solved without that tag, do nothing. Stop watching after 14 days and leave a note.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Inside the loop: Until the prescriber decides
Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works
What each step does
- New ticket Starts when Zendesk opens a ticket, from an email, your web form or any other channel. Tickets that the pharmacy fax and referral intake flows open are skipped.
- Read the request An AI agent decides whether the patient, or someone writing for them, is asking for a refill, and notes the patient's name and birth date, the medications and any pharmacy named. It gives no advice and makes no judgment on the refill. Anything else ends the run.
- Find the patient's chart Searches Healthie on name and birth date, then on last name and on first name with the birth date, to catch a chart that looks like the same patient. Only one chart with the same name and birth date counts as a match.
- Ask a person to pick the chart A near, double or missing match, or a request with no birth date, is tagged chart_check with an internal note listing the charts that might be the patient. A person finds the right chart and routes the ticket by hand.
- Route to the prescribers On an exact match, the medication list and the last and next visits are read from Healthie. The ticket moves to your prescriber group, and an internal note gives the chart link, the medications on the chart, any requested medication not on it and the visits.
- Until the prescriber decides Checks the ticket every 15 minutes for up to 14 days. A prescriber renews through e-prescribing and answers the patient as usual, or adds the tag visit_needed. A ticket still open after 14 days gets a note saying the flow stopped watching.
- Request a visit in Healthie When the ticket is tagged visit_needed, adds an appointment request in Healthie with the reason and the ticket number. Then a public reply tells the patient a visit comes first and the scheduling team will contact them, and nothing more.
Before you turn it on
This flow assumes every service in it, FlowRunner included, has signed a business associate agreement (BAA) with you. Its messages to your staff include the patient details they need to decide.
- Enter your Healthie API key, and your Zendesk subdomain, agent email and API token.
- Add your Anthropic key in the flow setting Anthropic key, and set Practice time zone for patients whose chart has none.
- Pick your prescriber group in Route to the prescribers.
- Create a Zendesk macro for prescribers that adds the tag visit_needed. A ticket solved without it ends the flow quietly.