Kavita Trivedi, a medical epidemiologist, saw her role as a health care consultant rapidly expand when the pandemic hit.