Pharmacy Portal Development
Pharmacy portal — specialized ecommerce with rigid regulatory constraints. Drug sales online regulated by law: Russia — Government Resolution #697 (2020), Ukraine — Drug Law. Portal must sell AND meet marking, prescription, composition requirements.
Regulatory Constraints — Technical Consequences
Prescription drugs (Rx) can't sell online without receipt verification:
- Products need
requires_prescription: booleanflag - Rx drugs shown in catalog, but add-to-cart blocked without uploaded receipt
- Uploaded receipt verified by pharmacist before order confirmation
Marking: Russia from 2020 all drugs marked via "Honest Sign" (GIS MT). Portal shows batch info, expiry dates, checks DataMatrix codes.
Drug Info: law requires dosage instructions, contraindications, storage. Not marketing text — fixed regulatory content.
Drug Catalog
Drug data structure more complex than regular product:
drugs (id, trade_name, inn, manufacturer, country_of_origin, atc_code, dosage_form, dosage, package_quantity, requires_prescription, storage_conditions, shelf_life_months, registration_number, is_vital)
drug_contraindications (drug_id, category, description)
drug_interactions (drug_id_a, drug_id_b, severity, description)
ATC Code (Anatomical Therapeutic Chemical) — international classification system for hierarchy. Example: C09AA01 — captopril (ACE inhibitors). Key for therapeutic group navigation.
Search by INN and Trade Names
User searches by trade name ("Nurofen"), INN ("ibuprofen"), or active substance. Catalog links all three, shows analogs.
drug_synonyms (drug_id, synonym, type) -- trade_name | inn | popular_name
Analog search: SELECT * FROM drugs WHERE inn = ... ORDER BY price. Standard feature — show cheaper generic alternatives with same active.
Elasticsearch index: trade_name, inn, synonyms[], atc_code with boost factors. Russian morphology via dictionary analyzer.
Pharmacy Stock
Typical model: chain of pharmacies, each has own stock. User enters address/geolocation, portal shows nearest pharmacies with drug and price.
pharmacy_locations (id, network_id, address, lat, lng, phone, schedule JSONB)
pharmacy_stock (location_id, drug_id, quantity, price, updated_at)
Geosearch: PostGIS for PostgreSQL, ST_DWithin function. Or simpler — Haversine formula for small chains (up to 1000).
Stock updates from pharmacy systems (1C:Pharmacy, ASNA, Katren-Style) via API or file. Frequency: every 15–60 minutes. Show with update timestamp — honest with user.
Online Reservation vs. Delivery
Two scenarios, different legal implications:
Pharmacy Reservation (click-and-collect): user reserves, pays in pharmacy. Legally simpler — reservation, not remote drug sale. Tech: reservation with TTL (usually 24–48 hours), decrement reserves.
Delivery (non-prescription only): needs remote sales license. Standard ecommerce checkout with strict requires_prescription = false filter.
"Honest Sign" Integration
For Russia from 2020, mandatory marking. Each package has QR/DataMatrix with GTIN + serial. GIS MT (Honest Sign API) integration:
- Verify code on receipt:
GET /api/v2/true-api/codes?code=010460606... - Drug info: manufacturer, release date, expiry, system status
- Code write-off on sale:
POST /api/v2/true-api/orders— notification
Backend-only integration, user sees only "product verified" or batch info.
Pharmacist Cabinet
Pharmacy staff interface:
- Receipt Verification: orders list with receipts, check status (approved/rejected/needs clarification)
- Stock Management: input current data if auto-sync unavailable
- Reservations: confirm readiness, cancel if no stock
- Dispensing Log: history of dispensed drugs per receipt (regulatory requirement)
Patient Cabinet
- Order and Purchase History — important for chronic patients (regular drugs)
- Receipts — stored uploaded receipts with issue and expiry dates
- Reminders — course end notifications, repeat order prompts
- Favorites — quick access to regularly bought drugs
Reminders via push (PWA) or email. Logic: if patient bought 30-day course — remind at day 25.
SEO and Content Strategy
Pharmacy portals rank well on informational queries: "ibuprofen instructions", "nurofen analogs", "what to take for fever". Each drug page — potential SEO traffic.
- Drug page: full dosage instructions (official text)
- INN page: all trade names and generics
- ATC group page: therapeutic group drugs
Structured data: Drug Schema.org (experimental but Google supports), MedicalCode for ATC.
Timeline
- Basic portal (catalog, pharmacy geosearch, reservation, non-prescription): 6–10 weeks
- Full portal (prescriptions with verification, 1C:Pharmacy integration, Honest Sign, delivery, pharmacist cabinet): 14–20 weeks
- Each additional accounting system integration: 2–4 weeks
Regulatory part is 30–40% of project. Before start, legal consult on current requirements in operation country.







