Event Storm — Electronic Prescription Dispensing
Prescribing, spine and pharmacy contexts for an electronic prescription service, with a nominated-pharmacy policy, a stock substitution hotspot and an expiry event nobody commands.
Make it your own.
title "Electronic prescriptions — prescribe to reimbursement"
context "Prescribing"
actor "General practitioner"
aggregate Prescription
command "Prescribe medicine" by "General practitioner" on Prescription emits "Prescription signed"
event "Prescription signed"
readmodel "Repeat medication review list"
command "Cancel prescription" by "General practitioner" on Prescription
event "Prescription cancelled" from "Cancel prescription"
external "Clinical decision support service"
hotspot "Cancellation arrives after the pharmacy has already dispensed"
policy "When prescription signed, route to nominated pharmacy" then "Route to pharmacy"
context "Spine"
aggregate "Prescription message"
command "Route to pharmacy" by "Spine router" on "Prescription message"
event "Prescription downloaded" from "Route to pharmacy"
event "Prescription expired"
readmodel "Prescription tracker"
external "NHS spine directory"
hotspot "Patient walks into a different pharmacy from the nominated one"
policy "When prescription downloaded, reserve stock" then "Reserve stock"
context "Pharmacy"
actor Pharmacist
actor Patient
aggregate "Dispensing episode"
command "Reserve stock" by "Dispensary system" on "Dispensing episode"
event "Stock reserved" from "Reserve stock"
command "Perform clinical check" by Pharmacist on "Dispensing episode"
event "Clinical check completed" from "Perform clinical check"
command "Hand out medicine" by Pharmacist on "Dispensing episode"
event "Medicine handed to patient" from "Hand out medicine"
readmodel "Owings and collection board"
external "Prescription pricing authority"
hotspot "Owing issued because only half the quantity is in stock"
policy "When medicine handed to patient, claim reimbursement" then "Claim reimbursement"
command "Claim reimbursement" by "Dispensary system" on "Dispensing episode"
event "Reimbursement claimed" from "Claim reimbursement"