Louis Lai | Systems Portfolio
Back to projects
Chain store management systemMulti-store managementAccess controlPrint and auditPrescription numbering

Pet Prescription System

Chain-store prescription records, review, printing, and access control

Prescriptions were scattered across paper and spreadsheets—print formats varied and permissions were hard to manage.

Outcomes

Key outcomes

44 stores file, search, and print in one system.
Each store can access only its own records.
Stores can print immediately after veterinarian approval.

Background

Background and process challenges

Chain pet stores selling prescription medication need complete records. Paper and ad-hoc tools caused scattered data, inconsistent print formats, and weak multi-store reporting. The system now handles filing, review, and printing while keeping each store within its own data scope.

Features

Roles and features

Requirements analysis and database designFull-stack developmentPermissions and print workflow designDeployment and operations

Prescription and data management

  • Create, search, and edit prescription records with multi-criteria search and CSV export
  • Owner and pet data linked with historical auto-fill
  • Prescription status management (draft / complete / printed)

Stores, printing, and permissions

  • Independent data permissions for 44 stores with unified prescription numbering
  • A4 triplicate printing with first-print and reprint history
  • Role-based access for admin, store staff, and veterinarians

Design

Key design decisions

Multi-store numbering

Prescription numbers are generated in PostgreSQL from date, store code, and sequence, preventing duplicates under concurrent use.

RBAC + Row Level Security

PostgreSQL RLS keeps each store within its own data scope.

Architecture

System architecture

Pet prescription system: prescription workflow and access control

Store staff

Create prescriptions, search records, print handoff forms

Veterinarian

Review prescriptions and confirm medication details

Web admin platform

Prescription status, forms, search, printing

Permissions and data control

RBAC, RLS, store data scope, audit log

Business output

A4 triplicate print, CSV export, report analytics

Data layer: Supabase PostgreSQL + Auth + Audit Log
Store intake
Veterinarian review
Print and reports

Workflow

Prescription flow map

Flow overview

Pet medication workflow: create, review, print, and audit

Store staff

Create prescriptionOpen purchase record
Select owner and petLoad owner and pet data
Enter medicationInput items and dosage
Print and hand offA4 triplicate form

Veterinarian

View pendingReview queue
Confirm contentCheck medication details
Complete reviewApprove prescription record
Return to storeReady for printing

System control

Generate numberDate, store, sequence
Manage permissionsRBAC and data scope
Retain recordsPrint and audit records
Search and reportSearch, export, analyze
Fill prescription details
Veterinarian approval
Print and retain records

Screens

Key screen walkthrough

Store staff

Store creates prescription

Stores fill prescriptions, select owner and pet records, and enter medication on one screen.

  • Create prescription record
  • Link owner and pet records
  • Enter medication details

Veterinarian

Veterinarian review

Vets see the pending queue; once confirmed, stores can print.

  • View pending queue
  • Confirm medication details
  • Complete review status

Print and audit

Print handoff and audit trail

Fixed triplicate print format with searchable print history.

  • A4 triplicate print
  • Track print history
  • Follow-up search and tracking

Technology

Technical architecture

Frontend

Next.jsReactTypeScriptTailwind CSSRadix UI

Database

SupabasePostgreSQLRow Level Security

Auth & Security

Supabase AuthRBACPostgreSQL RLS

DevOps

VercelGitHub Actions

Have an internal system in mind?

We can start with the current workflow, the bottlenecks, and the first process to fix.