Mortality prediction in the ICU is essential for effective resource allocation and early clinical intervention. Bedside monitors generate multivariate physiological time-series data, but these are often irregularly sampled, making standard predictive modeling challenging. Conventional transformer models assume regular time intervals and fixed positional encodings, which limits their ability to capture clinically meaningful temporal gaps in real ICU data. This can reduce the accuracy of mortality risk prediction by obscuring important short- and long-term physiological patterns.To address this limitation, the TERTIAN framework introduces a hierarchical transformer with time-aware positional encoding specifically designed for irregular ICU data. It combines a local transformer to capture short-term dynamics and a global transformer to model long-term trends, integrating both through time-sensitive attention mechanisms. This design eliminates the need for data imputation and improves temporal understanding of patient trajectories.Overall, the framework better captures rapid deterioration and gradual decline by respecting irregular sampling patterns, leading to more clinically relevant predictions. By aligning model structure with real-world ICU data characteristics, TERTIAN offers a promising approach for improving mortality prediction and supporting critical care decision-making.