Skip to contents

Calculate CMAM length of stay

Usage

calculate_los(admission_date, discharge_date)

Arguments

admission_date

Date of admission in YYYY-MM-DD format. If child is a kwashiorkor case, date of lowest weight (when oedema has subsided). Can be a single date value or a vector of date values.

discharge_date

Date of discharge in YYYY-MM-DD format. Can be a single date value or a vector of date values.

Value

Numeric value or vector of numeric values for length-of-stay in days.

Author

Ernest Guevarra

Examples

calculate_los(admission_date = "2010-03-15",
              discharge_date = "2010-06-14")
#> [1] 91

calculate_los(admission_date = c("2010-03-15", "2010-03-16"),
              discharge_date = c("2010-06-14", "2010-06-20"))
#> [1] 91 96