Here is what was included previously in the attachment! Hypothetical dataset: ID Date Diagnosis 1 9/1/2000 A 1 9/15/2000 A 1 11/3/2000 B 1 3/5/2001 A 1 4/5/2005 C 1 5/20/2005 B 2 6/6/2003 A 2 1/3/2005 A 2 2/7/2005 C 2 8/10/2012 C Scenario 1: For each person, group together diagnoses within 1 year (365 days) Output dataset should look like: ID First date Last date Diagnosis 1 9/1/2000 3/5/2001 A,A,B,A 1 4/5/2005 C 2 6/6/2003 A 2 1/3/2005 2/7/2005 A,C 2 8/10/2012 C Secnario 2: For each person, group together diagnoses allowing for a washout period of at least 5 years between consecutive dates Output dataset should look like: ID First date Last date Diagnosis 1 9/1/2000 5/20/2005 A,A,B,A,C,B 2 6/6/2003 2/7/2005 A,A,C 2 8/10/2012 C
... View more