View source: R/commodities_forecast.R
case_management_forecast | R Documentation |
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.
case_management_forecast(equipment, patients)
equipment |
This should be the data frame of equipment need |
patients |
From patients_weekly |
Dataframe of commodities weekly
Category of item: either Case management - accessories & consumables or Case management - biomedical equipment
Date the week begins
Date the week ends
Unit items supplied in
Item name
Total amount of that item (sum of all columns following)
Total amount for severe patients
Total amount for critical patients
Total amount for severe and critical patients
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.