tempor.datasources.mivdp.preproc.cohort.disease_cohort module

Disease cohort module.

Based on: https://github.com/healthylaife/MIMIC-IV-Data-Pipeline preprocessing/day_intervals_preproc/disease_cohort.py

tempor.datasources.mivdp.preproc.cohort.disease_cohort.read_icd_mapping(map_path: str) DataFrame[source]

Reads in mapping table for converting ICD9 to ICD10 codes

tempor.datasources.mivdp.preproc.cohort.disease_cohort.get_diagnosis_icd(module_path: str) DataFrame[source]

Reads in diagnosis_icd table

tempor.datasources.mivdp.preproc.cohort.disease_cohort.standardize_icd(mapping: DataFrame, diag: DataFrame, map_code_col='diagnosis_code', root=True) None[source]

Takes an ICD9 -> ICD10 mapping table and a diagnosis dataframe; adds column with converted ICD10 column

tempor.datasources.mivdp.preproc.cohort.disease_cohort.preproc_icd_module(module_path: str, ICD10_code: str, icd_map_path: str) DataFrame[source]

Takes an module dataset with ICD codes and puts it in long_format, mapping ICD-codes by a mapping table path

tempor.datasources.mivdp.preproc.cohort.disease_cohort.extract_diag_cohort(label: str, module_path, icd_map_path='/home/docs/checkouts/readthedocs.org/user_builds/temporai-mivdp/checkouts/latest/src/tempor/datasources/mivdp/utils/mappings/ICD9_to_ICD10_mapping.txt') DataFrame[source]