| Title: | Synthetic Hybrid Electronic Health Record Generation for SARS-Related Research and CT Views |
|---|---|
| Description: | Generates synthetic electronic health record data, including patients, encounters, vitals, laboratory results, medications, procedures, and allergies. The package supports optional SARS-focused and computed tomography (CT) research views and export to CSV, SQLite, and Excel formats for research and development workflows. |
| Authors: | Dennis Opoku Boadu [aut, cre], Isaac Osei [aut], Justice Kwame Appati [aut] |
| Maintainer: | Dennis Opoku Boadu <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-06-05 06:50:34 UTC |
| Source: | https://github.com/cran/hybridEHR |
High-level wrapper to generate and export a hybrid EHR dataset
generate_hybrid_ehr( n_patients = 50000, n_sites = 10, SARS_focused = TRUE, include_ct_links = FALSE, output_dir = "hybrid_ehr_dataset", seed = NULL, verbose = TRUE )generate_hybrid_ehr( n_patients = 50000, n_sites = 10, SARS_focused = TRUE, include_ct_links = FALSE, output_dir = "hybrid_ehr_dataset", seed = NULL, verbose = TRUE )
n_patients |
Number of unique patients. |
n_sites |
Number of sites/hospitals to simulate. |
SARS_focused |
Logical; if TRUE, use SARS-era encounter and lab patterns. |
include_ct_links |
Logical; if TRUE, add CT timing variables and a CT severity score in the CT research view. |
output_dir |
Directory to write export files into. |
seed |
Optional integer used to set the random seed for reproducibility. |
verbose |
Logical; if TRUE, print progress messages to the console. |
A list with:
The in-memory dataset list (as from generate_hybrid_ehr_dataset).
The output directory path where files were written.
## Not run: # Quick SARS CT research dataset res <- generate_hybrid_ehr( n_patients = 10000, n_sites = 5, SARS_focused = TRUE, include_ct_links = TRUE, output_dir = "SARS_ct_research_dataset", seed = 42 ) # General EHR dataset res2 <- generate_hybrid_ehr( n_patients = 50000, n_sites = 10, SARS_focused = FALSE, include_ct_links = FALSE, output_dir = "general_ehr_dataset", seed = 123 ) ## End(Not run)## Not run: # Quick SARS CT research dataset res <- generate_hybrid_ehr( n_patients = 10000, n_sites = 5, SARS_focused = TRUE, include_ct_links = TRUE, output_dir = "SARS_ct_research_dataset", seed = 42 ) # General EHR dataset res2 <- generate_hybrid_ehr( n_patients = 50000, n_sites = 10, SARS_focused = FALSE, include_ct_links = FALSE, output_dir = "general_ehr_dataset", seed = 123 ) ## End(Not run)
Generate synthetic hybrid EHR tables
generate_hybrid_ehr_dataset( n_patients = 1e+05, n_sites = 6, SARS_focused = TRUE, include_ct_links = FALSE, seed = NULL, verbose = TRUE )generate_hybrid_ehr_dataset( n_patients = 1e+05, n_sites = 6, SARS_focused = TRUE, include_ct_links = FALSE, seed = NULL, verbose = TRUE )
n_patients |
Number of unique patients. |
n_sites |
Number of sites/hospitals to simulate. |
SARS_focused |
Logical; if TRUE, use SARS-era encounter and lab patterns. |
include_ct_links |
Logical; if TRUE, add CT timing variables and a CT severity score in the CT research view. |
seed |
Optional integer used to set the random seed for reproducibility. |
verbose |
Logical; if TRUE, print progress messages to the console. |
A list with elements:
Named list of core EHR tables (patients, encounters, vitals, labs, medications, procedures, allergies).
Named list with ct_research_view (if SARS_focused) and
ml_flat_view (aggregated ML-ready table).
List of high-level generation settings and table metadata.