nhsrwaitinglist

R-package to implement the waiting list management approach described in this paper by Fong et al: https://www.medrxiv.org/content/10.1101/2022.08.23.22279117v1.full-text

https://github.com/nhs-r-community/nhsrwaitinglist

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: medrxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.1%) to scientific vocabulary

Keywords

nhs nhs-r-community package queuing-theory r waiting-list
Last synced: 9 months ago · JSON representation

Repository

R-package to implement the waiting list management approach described in this paper by Fong et al: https://www.medrxiv.org/content/10.1101/2022.08.23.22279117v1.full-text

Basic Info
Statistics
  • Stars: 21
  • Watchers: 3
  • Forks: 4
  • Open Issues: 14
  • Releases: 3
Topics
nhs nhs-r-community package queuing-theory r waiting-list
Created over 2 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License Code of conduct

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

# set a seed so that the waiting list example is consistent
set.seed(2)
```

# NHSRwaitinglist




[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/nhs-r-community/NHSRwaitinglist/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/nhs-r-community/NHSRwaitinglist/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/nhs-r-community/NHSRwaitinglist/branch/main/graph/badge.svg)](https://app.codecov.io/gh/nhs-r-community/NHSRwaitinglist?branch=main)
[![downloads](https://cranlogs.r-pkg.org/badges/grand-total/NHSRwaitinglist)](https://cran.r-project.org/package=NHSRwaitinglist)


{NHSRwaitinglist} is an R package implementing the waiting list management approach described in the paper [Understanding Waiting Lists Pressures](https://www.medrxiv.org/content/10.1101/2022.08.23.22279117v1) by Fong et al (2022).  The methodology is presented by Neil Walton, Professor in Operations Management at Durham University Business School.  The package is being contributed to by members of the [NHS-R Community](https://nhsrcommunity.com/), with the aim of making it simpler for NHS analysts to adopt these methods for the analysis of their own waiting lists.  

## Explanatory Videos

These videos explain more about the Operations Management methodologies which are encapsulated by the package.  Click through to view them on YouTube.

Detailed presentation of method | Recap of method, and presentation of this package
:---:|:---:
[![Thumbnail for link to MAN huddle video](man/figures/NHSRwaitinglist_MAN_huddle_thumbnail.jpg)](https://www.youtube.com/watch?v=NWthhW5Fgls) | [![Thumbnail for link to Health and Care Analytics Conference E-lab video](man/figures/NHSRwaitinglist_HACA_elab_thumbnail.jpg)](https://www.youtube.com/watch?v=3peqTEl_ZAQ)
Midlands Analyst Network Huddle, Nov 2023 | Health and Care Analytics Conference e-lab, Jul 2024

## Installation 

You can install the current version of {NHSRwaitinglist} from GitHub as below.  
If you have not installed from GitHub before, you may first need to create and store a "Personal Access Token" (PAT) to grant access to your account, for example by following the [{usethis} guide](https://usethis.r-lib.org/articles/git-credentials.html#get-a-personal-access-token-pat).

```r
# Install from CRAN
install.packages("NHSRwaitinglist")

# install.packages("remotes")
remotes::install_github("nhs-r-community/NHSRwaitinglist", build_vignettes = TRUE)
```

## Getting Started

There is a minimal example below.  To look in more detail at the functions within the package and some more ways of using them, it is a good idea to review the first two vignettes:

1. The [example walkthrough](https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html) vignette takes a step-by-step walk through the white paper, using the six core functions in this package.  
2. The [three example waiting lists](https://nhs-r-community.github.io/NHSRwaitinglist/articles/three_example_waiting_lists.html) vignette simulates three closely related waiting lists, and uses package functions to explore some of their characteristics.  

At its most basic, the package can be used to simulate a waiting list (a dataframe of waiting list addition dates and removal dates), and then compute some important statistics.  Of course, if you already have waiting list data ready to analyse, you can skip the simulation step in the code below.

```{r}
# load the package
library(NHSRwaitinglist)

# simulate a waiting list
waiting_list <- wl_simulator(
  start_date = "2020-01-01",
  end_date = "2024-03-31",
  demand = 10, # simulating 10 patient arrivals per week
  capacity = 10.2 # simulating 10.2 patients being treated per week
)

# compute some waiting list statistics
overall_stats <- wl_stats(
  waiting_list = waiting_list,
  target_wait = 18 # standard NHS 18wk target
)

# review the minimal dataset needed to define a waiting list (first 5 rows only)
knitr::kable(head(waiting_list, 5))

# review the waiting list statistics
knitr::kable(overall_stats)
```

## Contributing

If you want to learn more about this project, please join the discussion at the [NHS-R Community Slack](https://nhsrcommunity.slack.com/) group and the specific channel #managing-waiting-lists.

Please see our 
[guidance on how to contribute](https://tools.nhsrcommunity.com/contribution.html).

This project is released with a Contributor [Code of Conduct](https://github.com/nhs-r-community/NHSRwaitinglist/blob/main/CODE_OF_CONDUCT.md). 
By contributing to this project, you agree to abide by its terms.

The simplest way to contribute is to [raise an issue](https://github.com/nhs-r-community/NHSRwaitinglist/issues) detailing the feature or functionality you would like to see added, or any unexpected behaviour or bugs you have experienced.

### Pull-Request workflow

You are welcome to also submit Pull Requests and, as the `main` branch is protected and won't accept pushes directly even if you have been added to the repository as a member, the workflow will be (from your own forked repository if you are not a member, or a clone of the repository if you are a member):

* Create new branch with a descriptive name
* Commit to the new branch (add code or delete code or make changes)
* Push the commits 
* Create a pull-request in GitHub to signal that your work is ready to be merged
* Tag one or more reviewers (@ThomUK and @ChrisMainey) so that your contribution can be reviewed and merged into main


## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://github.com/all-contributors/all-contributors/blob/master/docs/emoji-key.md)):




Jacqueline Grout
Jacqueline Grout

🤔 💻
Tom Smith
Tom Smith

💻
Matt Dray
Matt Dray

💻
kaituna
kaituna

📖 💻
Chris Mainey
Chris Mainey

💻 📖 ⚠️
PeterSNHS
PeterSNHS

📖
neilwalton
neilwalton

💻 📖
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

Owner

  • Name: NHS-R Community
  • Login: nhs-r-community
  • Kind: organization
  • Email: nhs.rcommunity@nhs.net
  • Location: United Kingdon

A community for analysts and data scientists working in the UK's Health Sector and using R

GitHub Events

Total
  • Create event: 18
  • Release event: 3
  • Issues event: 31
  • Watch event: 4
  • Delete event: 7
  • Issue comment event: 56
  • Push event: 91
  • Pull request review comment event: 4
  • Pull request review event: 28
  • Pull request event: 48
  • Fork event: 3
Last Year
  • Create event: 18
  • Release event: 3
  • Issues event: 31
  • Watch event: 4
  • Delete event: 7
  • Issue comment event: 56
  • Push event: 91
  • Pull request review comment event: 4
  • Pull request review event: 28
  • Pull request event: 48
  • Fork event: 3

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 17
  • Total pull requests: 29
  • Average time to close issues: 4 months
  • Average time to close pull requests: 17 days
  • Total issue authors: 5
  • Total pull request authors: 5
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.69
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 14
  • Pull requests: 28
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 4 days
  • Issue authors: 3
  • Pull request authors: 5
  • Average comments per issue: 0.43
  • Average comments per pull request: 0.64
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
  • ThomUK (16)
  • chrismainey (9)
  • matt-dray (7)
  • Lextuga007 (3)
  • davidfoord1 (2)
  • kaituna (2)
  • anyaferguson (1)
  • jacgrout (1)
Pull Request Authors
  • allcontributors[bot] (15)
  • chrismainey (14)
  • ThomUK (10)
  • davidfoord1 (5)
  • neilwalton (3)
  • matt-dray (3)
  • Lextuga007 (2)
  • jacgrout (1)
Top Labels
Issue Labels
documentation (7) enhancement (7) help wanted (6) question (6) bug (5) must do v1 (5) good first issue (3) internals (3)
Pull Request Labels
enhancement (1) documentation (1)

Packages

  • Total packages: 1
  • Total downloads:
    • cran 344 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: NHSRwaitinglist

Waiting List Metrics Using Queuing Theory

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 344 Last month
Rankings
Dependent packages count: 26.9%
Dependent repos count: 33.1%
Average: 48.9%
Downloads: 86.9%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite