count_missed_doses function

Count number of patients with missed doses by thresholds