Skip to contents

Generate virtual datasets for multiple patients

Usage

virtual_med_mulp(
  patient_n,
  birth_start_date,
  birth_end_date,
  study_start_date,
  study_end_date,
  average_year_visit_n,
  ncores = 1
)

Arguments

patient_n

Generate the number of patients.

birth_start_date

Minimum expected birth date of the patient.

birth_end_date

Maximum expected birth date of the patient.

study_start_date

The starting time of the baseline period specified in the study.

study_end_date

The end time of the follow-up period specified in the study

average_year_visit_n

The average number of visits by patients each year is 6 by default. The data are from the statistical records of the Chinese people.

ncores

the number of cores used for parallelisation.

Value

Returns a data set of multiple patients, including a doctor's table, prescription table, diagnosis table, and biochemical test table.

Examples

if (FALSE) {
data_med_new = virtual_med_mulp(patient_n = 24,
   birth_start_date = "1980-01-01",birth_end_date ="2000-12-31" ,
   study_start_date = "2014-01-01",study_end_date ="2020-12-31",
   average_year_visit_n = 6,ncores=6)
}