patients_weekly: Produce Weekly Summary of Patients

View source: R/patients_weekly.R

patients_weeklyR Documentation

Produce Weekly Summary of Patients

Description

This function corresponds to the calculations in the Weekly Summary tab under the headers 'Sick patients per week', 'Patients recovering (or dying) from illness, per week'. It takes in the model output plus the cumulative infections calculated by cases_weekly (which is the first step in the weekly summary process). It then calculates hospital demands, including bed capping. Note: there will be a lag on the appearance of the first value for discharged_crit_patients, which is dependent on the length of stay specified in the get_parameters() function and the structure of the calculation.

Here is the description of the additional patient calculations:

  • crit_patients_nocap - ICU_demand if Imperial data, cum_crit_cases - cum_rem_crit_cases if WHO

  • sev_patients_nocap - hospital_demand if Imperial data, cum_sev_cases - cum_rem_sev_cases if WHO

  • mod_patients_nocap - cum_mod_cases - cum_rem_mod_cases

  • mild_patients_nocap - cum_mild_cases - cum_rem_mild_cases

  • crit_beds_inuse - crit_patients_nocap capped by beds allocated to critical COVID

  • sev_beds_inuse - sev_patients_nocap capped by beds allocated to severe COVID

  • total_beds_inuse - severe + critical beds in use

  • hosp_facilities_inuse - total beds in use / avg. hosp beds per care centre

  • rem_crit_patients - cumulative removed critical patients - cumulative removed critical patients shifted by avg. length of hospital stay

  • rem_sev_patients - cumulative removed severe patients - cumulative removed severe patients shifted by avg. length of hospital stay

  • rem_mod_patients - same as rem_mod_cases - new moderate cases shifted by avg. length of stay in isolation

  • rem_mild_patients - same as rem_mild_cases - new mild cases shifted by avg. length of stay in isolation

  • discharged_sev_patients - admitted severe patients shifted back by avg. length of hospital stay

  • discharged_crit_patients - admitted critical patients shifted back by avg. length of hospital stay

  • sev_patients_admitted_cap - admitted severe patients capped by severe beds, number of beds in use, and number of patients discharged

  • crit_patients_admitted_cap - admitted critical patients capped by critical beds, number of beds in use, and number of patients discharged

Usage

patients_weekly(params, country_capacity, data, data_source = "Imperial", user)

Arguments

params

From get_parameters

country_capacity

From get_country_capacity

data

Weekly summary dataframe - from cases_weekly

data_source

Either WHO or Imperial.

user

From user_input function

Value

Dataframe of weekly summary

week_begins

Date the week summarized begins

week_ends

Date the week summarized ends

crit_patients_nocap

If data_source = "Imperial", this is the uncapped ICU demand, if data_source = "WHO", this is back calculated from the difference between cum_crit_cases and cum_rem_crit_cases

sev_patients_nocap

If data_source = "Imperial", this is the uncapped hospital demand, if data_source = "WHO", this is back calculated from the difference between cum_sev_cases and cum_rem_sev_cases

mod_patients_nocap

cum_mod_cases - cum_rem_mod_cases

mild_patients_nocap

cum_mild_cases - cum_rem_mild_cases

crit_beds_inuse

ICU demand capped by beds allocated to critical COVID, same as crit_patients_cap

sev_beds_inuse

Hospital demand capped by beds allocated to severe COVID, same as sev_patients_cap

total_beds_inuse

Sum of severe and critical beds in use

hosp_facilities_inuse

Total beds in use divided by the avg. number of beds per hospital, as specified in parameters

rem_crit_patients

Cumulative removed critical patients - the cumulative removed critical patients shifted back by avg. length of hospital stay

rem_sev_patients

Cumulative removed severe patients - the cumulative removed severe patients shifted back by avg. length of hospital stay

rem_mod_patients

Moderate cases who have completed avg length of isolation

rem_mild_patients

Mild cases who have completed avg length of isolation

discharged_crit_patients

Critical patients admitted number of weeks ago that = avg. length of stay

discharged_sev_patients

Severe patients admitted number of weeks ago that = avg. length of stay

sev_patients_admitted_cap

Severe patients admitted during the week based on bed availability and numbers of discharged patients

crit_patients_admitted_cap

Critical patients admitted during the week based on bed availability and numbers of discharged patients


mrc-ide/esft documentation built on July 31, 2023, 2:30 p.m.