The hospitals play an indispensable role in daily life, serving critical functions such as treating injuries and providing medical services in disaster-affected areas. In recent years, there has been increasing attention to the seismic strengthening and reconstruction of hospital buildings. However, even if the hospital buildings meet seismic safety standards through seismic retrofitting, damage to non-structural components and medical equipment can still reduce or interrupt hospital functionality during earthquakes, leading to significant economic losses post-event. This is attributed to the critical role hospitals play in earthquake rescue and recovery efforts. In this paper, a two-stage optimization approach was proposed to integrate mitigation of post-earthquake functionality loss in hospital buildings. Through coordinated optimization of viscous damper design parameters and retrofitting strategies for non-structural component, the funology holistically enhance post-earthquake functionality by addressing interdependent systems: (1) primary structural system, (2) non-structural components and equipment (e.g., piping networks and medical equipment anchorage). The optimization design method is structured into two stages and is implemented using a fast and elitist non-dominated sorting genetic algorithm (NSGA-II) for resolution. The first stage focuses on the optimal design of the viscous damper, targeting the damping coefficient and velocity exponent as key optimization parameters to maximize post-earthquake functionality while minimizing the total damping coefficient. The second stage involves optimizing the enhancement strategies for non-structural components and medical equipment, aiming to minimize the functionality loss and enhancement budget. To this end, a four-story reinforced concrete frame hospital was design to demonstrate the effectiveness of two-stage method in enhancing hospital functionality for two earthquake intensity levels. The results demonstrate that hospital building optimized via the two-stage approach exhibit approximately 45.5 % and 74.6 % lower post-earthquake functionality loss under design-basis earthquake (DBE) and maximum considered earthquake (MCE) level ground motions, respectively, compared to those designed with conventional optimization methodologies. The research indicates that a hospital employing the two-stage optimization design can effectively maintain its operational functionality during a significant earthquake and exhibits a high degree of seismic resilience.