Orders and Prescriptions
This page explains the complete lifecycle of an order in RxScale — from the moment a patient places it to the moment they receive their medication.How Orders Flow Through the System
When a patient places an order through your shop, it triggers a series of steps managed by RxScale:Order Lifecycle Step by Step
1
Order created
The patient completes a checkout in your shop. An order is created in RxScale with a status of “init”. The system validates the order and begins processing.
2
Processing started
The system verifies the order details, checks product availability, and prepares the prescription request for doctor review.
3
Waiting for doctor
The prescription is placed in a doctor’s review queue. The doctor reviews the patient’s questionnaire responses and medical information.
4
Doctor decision
The doctor either approves, declines, or places the prescription on hold.
- Approved — The prescription moves to signing.
- Declined — The order is updated and the patient is notified.
- On hold — The prescription is paused for additional information.
5
Prescription signed
The doctor electronically signs the prescription using a qualified electronic signature (QES). This makes it legally valid.
6
Sent to pharmacy
The system routes the order to an appropriate pharmacy based on product availability and location.
7
Pharmacy processing
The pharmacy reviews the order, prepares the medication, and ships it to the patient.
8
Order completed
The patient receives their medication and the order is marked as completed.
Prescription Management
Prescription Creation
A prescription is created automatically when an order enters the doctor review stage. You do not need to create prescriptions manually — the system handles this based on the products in the order.Prescription Statuses
For detailed status descriptions, see Prescription Statuses.
Working with Pharmacy Partners
Once a prescription is signed, RxScale handles pharmacy assignment automatically. The system considers:- Product availability — Whether the pharmacy has the required products in stock.
- Location — Geographic proximity to the patient for faster delivery.
- Capacity — The pharmacy’s current workload.
Monitoring Orders
You can monitor order progress through:- Webhooks — Receive real-time notifications when order or prescription statuses change. See Webhooks and Notifications.
- Management API — Query order and prescription details programmatically. See Management API.
Shopify Priority Settings
If your shop uses Shopify, you can pass priority values to RxScale so urgent patients or orders are surfaced ahead of normal-priority work. Use integer values; higher numbers mean higher priority. Missing or invalid values are ignored and the default priority is used.
Order priority applies to the specific Shopify order. Patient priority is stored on the patient profile and can be reused across the patient’s future activity.
Store priority values as plain integers. Values such as
high, urgent, or empty strings are ignored instead of being converted to a priority.Placing Prescriptions on Hold
If your shop uses Shopify, you can have a prescription created on hold instead of going straight to the doctor. Held prescriptions are not offered to doctors for review until they are taken off hold, which is useful when an order needs a manual check first (for example, awaiting a lab result or an identity confirmation). Set the hold intent through order attributes:- The prescription is placed on hold only when
_rxscale_prescription_holdis a truthy value:true,1, oryes(case-insensitive). Any other value — or a missing attribute — creates the prescription normally. _rxscale_prescription_hold_commentis optional. When present alongside a truthy hold, the reason is recorded on the prescription’s status history and shown to the reviewer. The comment is ignored if the order is not held.- The hold is applied when the prescription is first created. Adding the attribute to an existing order later does not retroactively hold an already-created prescription.
The hold applies to the prescription only. The order itself continues through its normal lifecycle.
Pharmacy Orders in the API
When you retrieve orders via the Management API, each order includes apharmacy_orders array showing how the order is being fulfilled:
delivery_type is resolved from the connected shop’s fulfillment method (configured per shop), otherwise from the receiving pharmacy’s default delivery type. It may be null when neither is set, so do not assume a delivery type is always present.Pharmacy Order Statuses
Related Topics
- Order Statuses — Detailed explanation of all order statuses.
- Prescription Statuses — All prescription statuses and their meanings.
- Order Lifecycle — Technical guide to order status transitions.