I don’t think it’s formulaic but overall it’s great performance in terms of academics (GPA, class rank, and standardized test scores), big involvement in school related activities w/leadership positions, community service, and healthcare related ECs (sometimes being involved in research - but not for all programs), good writing ability for the essay sections of the application, and as @goldenrock mentioned, a little bit of luck and blessings. I would say the more competitive the program, the more stellar you have to be in those areas, sometimes leaving very room for error.