Post Author: PatchesPete
CA Forum: Crystal Reports
I need to identify patients that have NOT scheduled an appointment within the past 13 months.
The following Select criteria formula works only if the appointment month is not the same.
{APPT.CONTACT_DATE} <= dateadd("m", -13, currentdate)and datediff("m", {APPT.CONTACT_DATE}, currentdate) <= 13
Example: If the patient had an appointment on November 14, 2006 and had another appointment on November 30, 2007, the 2006 appointment shows up on the report, which is not correct. The patient should not show up on the report at all as he had an appointment a month ago. Patient 21024886 and 21032176 should not appear on the report, 21142471 should be on the report.
21024886
2/28/2003
21024886
9/10/2004
21024886
10/3/2005
21024886
11/14/2006
21024886
11/30/2007
21032176
10/29/1999
21032176
12/15/2000
21032176
12/20/2001
21032176
4/21/2003
21032176
11/1/2006
21032176
11/28/2007
21142471
4/15/1999
21142471
7/15/2003
21142471
10/6/2004
21142471
10/11/2005
21142471
11/27/2006
Does anyone have a suggestion.
Thanks. "Pete"