  Electronic Health Records (EHR) serve as a valuable source of patient
information, offering insights into medical histories, treatments, and
outcomes. Previous research has developed systems for detecting applicable ICD
codes that should be assigned while writing a given EHR document, mainly
focusing on discharge summaries written at the end of a hospital stay. In this
work, we investigate the potential of predicting these codes for the whole
patient stay at different time points during their stay, even before they are
officially assigned by clinicians. The development of methods to predict
diagnoses and treatments earlier in advance could open opportunities for
predictive medicine, such as identifying disease risks sooner, suggesting
treatments, and optimizing resource allocation. Our experiments show that
predictions regarding final ICD codes can be made already two days after
admission and we propose a custom model that improves performance on this early
prediction task.
