R/database.R
load_inpatient_diagnoses.Rd
Load records of clinical diagnoses into the
warehouse along with an ICD-10 reference table (`reference_icd`
).
In addition, this function automatically generates derived ICD-10 look up
tables for comorbidities (`reference_icd_comorbidity`
),
infection indications, (`reference_icd_infections`
), and the ccs
(`reference_icd_ccs`
and `reference_icd_ccsr`
).
load_inpatient_diagnoses(
conn,
diagnoses_data,
diagnoses_lookup,
overwrite = FALSE
)
a database connection
a data frame validated with
validate_inpatient_diagnoses()
a data frame containing an ICD-10 reference lookup table
if TRUE
(the default), will overwrite any existing
inpatient_diagnoses
database table