create_subject_stay is an internal function used by create_fake_subjectDB.
create_subject_stay(
sID,
fID,
last_discharge_date = NULL,
days_since_discharge = NULL,
length_of_stay = NULL
)
the subject ID
the facility ID
the last discharge date
the number of days since last discharge (default: max(0, rnorm(1, mean = 30, sd = 10)))
the length of stay (default: max(1, rnorm(1, mean = 5, sd = 3))
a one row data.table corresponding to the subject stay.