COHHIO / COHHIO_HMIS

Code for pulling in HMIS data, writing it out to reports
GNU Affero General Public License v3.0
10 stars 5 forks source link

Proposed edit to homeless history handling #146

Closed gwenbeebe closed 3 years ago

gwenbeebe commented 3 years ago

Right now, we're checking each possible condition separately when evaluating the homeless history score. If you group the number of months homeless and the number of times homeless according to the scoring handling, the homeless history score combinations can be put in a table like so:

image

This pull request creates the table shown as an independent data frame, looks at the the number of months and number of times homeless and groups them accordingly, and then simply looks up each value. It runs a little faster (1.6 seconds vs 0.6 seconds on my machine), is much shorter, and should be simpler to maintain if a score needs to be changed--update it in one spot instead of once per combination!

kiadso commented 3 years ago

Nice, this is great!!!!!