tempor.datasources.mivdp.utils.icu_preprocess_util module¶
ICU preprocessing utilities.
Based on:
https://github.com/healthylaife/MIMIC-IV-Data-Pipeline
utils/icu_preprocess_util.py
-
tempor.datasources.mivdp.utils.icu_preprocess_util.dataframe_from_csv(path, compression=
'gzip', header=0, index_col=0, chunksize=None)[source]¶
-
tempor.datasources.mivdp.utils.icu_preprocess_util.standardize_icd(mapping, df, root=
False)[source]¶ Takes an ICD9 -> ICD10 mapping table and a diagnosis dataframe; adds column with converted ICD10 column
- tempor.datasources.mivdp.utils.icu_preprocess_util.read_d_icd_procedures_table(mimic4_path)[source]¶
- tempor.datasources.mivdp.utils.icu_preprocess_util.preproc_meds(module_path: str, adm_cohort_path: str) DataFrame[source]¶
- tempor.datasources.mivdp.utils.icu_preprocess_util.preproc_proc(dataset_path: str, cohort_path: str, time_col: str, dtypes: dict | None, usecols: list) DataFrame[source]¶
Function for getting hosp observations pertaining to a pickled cohort. Function is structured to save memory when reading and transforming data.
- tempor.datasources.mivdp.utils.icu_preprocess_util.preproc_out(dataset_path: str, cohort_path: str, time_col: str, dtypes: dict | None, usecols: list | None) DataFrame[source]¶
Function for getting hosp observations pertaining to a pickled cohort. Function is structured to save memory when reading and transforming data.
- tempor.datasources.mivdp.utils.icu_preprocess_util.preproc_chart(dataset_path: str, cohort_path: str, time_col: str, dtypes: dict | None, usecols: list) DataFrame[source]¶
Function for getting hosp observations pertaining to a pickled cohort. Function is structured to save memory when reading and transforming data.
-
tempor.datasources.mivdp.utils.icu_preprocess_util.preproc_icd_module(module_path: str, adm_cohort_path: str, icd_map_path=
None, map_code_colname=None, only_icd10=True) DataFrame[source]¶ Takes an module dataset with ICD codes and puts it in long_format, optionally mapping ICD-codes by a mapping table path