new-shipment-spec.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. STARTING POINT: Pro creates supply_orders. Somehow supply_orders got cleared.
  2. SELECT COUNT(*) FROM supply_order WHERE is_cleared IS TRUE and shipment_id IS NULL AND is_cancelled IS NOT TRUE;
  3. ------------------------------------------------------------------------------------------------------------------------------------
  4. /supply-orders/ready-to-ship
  5. 1. RECEIVER generates SHIPMENT for all pending supply_orders, one shipment per patient per address.
  6. /ready-to-ship
  7. Date | Patient | Item | Address | Action [Generate Shipment]
  8. /shipment-underway
  9. Date | Patient | Item | Address | Shipment
  10. /all
  11. #TODO
  12. /shipments
  13. 2. PRINTER prints the PICK-LIST for each shipment, moving it from status CREATED to PRINTED.
  14. :: Pick lists now are presumed to exist in reality.
  15. :: Make sure duplicate pick lists are not created!
  16. :: TODO: defend against duplicate pick lists being printed and dispatched by scanner stopping it from going to fulfiller, or even fulfiller stopping it from going to dispatcher.
  17. /ready-to-print (SELECT * FROM shipment WHERE status = 'CREATED');
  18. TODO @Josh (! Add endpoint update multi shipments statuses)
  19. __ shipments selected [Generate PDF for Selected Shipments, Move status to 'PRINTED']
  20. _________________________________________________________________________
  21. [_] (v) | Patient | Items | Address
  22. /printed-and-waiting-for-picker
  23. ___ shipments selected [Print Again]
  24. _________________________________________________________________________
  25. [_] (v) | Patient | Items | Address | Printed At | Actions [Print Again]
  26. /being-processed
  27. (v) | Patient | Items | Address | Status
  28. /all
  29. #TODO
  30. /shipments/view/{shipment}
  31. -----------------------------------------
  32. ... show direct columns on shipment (date, status, etc.)
  33. ... show the supply_orders in the shipment
  34. ... allow mutation of shipment status.
  35. !!! you can even mark a shipment as 'CREATED' here and it would kick back up to '/ready-to-print'
  36. !!! you can even remove supply_orders from shipments, therefore kicking THEM back up to /supply-orders/ready-to-ship
  37. [Print Pick-List & Move Status to 'PRINTED'] <- I can click this button anytime I want.
  38. -----------------------------------------
  39. 3. PICKER is given this pick-list...
  40. moves status to BEING_PICKED,
  41. Picker then picks it all out,
  42. marks it as PICKED,
  43. gives it to a scanner.
  44. 4. SCANNER then associates which LOT#, IMEI#, etc. went out associated to that supply_order.
  45. marks it as READY_FOR_FULFILLMENT.
  46. 5. FULFILLER boxes it up and prints associated postage and mark the carriers / tracking numbers.
  47. marks it as READY_FOR_DISPATCH.
  48. 6. DISPATCHER gets it to the carrier.
  49. marks it as DISPATCHED.
  50. ====================================================================================================================================