HMIS / LSASampleCode

Longitudinal System Analysis (LSA) Sample Code and Documentation
22 stars 11 forks source link

Section 10.5 (both Sample Code and Spec): ReportRow = 906: review restriction by HMISParticipationStatusEndDate #1258

Closed nataliesus closed 2 months ago

nataliesus commented 2 months ago

Hi @MollyMcEvilley ,

It looks like the updated restriction by HMISParticipationStatusEndDate should be updated:

image

I am thinking of the case when project stay is active on the ReportEnd ( x.ExitDate > rpt.ReportEnd ). I.e.

Using part.HMISParticipationStatusEndDate >= coalesce(x.ExitDate, rpt.ReportEnd) the project stay is rejected because HMISParticipationStatusEndDate < ExitDate but for this case I think it should be accepted.

Maybe we can replace part.HMISParticipationStatusEndDate >= coalesce(x.ExitDate, rpt.ReportEnd) with part.HMISParticipationStatusEndDate >= IF( x.ExitDate < rpt.ReportEnd, x.ExitDate, rpt.ReportEnd )

What do you think?

Best regards! Natalie

MollyMcEvilley commented 2 months ago

Okay, I'm limiting the join to hmis_Exit so we only see ExitDates <= ReportEnd and including HMISEnd* > ReportEnd as a satisfactory condition.

*I hope that's a clear-enough alias -- typing the longer one drives me nuts.

image