The repository contains the code implementation used for the paper *Development of a dynamic prediction model for unplanned ICU admission and mortality in hospitalized patients *. We used disease trajectories, lab values and clinical notes to predict the composite outcome of unplanned ICU transfer and in-hospital mortality.