Earlier diagnosis improves COVID-19 prognosis: a nationwide retrospective cohort analysis