|
1 | 1 | # New Hospitals Demand Model |
2 | 2 |
|
| 3 | +<!-- badges: start --> |
| 4 | + |
| 5 | +[](https://www.repostatus.org/#active) |
| 8 | + |
3 | 9 | [](https://codecov.io/gh/The-Strategy-Unit/nhp_model) |
4 | 10 |
|
| 11 | +<!-- badges: end --> |
| 12 | + |
5 | 13 | ## Welcome |
6 | 14 |
|
7 | 15 | Welcome to the New Hospital Programme demand and capacity modelling tool. The methodology underpinning this model code is given in [the documentation](https://connect.strategyunitwm.nhs.uk/nhp/project_information/), along with a host of other technical information about the model and data that the model was built on. |
8 | 16 |
|
9 | | -Please note that it is important that the parameters of the model are set with great care and with proper support. It is important also that healthcare system partners are appropriately involved in parameter setting. For a description of the full process and support provision that is necessary to ensure the model functions well please see LINK FORTHCOMING. |
| 17 | +Please note that it is important that the parameters of the model are set with great care and with proper support. It is important also that healthcare system partners are appropriately involved in parameter setting. For a description of the full process and support provision that is necessary to ensure the model functions well please see the [NHS Futures workspace](https://future.nhs.uk/NewHospitalProgrammeDigital/browseFolder?fid=53572528&done=OBJChangesSaved) |
10 | 18 |
|
11 | 19 | This repo contains the model code but there are several other repositories which contain useful tools to set the [parameters of and run the model](https://github.com/The-Strategy-Unit/nhp_inputs), as well as to [explore the output of the model](https://github.com/The-Strategy-Unit/nhp_outputs). |
12 | 20 |
|
13 | | -## Running the model |
14 | | - |
15 | | -To run the model locally you will need to have installed miniconda, git, and VSCode. This is assuming that you are running on Windows, steps will need to be adjusted for other platforms. |
16 | | - |
17 | | -### Install |
18 | | - |
19 | | -1. Install [miniconda](https://conda.io/projects/conda/en/latest/user-guide/install/windows.html). When installing, choose to install for all users, and check the box on the final page to add conda to the System PATH. |
20 | | -2. Install [VS Code](https://code.visualstudio.com/). You can accept the default values while installing. |
21 | | -3. Install [Git](https://git-scm.com/downloads). When asked to choose the default editor, you should pick a "VS Code" or "notepad", unless you know "vim". |
22 | | - |
23 | | -### Set up VS Code |
24 | | - |
25 | | -4. Open Visual Studio Code, on the left hand panel, press the "extensions" button (or press Ctrl+Shift+X) |
26 | | -5. Search for "python" and press install |
27 | | -6. Search for "jupyter" and press install |
28 | | -7. Clone the git repository: the easiest way is to press `Ctrl+Shift+p` and type "clone", you should see "Git: clone". Choose that, then choose "Clone from GitHub". Follow the prompts to sign in, then when it asks you to type a repository name, type `The-Strategy-Unit/nhp_model`. |
29 | | - |
30 | | -### Set up Python |
31 | | - |
32 | | -8. Open the repository in Visual Studio Code, then open a terminal `Terminal -> New Terminal (Ctrl+Shift+')`. |
33 | | -9. In the terminal |
34 | | - ``` py |
35 | | - conda init |
36 | | - conda env create -f environment.yml |
37 | | - ``` |
38 | | -9. Press `Ctrl+Shift+p`, then type `Select Interpreter`. Press the down key and select `Python 3.10.4 ('nhp')`. |
39 | | -10. Download the data (see *Downloading the data*), and extract the contents to the project's folder. |
40 | | - |
41 | | -## Running the model |
42 | | - |
43 | | -The simplest way to test the model is to press `F5` in VS code. There are a number of debug profiles for testing each individual type of model (A&E, Inpatients, Outpatients), or to run all of the principal models, or run all of the models in parallel. |
44 | | - |
45 | | -You can use all of the VS code debugging tools like breakpoints and the debug console. Consult the [VS code documentation](https://code.visualstudio.com/docs/python/debugging) for more on how to do this. |
46 | | - |
47 | | -There is a Jupyter notebook, [`run_model.ipynb`](run_model.ipynb) which runs the models for a given params file. |
48 | | - |
49 | 21 | ## Deployment |
50 | 22 |
|
51 | 23 | The model is deployed to Azure Container Registry on pull requests, tagging the container as `nhp_model:dev`, and on releases its deployed to `nhp_model:v0.*.*` and `nhp_model:latest`. |
0 commit comments