Identifying sequential episodes of pharmacotherapy as a method for assessing treatment failure in comparative effectiveness research