civictechdc / districthousing

District Housing lets caseworkers help clients apply for Section 8 housing by automatically filling out multiple PDF applications using one online form.
http://codefordc.github.io/districthousing/
MIT License
40 stars 64 forks source link

[data model] Dupont Park page 5: emergency contact #382

Open kevko opened 8 years ago

kevko commented 8 years ago

From Stacey:

mlouie commented 8 years ago

@jrunningen Looking through this, I think this might related to how we collect data or map it to the PDF. In the Contacts section of the online form, we allow case workers to specify the relationship type, but it doesn't look like we can use that information to populate a form that explicitly asks for an Emergency Contact.

jrunningen commented 8 years ago

In /districthousing/app/models: $ grep when *.rb | grep -i emerg doesn't give any results, so it looks like we don't have any regexes that look for PDF field names starting with EmergencyContact. We should add some. The Dupont Park PDF specifically wants these fields:

EmergencyContactName EmergencyContactStreet EmergencyContactPhone EmergencyContactCityStateZIP EmergencyContact2Name EmergencyContact2Street EmergencyContact2Phone EmergencyContact2CityStateZIP

I think these can all be handled by checking for /^EmergencyContact/ in a when clause in applicant.rb, like we already do with when /^Contact(\d+)(.+)$/, then delegate to a list of emergency contacts.

If someone in the meetup wants to pick up a coding bug, I think this is a good one to try out, since it's not too hairy.