greenriver / hmis-warehouse

The Open Path HMIS Warehouse (Warehouse) project was initiated by the City of Boston's Department of Neighborhood Development office to coordinate data across various HMIS installations and supply de-duplicated client information to the Boston CAS (https://github.com/greenriver/boston-cas).
http://openpath.host
GNU General Public License v3.0
30 stars 14 forks source link

Process disability from external forms #4768

Closed martha closed 3 days ago

martha commented 6 days ago

Please squash merge this PR

Description

GH issue: https://github.com/open-path/Green-River/issues/6733

This PR enables processing disability responses from the PIT external form onto Disability records. The form structure I'm working with in dev looks like this:

Disability questions ``` { "item": [ { "text": "Substance use disorder", "type": "BOOLEAN", "link_id": "substance_use_disorder", "mapping": { "field_name": "substanceUseDisorder", "record_type": "DISABILITY_GROUP" }, "component": "CHECKBOX", "disabled_display": "HIDDEN" }, { "text": "Chronic health condition", "type": "BOOLEAN", "link_id": "chronic_health_condition", "mapping": { "field_name": "chronicHealthCondition", "record_type": "DISABILITY_GROUP" }, "component": "CHECKBOX", "disabled_display": "HIDDEN" }, { "text": "Mental health disorder", "type": "BOOLEAN", "link_id": "mental_health_disorder", "mapping": { "field_name": "mentalHealthDisorder", "record_type": "DISABILITY_GROUP" }, "component": "CHECKBOX", "disabled_display": "HIDDEN" }, { "text": "Physical disability", "type": "BOOLEAN", "link_id": "physical_disability", "mapping": { "field_name": "physicalDisability", "record_type": "DISABILITY_GROUP" }, "component": "CHECKBOX", "disabled_display": "HIDDEN" }, { "text": "Developmental disability", "type": "BOOLEAN", "link_id": "developmental_disability", "mapping": { "field_name": "developmentalDisability", "record_type": "DISABILITY_GROUP" }, "component": "CHECKBOX", "disabled_display": "HIDDEN" }, { "text": "HIV/AIDS", "type": "BOOLEAN", "link_id": "hiv_aids", "mapping": { "field_name": "hivAids", "record_type": "DISABILITY_GROUP" }, "component": "CHECKBOX", "disabled_display": "HIDDEN" } ], "text": "Do you have any of the following conditions?", "type": "GROUP", "link_id": "do_you_have_any_of_the_following_conditi", "component": "INPUT_GROUP", "enable_when": [ { "operator": "EQUAL", "question": "survey_type", "answer_code": "In-Person Interaction" } ], "enable_behavior": "ALL", "disabled_display": "HIDDEN" }, { "text": "Do any of those conditions keep you from actively maintaining employment or living independently?", "type": "CHOICE", "link_id": "do_any_of_those_conditions_keep_you", "mapping": { "field_name": "disablingCondition", "record_type": "ENROLLMENT" }, "enable_when": [ { "operator": "EQUAL", "question": "substance_use_disorder", "answer_code": "1" }, { "operator": "EQUAL", "question": "chronic_health_condition", "answer_code": "1" }, { "operator": "EQUAL", "question": "mental_health_disorder", "answer_code": "1" }, { "operator": "EQUAL", "question": "physical_disability", "answer_code": "1" }, { "operator": "EQUAL", "question": "developmental_disability", "answer_code": "1" }, { "operator": "EQUAL", "question": "hiv_aids", "answer_code": "1" } ], "warn_if_empty": false, "enable_behavior": "ANY", "disabled_display": "HIDDEN", "pick_list_options": [ { "code": "NO", "label": "No" }, { "code": "YES", "label": "Yes" }, { "code": "DATA_NOT_COLLECTED", "label": "Doesn't know / Prefers not to answer" } ] } ], ```

To dos:

Questions:

Type of change

Checklist before requesting review

gigxz commented 3 days ago

Is there anywhere in the ui that the client or enrollment's disability records are all shown? Or is it (so far) only shown on the assessment where it was collected?

They are shown in the warehouse on the client dashboard