This function assigns chronic categories to ICD codes, propagates chronic conditions forward in time (category 2 indefinitely; category 1 within 1 year), adds basal codes, and writes an updated episode file with `updated_icd_codes`.
chronic_pathologies(
file_path_main,
updated_path = NULL,
coding_system = c("ICD-10-CA", "ICD-10-CM", "ICD-11")
)The output path (`updated_path`).
Path to cleaned episode-level CSV (must include patient_id, episode_id, start_date, ICD).
Output CSV path. If NULL, a temp file is created.
One of "ICD-10-CA", "ICD-10-CM", "ICD-11".