You might try the following:
Create a formula {@mos} which translates all screening frequencies to months:
select {HM_MODIFIER.MODIFIER_NUM_C}
case 11004 : 12
case 11005 : 24
case 11006 : 6
case 11007 : 3
case 11008 : 60
default : 0
Then insert a group on {table.patientID} and
go to report->edit selection formula->GROUP and enter:
date(year(dateadd("m",{@mos},maximum({ORDER_PROC.ORDERING_DATE},{table.patientID}))),
month(dateadd("m",{@mos},maximum({ORDER_PROC.ORDERING_DATE},{table.patientID}))), 01) =
date(year(dateadd("m",1,currentdate)),month(dateadd("m",1,currentdate)), 01)
This tests out here.
-LB