PHARMACY NETWORK CONNECTORS
Stock, Availability & Reservation
5 of 7Connect 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
| Status | Meaning | Developer behavior |
|---|---|---|
| in_stock | Sufficient quantity | Can offer immediate preparation |
| low_stock | Below threshold | Show warning/freshness |
| out_of_stock | Unavailable | Offer allowed alternatives/other pharmacy |
| reserved | Temporarily held | Respect reservation TTL |
| unavailable | Not orderable/restricted | Do 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
| Issue | Handling |
|---|---|
| PMS unavailable | Return unknown/stale with freshness; do not invent stock |
| Reservation conflict | Return conflict and refreshed availability |
| Expired reservation | Release/mark expired; require new check |
| Unknown product | Resolve/mapping workflow before query |
| Duplicate reserve | Idempotently 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
| Surface | Operation / resource | Use | Status |
|---|---|---|---|
| Availability API | query product by pharmacy/location | Patient/preparation workflow | Connector-backed |
| Reservation API | create / release / expire | Temporary stock hold | Connector-backed |
| Inventory event | stock.changed | Near-real-time sync | Provider-dependent |
| PMS adapter | authoritative local inventory | Stock/dispense authority | Provider-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