HMIS / LSASampleCode

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

Flag 461-976 #1188

Closed TanyaPieterse closed 9 months ago

TanyaPieterse commented 10 months ago

Hi there, This flag seems to be caused by the same issue identified in issue 1187. According to the flag:

The LSAHousehold field HHFleeingDV must be consistent with the information provided by the project-specific versions of HHFleeingDV (ESTFleeingDV, RRHFleeingDV, and PSHFleeingDV). If HHFleeingDV equals 1 (yes), then at least one of the project-specific versions must equal 1. If HHFleeingDV equals 0 (no), then all of the project-specific versions must equal 0.

The values are: hhfleeingdv 1
estfleeingdv 2
rrhfleeingdv 1
pshfleeingdv 0 rrhsostatus 0

The flag dictionary looks at hhfleeingdv~=max(estfleeingdv,rrhfleeingdv,pshfleeingdv) & rrhsostatus<=2. In the flag description above it looks like if HHFleeingDV=1 then at lease one of the others (estfleeingdv,rrhfleeingdv,pshfleeingdv) should =1. Why is the flag checking if they are the same/approximate?

With the above values hhfleeingdv=1 and both estfleeingdv=2 and rrhfleeingdv=1 will satisfy the check. Why is this being flagged?

Thanks,

MollyMcEvilley commented 10 months ago

A fix for this is in progress.

JulesABrown commented 10 months ago

Just a plug for the weebly to keep tabs on known issues: https://hudhdx2infoissues.weebly.com/

nataliesus commented 9 months ago

Hi @MollyMcEvilley , @JulesABrown ,

On 11/21/2023 we still have Flag 461 ( upload: https://hdxsandbox.abtsites.com/dataset/443/flag-report ) but our case is a bit different from the original case which may be interesting for you:

image

tlsa_Household.HHFleeingDV is calculated on step 6.1 only: image

Here is our data: image

Thus, on step 6.1, 4 records from tlsa_HHID table are grouped into one tlsa_Household record; HHFleeingDV = 1

On step 6.8.1 ESTFleeingDV is calculate as MAX(FleeingDV), thus, we get ESTFleeingDV = 2: image

The client doesn't have RRH and PSH project stays, so RRHFleeingDV = 0, PSHFleeingDV = 0.

Thus, we have a scenario described in the flag, but I am not sure if the flag should be reviewed, or Sample Code and Spec should be corrected, or we need to fix our initial data.

Could you please take a look and advise?

Thank you! Natalie

JulesABrown commented 9 months ago

Closing - this was resolved and details are on weebly.

nataliesus commented 9 months ago

Hi @JulesABrown ,

I still get the flag for my scenario above.

New upload: https://hdxsandbox.abtsites.com/dataset/503/flag-report#

image

Thank you! Natalie

JulesABrown commented 9 months ago

@MollyMcEvilley This one needs you to weigh in on the question in the comment. Should it be possible to be a 1 in HHFleeingDV if only 2s in any of the [EST/RRH/PSH]FleeingDVs?

MollyMcEvilley commented 9 months ago

Yes! If they were currently fleeing for an RRH-SO enrollment but not for an ES/SH/TH/RRH(Standard)/PSH enrollment, HHFleeingDV will be 1 and the others will be whatever the data for the individual project groups reflect.

JulesABrown commented 9 months ago

@MollyMcEvilley, please look at the specific example Natalie provided in the comment from 2 weeks ago where the client has no RRHSO stays. The difference is due to the way the values are calculated differently in different steps.

MollyMcEvilley commented 9 months ago

The code for setting EST/RRH/PSHFleeingDV was not updated to account for multiple non-zero options -- it was looking for the max tlsa_HHID.HHFleeingDV value because the max used to be 1. Instead, it should be looking for the minimum non-zero value and set it to zero if none exists. Updating the sample code in 6.8.1, 6.8.2, and 6.8.3.

image