case_management_forecast: Case management weekly: accessories, consumables, and...

View source: R/commodities_forecast.R

case_management_forecastR Documentation

Case management weekly: accessories, consumables, and biomedical equipment

Description

in O(N^2) time. Next iteration should get rid of for loops. To do: get rid of for loop for non reusable items. Can also experiment with Reduce. Also note - the last three columns do not double count the item amounts, they are structured this way due to the way that the amount per patient is structured in the input data sheet. There is never a case where all three final columns have entries >0.

Usage

case_management_forecast(equipment, patients)

Arguments

equipment

This should be the data frame of equipment need

patients

From patients_weekly

Value

Dataframe of commodities weekly

category

Category of item: either Case management - accessories & consumables or Case management - biomedical equipment

week_begins

Date the week begins

week_ends

Date the week ends

unit

Unit items supplied in

item

Item name

total_amount

Total amount of that item (sum of all columns following)

amount_sev_patient

Total amount for severe patients

amount_crit_patient

Total amount for critical patients

amount_sev_crit_patient

Total amount for severe and critical patients


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