# StockMed Platform Features — Digital B2B Pharmacy Supply Chain

> In-depth architectural and functional breakdown of StockMed's real-time B2B pharmaceutical supply chain platform.

## 1. Real-Time 1-Tap Shortage Order Dispatch
- **Zero Prescription Bounce**: Retail chemists log out-of-stock prescription medicines in seconds.
- **Unit Precision**: Explicit packaging unit selection (*Strips, Boxes, Bottles, Packs, Vials, Kits, Tubes, Injectables*).
- **5-Digit Group Notes**: Multiple shortage line items bundled under a shared 5-digit group pass.
- **Wholesaler Sync & WhatsApp Fallback**: Real-time 🟢 `ACCEPTED` status sync and 1-tap WhatsApp order pass forwarding.

## 2. Multi-Dimensional Brand Stockist Directory
- **36 Indian States & Dynamic City Cascades**: Discover super-stockists across all 36 Indian States/UTs.
- **PIN Code & Haversine Distance**: Search distributors by 6-digit postal PIN code or exact device GPS coordinates.
- **Authorized Pharma Brands**: Filter stockists representing 80+ top pharma manufacturers (Sun Pharma, Cipla, Dr. Reddy's, Torrent, Mankind, Abbott, Zydus, Alkem, Glenmark, Lupin, Intas, Macleods, Aristo).

## 3. AI Bill Scanner & Automated ERP Inwarding
- **Marg, Busy, Tally & RetailStar Bill OCR**: Automatic extraction of item names, alphanumeric batch IDs (e.g. `DL4920`), named-month expiry dates (e.g. `NOV-27`), rates, and MRPs.
- **Hybrid OCR Pipeline**: On-device Google ML Kit text recognition with Gemini 1.5 Flash Vision cloud fallback.
- **Self-Learning Autocorrect Engine**: Learns dirty OCR spelling corrections against an 80+ medicine dictionary, updating store inventory in a single batch write.

## 4. Wholesaler Batch Fulfillment & Tax Invoicing
- **1-Tap Item Toggle**: Mark line items as `PACKED` 🟢 or `UNAVAILABLE` 🔴 with automatic inventory reconciliation.
- **Printable A4 GST Tax Invoices**: Standardized ASCII/Type-1 font-safe PDF generation.
- **Counter Standees & QR Passes**: Generate high-definition printable A4/A5 display standees with scannable QR codes for retail chemist order routing.

## 5. Consumer Proximity & Store Status
- **Hyperlocal Medicine Discovery**: Search medicine availability within 500m–15km radius.
- **Live Store Status**: Retailers toggle store availability (🟢 `OPEN NOW` / 🔴 `STORE CLOSED`).
- **Generic Medicine Cost Savings**: Calculate branded vs generic cost differences for patient affordability.

## 6. Enterprise Security & DPDP Compliance
- **DPDP Act 2023 Compliance**: Automatic on-device PII redaction (Aadhaar, PAN, OTPs, tokens).
- **Offline First**: SQLite & Hive local caching for unhindered counter operations during internet outages.
- **Role Locking**: Role elevation protection and biometric / 4-digit quick PIN terminal auth.
