Pharmacy Inventory Management
Architecture for Pharmacy Inventory Management:
DrugPurchaseOrders are sent from a dispense location to a stock location. DrugPurchaseOrder has a one-to-many relationship with DrugInventory. When a DPO is created, it has:
State | DrugPurchaseOrder | DrugInventory location | DrugInventory status |
---|---|---|---|
DPO is created | received: false | Pharmacy dispensary X | requested |
DPO is received | received: true | Pharmacy stock center | received |
DPO is filled | received: true | Pharmacy stock center | filled |
DPO is sent to Pharmacy dispensary | received: false | Pharmacy stock center | sent |
DPO drugs are received by dispensary | received: true | Pharmacy dispensary X | available |
Notes on filling:
-Each DrugInventory is converted to a specific batch with expiryDate, etc.
-DrugInventories are split if necessary, new DrugInventories added
-The existing batches of DrugInventories that are being used to fill are decremented as needed (the user will choose which batch to fill the purchase order with)
Other use cases:
Issuing stock to dispensary: same as last two steps above. Stock Center creates the DrugPurchaseOrder but system acts as if the dispensary requested.
State | DrugPurchaseOrder | DrugInventory location | DrugInventory status |
---|---|---|---|
Stock sent | received: false | Pharmacy stock center | sent |
Stock received | received: true | Pharmacy dispensary Y | available |
Issuing stock to outside of system/offline dispensaries: existing inventories are decremented, and DrugInventories immediately available at some location:
State | DrugPurchaseOrder | DrugInventory location | DrugInventory status |
---|---|---|---|
Stock Issued | received: true | Dispensary Z/Unknown Location | available |