Skip to content

Commit

Permalink
Changes for V33/34/46/47
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Jan 10, 2025
1 parent 8886401 commit 91a58ad
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public boolean noCoursesForSchoolAgedStudentInLastTwoYears(StudentRuleData stude
var student = studentRuleData.getSdcSchoolCollectionStudentEntity();
var school = studentRuleData.getSchool();
var isEightPlusGradeCode = SchoolGradeCodes.get8PlusGradesNoGA().contains(student.getEnrolledGradeCode());
var reportedByOnlineOrContEdSchool = StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.DIST_LEARN.getCode()) || StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.DISTONLINE.getCode()) || StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.CONT_ED.getCode());
var reportedByOnlineOrContEdSchool = StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.DIST_LEARN.getCode()) || StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.DISTONLINE.getCode());
var zeroCourses = TransformUtil.parseNumberOfCourses(student.getNumberOfCourses(), student.getSdcSchoolCollection().getSdcSchoolCollectionID()) == 0;
boolean isSchoolAged = Boolean.TRUE.equals(student.getIsSchoolAged());

Expand All @@ -210,11 +210,11 @@ public boolean noCoursesForAdultStudentInLastTwoYears(StudentRuleData studentRul
var student = studentRuleData.getSdcSchoolCollectionStudentEntity();
var school = studentRuleData.getSchool();
var isAllowedAdultGradeCode = SchoolGradeCodes.getAllowedAdultGrades().contains(student.getEnrolledGradeCode());
var reportedByOnlineOrContEdSchool = StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.DIST_LEARN.getCode()) || StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.DISTONLINE.getCode()) || StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.CONT_ED.getCode());
var reportedByOnlineSchool = StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.DIST_LEARN.getCode()) || StringUtils.equals(school.getFacilityTypeCode(), FacilityTypeCodes.DISTONLINE.getCode());
var zeroCourses = TransformUtil.parseNumberOfCourses(student.getNumberOfCourses(), student.getSdcSchoolCollection().getSdcSchoolCollectionID()) == 0;
boolean isAdult = Boolean.TRUE.equals(student.getIsAdult());

if (isAdult && isAllowedAdultGradeCode && reportedByOnlineOrContEdSchool && zeroCourses) {
if (isAdult && isAllowedAdultGradeCode && reportedByOnlineSchool && zeroCourses) {
if(studentRuleData.getSdcSchoolCollectionStudentEntity().getAssignedStudentId() == null) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public FteCalculationResult calculateFte(StudentRuleData studentData) {
}

private boolean isOnlineSchool(StudentRuleData studentRuleData) {
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.CONT_ED.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public FteCalculationResult calculateFte(StudentRuleData studentData) {
}

private boolean isOnlineSchool(StudentRuleData studentRuleData) {
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.CONT_ED.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public List<SdcSchoolCollectionStudentValidationIssue> executeValidation(Student
final List<SdcSchoolCollectionStudentValidationIssue> errors = new ArrayList<>();

if(fteCalculatorUtils.noCoursesForAdultStudentInLastTwoYears(studentRuleData) && SchoolGradeCodes.getAllowedAdultGrades().contains(studentRuleData.getSdcSchoolCollectionStudentEntity().getEnrolledGradeCode()) && (studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode())
|| studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.CONT_ED.getCode()))) {
|| studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode()))) {
log.debug("AdultOnlineZeroCourseHistoryRule-V34: Student has no courses reported within last two years for sdcSchoolCollectionStudentID::" + studentRuleData.getSdcSchoolCollectionStudentEntity().getSdcSchoolCollectionStudentID());
errors.add(createValidationIssue(
StudentValidationIssueSeverityCode.FUNDING_WARNING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public List<SdcSchoolCollectionStudentValidationIssue> executeValidation(Student
}

private boolean onlineConditionPassed(StudentRuleData studentRuleData) {
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.CONT_ED.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public boolean shouldExecute(StudentRuleData studentRuleData, List<SdcSchoolColl
log.debug("In shouldExecute of SchoolAgedNoOfCoursesRule-V46: for collectionType {} and sdcSchoolCollectionStudentID :: {}" , FteCalculatorUtils.getCollectionTypeCode(studentRuleData),
studentRuleData.getSdcSchoolCollectionStudentEntity().getSdcSchoolCollectionStudentID());

var onlineAndContinuingFacilityCodes = Arrays.asList(FacilityTypeCodes.DISTONLINE.getCode(), FacilityTypeCodes.DIST_LEARN.getCode(), FacilityTypeCodes.CONT_ED.getCode());
var onlineAndContinuingFacilityCodes = Arrays.asList(FacilityTypeCodes.DISTONLINE.getCode(), FacilityTypeCodes.DIST_LEARN.getCode());

var shouldExecute = isValidationDependencyResolved("V46", validationErrorsMap) && !onlineAndContinuingFacilityCodes.contains(studentRuleData.getSchool().getFacilityTypeCode());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public List<SdcSchoolCollectionStudentValidationIssue> executeValidation(Student
final List<SdcSchoolCollectionStudentValidationIssue> errors = new ArrayList<>();

if(fteCalculatorUtils.noCoursesForSchoolAgedStudentInLastTwoYears(studentRuleData) && (studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode())
|| studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.CONT_ED.getCode()))) {
|| studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode()))) {
log.debug("SchoolAgedOnlineZeroCourseHistoryRule-V47: Student has no courses reported within last two years for sdcSchoolCollectionStudentID::" + studentRuleData.getSdcSchoolCollectionStudentEntity().getSdcSchoolCollectionStudentID());
errors.add(createValidationIssue(
StudentValidationIssueSeverityCode.FUNDING_WARNING,
Expand Down

0 comments on commit 91a58ad

Please sign in to comment.