Skip to content

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:

  1. Clinician records — campus enrollment and qualifications
  2. Student records — campus enrollment, Medicaid dates, TMHP info, and services
  3. Calendar records — school calendar and exception days

Script Parameters

-- The Upcoming school Year
DECLARE @newSchoolYear VARCHAR(MAX) = '2026'
-- The Current School Year
DECLARE @CurrentSchoolYear VARCHAR(MAX) = '2025'

Clinician Extensions

TablePurposeLogic
ClinicianCampusEnrollmentNew campus enrollment record for next school yearFinds records ending on 07/31 of current year, copies with new date range if none exists
ClinicianQualificationNew qualification record for next school yearFinds records ending on 07/31 of current year, copies with new date range if none exists

Student Extensions

TablePurposeLogic
StudentCampusEnrollmentNew campus enrollment for next school yearCopies records ending 07/31 of current year with new date range
StudentMedicaidEffectiveDateNew Medicaid effective date for next school yearCopies records ending 07/31 of current year with new date range
StudentTmhpInfoExtends existing TMHP Info end dateUpdates (not copies) the end date to end of next school year
StudentServiceNew service record for next school yearCopies records ending 07/31 of current year with new date range

Calendar Extensions

TablePurposeLogic
CalendarNew calendar for the school year after nextCreates records 1 year beyond @newSchoolYear for ARD/cross-year overlap
CalendarExceptionDayNew exception days for the school year after nextCopies 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 Calendar
DECLARE @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, RecordCount
FROM (
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 Results
ORDER BY SourceTable, SchoolYear;

Each table should show non-zero counts for the new school year after the script runs successfully.