Skip to content

Commit

Permalink
Merge pull request #1461 from bcgov/feature/addKF
Browse files Browse the repository at this point in the history
Adding KF to the enrolment headcount report
  • Loading branch information
SodhiA1 authored Jan 9, 2025
2 parents 53cbb7a + 80a064b commit 380514f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ public enum CEAndOLEnrolmentAndFteHeader {
KIND_HT_REFUGEE_COUNT("Headcount Kind(H/T) Refugees"),
KIND_HT_ELL_COUNT("Headcount Kind(H/T) ELL"),

KIND_FT_COUNT("Headcount Kind(F/T) New CE/OL"),
KIND_FT_REFUGEE_COUNT("Headcount Kind(F/T) Refugees"),
KIND_FT_ELL_COUNT("Headcount Kind(F/T) ELL"),

GRADE_01_COUNT("Headcount Grade 1 New CE/OL"),
GRADE_01_REFUGEE_COUNT("Headcount Grade 1 Refugees"),
GRADE_01_ELL_COUNT("Headcount Grade 1 ELL"),
Expand Down Expand Up @@ -76,6 +80,9 @@ public enum CEAndOLEnrolmentAndFteHeader {
KIND_HT_FTE_TOTAL("Funded FTE Kind(H/T) New CE/OL"),
KIND_HT_FTE_REFUGEE_TOTAL("Funded FTE Kind(H/T) Refugees"),

KIND_FT_FTE_TOTAL("Funded FTE Kind(F/T) New CE/OL"),
KIND_FT_FTE_REFUGEE_TOTAL("Funded FTE Kind(F/T) Refugees"),

GRADE_ONE_FTE_TOTAL("Funded FTE Grade 1 New CE/OL"),
GRADE_ONE_FTE_REFUGEE_TOTAL("Funded FTE Grade 1 Refugees"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,10 @@ WHERE sscs.sdcSchoolCollectionStudentStatusCode NOT IN ('ERROR', 'DELETED')
COUNT(DISTINCT CASE WHEN sscs.enrolledGradeCode = 'KH' AND sscs.schoolFundingCode = '16' THEN sscs.sdcSchoolCollectionStudentID ELSE NULL END) AS khRefugeeCount,
COUNT(DISTINCT CASE WHEN sscs.enrolledGradeCode = 'KH' AND ep.enrolledProgramCode = '17' AND sscs.ellNonEligReasonCode IS NULL THEN sscs.sdcSchoolCollectionStudentID END) AS khEllCount,
COUNT(DISTINCT CASE WHEN sscs.enrolledGradeCode = 'KF' THEN sscs.sdcSchoolCollectionStudentID END) as kfTotalCount,
COUNT(DISTINCT CASE WHEN sscs.enrolledGradeCode = 'KF' AND sscs.schoolFundingCode = '16' THEN sscs.sdcSchoolCollectionStudentID ELSE NULL END) AS kfRefugeeCount,
COUNT(DISTINCT CASE WHEN sscs.enrolledGradeCode = 'KF' AND ep.enrolledProgramCode = '17' AND sscs.ellNonEligReasonCode IS NULL THEN sscs.sdcSchoolCollectionStudentID END) AS kfEllCount,
COUNT(DISTINCT CASE WHEN sscs.enrolledGradeCode = '01' THEN sscs.sdcSchoolCollectionStudentID END) as gradeOneTotalCount,
COUNT(DISTINCT CASE WHEN sscs.enrolledGradeCode = '01' AND sscs.schoolFundingCode = '16' THEN sscs.sdcSchoolCollectionStudentID ELSE NULL END) AS gradeOneRefugeeCount,
COUNT(DISTINCT CASE WHEN sscs.enrolledGradeCode = '01' AND ep.enrolledProgramCode = '17' AND sscs.ellNonEligReasonCode IS NULL THEN sscs.sdcSchoolCollectionStudentID END) AS gradeOneEllCount,
Expand Down Expand Up @@ -1550,6 +1554,17 @@ AND s.sdcSchoolCollectionStudentStatusCode NOT IN ('ERROR', 'DELETED')) as khTot
AND s.sdcSchoolCollectionStudentStatusCode NOT IN ('ERROR', 'DELETED'))
as khRefugeeTotalFte,
(SELECT SUM(CASE WHEN s.enrolledGradeCode = 'KF' AND s.fte IS NOT NULL THEN s.fte ELSE 0 END ) FROM SdcSchoolCollectionStudentEntity s
WHERE s.sdcSchoolCollection.collectionEntity.collectionID = :collectionID
AND s.sdcSchoolCollection.sdcSchoolCollectionID = sscs.sdcSchoolCollection.sdcSchoolCollectionID
AND s.sdcSchoolCollectionStudentStatusCode NOT IN ('ERROR', 'DELETED')) as kfTotalFte,
(SELECT SUM(CASE WHEN s.enrolledGradeCode = 'KF' AND s.schoolFundingCode = '16' AND s.fte IS NOT NULL THEN s.fte ELSE 0 END ) FROM SdcSchoolCollectionStudentEntity s
WHERE s.sdcSchoolCollection.collectionEntity.collectionID = :collectionID
AND s.sdcSchoolCollection.sdcSchoolCollectionID = sscs.sdcSchoolCollection.sdcSchoolCollectionID
AND s.sdcSchoolCollectionStudentStatusCode NOT IN ('ERROR', 'DELETED'))
as kfRefugeeTotalFte,
(SELECT SUM(CASE WHEN s.enrolledGradeCode = '01' AND s.fte IS NOT NULL THEN s.fte ELSE 0 END ) FROM SdcSchoolCollectionStudentEntity s
WHERE s.sdcSchoolCollection.collectionEntity.collectionID = :collectionID
AND s.sdcSchoolCollection.sdcSchoolCollectionID = sscs.sdcSchoolCollection.sdcSchoolCollectionID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,10 @@ private List<String> prepareEnrolmentFteDataForCEAndOLSchools(EnrolmentHeadcount
TransformUtil.getPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKhRefugeeCount() : "0", headcountResult.getKhRefugeeCount()),
TransformUtil.getPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKhEllCount() : "0", headcountResult.getKhEllCount()),

TransformUtil.getPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKfTotalCount() : "0", headcountResult.getKfTotalCount()),
TransformUtil.getPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKfRefugeeCount() : "0", headcountResult.getKfRefugeeCount()),
TransformUtil.getPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKfEllCount() : "0", headcountResult.getKfEllCount()),

TransformUtil.getPositiveChange(septHeadcountResult != null ? septHeadcountResult.getGradeOneTotalCount() : "0", headcountResult.getGradeOneTotalCount()),
TransformUtil.getPositiveChange(septHeadcountResult != null ? septHeadcountResult.getGradeOneRefugeeCount() : "0", headcountResult.getGradeOneRefugeeCount()),
TransformUtil.getPositiveChange(septHeadcountResult != null ? septHeadcountResult.getGradeOneEllCount() : "0", headcountResult.getGradeOneEllCount()),
Expand Down Expand Up @@ -1338,6 +1342,9 @@ private List<String> prepareEnrolmentFteDataForCEAndOLSchools(EnrolmentHeadcount
TransformUtil.getFTEPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKhTotalFte() : "0", headcountResult.getKhTotalFte()),
TransformUtil.getFTEPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKhRefugeeTotalFte() : "0", headcountResult.getKhRefugeeTotalFte()),

TransformUtil.getFTEPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKfTotalFte() : "0", headcountResult.getKfTotalFte()),
TransformUtil.getFTEPositiveChange(septHeadcountResult != null ? septHeadcountResult.getKfRefugeeTotalFte() : "0", headcountResult.getKfRefugeeTotalFte()),

TransformUtil.getFTEPositiveChange(septHeadcountResult != null ? septHeadcountResult.getGradeOneTotalFte() : "0", headcountResult.getGradeOneTotalFte()),
TransformUtil.getFTEPositiveChange(septHeadcountResult != null ? septHeadcountResult.getGradeOneRefugeeTotalFte() : "0", headcountResult.getGradeOneRefugeeTotalFte()),

Expand Down

0 comments on commit 380514f

Please sign in to comment.