Hi all
I would like to ask how drools run . I found that they can run in two
different drl file. What is salience for ?.
rule " Teting 571"
salience 4200
when
root:AdjudicationDTO(type=="PRIORAPPROVAL_LINE",t:type);
pa:PriorApproval();
pal:PriorApprovalLine($pb:productBenefit);
cct:PriorApprovalTreatment(id!=null,$c:clinical);
then
System.out.println( "571= PASS ");
if(
root.getAppliedUcr($pb.getBenefit(),pa.getProposedDateOfTreatment(),pal.getClinicalUcrs(),$c)!=null&&
root.getAppliedUcr($pb.getBenefit(),pa.getProposedDateOfTreatment(),pal.getClinicalUcrs(),$c).getUcrType()!=null&&
(
root.getAppliedUcr($pb.getBenefit(),pa.getProposedDateOfTreatment(),pal.getClinicalUcrs(),$c).getMinChargeLimit()!=null&&
root.getAppliedUcr($pb.getBenefit(),pa.getProposedDateOfTreatment(),pal.getClinicalUcrs(),$c).getMinChargeLimit().compareTo(pal.getRequestedAmount())<0
||
root.getAppliedUcr($pb.getBenefit(),pa.getProposedDateOfTreatment(),pal.getClinicalUcrs(),$c).getMinChargeLimit()!=null&&
root.getAppliedUcr($pb.getBenefit(),pa.getProposedDateOfTreatment(),pal.getClinicalUcrs(),$c).getMinChargeLimit().compareTo(pal.getAllocatedAmount())<0
)
){
registerPALineStepStr(pal,571+cct.getId().toString(),
"571 Clinical treatment UCR validation",
AdjudicationConstants.RESULT_FAIL,
"The requested amount is more than the treatment UCR charge limit",
"PA line requested amt ["+pal.getRequestedAmount()+"] "+
" Allocated amt ["+pal.getAllocatedAmount()+"] "+
"
benefit["+pal.getProductBenefit().getBenefit().getCode()+"]"+
"UCR["+root.getUcrDetailsMsg(root.getAppliedUcr($pb.getBenefit(),pa.getProposedDateOfTreatment(),pal.getClinicalUcrs(),$c))+"]"
);
}
else{
registerPALineStepStr(pal,571+cct.getId().toString(),
"571 Clinical treatment UCR validation",
AdjudicationConstants.RESULT_PASS,
"The requested amount is more than the treatment UCR charge limit",
"PA line requested amt ["+pal.getRequestedAmount()+"] "+
" Allocated amt ["+pal.getAllocatedAmount()+"] "+
"
benefit["+pal.getProductBenefit().getBenefit().getCode()+"]"+
root.getUcrDetailsMsg(root.getAppliedUcr($pb.getBenefit(),pa.getProposedDateOfTreatment(),pal.getClinicalUcrs(),$c))
);
}
end