Fusion seems to only support days, hours, minutes, seconds
and milliseconds for the units of time used with temporal operators. For
example consider the following rule (which works correctly):
rule "AdmittedInLast7Days"
dialect "java"
when
$now :
RuleTime()
$account
: PatientAccount(this after[-7d,0s] $now )
then
System.out.println("AdmittedInLast7Days
fired");
End
Now suppose that I want an alternate version of this rule
that instead of firing for patients admitted in the last 7 days it fires for
patients admitted in the last 7 months, or years. Is there built-in support for
doing this? If not, does anyone have suggestions on the best way to approach
this?
Thank You,
Nathan Bell