Manage the Prescription Queue
The /pharmacy screen is currently a queue-oriented prescription list. It helps staff search prescriptions by date, patient, and customer, then work the dispensing queue based on status.
Main Purpose of the Pharmacy Screen
- list prescriptions
- search by patient or customer
- filter by date
- review prescription status
- open prescription context for follow-up
Screen Layout
The current Pharmacy screen is fairly simple:
- top search and date filter area
- lower prescription table with pagination
Search Prescriptions
Step 1. Search by patient or customer
Use the top search field to find prescriptions by:
- patient name
- customer name
The search is debounced, so results update after a short delay.
Step 2. Narrow by date
Use the date picker to focus on prescriptions from a particular day. Internally, the query uses the start and end time of that selected day.
Step 3. Reset filters
Use Reset to clear both the search term and the date filter.
Read the Prescription Table
The table usually shows:
- created date and time
- HN
- customer
- pet name
- veterinarian
- status
The current pharmacy workflow mainly revolves around these statuses:
PENDINGDONECANCELED
Work the Dispensing Queue
PENDING
The prescription is not yet completed. This is the main active dispensing queue.
DONE
Dispensing is complete. Users usually enter these cases for review, reprint, or history confirmation.
CANCELED
The prescription should not be dispensed. Review the clinical context and cancellation reason before taking any action.
Warning: Dispensing a canceled prescription can create mismatch in billing, stock, and medication counseling.
Relationship Between Clinical Orders and Pharmacy
The pharmacy queue is usually created from treatment plan items and prescription data written in the clinical record, such as:
- medication or item selection
- prescription details such as route and frequency
- distribution context like
IN_CLINICorTAKE_HOME
If a prescription looks wrong in Pharmacy, review the clinical charting context rather than assuming the list itself is wrong.
Practical Tips
- Work the
PENDINGqueue first and treatDONEas a follow-up or output queue. - Use HN together with the patient name to reduce dispensing mistakes.
- The date filter is useful not only for same-day work but also for later dispute review.
Current Scope Limitation
Based on the current code, the main /pharmacy screen is list-oriented, while the detail route /pharmacy/[recordItemId] does not appear to be fully implemented yet.
Note: A separate document for detailed dispensing actions, label printing, and stock deduction linkage should be added when the detailed screen is implemented more fully.