Skip to content

Commit 5bd6119

Browse files
4.14 CH Enrollment MoveInDate
#122 - consistent with 5/9 update to section 4.7 -- for RRH/PSH enrollments relevant to CH, when EntryDate is > than the HoH MoveInDate, use EntryDate as MoveInDate.
1 parent 0962f8e commit 5bd6119

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

LSASampleCode.sql

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,9 +1135,14 @@ select distinct lp.PersonalID, hn.EnrollmentID, p.ProjectType
11351135
when p.TrackingMethod = 3 then null
11361136
when hn.EntryDate < lp.CHStart then lp.CHStart
11371137
else hn.EntryDate end
1138-
, case when p.ProjectType in (3,13) and hoh.MoveInDate >= hn.EntryDate
1139-
and hoh.MoveInDate < coalesce(x.ExitDate, lp.LastActive)
1140-
then hoh.MoveInDate else null end
1138+
-- 6/10/2019 for RRH/PSH enrollments where EntryDate is > than the HoH MoveInDate,
1139+
-- use EntryDate as MoveInDate (consistent with 5/9/2019 update to section 4.7)
1140+
, case when p.ProjectType not in (3,13) or hoh.MoveInDate is null then null
1141+
when hoh.MoveInDate >= hn.EntryDate
1142+
and hoh.MoveInDate < coalesce(x.ExitDate, lp.LastActive)
1143+
then hoh.MoveInDate
1144+
when hoh.MoveInDate < hn.EntryDate then hn.EntryDate
1145+
else null end
11411146
, case
11421147
when p.TrackingMethod = 3 then null
11431148
when x.ExitDate is null then lp.LastActive

0 commit comments

Comments
 (0)