Home / Help Center / pos-app-pharmacy / pharmacy / Prescriptions
📝 pharmacy

Prescriptions

Prescriptions is where a pharmacy logs each patient Rx — patient details, prescribing doctor, one or more drug lines with dosage/frequency/duration, and how long the prescription is valid for. Every Rx gets an auto-generated number and expiry date, can be "dispensed" by handing its drug list off to billing, and feeds a WhatsApp refill-reminder banner for patients due for a refill soon.

📍 Menu path: Pharmacy → Prescriptions
👤 Who uses it: All roles with the Billing feature enabled

Overview

Every prescription is given an Rx number in the format RX-YYYYMMDD-### the moment it is created, where the date is the prescribed date and ### is a running count of Rx created for that same date at this store.

Expiry Date is calculated automatically as Prescribed Date + Valid For (days) — there is no separate manual expiry field.

A prescription can hold multiple drug lines ("items"), each with its own dosage, frequency, duration, quantity and instructions — add or remove lines freely before saving.

Typing a Doctor Name that exactly matches (case-insensitive) an entry in Doctors auto-links the prescription to that doctor record (doctorId); typing any other name still saves fine as free text, just without the link.

A "Dispense" action on each active Rx hands its patient name, doctor name and drug list to the billing screen via sessionStorage so a cashier can search for and add each drug to the cart — it does not add the items automatically.

A banner above the list surfaces patients whose prescription is due for a refill within 7 days, each with a one-tap WhatsApp reminder button (same wa.me pattern used by Warranty/EMI reminders in other variants).

Before You Start

Step-by-Step Guide

1 Create a new prescription

  1. Open Pharmacy → Prescriptions and click "+ New Rx".
  2. Fill in Patient Name (required), Phone, Age and Gender.
  3. Enter Doctor Name (pick from the suggestions if the doctor is already in Doctors), Reg. Number, Hospital/Clinic, Prescribed Date, Valid for (days, default 30) and Diagnosis.
  4. Add one or more drug lines under "Drugs Prescribed" — Drug Name, Frequency, Duration and Qty (use "+ Add Drug" for more lines, the trash icon to remove one).
  5. Add any Notes, then click "Save Rx" — the Rx number and expiry date are generated automatically.

2 Dispense a prescription at billing

  1. On an active (non-expired) prescription row, click the pill icon ("Dispense at billing").
  2. You are taken to Quick Billing; the patient and doctor name are pre-filled and a toast lists every drug and quantity from the Rx so the cashier knows what to search for and add.
  3. Search for and add each drug to the cart as normal, then complete the sale — the sale is stamped with the prescription's ID.
  4. On checkout, each matching drug line's dispensed quantity is updated and the prescription's status advances automatically (see Field Reference → Status).

3 Send a refill reminder

  1. If any active prescriptions are due for a refill within 7 days, an amber banner appears above the filters listing each patient as a button.
  2. Click a patient's name to open a pre-filled WhatsApp message on their phone number reminding them to restock; this only works if the prescription has a Patient Phone on file.

4 Search, filter, edit and delete

  1. Use the search box to filter by patient name, Rx number or doctor name as you type.
  2. Use the All / Active / Expired chips to narrow the list; "Expired" shows Rx whose expiry date has passed regardless of status.
  3. Click the edit (pencil) icon to reopen an Rx for editing, including its drug lines, which are fully replaced with whatever is in the form when you save.
  4. Click the trash icon and confirm to permanently delete a prescription and all its drug lines.

Every Field & Button, Explained

Field / ButtonWhat it does
Rx NumberAuto-generated as RX-YYYYMMDD-###; the date is the Prescribed Date and ### is a running count for that date at this store — not editable.
Patient Name / Phone / Age / GenderPatient Name is required; the rest are optional. Phone is what the WhatsApp refill reminder is sent to.
Doctor NameFree text with autocomplete suggestions from Doctors. An exact case-insensitive match to an existing doctor links doctorId automatically; anything else is still saved as plain text.
Reg. Number / Hospital or ClinicRecorded on the Rx itself (separate from any linked Doctor record) — useful when the prescribing doctor is not in your Doctors master.
Prescribed DateDefaults to today if left blank. Used as the base date for both the Rx number and the Expiry Date calculation.
Valid for (days)Number of days the prescription remains valid from Prescribed Date; defaults to 30. Expiry Date = Prescribed Date + this many days.
Diagnosis / NotesFree-text; Notes only appears in the edit form, not in the list.
Drugs Prescribed (items)One or more lines, each with Drug Name (required to be saved), Frequency (from a fixed list: Once daily, Twice daily, Thrice daily, Four times daily, Every 8 hours, Every 6 hours, As needed, At bedtime), Duration (free text, e.g. "7 days") and Quantity.
StatusACTIVE at creation. Advances to PARTIAL once some drug lines are dispensed via a sale, DISPENSED once every line's dispensed quantity reaches its prescribed quantity. "Expired" in the list is a separate, date-based badge (Expiry Date passed) shown regardless of the underlying status value; CANCELLED exists in the schema but there is no button in this screen to set it.

Tips & Best Practices

Troubleshooting & FAQ

A prescription still shows ACTIVE after I dispensed some of it at billing.
Status only advances to PARTIAL/DISPENSED when a sale's item names match a drug line's name exactly (case-insensitive, trimmed) — if the product added at billing used a different name than the drug line, that line's dispensed quantity will not update and the status will not change.
The refill reminder button does nothing.
The prescription has no Patient Phone on file — add one by editing the Rx, since the WhatsApp link is built from that field.
I edited a prescription's drug list and a line I didn't touch disappeared.
Saving an edit replaces the entire drug-line list with whatever is currently in the form — if a line was removed (even accidentally) before saving, it will not be restored.
Doctor Name did not link to the doctor I expected.
Linking requires an exact, case-insensitive match to a name in Doctors — small differences (extra initials, "Dr." prefix, spacing) will save the Rx fine but leave it unlinked (doctorId empty), which also means it will not roll into that doctor's Rx count on the Doctors → Report view.