View source: R/patients_weekly.R
patients_weekly | R Documentation |
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
patients_weekly(params, country_capacity, data, data_source = "Imperial", user)
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 |
Dataframe of weekly summary
Date the week summarized begins
Date the week summarized ends
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
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
cum_mod_cases - cum_rem_mod_cases
cum_mild_cases - cum_rem_mild_cases
ICU demand capped by beds allocated to critical COVID, same as crit_patients_cap
Hospital demand capped by beds allocated to severe COVID, same as sev_patients_cap
Sum of severe and critical beds in use
Total beds in use divided by the avg. number of beds per hospital, as specified in parameters
Cumulative removed critical patients - the cumulative removed critical patients shifted back by avg. length of hospital stay
Cumulative removed severe patients - the cumulative removed severe patients shifted back by avg. length of hospital stay
Moderate cases who have completed avg length of isolation
Mild cases who have completed avg length of isolation
Critical patients admitted number of weeks ago that = avg. length of stay
Severe patients admitted number of weeks ago that = avg. length of stay
Severe patients admitted during the week based on bed availability and numbers of discharged patients
Critical patients admitted during the week based on bed availability and numbers of discharged patients
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.