[rules-users] Fusion temporal operators, time units

Nathan Bell Nathan.Bell at pharmacyonesource.com
Tue Nov 16 14:16:31 EST 2010


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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101116/077a25e1/attachment.html 


More information about the rules-users mailing list