knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(esft)

Here we will go into greater details on the user input defaults, the parameters, and the capacity calculations.

User Input

user <- user_input()

# we set the country to be afghanistan
country <- "AFG"

User input contains four parameters:

Parameter Setting

# This is the standard list of all parameters, many from inputs tab of excel sheet
params <- get_parameters()

Case Severity Distributions:

Weeks of Stay in Isolation (WHO recommendation based on incubation period of COVID-19 and case management guidelines):

Weeks of Stay in Hospital (based on studies of case severity):

Infection Fatality Rates (note: could be updated based on newer research):

Miscellaneous Parameters:

Healthcare Workers per Bed or Patient:

Percent of Critical Patients that are Mechanically Ventilated:

Oxygen Flow by Case Severity, in LPM:

Testing Strategy

# Testing strategy parameters - population level testing parameters (i.e. percent
# tested)
test_strat <- set_testing_strategy()

Testing Strategies (there are two choices, input as string values):

Testing Parameters (the rest of the testing strategy parameters, some of which depend on the testing strategy chosen):

Diagnostic Parameters

# Diagnostic parameters - individual level testing parameters (i.e. number of tests
# per case per diagnosis, etc.)
test_params <- get_diagnostic_parameters()

Total tests and percent antigen:

Lab Parameters

# Diagnostic lab parameters - number of lab staff per lab, safety boxes per unit,
# etc.
lab_params <- get_lab_parameters()

Requirements per Lab:

Capacity Mapping

capacity <- get_country_capacity(iso3c = country)

Country-Specific Capacity Estimates:

Testing Capacity

country_test_capacity <- get_country_test_capacity(iso3c = country)

This uses estimated provided by the WHO Operations, Supply and Logistics Team that are reviewed by diagnostics technical experts at the WHO to provide estimates of counts of various diagnostic processing machines in country.

Types of machines in output:

Diagnostic Capacity

The next function, called calc_diagnostic_capacity, takes these machine counts as inputs, in addition to data on their processing capability, hours per shift, and number of shifts per day to estimate the total test processing capability, what we term the diagnostic capacity.

data(throughput, package = "esft")
data(hours_per_shift, package = "esft")

diagnostic_capacity <- calc_diagnostic_capacity(
  country_diagnostic_capacity = country_test_capacity,
  throughput,
  hours_per_shift = hours_per_shift,
  shifts_per_day = 1
)

Diagnostic (Total Test Processing) Capacity:

Total Labs

# Calculates the total labs available for COVID-19 given the diagnostic capacity
# (number of modules and machines) available
t_labs <- total_labs(diagnostic_capacity)

This calculates the number of labs conducting COVID-19 testing, the reference value assumes 1 lab for every 3 high-throughput, manual or other platforms and 1 lab for every 4 GeneXpert modules.

$$ \begin{align} Modules_{sum} = Modules_{roche-6800} + Modules_{roche-8800} + Modules_{abbott-m2000} +\ Modules_{hologic-panther}+Modules_{hologic-panther-fusion}+Modules_{manual}\ \ Labs_{total} = \frac{Modules_{sum}}{3} + \frac{Modules_{genexpert}}{4} \end{align} $$

Max Tests

# Uses the country specific diagnostic capacity estimates to calculate the max
# number of tests per day. This is then used to help cap tests by total testing
# capacity in total_tests.
max_tests <- max_tests_per_day(diagnostic_capacity)

This calculates the total number of tests per week given covid test capacity, and divides by 7 to find the max number of tests per day (I am not certain that 7 is the correct way to calculate max tests - the machines are presumed to run for a pre-set number of days per week, so I am not sure why this would change here).



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