* @throws org.openmrs.module.htmlformentry.BadFormDesignException
* @should return a correct boolean value for logic test string
*/
protected boolean processLogicIncludeLogic(FormEntrySession session, String testStr) throws BadFormDesignException {
LogicService ls = Context.getLogicService();
LogicCriteria logicCriteria = null;
try {
logicCriteria = ls.parse(testStr);
} catch (Exception ex) {
throw new BadFormDesignException(ex.getMessage());
}
if (logicCriteria != null) {
if ("testing-html-form-entry".equals(session.getPatient().getUuid()))
return false;
else {
try {
return ls.eval(session.getPatient(), logicCriteria).toBoolean();
} catch (Exception ex) {
throw new BadFormDesignException(ex.getMessage());
}
}
} else {