From 7908742a6eee00c8f162d12425f8fb201358e4b4 Mon Sep 17 00:00:00 2001 From: YiWen Hon Date: Fri, 31 May 2024 13:53:36 +0100 Subject: [PATCH 1/6] added link to NHS data dictionary --- data_extraction/index.qmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data_extraction/index.qmd b/data_extraction/index.qmd index c18e2c7..ff24470 100644 --- a/data_extraction/index.qmd +++ b/data_extraction/index.qmd @@ -3,7 +3,8 @@ title: Data extraction overview order: 200 --- -We store Hospital Episodes Statistics (HES) data in the MLCSU's datawarehouse. +We store Hospital Episodes Statistics (HES) data in the MLCSU's data warehouse. +The NHS Data Dictionary is available to [view online](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics/hospital-episode-statistics-data-dictionary). There are a number of scripts in this project which are used to extract the data. All of these repositories utilise the `{targets}` package to orchestrate the data extraction. From f991ba9f5e1cbbcfe03500d5cfc0c8a7c37a1739 Mon Sep 17 00:00:00 2001 From: YiWen Hon Date: Tue, 4 Jun 2024 13:38:37 +0100 Subject: [PATCH 2/6] added 1.2 update news --- project_plan_and_summary/model_updates.qmd | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/project_plan_and_summary/model_updates.qmd b/project_plan_and_summary/model_updates.qmd index 1c245f1..6783b17 100644 --- a/project_plan_and_summary/model_updates.qmd +++ b/project_plan_and_summary/model_updates.qmd @@ -3,6 +3,34 @@ title: "Model updates" order: 4 --- +# Update 2024/06/06 + +## v.1.2 of NHP model, inputs and outputs apps + +All scenarios on the inputs app that are currently on v.1.1 will be automatically upgraded to v.1.2. Users who have run a scenario on v.1.1 may wish to re-run their scenario on v.1.2. + +**How can I see which version of the model and inputs app is being used?** + +Check the URL: + +- If it starts with https://connect.strategyunitwm.nhs.uk/nhp/v1-1/ then it is v.1.1. +- If it starts with https://connect.strategyunitwm.nhs.uk/nhp/v1-2/ then it is v.1.2. + +**Capacity conversion removed** + +We have removed bed capacity from the inputs app, and calculation of beds from the model calculations and outputs. We are working on an improved capacity calculation which utilises queueing theory, which will replace this. + +**More granular results** + +On the Excel download from the outputs app, model results are now available broken down by treatment specialty and length of stay. + +**Bug fixes** + +- In the inputs app, the diagnosis tables for outpatients mitigators were showing all attendances, not just those without procedures. The strategies in the model only apply to activity with no procedures. The diagnosis tables should now match the activity which will be affected in the model. + +- In the inputs app, the Outpatient Convert to Tele-Attendance mitigator charts were including attendances with procedures. The strategy itself in the model only applies to activity with no procedures. The tables and charts for these mitigators should now match the activity which will be affected in the model. + +- The A&E Patients Left Before Being Treated mitigators now utilise the SNOMED codes "1066301000000103", "1066311000000101" and “1066321000000107”. Previously, they only used the SNOMED code 1066321000000107. # Update 2024/05/10 From 45f2f0d15e0b473b6d39035240c2f343e15abc3a Mon Sep 17 00:00:00 2001 From: YiWen Hon Date: Tue, 4 Jun 2024 14:23:01 +0100 Subject: [PATCH 3/6] removed bed capacity references --- _quarto.yml | 3 -- .../capacity_conversion/beds.qmd | 45 ------------------- .../capacity_conversion/theatres.qmd | 8 ---- modelling_methodology/methodology.qmd | 4 -- .../inputs_and_outputs.qmd | 3 +- software_implementation/qa_and_testing.qmd | 2 - user_guide/FAQ.qmd | 2 +- user_guide/NHP_model_summary.qmd | 6 +-- user_guide/setting_the_parameters.qmd | 11 ----- 9 files changed, 4 insertions(+), 80 deletions(-) delete mode 100644 modelling_methodology/capacity_conversion/beds.qmd delete mode 100644 modelling_methodology/capacity_conversion/theatres.qmd diff --git a/_quarto.yml b/_quarto.yml index 24e5365..74210ee 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -37,9 +37,6 @@ website: - modelling_methodology/activity_mitigators/inpatient_activity_mitigators.qmd - modelling_methodology/activity_mitigators/outpatient_activity_mitigators.qmd - modelling_methodology/activity_mitigators/ae_activity_mitigators.qmd - - section: "Capacity conversion" - contents: - - auto: modelling_methodology/capacity_conversion/*.qmd - section: "Data quality" contents: - modelling_methodology/data_summary.qmd diff --git a/modelling_methodology/capacity_conversion/beds.qmd b/modelling_methodology/capacity_conversion/beds.qmd deleted file mode 100644 index b26f633..0000000 --- a/modelling_methodology/capacity_conversion/beds.qmd +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Bed Capacity Conversion ---- - -The inpatients model generates activity based on admissions and number of days spent in a bed. -We use data from the [KH03][kh03] data returns along with the modelled and baseline activity to estimate the number of beds that may be required in the future. - -[kh03]: https://www.england.nhs.uk/statistics/statistical-work-areas/bed-availability-and-occupancy/ - - -$$ -N=\cfrac{A_{future}}{A_{baseline}}\cdot\cfrac{B}{P} -$$ - -where: - -- $A$ is the activity: the sum of length of stay (LoS) [LoS: difference between discharge date and admission date]{.aside} -- $B$ is the number of beds that were occupied in the baseline period, sourced from KH03. -- $P$ is the future occupancy rate paramater, provided by the user -- $N$ is the future amount of available beds - -This calculation is performed by quarter, and by "ward group", which are definable in the model inputs by grouping main specialties together. - -## Example - -In the baseline, we may have 90 beds and a 90% occupancy rate (100 beds available). -We may want to target 80% occupancy in the future. - -If in the baseline there were 100,000 bed nights, and in the future 120,000, with 90 beds in the baseline and a future occupancy rate of 90%, then we would get: - -$$ -N=\cfrac{120,000}{100,000}\cdot\cfrac{90}{0.8} = 1.2 \times 112.5 = 135 -$$ - -## Data logic - -We filter to only include patients who were `classpat == "1"` (ordinary admissions) with a `speldur > 0` (they spent at least 1 night in hospital). - -We take the admission date, and we create a row from each data from the admission date (inclusive) to the discharge date (exclusive). For example if a patient was admitted on 01/01/2023 and discharged on 04/01/2023 (`speldur = 3`), then we would have the following rows: - -- 01/01/2023 -- 02/01/2023 -- 03/01/2023 - -We then assign each of the rows to a quarter, then count in each quarter how many nights beds were occupied for by counting the number of rows in that quarter (per `mainspef`). \ No newline at end of file diff --git a/modelling_methodology/capacity_conversion/theatres.qmd b/modelling_methodology/capacity_conversion/theatres.qmd deleted file mode 100644 index bdc6db9..0000000 --- a/modelling_methodology/capacity_conversion/theatres.qmd +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Theatres Capacity Conversion ---- - -Versions of the model prior to 0.6 included theatres capacity conversion. However, the decision was made to remove this in November 2023, as the methodology has not been fully agreed. Thanks to Git and version control, the documentation on how this was previously handled is available on GitHub. - -This page will be updated when the methodology is finalized and incorporated to the model. - diff --git a/modelling_methodology/methodology.qmd b/modelling_methodology/methodology.qmd index 8da45d5..6990cc7 100644 --- a/modelling_methodology/methodology.qmd +++ b/modelling_methodology/methodology.qmd @@ -30,7 +30,3 @@ Healthcare need and demand might also change as a result of a series of non-demo ### Activity mitigators Hospital trusts and local health systems frequently plan to reduce hospital activity or resource use, by improving efficiency, diverting patients to receive care in more local settings outside of hospital, by preventing needs upstream or by restricting access to low-value procedures. The component of the model allows users to adjust specific forms of hospital activity or resource use that commonly form the focus of these schemes. - -### Resource utilisation rates -Having determined the level of future activity after the transformations described above, the model estimates the level of capacity (beds) required to deliver it. This is based on the user-provided estimation of resource utilisation - more information on this is available in the [Capacity Conversion section](capacity_conversion/beds.qmd). - diff --git a/project_plan_and_summary/inputs_and_outputs.qmd b/project_plan_and_summary/inputs_and_outputs.qmd index fb138ed..3038f10 100644 --- a/project_plan_and_summary/inputs_and_outputs.qmd +++ b/project_plan_and_summary/inputs_and_outputs.qmd @@ -11,7 +11,7 @@ There are two main types of inputs for the model: - Historical national hospital activity data: This will be sourced from Hospital Episode Statistics (HES) data, and will be the main source for input data. It provides record/person-level data on historical hospital activity. - ONS population and life expectancy projections: This may be supplemented by local/regional projections, such as housing growth estimates. -- Other published data sets: This includes, for example, NHS trust bed and theatre numbers (including occupancy rates), Referral to Treatment (RTT) data, and lookup tables mapping CCGs, trusts, sites and local authorities. Note that some of these datasets (such as RTT data) will be used to provide contextual information for users setting model parameters, rather than directly driving the model engine and outputs. +- Other published data sets: This includes Referral to Treatment (RTT) data and lookup tables mapping CCGs, trusts, sites and local authorities. Note that some of these datasets (such as RTT data) will be used to provide contextual information for users setting model parameters, rather than directly driving the model engine and outputs. For more detail on the data used in the project see the [data summary page](../modelling_methodology/data_summary.qmd). @@ -34,7 +34,6 @@ The model will use the estimations of activity increase/decrease found in the pa The model will generate the following key outputs for each scheme and set of scenarios: - A description of future hospital activity levels across a range of future years, based on the principal forecast from the tool. This will contain high-level summary statistics such as counts of admissions, outpatient attendances and bed days, along with more detailed information providing a breakdown by activity type, month, specialty, patient age, diagnosis, and so on. -- A description of future capacity requirements across a range of future years. This will contain high-level summary statistics such as the number of beds required by different activity types by quarter. - A description of the potential variation in the high-level summary statistics given the uncertainty in the underpinning inputs, assumptions and estimates. - A summary of input assumptions and estimates, including how central estimates and probability distributions compare with those used in modelling for other local health systems participating in the NHP. - A detailed extract of the full model outputs, including record level data for each scenario/run of the Monte-Carlo simulation. diff --git a/software_implementation/qa_and_testing.qmd b/software_implementation/qa_and_testing.qmd index 1000f8b..7a0f55c 100644 --- a/software_implementation/qa_and_testing.qmd +++ b/software_implementation/qa_and_testing.qmd @@ -36,7 +36,6 @@ The model results are a product of the inputs- that is the data and the paramete There are four main data sources in use within the project. * Hospital Episode Statistics (HES) -* Bed Availability and Occupancy (KH03) Collection * Quarterly Monitoring of Cancelled Operations Return (QMCO) * Office for National Statistics Population Projections @@ -68,7 +67,6 @@ The following parameters are set by individual trusts * Expatriation/ repatriation * Inequalities * Activity mitigators -* Bed occupancy In all cases these parameters are set after an extensive support process from a team allied to the team building the model, and the parameters are set with appropriate involvement of stakeholders and with governance processes as determined locally. diff --git a/user_guide/FAQ.qmd b/user_guide/FAQ.qmd index 377f48b..24a35c9 100644 --- a/user_guide/FAQ.qmd +++ b/user_guide/FAQ.qmd @@ -79,7 +79,7 @@ Subject matter experts were invited to provide forecasts about future hospital a ## Capacity conversion - Does the model project the number of beds required? -Earlier versions did include KH03 bed and occupancy data which were used to generate some indicative capacity (bed) estimates, but this was found to be insufficiently accurate – these bed number conversions are no longer shown in the outputs app although they can be viewed in the downloadable Excel file. This is principally a demand model. The main outputs are hospital activity as measured in inpatients admissions and bed days, and outpatients and A&E attendances. Schemes will need to undertake their own analysis to convert activity into capacity. The first stage output report that we co-produce with you will detail how you have locally undertaken the conversion from demand to capacity based on local context. Over coming months, we will be issuing tools that can assist in this (e.g. discrete event simulation models that assist in determining required capacity based on availability requirements that you set and bed pools that you determine) and we are also structuring the demand output reports to facilitate this aspect of planning (e.g. grouping particular categories of activity because they impact on a chosen type of capacity). +Earlier versions did include KH03 bed and occupancy data which were used to generate some indicative capacity (bed) estimates, but this was found to be insufficiently accurate. This is principally a demand model. The main outputs are hospital activity as measured in inpatients admissions and bed days, and outpatients and A&E attendances. Schemes will need to undertake their own analysis to convert activity into capacity. The first stage output report that we co-produce with you will detail how you have locally undertaken the conversion from demand to capacity based on local context. Over coming months, we will be issuing tools that can assist in this (e.g. discrete event simulation models that assist in determining required capacity based on availability requirements that you set and bed pools that you determine) and we are also structuring the demand output reports to facilitate this aspect of planning (e.g. grouping particular categories of activity because they impact on a chosen type of capacity). ## Does the model cater for seasonal variation to establish peak demand? diff --git a/user_guide/NHP_model_summary.qmd b/user_guide/NHP_model_summary.qmd index 247acaf..8fe2d16 100644 --- a/user_guide/NHP_model_summary.qmd +++ b/user_guide/NHP_model_summary.qmd @@ -5,9 +5,7 @@ order: 1 # What does the NHP model do? -In a nutshell, the NHP model estimates future hospital activity, and converts this activity into estimated future capacity requirements. - -To do this, it uses as its basis activity from a baseline year (2019/20). +In a nutshell, the NHP model estimates future hospital activity. To do this, it uses as its basis activity from a baseline year (2019/20). Users provide input parameters, estimating the probability of whether specific types of activity will increase or decrease. Other change factors are also taken into consideration, such as demographic and non-demographic growth. @@ -17,4 +15,4 @@ It will then run as many Monte Carlo simulations as have been selected by the us More detail on how the parameters are applied to individual records from the baseline data is [available here](../modelling_methodology/modelling_uncertainty.qmd). -After each model run we get estimated future hospital activity. The numerous runs that happen during the Monte Carlo simulations are summarised to give an overall estimation of likely future activity. This is then converted into estimated capacity requirements. +After each model run we get estimated future hospital activity. The numerous runs that happen during the Monte Carlo simulations are summarised to give an overall estimation of likely future activity. diff --git a/user_guide/setting_the_parameters.qmd b/user_guide/setting_the_parameters.qmd index ef53011..856434e 100644 --- a/user_guide/setting_the_parameters.qmd +++ b/user_guide/setting_the_parameters.qmd @@ -143,17 +143,6 @@ Includes the following types of activities, which are broken down further into s - Left before seen - Low cost discharged -## Capacity conversion - -### Bed occupancy - -- Mandatory, set by users -- Confidence interval, possible values 0 - 100% - -The NHP model currently converts projected hospital bed days to general and acute beds. The model user can set estimated future occupancy rates by specialty or group of specialties, the full calculation is available [here](../modelling_methodology/capacity_conversion/beds.html). - -For example, the estimated future occupancy rate for Maternity wards might be given as an 80% confidence interval of 65% - 90%. - ## Time profiles - Mandatory, set by users (defaults to linear) From 71e44e8adfd29adf4aee619541720f226fd189fa Mon Sep 17 00:00:00 2001 From: YiWen Hon Date: Tue, 4 Jun 2024 14:36:36 +0100 Subject: [PATCH 4/6] fixed bad punctuation in model_update --- project_plan_and_summary/model_updates.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_plan_and_summary/model_updates.qmd b/project_plan_and_summary/model_updates.qmd index 6783b17..b922341 100644 --- a/project_plan_and_summary/model_updates.qmd +++ b/project_plan_and_summary/model_updates.qmd @@ -30,7 +30,7 @@ On the Excel download from the outputs app, model results are now available brok - In the inputs app, the Outpatient Convert to Tele-Attendance mitigator charts were including attendances with procedures. The strategy itself in the model only applies to activity with no procedures. The tables and charts for these mitigators should now match the activity which will be affected in the model. -- The A&E Patients Left Before Being Treated mitigators now utilise the SNOMED codes "1066301000000103", "1066311000000101" and “1066321000000107”. Previously, they only used the SNOMED code 1066321000000107. +- The A&E Patients Left Before Being Treated mitigators now utilise the SNOMED codes "1066301000000103", "1066311000000101" and "1066321000000107". Previously, they only used the SNOMED code "1066321000000107". # Update 2024/05/10 From 5361cc27a167d0cac8ae18ff5593dcfeb8e43ec0 Mon Sep 17 00:00:00 2001 From: YiWen Hon Date: Wed, 5 Jun 2024 12:02:15 +0100 Subject: [PATCH 5/6] added updated text on planned changes to principal and waterfall --- project_plan_and_summary/model_updates.qmd | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/project_plan_and_summary/model_updates.qmd b/project_plan_and_summary/model_updates.qmd index b922341..a0d3581 100644 --- a/project_plan_and_summary/model_updates.qmd +++ b/project_plan_and_summary/model_updates.qmd @@ -32,6 +32,19 @@ On the Excel download from the outputs app, model results are now available brok - The A&E Patients Left Before Being Treated mitigators now utilise the SNOMED codes "1066301000000103", "1066311000000101" and "1066321000000107". Previously, they only used the SNOMED code "1066321000000107". +## Planned changes to waterfall / impact of changes chart and principal projection + +**Waterfalls / impact of changes charts** + +We are updating our evidence-based approach to visualising the shifts in activity in the outputs app. This will be available in July 2024. In the meantime, occasionally when the points of delivery (PODs) are small, we find the current approach doesn't work in the way we envisaged (resulting in the bars on the waterfall chart that illustrate the effect of individual modelling factors showing incorrect data. The underlying data within the downloadable Excel and JSON of results is similarly affected). Please note and be assured that the baseline and final model estimate figures are correct. + +**Principal projection** + +We are currently implementing an improved method to generate the principal projection. Again this will be available in July 2024. The new approach delivers a more stable estimate of future activity that is less affected by the randomness inherent in the probabilistic methods used within the model engine. The key impact of this improvement will be to ensure that the principal projection will always sit in the middle of the activity distributions resulting from the Monte Carlo simulation. At present, the principal projection can vary from the centre of the distribution and in some instances this variation can be material. + +In the meantime, if you note that any of the activity distribution charts provided in the outputs app show a principal projection that does not sit close to the middle of the distribution (as shown by the 50th percentile in the S-curve chart) AND if that variation is considered to be material (i.e. it would result in materially more or fewer beds than if the central (50th percentile) estimate were used) then we would advise that the current principal projection data is not used as the basis for your capacity conversions and instead wait for the updated model outputs before making the final capacity calculations. + + # Update 2024/05/10 ## Open source repositories From 41e21eb4ece7931289761fce2309757dd3bb838a Mon Sep 17 00:00:00 2001 From: YiWen Hon Date: Wed, 5 Jun 2024 13:02:29 +0100 Subject: [PATCH 6/6] added instructions for users on v.1.0 --- project_plan_and_summary/model_updates.qmd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project_plan_and_summary/model_updates.qmd b/project_plan_and_summary/model_updates.qmd index a0d3581..b71f94c 100644 --- a/project_plan_and_summary/model_updates.qmd +++ b/project_plan_and_summary/model_updates.qmd @@ -9,10 +9,13 @@ order: 4 All scenarios on the inputs app that are currently on v.1.1 will be automatically upgraded to v.1.2. Users who have run a scenario on v.1.1 may wish to re-run their scenario on v.1.2. +Users on v.1.0 will need to create a new scenario from scratch in order to utilise the newest available version of the model. + **How can I see which version of the model and inputs app is being used?** Check the URL: +- If it starts with https://connect.strategyunitwm.nhs.uk/nhp/v1-0/ then it is v.1.0. - If it starts with https://connect.strategyunitwm.nhs.uk/nhp/v1-1/ then it is v.1.1. - If it starts with https://connect.strategyunitwm.nhs.uk/nhp/v1-2/ then it is v.1.2.