| bed_days_fy | R Documentation | 
This function calculates NHS Acute Trusts's inpatient bed-days using NHSI's published mandatory KH03 return
bed_days_fy(data, kh03, fyear)
data | 
 A dataframe  | 
kh03 | 
 Trust specific KH03 mandatory return  | 
fyear | 
 Financial year. Example format; 201718 (Apr 2017 to March 2018) and 201819 (Apr 2018 to March 2019)  | 
Dataframe with the number of days in each financial year with corresponding inpatient bed-days for the same period
average_kh03 <- data.frame(
fy = c(200708,200809,200708,200809),
trust_code = c(rep("RX1",2), rep("RYJ",2)),
trust_name = c(rep("Nottingham University Hospitals",2), rep("Imperial College Healthcare",2)),
kh03_avg = c(1508,1537,1211,1250)
)
bed_days_fy(average_kh03,"kh03_avg","fy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.