Skip to content
Molly McEvilley edited this page Aug 18, 2021 · 3 revisions

Note: Incomplete

LSA Sample Code Repository

The Longitudinal System Analysis (LSA) is:

  • A report to the US Department of Housing and Urban Development (HUD) as
  • A zip file containing 10 Comma-Separated Values (CSV) files
  • Generated by a Homeless Management Information System (HMIS)
  • For Continuums of Care for the Homeless (CoCs)
  • Submitted annually via HUD's Homelessness Data Exchange (HDX 2.0)
  • Used to produce HUD's Annual Homelessness Assessment Report (AHAR) to Congress and
  • Food for Stella (which may or may not be an acronym), HUD's strategy and analysis tool for CoCs.

If you needed the long version of any of the acronyms above, this repository is probably not relevant to you. If it all makes perfect sense -- and you are an HMIS developer, an HMIS system administrator, or otherwise have some responsibility for producing the LSA or need to understand its business logic in depth -- you may be in the right place.

Resources

Documentation

The final versions of these documents are available on the HUD Exchange. The documents here are working versions that change more frequently and prior to release on the HUD Exchange.

  • LSA Programming Specifications (usually referred to as 'the specs') - a Word document with detailed business logic and step-by-step instructions for producing the LSA based on HMIS data.
  • LSA Data Dictionary - an Excel file that lists file names, columns, and valid values for the 10 CSV files included in an LSA upload.

Code

The sample code is SQL, and written in SQL Server. Originally, it was not intended for public release -- it was written concurrent with the first version of the specs (FY2018) as a check to make sure the specs were specific enough. It was released on GitHub as a reference.

As it has evolved since, some HMIS applications use (modified versions of) this code in their production environments. There is absolutely no requirement to do so; however, it benefits from collaboration with HMIS developers across the country reviewing, identifying bugs, and improving it rather than working in a silo and reproducing effort.

Dependencies

In order to run the code as is, a user must have access to a SQL Server (or SQL Server Express) database with:

  • Permissions that allow creating and populating tables.
  • Existing tables modeled after HMIS CSV FY2022 v1.1. In order to produce any results, there must be records in the tables / columns listed below. Only records where DateDeleted is NULL are relevant.

Project Descriptor Data

  • hmis_Organization
  • hmis_Project
  • hmis_Funder
  • hmis_ProjectCoC
  • hmis_Inventory

hmis_Client

  • PersonalID
  • DOB and DOBDataQuality
  • Race, Gender, and Ethnicity Data
  • VeteranStatus

hmis_Enrollment

Limited to enrollments in ES/SH/TH/RRH/PSH projects and the following data:

  • EnrollmentID, ProjectID, HouseholdID, and RelationshipToHoH
  • EntryDate and MoveInDate
  • LivingSituation and LengthOfStay
  • PreviousStreetESSH, DateToStreetESSH, TimesHomelessPastThreeYears, MonthsHomelessPastThreeYears

hmis_EnrollmentCoC

  • InformationDate, EnrollmentID, HouseholdID, CoCCode

hmis_Services

  • EnrollmentID and DateProvided for RecordType = 200 (bed nights for ES night-by-night enrollments)

hmis_HealthAndDV

  • InformationDate, EnrollmentID, DomesticViolenceVictim, WhenOccurred, CurrentlyFleeing

hmis_Exit

  • ExitDate and Destination

Participation