I am writing a report for Hospital patients. Each patient has a start date and a discharge date for the buildings that they recieve treatment in. I am working on a report that displays the patients that moved from one building to another withen 7 days. I want to count each patient who has met this criteria once. So if given the data below I would like the report to display "John Doe 1" because John Doe met the criteria.
@Patient epsd.building epsd.Start_date epsd.Dschg_date
John Doe A 06/20/2010 07/05/2010
John Doe C 07/06/2010 07/23/2010
Bob Smith A 06/20/2010 06/25/2010
@Patient epsd.building epsd.Start_date epsd.Dschg_date
John Doe A 06/20/2010 07/05/2010
John Doe C 07/06/2010 07/23/2010
Bob Smith A 06/20/2010 06/25/2010