Skip to main content

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.
You do not need to manage pharmacy relationships directly. RxScale takes care of routing orders to the right pharmacy.

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_hold is a truthy value: true, 1, or yes (case-insensitive). Any other value — or a missing attribute — creates the prescription normally.
  • _rxscale_prescription_hold_comment is 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.

Skipping RxScale Order Import

If your shop uses Shopify, you can prevent RxScale from automatically importing an order via Shopify webhooks (and from processing later webhook updates or cancellations for that order) by setting an order additional attribute:
  • RxScale skips the order only when the attribute value is true (case-insensitive). Values such as 1, yes, false, or a missing attribute do not skip import.
  • While the attribute is set, automatic Shopify webhook processing does not import, update, or cancel-process the order in RxScale. An order that was already imported earlier is left as-is; further Shopify webhooks for that order are ignored until the attribute is removed or no longer true.
This is different from _skip_validation / _rxscale_skip_validation, which still import the order but skip anamnesis validation for prescription items.

Age Limit for Shopify Order Webhooks

RxScale ignores Shopify order webhooks for orders created more than 60 days before the webhook was sent. This keeps bulk edits, tag sweeps, and archive migrations of long-closed orders from re-entering the RxScale pipeline.
  • The limit applies to order creation and order update webhooks.
  • Order cancellations are always processed, however old the order is.
  • The age is measured from the order’s creation date in Shopify to the moment the webhook was sent — not from the date you edit the order. Editing a two-year-old order therefore has no effect in RxScale.
To get a change into RxScale for an order past the limit, create a new order. If an older order genuinely needs to be imported, contact RxScale support — an administrator can import it manually.

Pharmacy Orders in the API

When you retrieve orders via the Management API, each order includes a pharmacy_orders array showing how the order is being fulfilled:
Each pharmacy order represents a fulfillment attempt by a pharmacy. An order may have multiple pharmacy orders if it was reassigned to a different pharmacy.
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