[rules-users] I must be missing the obvious

Dean Whisnant dean at basys.com
Mon Jun 3 17:48:21 EDT 2013


I've got to be blind and missing the obvious here.  I had this working, but made a change to the function today.  Now it's just not working.

5.1.1

Getting "error=Exception executing predicate  diagVersion(DC) = "9""

Rule:

1.	|	rule "L2300_HI_01"
2.	|	    dialect "mvel"
3.	|	    when
4.	|	        CLM_837_SUPP( breakClaim_74 == "1" , DC : primaryDiagnosis_102 != ( null ) , eval( diagVersion(DC) = "9" ))
5.	|	        diag : L2300_HI_HealthCareDiagnosisCode( )
6.	|	    then
7.	|	        diag.setHI01_01_DiagnosisTypeCode( "BK" );
8.	|	        diag.setHI01_02_DiagnosisCode( diagCode(DC) );
9.	|	end

Functions

function String diagVersion(String diagcode) {
	String tempDiagVersion = "";
	if (diagcode.startsWith("ICD10")) {
		tempDiagVersion = "10";
	} else {
		tempDiagVersion = "9";
	}
	return tempDiagVersion;
}

function String diagCode(String diagcode) {
	String tempDiagCode = "";

	if (diagcode.startsWith("ICD10")) {
		tempDiagCode = diagcode.substring(5,diagcode.length());
	} else {
		tempDiagCode = diagcode;
	}

	

	return tempDiagCode;
}

Any thoughts on catching the obvious are appreciated.

Thanks

Dean



More information about the rules-users mailing list