Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 1.84 KB

README.md

File metadata and controls

45 lines (35 loc) · 1.84 KB

This code accompanies the following paper:

Delos Reyes, R., Capurro, D., & Geard, N. (2024). Modelling patient trajectories in emergency department simulations using retrospective patient cohorts. Computers in Biology and Medicine. https://doi.org/10.1016/j.compbiomed.2024.109147

graphical-abstract_10-1016-j-compbiomed-2024-109147


Setting up the environment

  1. Download anaconda
  2. Run conda env create --name edabm -f edabm.yaml
  3. Run conda activate edabm

Getting the required data

  1. Download the following datasets (they require credentialed access which can be requested at the provided websites)
  2. Store the unzipped datasets inside the data folder
    • data/ed
    • data/hosp
    • data/icu

Preprocessing the data

Open the following Jupyter notebooks in the following order and run all cells:

  1. generate_patient_data.ipynb  # To exclude patient records with invalid values
  2. generate_event_logs.ipynb  # To convert the records to event logs
  3. generate_model_parameters.ipynb  # To generate the parameters needed to run the ED simulation model
  4. generate_mci_frequency.ipynb  # To generate modified parameters for experiment 3 (mass casualty incident scenarios)

Running the experiments

  1. Run chmod u+x ./run.sh
  2. Run ./run.sh

Generating the figures

Open the following Jupyter notebooks and run all cells:

  1. plot_results_exp1.ipynb
  2. plot_results_exp2.ipynb
  3. plot_results_exp3.ipynb
  4. plot_results_supplementary.ipynb