Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding KF to the enrolment headcount report #1461

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing CSV header


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

Expand Down
Loading