rx_shop to look and rx_route to decide.
Use them in the order rx_shop → rx_route → rx_shop, ending with a read that confirms the route.
rx_shop
Read-only. It works for a prescriber, a patient, or an agent acting for either. SendorderId, pharmacySearch, or both.
A pharmacy search needs a
name or a location. The server doesn’t convert addresses to coordinates.
With an orderId, the response’s status includes:
- the order’s state:
ROUTING,PENDING,PLACED,COMPLETED,CANCELEDorERROR isReroutable, which says whether the order can still change pharmacy- the
patient(with the address on their record), thedeliveryAddress, and theprescribers
isReroutable is true. Pharmacies include price and retailPrice when pricing is available.
rx_route
Sends an order to the chosen pharmacy. For an order that hasn’t been routed yet, it sets the pharmacy. After that, it reroutes.
The response’s
operation is SET_PHARMACY, REROUTE or UNCHANGED. It also says whether the change was only accepted or was confirmed by a follow-up read. Call rx_shop afterward to check.