FlowRunner
Features Pricing
Theme
Start Free

Pharmacy refill and clarification faxes answered from a Zendesk ticket

Holds each pharmacy refill or clarification fax in a Zendesk ticket with the Healthie chart, then faxes the prescriber's own answer back. Controlled substances are never faxed.

The prompt

When a fax comes in on our Documo line, read it. If it's a pharmacy asking to refill a prescription or asking a question about one, copy what it says: the patient's name and date of birth, the drug, strength, quantity, days supply, directions, refills, the pharmacy and its reply fax number, the prescriber and their NPI, any controlled substance schedule printed on it, and the pharmacy's question with the options it offered. Look for the patient in Healthie by name and date of birth, and find the prescriber in Healthie by NPI or name. Open an internal ticket in our Zendesk prescriptions group, assigned to that prescriber, with the fax attached and the request written out. If exactly one chart matches, add a link to it with the medication list and the last and next visits. If not, list the charts that might be the patient so a person checks. If the fax prints a schedule, mark the ticket as a controlled substance and never fax an answer, because the prescriber answers through e-prescribing. Otherwise, when the prescriber solves the ticket with an internal note that starts with Fax reply:, fax exactly what they wrote back to the number the request came from, in their name with their NPI. Only fax an answer from the prescriber the ticket was assigned to, and only if they have an NPI in Healthie. If the prescriber can't be found in Healthie, add an internal note saying so, so our staff answer the pharmacy themselves, and never fax an answer from that ticket. Use a different reply number printed on the request only if their note confirms it. If the ticket is solved without that note from the assigned prescriber, reopen it and say what's missing. Check the fax went through, and reopen the ticket if it failed. A fax with no file, or one we can't read, gets its own ticket for a person.

FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.

The flow

Yes No No Yes No Yes No Yes No Asks a person Until the prescriberanswers Repeats for each item Until the fax isdelivered or fails Action Find the last visit Action Ticket: fax with nofile Action Find the next visit Action Find the prescriberin Healthie Action Search by last nameand birth date Starts the flow New fax received Action Ticket: fax couldnot be read Action Search by firstname and birth date AI agent Read the pharmacyrequest Condition Refill orclarification? Action Find the prescriberin Zendesk Code Write the ticket Code Match the patient andprescriber Condition Fax has a file? Condition One exact chart? Action Find the patient'schart Condition Controlledsubstance? Action Read themedication list Asks a person Open theprescriptions ticket Action Start waiting Code Write the fax Condition Prescriberconfirmed? Action Reopen: fax failed Action Fax the answer tothe pharmacy Action Who answered Action Confirm theprescriber inHealthie Action Note no fax wasasked for Action Note the wait ranout Action Note the fax wassent Action Note nothing wasfaxed Condition Prescriber'sanswer? Action Start checking the fax Condition Fax result? Action Note the fax isstill sending Condition Prescriberidentified? Action Note the prescriberis unknown

Inside the loop: Until the prescriber answers

Yes No Yes Action Stop waiting Condition Ticket solved? Action Ask for theanswer Condition Answer found? Action Read the ticketnotes Action Check the ticket Code Find the prescriber'sanswer Action Keep the answer Action Wait 15 minutes

Inside the loop: Until the fax is delivered or fails

Code Read the fax result Action Wait 5 minutes Action Keep the fax result Action Check the fax

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

  1. New fax received Starts when Documo finishes receiving a fax, with the PDF already saved. A fax that arrives with no file opens a ticket for a person with the Documo message ID.
  2. Read the pharmacy request An AI agent decides whether the fax is a pharmacy refill request or clarification and copies what it says, including any controlled substance schedule printed on it. It never judges whether a drug is controlled or what the answer should be. A fax it cannot read or place gets its own ticket, and any other kind of document ends the run.
  3. 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. Find the prescriber in Healthie matches the prescriber by NPI or exact name, and their Zendesk agent account by email.
  4. Open the prescriptions ticket Opens an internal ticket in your prescriptions group with the fax attached, assigned to the prescriber. It lists the request, the pharmacy's question and options, and either the chart link with the medication list and the last and next visits, or the charts that might be the patient. It shows the number the fax came from and any different reply number printed on it.
  5. Controlled substance? A request with a printed schedule is tagged controlled_substance and stops there. The ticket tells the prescriber to answer through e-prescribing, and nothing is ever faxed back. When the request's prescriber can't be identified in Healthie, the ticket gets an internal note saying so, your staff answer the pharmacy themselves, and nothing is faxed from it.
  6. Until the prescriber answers Checks the ticket every 15 minutes for up to 7 days. Once it is solved, it looks for the assigned prescriber's latest internal note that starts with Fax reply: or No fax:. A ticket solved without one, with no prescriber assigned, or with a Fax to: number that is not one of the two on the request is reopened with a note saying what to fix.
  7. Fax the answer to the pharmacy Confirms the person who answered is the prescriber the ticket was assigned to and a Healthie member with an NPI. Then it faxes the pharmacy exactly what they wrote, under the patient, the medication and their name and NPI. Anyone else's answer is not faxed, and the ticket is reopened with the reason. Documo's result is checked every 5 minutes for up to 30 minutes: a failed fax reopens the ticket, and one still sending gets a note so nobody resends it twice.

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 Documo and Healthie API keys, and your Zendesk subdomain, agent email and API token.
  • Add your Anthropic key in the flow setting Anthropic key.
  • Pick your prescriptions group in Open the prescriptions ticket, Ticket: fax with no file and Ticket: fax could not be read. Pick your receiving fax number in New fax received if the account has more than one.
  • Give each prescriber a Zendesk agent account in the prescriptions group with the same email as their Healthie account, so tickets are assigned to them and their answers are confirmed.
  • Prescribers answer with an internal note that starts with Fax reply: followed by the answer as the pharmacy should read it, adding a line Fax to: with the printed reply number only when they want that number used, then solve the ticket. A note that starts with No fax: means they answered the pharmacy another way. A Zendesk macro per common answer saves typing.