create_subject_stay: Create a fake subject stay

Description Usage Arguments Value

View source: R/FakePatientsDB.R

Description

create_subject_stay is an internal function used by create_fake_subjectDB.

Usage

1
2
3
4
5
6
7
create_subject_stay(
  sID,
  fID,
  last_discharge_date = NULL,
  days_since_discharge = NULL,
  length_of_stay = NULL
)

Arguments

sID

the subject ID

fID

the facility ID

last_discharge_date

the last discharge date

days_since_discharge

the number of days since last discharge (default: max(0, rnorm(1, mean = 30, sd = 10)))

length_of_stay

the length of stay (default: max(1, rnorm(1, mean = 5, sd = 3))

Value

a one row data.table corresponding to the subject stay.


PascalCrepey/HospitalNetwork documentation built on Sept. 16, 2020, 9:56 p.m.