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
)

Arguments

conn

a database connection

diagnoses_data

a data frame validated with validate_inpatient_diagnoses()

diagnoses_lookup

a data frame containing an ICD-10 reference lookup table

overwrite

if TRUE (the default), will overwrite any existing inpatient_diagnoses database table