HMIS / LSASampleCode

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

Flags 687-655/687-656 All Households (687-657/687-658 AO Households) #1187

Closed TanyaPieterse closed 11 months ago

TanyaPieterse commented 11 months ago

Hi there, With one of our uploads, these 4 flags popped up. There is a couple of questions.

Question 1 What is the difference between flags 687-655 and 687-656 since they look the same on the exported Flag File? (Same answer is probably for difference between flags 687-657 and 687-658 which is just for the AO HHType)

Question 2 I am not sure if this is an issue with the flags, or the code (we use Molly's code - thank you!!) According to the flags: LSAHousehold count 64
LSACalculated count 65 LSAHousehold version of this field computed as the sum of RowTotal where (ESTStatus>2 and ESTAHAR==1 and ESTFleeingDV==1) LSACalculated version of this field computed as the number in the Value field where Cohort=1, Universe=16 & HHType=0 & Population=19 & ReportRow=54

We have a HOHID (21662) over 2 HouseholdIDs (49532, 56144). Both HouseholdIDs indicate AO HHType.

The difference in the flag counts 64 vs 65 is caused because LSACalculated looks at the min(HHFleeingDV) and LSAHousehold looks at max(HHFleeingDV) to determine ESTFleeingDV.

How it was calculated:

LSACalculated ReportRow=54 is counting the HOHID as 'Household Fleeing Domestic Violence' (Population 19) because: Step 3.4.4 uses hmis_HealthAndDV and sets DVStatus for tlsa_Enrollment Step 5.3/5.4 uses tlsa_Enrollment and sets DVStatus for lsa_Person based on ALL active enrollments data and min(DVStatus) Step 5.12.1 uses lsa_Person and sets HHFleeingDV for tlsa_HHID based on min(DVStatus), making HHFleeingDV=1 Step 6.1 uses tlsa_HHID and sets HHFleeingDV for tlsa_Household based on min(HHFleeingDV), making HHFleeingDV=1 Step 8.3.11 uses tlsa_Household sets tlsa_AveragePops for this household as a Population=19 since HHFleeingDV=1

LSAHousehold is not counting the HOHID because: Step 6.8.1 uses max(HHFleeingDV) from tlsa_HHID so set ESTFleeingDV, making ESTFleeingDV=2

According to the flag library it is not possible for LSAHousehold to be less than LSACalculated, and since this is flagged as a Data Error I am not sure if the community can just explain why there is a difference. Any advice?

Thanks,

JulesABrown commented 11 months ago

Agreed - up on weebly and we'll put a fix through shortly. I'll close the ticket when pushed

JulesABrown commented 11 months ago

Closing - this was resolved and details are on weebly.