Description Usage Arguments Details Value
This function can generate events for clinical, referral and therapy tables. These are based on
the consultation tables generated by simulate_ehr_consultations
.
1 2 | simulate_ehr_events(ehr_def, consultation, event_type = c("clinical",
"referral", "therapy"), cores = 1, therapy_lookup = NULL)
|
ehr_def |
an object of class |
consultation |
a dataframe of simulated patient consultations |
event_type |
Type of events to be generated |
cores |
number of processor cores to use in generating the data |
therapy_lookup |
lookup table for drug therapy events e.g. |
This function is relatively basic - for clinical and referral tables, it generates
events according to the comorbidities defined in the ehr_def
, with the mean number of events
for each consultation being defined in the ehr_def for that event_type.
For therapy events, the function simply samples the therapy_lookup table, with the mean number
of events for each consultation being defined in the ehr_def for therapy. Therefore, at the
moment, the therapies bear no relationship to the conditions the patient has and are only for
the purposes of explaining the functioning of the package.
The random sampling is based on a poisson distribution
dataframe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.