This study aimed to analyze the influence of service quality, drug availability, and facilities on patient satisfaction and its impact on patient loyalty at the Outpatient Pharmacy Installation of Hospital X in Bekasi City. As a healthcare provider, Hospital X faces intense competition with other hospitals, which requires continuous improvement in service quality to retain patients. The research employed a quantitative approach using a questionnaire survey to collect primary data. The data were analyzed using Structural Equation Modelling (SEM) with SmartPLS, including respondent characteristics, frequency, percentage, total score, and variable mean analysis. The results reveal that service quality significantly affects patient satisfaction (t = 5.343; p = 0.000; f² = 0.057), drug availability significantly influences patient satisfaction (t = 2.259; p = 0.046; f² = 0.250), and facilities also have a significant effect (t = 2.096; p = 0.023; f² = 0.604). Furthermore, service quality, drug availability, and facilities significantly affect patient loyalty (t > 2; p < 0.05). Mediation analysis shows that patient satisfaction significantly mediates the relationship between service quality, drug availability, and facilities with patient loyalty. Overall, the study concludes that service quality, drug availability, and facilities positively and significantly influence both patient satisfaction and patient loyalty.