load_inpatient_diagnoses: Load inpatient diagnosis records into the warehouse

View source: R/database.R

load_inpatient_diagnosesR Documentation

Load inpatient diagnosis records into the warehouse

Description

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` ).

Usage

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

See Also

validate_inpatient_episodes(), map_infections_abx_indications(), map_charlson_comorbidities(), map_ICD10_CCS(), map_ICD10_CCSR()


ramses-antibiotics/ramses-package documentation built on Feb. 13, 2024, 1:01 p.m.