Skip to content

Commit

Permalink
add more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MeWu-IDM committed Mar 28, 2024
1 parent 2e4a867 commit 76be8bc
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 59 deletions.
129 changes: 70 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,89 @@
---
editor_options:
markdown:
wrap: 72
---

# PACE-HRH-UI

In the rapidly evolving landscape of population health management,
there is a critical and pressing need for tools that enable efficient capacity estimation,
taking into account various dynamic factors such as population demographics, seasonal trends,
and health-related tasks.
To address this challenge, we introduce an open-source software designed to serve as
a population-aware capacity estimator.
This application offers users the ability to configure inputs related to
population size, seasonal variations, and specific health tasks,
thereby providing customized capacity planning solutions tailored to different regions and diverse needs.
<br><br>
PACE-HRH-UI is a shinyapp that encapulates the [PACE-HRH](https://github.com/InstituteforDiseaseModeling/PACE-HRH/releases) package
which employs stochastic simulation for capacity projections based on excel spreadsheets configurations,
it offers users a friendly interface to visualization the input data and simulation results.
Users can also download and coompare results from different run for further analysis.


### Setup
Install the most recent version of the PACE-HRH-UI binary file from our [releases](https://github.com/InstituteforDiseaseModeling/PACE-HRH-UI/releases)


### Run the app locally
The first step is torun `install_packages.R`, once you have all the dependent packages installed,
in RStudio open `app.R` and click on "Run App". Alternatively you can launch the app from the RStudio console with the following:
```
In the rapidly evolving landscape of population health management, there
is a critical and pressing need for tools that enable efficient capacity
estimation, taking into account various dynamic factors such as
population demographics, seasonal trends, and health-related tasks. To
address this challenge, we introduce an open-source software designed to
serve as a population-aware capacity estimator. This application offers
users the ability to configure inputs related to population size,
seasonal variations, and specific health tasks, thereby providing
customized capacity planning solutions tailored to different regions and
diverse needs. <br><br> PACE-HRH-UI is a shinyapp that encapulates the
[PACE-HRH](https://github.com/InstituteforDiseaseModeling/PACE-HRH/releases)
package which employs stochastic simulation for capacity projections
based on excel spreadsheets configurations, it offers users a friendly
interface to visualization the input data and simulation results. Users
can also download and coompare results from different run for further
analysis.

### Download the app

Install the most recent version of the PACE-HRH-UI binary file from our
[releases](https://github.com/InstituteforDiseaseModeling/PACE-HRH-UI/releases)

### Run the app locally

The first step is torun `install_packages.R`, once you have all the
dependent packages installed, in RStudio open `app.R` and click on "Run
App". Alternatively you can launch the app from the RStudio console with
the following:

```
library(shiny)
runApp(port=8888)
```
<br>
This will launch your default browser and open http://localhost:8888, you can use any port as you wish
but if you switch port between two runs, your data may not be saved in the local storage.

<br> This will launch your default browser and open
<http://localhost:8888>, you can use any port as you wish but if you
switch port between two runs, your data may not be saved in the same
local storage.

### Installation and Run on windows without Git and Rstudio
To install the app in a separate environment:
<br>
Download `start_pace_ui.bat` and run it by double clicking it (or open a commandline window to your downloaded folder to run it).
This will prompt you a step by step guide for installation and running the app
<br>
Once installed on your desired folder, for future use, you should go to the subfolder with name PACE-HRH-UI-{version} and run the start_pace_ui.bat from there,
this will start the app and open your default browser so that you can interact with it. To close the app, simply press any key on the batch script window.
<br>
You can zip this pre-installed self-contained folder and send it to those who do not have internet access, they should be able to run start_pace_ui.bat without installation.
<br>

To install the app in a separate environment: <br> Download
`start_pace_ui.bat` and run it by double clicking it (or open a
commandline window to your downloaded folder to run it). This will
prompt you a [step by step guide](./Setup.md) for installation and
running the app. <br> Once installed on your desired folder, for future
use, you should go to the subfolder with name PACE-HRH-UI-{version} and
run the start_pace_ui.bat from there, this will start the app in offline mode and open
your default browser so that you can interact with it. To close the app,
simply press any key on the command prompt window. <br> You can zip this
pre-installed self-contained folder and send it to those who do not have
internet access, they should be able to run `start_pace_ui.bat` without
installation. <br>

### Screenshots

- From Homepage you can start a new simulation from scrtach or use a previous run config to start.
- From Homepage you can start a new simulation from scratch or use a
previous run configuration to start.

![Home Page](./screenshots/1.homepage.png)

- Configure page for simulation paramaters. ![Configuration
Page](./screenshots/2.configuration.png)

- Configure page for simulation paramaters.
![Configuration Page](./screenshots/2.configuration.png)

- Configure page for input data allow you to upload and preview custom data.
![Configuration Data](./screenshots/3.configure_data.png)

- Visualize your input data.
![Validation Page](./screenshots/4.validation.png)
- Configure page for input data: This allows you to upload and preview custom
data. ![Configuration Data](./screenshots/3.configure_data.png)

- Run simulation page allow you set simulation iterations.
![Run simulation Page](./screenshots/5.Run_simulation.png)
- Visualize your input data. ![Validation
Page](./screenshots/4.validation.png)

- Check simulation logs for progress and potential issues.
![simulation Logs Page](./screenshots/6.Run_simulation_log.png)
- Run simulation page: This allows you set simulation iterations. ![Run
simulation Page](./screenshots/5.Run_simulation.png)

- Visualize and download the pdf file.
![Download Pdf Data](./screenshots/7.result_compare.png)
- Check simulation logs for progress and potential issues.
![simulation Logs Page](./screenshots/6.Run_simulation_log.png)

- Download result files to your desktop and do your own analysis.
![Download result files Page](./screenshots/9.download_files.png)
- Visualize and download the pdf file. ![Download Pdf
Data](./screenshots/7.result_compare.png)

- Download result files to your desktop and do your own analysis.
![Download result files Page](./screenshots/9.download_files.png)
13 changes: 13 additions & 0 deletions Setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Setup PACE-HRH-UI using batch script

1. Download [start_pace_ui.bat](https://github.com/InstituteforDiseaseModeling/PACE-HRH-UI/blob/main/start_pace_ui.bat) to your computer. ![](./screenshots/download_batch.png)

2. Double-click on the downloaded file to start the PACE-HRH-UI application. Note: Your computer's antivirus scan may prevent you from running it, click on "More Info" and "Run Anyway" to proceed. ![](./screenshots/defender.png)

3. Alternatively you can use command prompt window to run it. Open a command prompt window (cmd) and navigate to the folder where you downloaded the file. Run the following command: `start_pace_ui.bat` ![](./screenshots/commandline.png)

4. When you start the application, you will see a command prompt window asking for installation location. You must have internet for the first time installation. (However,You will be able to zip this "installed folder" later and send it to those who do not have internet access for offline run). You can enter either absolute or relative path. All the files needed to run will be installed into this location and you will need to launch the app from this location later. You will also need to agree on our license terms in order to proceed. ![](./screenshots/prompt.png)

5. The installation may take 5-10 minutes depending on your computer's processing power and internet speed. Once the installation is completed, you will see it asking you to reopen the `start_pace_ui.bat` from your chosen directory. You can now close the command prompt window and go to this folder, from there you can restart app using the same batch script in offline mode. ![](./screenshots/success.png)

6. After restart (double click) `start_pace_ui.bat` from your installed location, it should open the app on port 8888 using your default browser. Leave the commandline window open while interacting with the app. ![](./screenshots/app.png)
Binary file added screenshots/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/commandline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/defender.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/download_batch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/prompt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 76be8bc

Please sign in to comment.