Mediloop
PHARMACY NETWORK CONNECTORS

Stock, Availability & Reservation

5 of 7

Connect pharmacy systems, ePrescription networks, medication catalogues and fulfillment workflows across the medication pathway.

InventoryAvailabilityReservationMulti-LocationFreshnessAlternativesPMS
Real-Time Availability

Check PMS/group stock in real time or with freshness metadata.

Intelligent Reservation

Reserve products temporarily during preparation.

Multi-Location Support

Search across multiple pharmacy locations when permitted.

Reliable & Transparent

Expose confidence and freshness to avoid false availability.

Stock & Availability Workflow
1
Product Lookup
Resolved GTIN/SKU/local product
2
Check Availability
Real-time or cached PMS query
3
Evaluate Options
Quantity, location and allowed alternatives
4
Reserve
Optional time-bound reservation
5
Prepare & Dispense
Consume reserved inventory
6
Update & Release
Sync stock and release unused reservations
Stock Statuses
StatusMeaningDeveloper behavior
in_stockSufficient quantityCan offer immediate preparation
low_stockBelow thresholdShow warning/freshness
out_of_stockUnavailableOffer allowed alternatives/other pharmacy
reservedTemporarily heldRespect reservation TTL
unavailableNot orderable/restrictedDo not offer
Stock Synchronization
PMS remains authoritative for local stock
Support event-driven updates where PMS provides them
Use periodic sync/reconciliation for missed events
Track source timestamp and received timestamp
Separate on-hand, available-to-promise and reserved quantities
Never present stale cache as real-time
Availability & Reservation
Reservation requires explicit TTL and release behavior
Use idempotency key per prescription/item reservation
Validate product identity before reserve
Handle concurrent reservations/dispensing atomically at authoritative system
Return reservation expiry and source reference
Do not treat reservation as dispensed
APIs & Examples
httpCopy
# Illustrative availability
GET /v1/pharmacies/pharm_123/availability?product=GTIN:05412345678903
Authorization: Bearer <token>

# Illustrative reservation
POST /v1/pharmacies/pharm_123/reservations
Idempotency-Key: rx_456-item_1
{ "prescriptionId":"rx_456", "product":"GTIN:05412345678903", "quantity":1, "ttlMinutes":30 }
Illustrative routes. Final stock/reservation authority and semantics depend on PMS connector contracts.
Error Handling
IssueHandling
PMS unavailableReturn unknown/stale with freshness; do not invent stock
Reservation conflictReturn conflict and refreshed availability
Expired reservationRelease/mark expired; require new check
Unknown productResolve/mapping workflow before query
Duplicate reserveIdempotently return existing reservation
Best Practices
Make stock freshness visible
Reconcile PMS stock after dispense/cancel
Keep reservation and dispense states separate
Handle substitute products only under applicable rules
Test concurrent reservation races
Monitor stale connectors and reservation leakage
Developer Integration Surface
SurfaceOperation / resourceUseStatus
Availability APIquery product by pharmacy/locationPatient/preparation workflowConnector-backed
Reservation APIcreate / release / expireTemporary stock holdConnector-backed
Inventory eventstock.changedNear-real-time syncProvider-dependent
PMS adapterauthoritative local inventoryStock/dispense authorityProvider-specific
Next Steps
Connect authoritative PMS stock source
Define freshness/TTL policy
Implement idempotent reservations
Test conflicts/outages/expiry
Add reconciliation after dispense and cancellation