Pharmacy Website Development on 1C-Bitrix
A pharmacy website is one of the most regulated e-commerce projects. Remote sale of prescription drugs is prohibited by law; over-the-counter medicines can be sold only with pharmacy business license and compliance with government regulations. Technical implementation must account for these restrictions at architecture level, not just text warnings.
Pharmacological Product Catalog
Catalog structure built on information block with extended properties adapted to pharmaceutical nomenclature:
| Property | Type | Purpose |
|---|---|---|
ACTIVE_SUBSTANCE |
String | INN (International Non-proprietary Name) |
TRADE_NAME |
Element Title | Trade name |
DOSAGE_FORM |
List | Tablets, capsules, solution, ointment, suppositories... |
DOSAGE |
String | 500 mg, 10 mg/ml |
PACKAGE_QTY |
Number | Quantity per package |
PRESCRIPTION |
List | Prescription / Over-the-counter |
ATC_CODE |
String | ATC classification code (J01CA04 etc.) |
MANUFACTURER |
HL Link | Manufacturer |
COUNTRY |
HL Link | Country of manufacture |
REG_NUMBER |
String | Registration certificate number |
STORAGE_TEMP |
List | Up to 25°C / 2–8°C / No restrictions |
MDLP_GTIN |
String | GTIN for MDLP marking |
ANALOGS |
Element Link (multiple) | Analogs by INN |
For prescription drugs, "Buy" button is replaced with "Reserve" with clarification: dispensed only upon presentation of prescription at pharmacy. This is handled at template level — catalog.element component checks PRESCRIPTION property and renders appropriate action block.
Catalog categorization is dual. Primary navigation by pharmacotherapeutic groups (ATC classification), secondary by dosage forms and purpose (for headache, for cold, vitamins). Implemented via information block sections (ATC) and tags (purpose).
Symptom-Based Search and ICD-10 Reference
ICD-10 (International Classification of Diseases, 10th revision) reference loaded into Highload-block hl_mkb10. Structure:
-
UF_CODE— diagnosis code (J06.9, K21.0) -
UF_NAME— diagnosis name -
UF_PARENT_CODE— parent group code (for hierarchy) -
UF_SYNONYMS— colloquial names (runny nose, heartburn, migraine)
Search field with autocomplete: user enters "sore throat" — system searches in UF_SYNONYMS, finds J02 (acute pharyngitis) and J03 (acute tonsillitis), displays related drugs. "Diagnosis → Drug" relationship stored in intermediate Highload-block hl_mkb_drugs (fields: UF_MKB_CODE, UF_PRODUCT_ID).
Search works via AJAX-controller, results cached client-side (sessionStorage) for repeat queries. Backend — composite index on UF_SYNONYMS + UF_NAME for fast filtering.
Availability Checking by Pharmacy and Analog Search
This is the most requested pharmacy website feature and main technical complexity point. User wants: is needed medicine available at nearby pharmacy, and if not — what analogs are available.
Availability Check Architecture:
Inventory stored not in Bitrix — comes from pharmacy chain accounting system. Typical options:
- 1C:Pharmacy Chain Management — inventory export via HTTP REST service
- Farmatika / M-Pharmacy Plus — exchange via CSV/XML files on FTP
- Custom accounting system — REST API or SOAP
Regardless of source, data goes to Highload-block hl_pharmacy_stock:
| Field | Type | Purpose |
|---|---|---|
UF_PRODUCT_ID |
Number | Product ID in Bitrix catalog |
UF_PHARMACY_ID |
Number | Pharmacy ID (from "Pharmacies" block) |
UF_QUANTITY |
Number | Stock (pieces/packages) |
UF_PRICE |
Number | Price at specific pharmacy |
UF_UPDATED_AT |
DateTime | Last update time |
Synchronization runs via cron agent CPharmacyStockAgent every 15–30 minutes. Full export at night, daytime — incremental (changes only). With 50 pharmacies and 15,000 SKUs, table contains up to 750,000 records — Highload-block handles it, but index on (UF_PRODUCT_ID, UF_PHARMACY_ID) is needed.
Frontend Display:
On drug detail page — "Availability in Pharmacies" block. AJAX request with product ID returns pharmacy list with inventory. Pharmacies sorted by user distance (browser Geolocation API + Haversine formula). Each row: pharmacy name, address, stock (exact amount or "In stock" / "Low" / "Out"), "Reserve" button.
Displaying exact stock not recommended — it becomes outdated within minutes. Better three gradations: green (>5), yellow (1–5), gray (0). Threshold configurable in module options.
Analog Search:
When drug unavailable in any pharmacy — user offered analogs. Algorithm:
- Take current drug INN (
ACTIVE_SUBSTANCE). - Select all drugs with same INN and same dosage — complete analogs (generics).
- If few matches — expand to same 4th-level ATC group (pharmacological analogs).
- Filter by pharmacy availability — show only those actually available.
Property ANALOGS (element link) auto-filled by cron script based on INN matching. Manual editing for cases where pharmacist wants add/exclude specific analog.
Online Reservation
Reservation is not sale. Payment not collected on site. Process:
- User selects drug and pharmacy, clicks "Reserve".
- CRM lead or deal created with: drug, pharmacy, contact phone.
- Simultaneously — request to pharmacy system to reserve.
- User gets SMS/push with reservation number and pickup time (typically 24–48 hours).
- Upon time expiry — auto-cancellation, return to free stock.
For prescription drugs, reservation available, but at pickup presentation of prescription required — noted in reservation terms.
MDLP Integration
Drug marking via "Honest Sign" system (MDLP — drug movement monitoring) mandatory. On website reflected:
- Each drug contains GTIN (
MDLP_GTIN) — verify authenticity via "Honest Sign" website. - Detail page has "Check Authenticity" link generating URL to
checkmark.crpt.ru. - During reservation, package serial number fixed (if pharmacy provides via API).
Schema.org for Pharmaceuticals
schema.org/Drug micromarkup on detail pages:
-
nonProprietaryName— INN -
activeIngredient— active substance -
dosageForm— dosage form -
drugClass— pharmacological group -
manufacturer— manufacturer -
availableStrength— dosage -
prescriptionStatus—OTCorPrescriptionOnly -
isAvailableGenerically— generic availability (true/false)
This markup helps search engines properly index catalog and form rich snippets.
Project Phases
| Phase | Work | Duration |
|---|---|---|
| Analytics and Design | Nomenclature mapping, integration contracts, UX prototypes | 2–3 weeks |
| Catalog and Search | Info blocks, HL-blocks, ICD-10 search, filters | 3–4 weeks |
| Availability and Reservation | Accounting system integration, geolocation, reservation | 4–5 weeks |
| Analogs and Schema.org | Analog selection algorithm, micromarkup, SEO | 2 weeks |
| Testing | Data exchange verification, HL-block load testing | 1–2 weeks |
| Launch | Catalog population, pharmacist editor training | 1 week |







