Start of School Year Process
Annual process for extending clinician, student, and calendar records into the new school year. This is a critical operational task that must be run before each new school year begins.
Overview
The start-of-school-year script creates new records for the upcoming school year by copying records from the current school year and adjusting the date ranges. It covers three categories:
- Clinician records — campus enrollment and qualifications
- Student records — campus enrollment, Medicaid dates, TMHP info, and services
- Calendar records — school calendar and exception days
Script Parameters
-- The Upcoming school YearDECLARE @newSchoolYear VARCHAR(MAX) = '2026'-- The Current School YearDECLARE @CurrentSchoolYear VARCHAR(MAX) = '2025'Clinician Extensions
| Table | Purpose | Logic |
|---|---|---|
ClinicianCampusEnrollment | New campus enrollment record for next school year | Finds records ending on 07/31 of current year, copies with new date range if none exists |
ClinicianQualification | New qualification record for next school year | Finds records ending on 07/31 of current year, copies with new date range if none exists |
Student Extensions
| Table | Purpose | Logic |
|---|---|---|
StudentCampusEnrollment | New campus enrollment for next school year | Copies records ending 07/31 of current year with new date range |
StudentMedicaidEffectiveDate | New Medicaid effective date for next school year | Copies records ending 07/31 of current year with new date range |
StudentTmhpInfo | Extends existing TMHP Info end date | Updates (not copies) the end date to end of next school year |
StudentService | New service record for next school year | Copies records ending 07/31 of current year with new date range |
Calendar Extensions
| Table | Purpose | Logic |
|---|---|---|
Calendar | New calendar for the school year after next | Creates records 1 year beyond @newSchoolYear for ARD/cross-year overlap |
CalendarExceptionDay | New exception days for the school year after next | Copies exception day records 1 year beyond @newSchoolYear |
Verification
After running the script, verify record counts by school year:
DECLARE @Year2026 INT = 2026;DECLARE @Year2027 INT = 2027;
-- Get date ranges from CalendarDECLARE @Start2026 DATE = (SELECT MIN(StartDate) FROM Calendar WHERE SchoolYear = @Year2026 AND organizationid = 1)DECLARE @End2026 DATE = (SELECT MAX(EndDate) FROM Calendar WHERE SchoolYear = @Year2026 AND organizationid = 1)DECLARE @Start2027 DATE = (SELECT MIN(StartDate) FROM Calendar WHERE SchoolYear = @Year2027 AND organizationid = 1)DECLARE @End2027 DATE = (SELECT MAX(EndDate) FROM Calendar WHERE SchoolYear = @Year2027 AND organizationid = 1)
SELECT SourceTable, SchoolYear, RecordCountFROM ( SELECT 'ClinicianCampusEnrollment' AS SourceTable, '2026' AS SchoolYear, COUNT(*) AS RecordCount FROM ClinicianCampusEnrollment WHERE EndDate BETWEEN @Start2026 AND @End2026 HAVING COUNT(*) > 0 UNION ALL SELECT 'ClinicianQualification', '2026', COUNT(*) FROM ClinicianQualification WHERE EndDate BETWEEN @Start2026 AND @End2026 HAVING COUNT(*) > 0 UNION ALL SELECT 'StudentCampusEnrollment', '2026', COUNT(*) FROM StudentCampusEnrollment WHERE EndDate BETWEEN @Start2026 AND @End2026 HAVING COUNT(*) > 0 UNION ALL SELECT 'StudentService', '2026', COUNT(*) FROM StudentService WHERE EndDate BETWEEN @Start2026 AND @End2026 HAVING COUNT(*) > 0 UNION ALL SELECT 'StudentMedicaidEffectiveDate', '2026', COUNT(*) FROM StudentMedicaidEffectiveDate WHERE EndDate BETWEEN @Start2026 AND @End2026 HAVING COUNT(*) > 0 UNION ALL SELECT 'Calendar', '2027', COUNT(*) FROM Calendar WHERE EndDate BETWEEN @Start2027 AND @End2027 HAVING COUNT(*) > 0) AS ResultsORDER BY SourceTable, SchoolYear;Each table should show non-zero counts for the new school year after the script runs successfully.