Offline pharmacy POS — how to keep selling during a Lebanese outage
Why offline-first matters more in Lebanon than anywhere else, what software design has to do, and how a pharmacy POS keeps ringing sales when the power or internet drops.
Definition
An offline-first pharmacy POS is a point-of-sale system that records every sale, return, and inventory adjustment on the device itself before involving the network. It keeps selling when the power cuts and the generator picks up, when the internet drops, when MoPH MediTrack is unreachable, and when the central server is unavailable.
Why offline matters more in Lebanon
Power outages and intermittent internet are facts of life in Lebanon, not edge cases. A pharmacy that stops ringing sales every time the grid blinks loses tens of transactions a week — patients leave, walk to the next pharmacy down the street, and the customer rarely comes back. The competitive moat for a Lebanese pharmacy is being the one that is always open. The technical moat for a Lebanese pharmacy POS is being the one that never freezes.
What "offline-first" actually means technically
Offline-first is not a flag — it is an architecture. Every operation that touches money, inventory, or compliance has to be designed so the device is the source of truth at the moment of the action, with the cloud reconciling in the background. The opposite — calling out to a server on every keystroke and freezing when it does not respond — is what most legacy systems do, and it is what falls over the minute the network blinks.
- Service worker pre-caches the application shell on first load
- IndexedDB stores drug catalog, customer list, current rate, batch inventory
- Every transaction writes to the local database before any network call
- Sync layer replays transactions to the cloud when the connection returns
- Conflict resolution: server is the eventual source of truth, but the till never blocks waiting for it
What happens during an outage
On PharmEasy, the moment the internet drops, nothing changes from the cashier's perspective. They keep scanning barcodes, ringing sales, accepting dual-currency payments, printing receipts. Each transaction queues for sync. The dashboard shows a small offline indicator so the owner knows; the till shows none of the work it is doing in the background. When the connection returns, queued transactions replay to the cloud in order, idempotency keys prevent duplicates, and the dashboard catches up within seconds.
What about MoPH MediTrack during the outage?
MediTrack submissions are queued alongside the sales. The full payload (GTIN, batch, expiry, UHID, dispense timestamp) is captured at the till and stored locally. When the device is online and MoPH is reachable, every queued submission posts with an idempotency key so MoPH cannot double-record. Pharmacies running purely manual portal entry have no fallback when MediTrack itself is offline — software-driven submission with retries fills that gap.
What this looks like over a real outage day
A typical Beirut outage day: power goes at 11am, the generator kicks in within thirty seconds. The pharmacy keeps trading. The internet drops at 2pm when the cellular tower runs short on backup. The pharmacy keeps trading. Power and internet both return at 4pm. PharmEasy spends about ninety seconds replaying the queued transactions to the cloud and posting the queued MediTrack submissions. By 4:02pm, the cloud reflects every sale, every dispense submitted to MoPH, every cash-shift entry. The cashier never noticed.
Frequently asked
- How long can the POS run offline?
- Indefinitely. We have customers who have run a full day disconnected from the internet with no degradation. The constraints are the device's storage (modern laptops and tablets have far more than a single pharmacy ever generates in a day) and the freshness of pricing data (handled by a daily exchange-rate snapshot that is good for the whole day even without a re-sync).
- What happens if two cashiers ring overlapping inventory while offline?
- Each device tracks its own local inventory and the sync layer reconciles when both come back online. In rare conflict cases — the same physical batch shown as in-stock on two devices and dispensed by both — the server-side reconciliation flags the over-dispense and the operator resolves manually. In practice this happens vanishingly rarely because device sync resumes the moment connectivity returns, usually within seconds.
- What hardware do I need for offline-first to work?
- Any modern laptop, tablet, or desktop with a current browser and enough battery to ride through power outages until the generator picks up. The barcode scanner and receipt printer talk to the device, not the cloud, so they keep working during the outage. PharmEasy supports any USB or Bluetooth scanner and any ESC/POS-compatible receipt printer.
Keep reading
How to choose pharmacy software in Lebanon (2026 guide)
A practical buyer's guide to pharmacy management software for Lebanese pharmacies. Offline-first POS, MoPH MediTrack, dual-currency, FEFO, NSSF — the questions to ask before signing.
Read articleGTIN barcode setup for Lebanese pharmacy distributors and pharmacies
What a GTIN is, how it encodes batch and expiry in the GS1 2D barcode on every regulated Lebanese drug, and what pharmacies and distributors have to get right before MediTrack works.
Read articleMoPH MediTrack submission errors — the most common ones and how to fix them
The error patterns Lebanese pharmacies hit when submitting to MoPH MediTrack — UHID format, GTIN not registered, batch already consumed, expiry mismatch — and what to do about each.
Read article
Run your pharmacy with PharmEasy.
Founders-run demos, 30 minutes, tailored to your pharmacy. We typically schedule within 24 hours.
