Background: Cases of refractory Mycoplasma pneumoniae pneumonia have been increasing recently; however, whether viral coinfection or macrolide-resistant M. infection contribute to the development of refractory M. pneumoniae pneumonia remains unclear. This study aimed to investigate the impacts of viral coinfection and macrolide-resistant M. pneumoniae infection on M. pneumoniae pneumonia in hospitalized children and build a model to predict a severe disease course. Methods: Nasopharyngeal swabs or sputum specimens were collected from patients with community-acquired pneumonia meeting our protocol who were admitted to Shanghai Children’s Medical Center from December 1, 2016, to May 31, 2019. The specimens were tested with the FilmArray Respiratory Panel, a multiplex polymerase chain reaction assay that detects 16 viruses, Bordetella pertussis, M. pneumoniae, and Chlamydophila pneumoniae. Univariate and multivariate logistic regression models were used to identify the risk factors for adenovirus coinfection and macrolide-resistant mycoplasma infection.Results: Among the 107 M. pneumoniae pneumonia patients, the coinfection rate was 56.07%, and 60 (60/107, 56.07%) patients were infected by drug-resistant M. pneumoniae. Adenovirus was the most prevalent coinfecting organism, accounting for 22.43% (24/107). The classification tree confirmed that viral coinfection was more common in patients younger than 3 years old. Adenovirus coinfection and drug-resistant M. pneumoniae infection occurred more commonly in patients with refractory M. pneumoniae pneumonia (P=0.019; P=0.001). A prediction model including wheezing, lung consolidation and extrapulmonary complications was used to predict adenovirus coinfection. The area under the receiver operating characteristic curve of the prediction model was 0.795 (95% CI 0.679-0.893, P<0.001). A prolonged fever duration after the application of macrolides for 48 hours was found more commonly in patients infected by drug-resistant M. pneumoniae (P=0.002). A fever duration longer than 7 days was an independent risk factor for drug-resistant Mycoplasma infection (OR=3.500, 95% CI=1.310-9.353, P=0.012).Conclusions: The occurrence of refractory M. pneumoniae pneumonia is associated with adenovirus coinfection and infection by drug-resistant M. pneumoniae. A prediction model combining wheezing, extrapulmonary complications and lung consolidation can be used to predict adenovirus coinfection in children with M. pneumoniae pneumonia. A prolonged fever duration indicates drug-resistant M. pneumoniae infection, and a reasonable change in antibiotics is necessary.