COVID-19 is spreading widely, and the pandemic is seriously threatening public health throughout the world. A comprehensive study on the optimal sampling types and timing for an efficient SARS-CoV-2 test has not been reported. We collected clinical information and the values of 55 biochemical indices for 237 COVID-19 patients, with 37 matched non-COVID-19 pneumonia patients and 131 healthy people in Inner Mongolia as control. In addition, the results of dynamic detection of SARS-CoV-2 using oropharynx swab, pharynx swab, and feces were collected from 197 COVID-19 patients. SARS-CoV-2 RNA positive in feces specimen was present in approximately one-third of COVID-19 patients. The positive detection rate of SARS-CoV-2 RNA in feces was significantly higher than both in the oropharynx and nasopharynx swab (P < 0.05) in the late period of the disease, which is not the case in the early period of the disease. There were statistically significant differences in the levels of blood LDH, CRP, platelet count, neutrophilic granulocyte count, white blood cell number, and lymphocyte count between COVID-19 and non-COVID-19 pneumonia patients. Finally, we developed and compared five machine-learning models to predict the prognosis of COVID-19 patients based on biochemical indices at disease onset and demographic characteristics. The best model achieved an area under the curve of 0.853 in the 10-fold cross-validation.