Skip to content

Stress DES Checklist

This table is auto-generated from checklists/stress_des.xlsx.

Section/Subsection Item Recommendation Details
1.   Objectives
Purpose of the model 1.1 Explain the background and objectives for the model. The prevalence of strokes in the UK is on the increase, with some forecasts putting these increases at 60% between 2015 and 2035. As the number of stroke patients nationally rises the pressure on the already resourced stretched NHS will rise.

In stroke care time critical interventions are key, patients need to be in the right place and within the correct time frames to receive treatment. Maintaining efficient flow from the ambulance to ED to the stroke unit itself is essential to meet these time critical interventions and the following monitoring.

Flow is not only vital for early interventions but also for the stroke unit’s workforce. A ward with higher occupancy puts pressure on the unit's medical, nursing and therapy staff. Higher ward occupancy leads to lowering staff patient ratios when staffing levels remain the same, reducing the quality of care and therapy input per patient.

The purpose of this model is to assess the effect of changing variables on stroke unit flow and occupancy, to simulate different approaches to address the increasing pressure all stroke units in the UK will face in the coming years. The models key areas of focus are on the number of beds a ward possesses, the utilisation of the CT perfusion and the stroke SDEC model developed and currently operational at Maidstone Hospital.

There is also a large focus on the financial savings generated from utilising CT perfusion and a stroke SDEC model, as both require an upfront investment, however are inherently cost saving through bed days saved. The secondary purpose of the model is to show that not only is the utilisation of CTP and stroke SDEC beneficial to patient flow and ward occupancy but also cost saving.
Model Outputs 1.2 Define all quantitative performance measures that are reported, using equations where necessary.  Specify how and when they are calculated during the model run along with how any measures of error such as confidence intervals are calculated. Number of Admissions Avoided : The number of patients within the simulation who are assigned a diagnosis of stroke, patient admission_avoidance = TRUE and an MRS value below the threshold set in the model. This is to simulate the same day discharge process of the Stroke SDEC, with patients meeting the criteria being able to avoid a stroke unit overnight stay while still receiving the same care.

Mean Q Time Ward (Hours) : The mean time that passes in the simulation between patients requesting the ward bed resource and it being made available for them.

Mean Ward Occupancy : The mean number of patients that are on the “Ward Occupancy List” at each point a patient either is added to or leave the list.

Total Number of Admission Delays : A sum of all patients who could not immediately be assigned a stroke bed in the simulation when it is requested.

SDEC Total Savings (£) : The sum of the patients whose attributes for “Admission Avoidance” are TRUE at the end of the simulation multiplied by the value stored in the g class for the cost of an overnight hyper acute bed.

SDEC Medical Cost (£) : The sum of each simpy time value elapsed while the SDEC generator is set to FALSE multiplied the value of the “sdec_dr_cost_min”

SDEC Saving – Cost (£) : The value of SDEC Total Savings – SDEC Medical Costs

Thrombolysis Savings (£) : Each patient in the simulation that requests a ward bed will be assigned a “sampled_ward_act_time” which is sampled from an exponential distribution based on the values in class g. If a patient’s thrombolysis Boolean is TRUE the “sampled_ward_act_time” will reduce by 25% and the difference between the original “sampled_ward_act_time” and the new “sampled_ward_act_time_thrombolysis” will be converted into days (with the time in the simpy model representing minutes). The sum of saved thrombolysis days is then multiplied by the cost of a HASU bed stored in the G class. 

Trial Total Savings (£) : The sum of “SDEC Saving – Cost (£) and “Thrombolysis Savings (£)”.
Experimentation Aims 1.3 If the model has been used for experimentation, state the objectives that it was used to investigate.

a.) Scenario based analysis – Provide a name and description for each scenario, providing a rationale for the choice of scenarios and ensure that item 2.3 (below) is completed.

b.) Design of experiments – Provide details of the overall design of the experiments with reference to performance measures and their parameters (provide further details in data below).

c.)  Simulation Optimisation – (if appropriate) Provide full details of what is to be optimised, the parameters that were included and the algorithm(s) that was be used.  Where possible provide a citation of the algorithm(s).
All combinations of the following parameters were tested:

Same Day Emergency Care (SDEC) availability
- 0% Same Day Emergency Care (SDEC) availability
- 50% SDEC availability (continuous 12 hour block from xam to ypm)
- 100% SDEC availability (24 hour availability)

CT perfusion scanner availability
- 0% CT Perfusion (CTP) availability
- 50% CTP availability (continuous 12 hour block from xam to ypm)
- 100% CTP availability (24 hour availability)

Therapy availability
- Therapy is available with the Same Day Emergency Care setting.
- Therapy is not available with the Same Day Emergency Care setting.

In the instance that therapy is available, which enables admission avoidance for haemhorraghic and ischamic strokes with a higher MRS score (up to 3).
Where therapy is not available, the maximum MRS score that may be considered to avoid admission when seen in SDEC is 2.

Current and projected demand

[JOHN - how was projected demand determined?]
2.   Logic
Base model overview diagram 2.1 Describe the base model using appropriate diagrams and description.  This could include one or more process flow, activity cycle or equivalent diagrams sufficient to describe the model to readers.  Avoid complicated diagrams in the main text.  The goal is to describe the breadth and depth of the model with respect to the system being studied. See diagram 2.1 in folder 'checklists' within GitHub repository
Base model logic 2.2 Give details of the base model logic. Give additional model logic details sufficient to communicate to the reader how the model works. Patients arrive into the model based on two stochastic patient generators, calling on inter-arrival times for high arrival hours (determined as 7am to 11.59pm) and low arrival hours (12am to 6.59am).

Patients are then assessed by a triage nurse.

They will then undergo a CT or CT perfusion scan (see 2.3).

They will then be admitted to SDEC if available (see 2.3).

If they are not suitable to be discharged after their stay in SDEC, or SDEC is not available, they will be admitted to the main stroke ward.

If the main stroke ward is full, they will queue for the stroke ward until a bed becomes available (which can be considered in a real-world to be admission to an alternative ward while waiting for a stroke ward bed to become available). They are then admitted to the stroke ward for the sampled duration of their stay.
Scenario logic 2.3 Give details of the logical difference between the base case model and scenarios (if any).  This could be incorporated as text or where differences are substantial could be incorporated in the same manner as 2.2. If CT perfusion scanner availability is greater than 0, patients who complete their nurse triage step while scanners are available will instead undergo a CT perfusion scan. For patients with an unknown stroke onset time who were otherwise eligible for thrombolysis, this makes them eligible for thrombolysis, which has a 50% chance to lead to a 1 point improvement in MRS on discharge compared to the same patient not undergoing thrombolysis, and also reduces LOS to 75% of the originally sampled LOS duration for that patient (i.e. their stay duration is reduced by 25%).

If SDEC availability is greater than 0, patients who complete their CT or CT perfusion scan while the SDEC is open and has an available bed will be admitted to the SDEC instead of the inpatient ward. A subset of these patients will be considered eligible for avoiding a full subsequent admission and will be tagged as such. Further details of the criteria for admission avoidance are detailed in section 2.5.3.

If SDEC therapy support is enabled, more patients will become eligible for admission avoidance. This is again detailed in section 2.5.3.
Algorithms 2.4 Provide further detail on any algorithms in the model that (for example) mimic complex or manual processes in the real world (i.e.  scheduling of arrivals/appointments/operations/maintenance, operation of a conveyor system, machine breakdowns, etc.). Sufficient detail should be included (or referred to in other published work) for the algorithms to be reproducible.  Pseudo-code may be used to describe an algorithm.
Components 2.5 2.5.1 Entities A single class of patient is used within the model, referenced as 'Patient' within the Python model code.

These entities are the stroke and non-stroke patients who are seen within the pathway.

Key attributes are as follows:

ID = a persistent identifier used to track a single patient through their full system journey

onset_type = Categorisation of onset information: 0 : Known onset; 1 : Unknown onset but within CTP window; 2 : Unknown onset and outside CTP window

mrs_type = Modified Rankin Scale score at presentation (0–5). Drawn from an exponential distribution and capped at 5. 0 indicates no disability, while 5 represents severe disability.

mrs_discharge = Modified Rankin Scale score at discharge. Unlike mrs_type, which is set on patient generation, the mrs_discharge is set later by the model and may differ depending on the availability of different pathways within the model - e.g. a patient may have a lower MRS on discharge if the CT perfusion scanner availability permits them to have thrombolysis.

diagnosis = Raw randomised diagnostic value (0–100).

patient_diagnosis = Encoded diagnosis category: 0 : Intracerebral haemorrhage (ICH); 1 : Ischaemic stroke (I); 2 : Transient ischaemic attack (TIA); 3 : Stroke mimic; 4 : Non-stroke. This is mapped from the diagnosis patient attribute, using thresholds defined in the global parameter class g.

non_admission = a numerical score used to determine whether patients with a transient ischaemic attack (TIA) or stroke mimic symptoms are admitted.

Tracking attributes

Various attributes are set as events occur in the model, allowing for post-hoc analysis of logs.

advanced_ct_pathway: Whether the patient enters an advanced CT imaging pathway (elsewhere referred to as CT perfusion scanning).
sdec_pathway: Whether the patient is routed through the Same Day Emergency Care (SDEC) pathway.
thrombolysis: Whether the patient receives thrombolysis.
admission_avoidance: Whether the patient avoids an admission by being seen in SDEC instead.
q_time_nurse, q_time_ward: Time spent waiting for nursing assessment/consultation, and time spent waiting for an inpatient ward bed respectively.

Unused attributes

Several attributes are created but not currently used by the published version of the model. They may be used in future versions of the model.

priority = a numerical triage priority level used for queue ordering.
thrombectomy = whether the patient receives mechanical thrombectomy
2.5.2 Activities Nurse triage = generated entities undergo assessment by a nurse for a generated amount of time. Duration is generated using an exponential distribution parameterised from historical data.

CT or CT perfusion scanning = after triage, entities leave the nurse and undergo either a CT or CT perfusion (advanced CT) scan for a generated amount of time. Duration is generated using an exponential distribution parameterised from historical data.

Thrombolysis = if eligible, patients will undergo thrombolysis. The time taken for this is not modelled; it purely affects eventual LOS if patients are admitted to the stroke ward.

Same Day Emergency Care (SDEC) = if SDEC is open and has capacity, all patients are admitted to the SDEC after scanning.

Ward stay = if admission is not avoided (see 2.5.3), entities are admitted to the main stroke ward for a generated amount of time. Patients may go straight from the CT/CTP scanning step if the SDEC is not open or is at capacity, or may move from the SDEC to the main ward. LOS is generated using an exponential distribution parameterised from historical data, stratified by Modified Rankin Scale on admission and stroke type, and adjusted by a defined proportion if thrombolysis is administered.
2.5.3 Resources Key capacity-limited resources within the system are:

Nurses
Nurses are used during the assessment step, where the patients are triaged. This is the first step in the patient pathway after patients are generated.
The nurse resource is released when the patient moves on to scanning.

Same Day Emergency Care (SDEC) beds
After a patient has been seen by a nurse and received either a CT or CT perfusion (CTP) scan, they will be admitted to the same day emergency care ward if the ward is currently operating and if there is sufficient capacity.
The number of SDEC beds available defaults to 5.

Inpatient Ward beds
If the SDEC is not operating at the time a patient finishes their CT/CTP scan, or if SDEC is operating but at capacity, patient will be admitted to an inpatient ward bed if available.

Patients will also move to an inpatient ward bed after their SDEC stay if they are not a candidate for admission avoidance. Admission avoidance is considered to occur in the following situations:
- patient diagnosis is 0 or 1 AND mrs type is 0 or 1 AND the patient is not thrombolysed AND therapy is NOT available within the SDEC
- patient diagnosis is 0 or 1 AND mrs type is 0, 1 or 2 AND the patient is not thrombolysed AND therapy is available within the SDEC
- patient diagnosis is 2 (transient ischaemic attack) AND the randomised patient non-admission chance is higher than the globally defined TIA admission chance
- patient diagnosis is 3 or 4 (stroke mimic or non-stroke) AND the randomised patient non-admission chance is higher than the globally defined stroke mimic admission chance

If a bed is unavailble, patients will wait for a bed to become available. It is assumed that during this time they will be admitted to an alternative ward in the wider hospital where space is available, before being moved to this more appropriate ward as soon as a bed becomes available, with beds being allocated purely in the order that patients arrive.

Unused constrained resources
The model creates an attribute relating to the number of CT perfusion (CTP) scanners within the model. However, this attribute is not currently used within the model. Instead, standard CT scanning capacity is assumed to always be available. CTP scanning availability is controlled on a purely time-based basis rather than checking against the number of available units.
2.5.4 Queues First in first out (FIFO) queueing is used in all cases.

No reneging, balking or jockeying occur in the model.

If CT perfusion scanning is not available when required, entities will not wait for it to become available; they will proceed straight to a CT scanner instead.

If the SDEC unit is not available when required, entities will not wait for it to become available; they will proceed straight to the main stroke unit.

If a bed is not available in the main stroke unit when required, patients will queue for a bed in the stroke unit, with the delay in being allocated a stroke bed being recorded as one of the key metrics in the model. Patients will wait indefinitely for a bed to become available. The duration of their stay in the main stroke unit is only sampled after a bed becomes available, and is independent of the time they spend waiting for a bed. [TODO: determine if this is the optimum behaviour]
2.5.5 Entry/Exit Points The boundary of the model is the stroke pathway, with specific reference to how the stroke pathway is set up in 2025 in Maidstone and Tunbridge Wells hospital.
The model only looks at patients who interact with this pathway in some capacity, encompassing triage, scanning, time in the same day emergency care stroke unit (SDEC), and time in the main stroke inpatient unit.

Patients arrive into the model based on two stochastic patient generators, calling on inter-arrival times for high arrival hours (determined as 7am to 11.59pm) and low arrival hours (12am to 6.59am).

The arrivals are modelled on a poisson process, with inter-arrival times sampled from two separate exponential distributions parameterised using the average inter-arrival times of the two periods above in the real stroke unit being modelled.

This is the only arrival point for patients, and they will all follow broadly the same process, with minor variations in their journey as described in 2.3.

Patients may exit the system at one of two points:

- discharge from the SDEC (if conditions for admission avoidance are met - see section 2.5.3)
- discharge from the stroke unit
3.   Data
Data sources 3.1 List and detail all data sources. Sources may include:

·         Interviews with stakeholders,
·         Samples of routinely collected data,
·         Prospectively collected samples for the purpose of the simulation study,
·         Public domain data published in either academic or organisational literature.   Provide, where possible, the link and DOI to the data or reference to published literature.

All data source descriptions should include details of the sample size, sample date ranges and use within the study.
Pre-processing 3.2 Provide details of any data manipulation that has taken place before its use in the simulation, e.g. interpolation to account for missing data or the removal of outliers.
Input parameters 3.3 List all input variables in the model. Provide a description of their use and include parameter values.  For stochastic inputs provide details of any continuous, discrete or empirical distributions used along with all associated parameters.  Give details of all time dependent parameters and correlation.

Clearly state:

Base case data

Data use in experimentation, where different from the base case.

Where optimisation or design of experiments has been used, state the range of values that parameters can take.

Where theoretical distributions are used, state how these were selected and prioritised above other candidate distributions.
Note that the time units used within the model are minutes; all values below relate to durations in minutes. An asterisk is used to identify those parameters that can be easily altered using the web based front end. All listed parameters could bechanged within the model code.

Patient inter-arrival times
Inter-arrival times are drawn from an exponential distribution.
Two different distributions are used for different times of day:
High arrival hours (7am to 11.59pm): λ = 1 / 200.0
Low arrival hours (12am to 6.59am): λ = 1 / 666.666666666667

Activity durations
All activity durations draw from an exponential distribution, where λ is calculated as 1 divided by the relevant value from the list below (where all values relate to a number of minutes).
mean_n_consult_time = 60; mean_n_ct_time = 20; mean_n_sdec_time = 240

Time on the main wards is an exponential distribution parameterised in the same way, but the value depends on both the stroke type (intercranial haemhorragic [ich], ischaemic [i], transient ischaemic attack (tia), and stroke mimic or non-stroke.
Ischaemic strokes: mrs_0 = 1440 * 6; mrs_1 = 1440 * 4; mrs_2 = 1440 * 8; mrs_3 = 1440 * 11; mrs_4 = 1440 * 24; mrs_5 = 1440 * 29
Intercranial haemhorrhage: mrs_0 = 1440 * 5; mrs_1 = 1440 * 4; mrs_2 = 1440 * 5; mrs_3 = 1440 * 17; mrs_4 = 1440 * 36; mrs_5 = 1440 * 36
non_stroke = 4320
tia = 1440

Where patients undergo thrombolysis, the sampled duration is modified by the following parameter: thrombolysis_los_save = 0.75

Opening/operating hours of resources
Various parameters are used to determine what percentage of time the SDEC and advanced CT scanning capabilities are available and from what time of day they are available, defaulting to no availability for either.
These can be set independently of each other.
The model is primarily built to support one single uninterruped period of availability per day.

Costs
The cost of staffing the SDEC per minute is tracked with sdec_dr_cost_min = 0.50
Per day overnight hyper-acute stroke unit bed costs are set as follows: inpatient_bed_cost = £876 and inpatient_bed_cost (thrombolysed patients) = £528.17

Other
The average Modified Rankin Scale score is determined with the parameter: mean_mrs = 2
Patients are allocated a diagnosis value using a uniform distribution randing from 0 to 100. They are then categoriesed using the following boundaries: <= 10 = intercranial haemhorrhage (ich); <= 60 = ischaemic stroke (i); <= 70 = tia; <= 80 = stroke mimic; > 80 = non-stroke
Assumptions 3.4 Where data or knowledge of the real system is unavailable what assumptions are included in the model?  This might include parameter values, distributions or routing logic within the model.
4.   Experimentation
Initialisation 4.1 Report if the system modelled is terminating or non-terminating.  State if a warm-up period has been used, its length and the analysis method used to select it.  For terminating systems state the stopping condition.

State what if any initial model conditions have been included, e.g., pre-loaded queues and activities.  Report whether initialisation of these variables is deterministic or stochastic.
The system is non-terminating.

A warm-up period equivalent to one fifth of the specified model duration is included.

[TODO: Add justification for warm-up duration]

No pre-loaded queues or activities are included in the initialisation of the model.
Run length 4.2 Detail the run length of the simulation model and time units. The model defaults to a run duration of one non-leap calendar year.

The model uses minutes as its units of time, so this equates to 525,600 minutes.
Estimation approach 4.3 State the method used to account for the stochasticity: For example, two common methods are multiple replications or batch means.

Where multiple replications have been used, state the number of replications and for batch means, indicate the batch length and whether the batch means procedure is standard, spaced or overlapping.

For both procedures provide a justification for   the methods used and the number of replications/size of batches.
Multiple replications are used to account for stochasticity.

The model uses [x] runs. [TODO: determine final number of runs]

[TODO: add justification for run number]
5.   Implementation
Software or programming language 5.1 State the operating system and version and build number.

State the name, version and build number of commercial or open source DES software that the model is implemented in. 

State the name and version of general-purpose programming languages used (e.g. Python 3.5).

Where frameworks and libraries have been used provide all details including version numbers.
[TODO: Add OS and build number from windows → system settings → about]

The model is written in the Python programming language.

Results were obtained using Python 3.12.10.[TODO: this may change depending on exact version John is running].

Key libraries for the model itself are
simpy==4.1.1
vidigi==1.1.0
pandas==2.1.1
numpy==1.26.4
matplotlib==3.10.8
sim-tools==1.0.0

Additional libraries are used for the web application front end and documentation creation

streamlit-mermaid==0.3.0
mkdocs-material==9.7.0
mkdocstrings[python]
streamlit-extras==0.7.8
streamlit==1.52.1
stlitepack==0.4.5
Random sampling 5.2 State the algorithm used to generate random samples in the software/programming language used e.g. Mersenne Twister.

If common random numbers are used, state how seeds (or random number streams) are distributed among sampling processes.
Seeds are generated using Numpy's seed sequence, which is itself primed by a user-provided seed (default 42) plus the run number.

Generators for each random number stream (one per activity) are set up independently using the sampling classes of the sim_tools package (v1.0.0), which each provided with a seed from the seed sequence.
Model execution 5.3 State the event processing mechanism used e.g. three phase, event, activity, process interaction. 

Note that in some commercial software the event processing mechanism may not be published. In these cases authors should adhere to item 5.1 software recommendations.

State all priority rules included if entities/activities compete for resources.

If the model is parallel, distributed and/or use grid or cloud computing, etc., state and preferably reference the technology used.  For parallel and distributed simulations the time management algorithms used.  If the HLA is used then state the version of the standard, which run-time infrastructure (and version), and any supporting documents (FOMs, etc.)
SimPy is described as a 'process-based discrete-event simulation framework'. It makes use of Python generators to describe these processes.

No prioritisation is applied when allocating resources to beds, though the model has been set up with both CTP scanners and SDEC beds as priority resources, with generated patients also having a priority score, so future versions of the model may be enhanced to make use of prioritisation at these points in the model.

System Specification 5.4 State the model run time and specification of hardware used.  This is particularly important for large scale models that require substantial computing power.  For parallel, distributed and/or use grid or cloud computing, etc. state the details of all systems used in the implementation (processors, network, etc.) [TODO: get John's system specs from windows → system settings → about]
6.   Code Access
Computer Model Sharing Statement 6.1 Describe how someone could obtain the model described in the paper, the simulation software and any other associated software (or hardware) needed to reproduce the results.  Provide, where possible, the link and DOIs to these. Model code, environment specifications, code for the associated web application frontend, and outputs associated with this paper can be accessed on GitHub: TODO

A permanent archive of the version of the code and results relating to this paper can be accessed on Zenodo: TODO

All code is licenced under the MIT licence, a permissive licence allowing for use and adaptation of this work in both non-commercial and commercial settings.