{"action":"created","issue":{"url":"https://api.github.com/repos/radremedy/radremedy/issues/283","labels_url":"https://api.github.com/repos/radremedy/radremedy/issues/283/labels{/name}","comments_url":"https://api.github.com/repos/radremedy/radremedy/issues/283/comments","events_url":"https://api.github.com/repos/radremedy/radremedy/issues/283/events","html_url":"https://github.com/radremedy/radremedy/issues/283","id":102044525,"number":283,"title":"Add flags (WPATH, ICATH, ADA/Wheelchair Accessible, Sliding Scale) and hospital affiliations to providers","user":{"login":"radioprotector","id":8010294,"avatar_url":"https://avatars.githubusercontent.com/u/8010294?v=3","gravatar_id":"","url":"https://api.github.com/users/radioprotector","html_url":"https://github.com/radioprotector","followers_url":"https://api.github.com/users/radioprotector/followers","following_url":"https://api.github.com/users/radioprotector/following{/other_user}","gists_url":"https://api.github.com/users/radioprotector/gists{/gist_id}","starred_url":"https://api.github.com/users/radioprotector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radioprotector/subscriptions","organizations_url":"https://api.github.com/users/radioprotector/orgs","repos_url":"https://api.github.com/users/radioprotector/repos","events_url":"https://api.github.com/users/radioprotector/events{/privacy}","received_events_url":"https://api.github.com/users/radioprotector/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/radremedy/radremedy/labels/data%20management","name":"data management","color":"009800"},{"url":"https://api.github.com/repos/radremedy/radremedy/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/radremedy/radremedy/labels/ready","name":"ready","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"radioprotector","id":8010294,"avatar_url":"https://avatars.githubusercontent.com/u/8010294?v=3","gravatar_id":"","url":"https://api.github.com/users/radioprotector","html_url":"https://github.com/radioprotector","followers_url":"https://api.github.com/users/radioprotector/followers","following_url":"https://api.github.com/users/radioprotector/following{/other_user}","gists_url":"https://api.github.com/users/radioprotector/gists{/gist_id}","starred_url":"https://api.github.com/users/radioprotector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radioprotector/subscriptions","organizations_url":"https://api.github.com/users/radioprotector/orgs","repos_url":"https://api.github.com/users/radioprotector/repos","events_url":"https://api.github.com/users/radioprotector/events{/privacy}","received_events_url":"https://api.github.com/users/radioprotector/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/radremedy/radremedy/milestones/3","html_url":"https://github.com/radremedy/radremedy/milestones/0.2","labels_url":"https://api.github.com/repos/radremedy/radremedy/milestones/3/labels","id":750598,"number":3,"title":"0.2","description":"","creator":{"login":"radioprotector","id":8010294,"avatar_url":"https://avatars.githubusercontent.com/u/8010294?v=3","gravatar_id":"","url":"https://api.github.com/users/radioprotector","html_url":"https://github.com/radioprotector","followers_url":"https://api.github.com/users/radioprotector/followers","following_url":"https://api.github.com/users/radioprotector/following{/other_user}","gists_url":"https://api.github.com/users/radioprotector/gists{/gist_id}","starred_url":"https://api.github.com/users/radioprotector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radioprotector/subscriptions","organizations_url":"https://api.github.com/users/radioprotector/orgs","repos_url":"https://api.github.com/users/radioprotector/repos","events_url":"https://api.github.com/users/radioprotector/events{/privacy}","received_events_url":"https://api.github.com/users/radioprotector/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":6,"state":"open","created_at":"2014-08-12T04:43:02Z","updated_at":"2015-08-20T04:30:36Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-08-20T02:38:09Z","updated_at":"2015-08-27T05:33:39Z","closed_at":null,"body":"As identified in the 8/19/2015 meeting."},"comment":{"url":"https://api.github.com/repos/radremedy/radremedy/issues/comments/135299134","html_url":"https://github.com/radremedy/radremedy/issues/283#issuecomment-135299134","issue_url":"https://api.github.com/repos/radremedy/radremedy/issues/283","id":135299134,"user":{"login":"radioprotector","id":8010294,"avatar_url":"https://avatars.githubusercontent.com/u/8010294?v=3","gravatar_id":"","url":"https://api.github.com/users/radioprotector","html_url":"https://github.com/radioprotector","followers_url":"https://api.github.com/users/radioprotector/followers","following_url":"https://api.github.com/users/radioprotector/following{/other_user}","gists_url":"https://api.github.com/users/radioprotector/gists{/gist_id}","starred_url":"https://api.github.com/users/radioprotector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radioprotector/subscriptions","organizations_url":"https://api.github.com/users/radioprotector/orgs","repos_url":"https://api.github.com/users/radioprotector/repos","events_url":"https://api.github.com/users/radioprotector/events{/privacy}","received_events_url":"https://api.github.com/users/radioprotector/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T05:33:39Z","updated_at":"2015-08-27T05:33:39Z","body":"## Functional Overview\r\n\r\nWe will be adding the following fields to the RAD Record format (with the corresponding CSV column names):\r\n\r\n- Hospital Affiliation (`hospital_affiliation`, a multi-line free-text field)\r\n- Informed Consent (ICATH) Provider (`is_icath`, a flag)\r\n- WPATH Provider (`is_wpath`, a flag)\r\n- ADA/Wheelchair Accessible (`wheelchair_accessible`, a flag)\r\n- Sliding Scale (`sliding_scale`, a flag)\r\n\r\nThe flag fields will recognize the following column values (case-insensitive):\r\n\r\n- `True`\r\n- `False`\r\n- `Yes`\r\n- `No`\r\n- `Y`\r\n- `N`\r\n- `1`\r\n- `0`\r\n\r\nA blank value will be interpreted as unknown.\r\n\r\nThe provider search page will be expanded with \"Informed Consent/ICATH\", \"WPATH\", \"ADA/Wheelchair Accessible\", and \"Sliding Scale\" checkboxes.\r\n\r\nHaving a flag set for a resource will add keywords to the hidden field used in text searching (which currently includes category/population names):\r\n\r\n- *Informed Consent/ICATH*: `informed consent ICATH`\r\n- *WPATH*: `WPATH`\r\n- *ADA/Wheelchair Accessible*: `ADA accessible wheelchair accessible`\r\n- *Sliding Scale*: `sliding scale`\r\n\r\nThe hospital affiliation will not be included in text searching.\r\n\r\nOn the provider page, these new flags will be listed out between the categories and description fields. We will only render out flags that have an explicit value set (I want to avoid displaying a ton of \"Unknown\" values).\r\n\r\nThe affiliated hospital will be listed on each provider after the list of populations served.\r\n\r\nFrom an administrative perspective, the new flags will be available as filters on the resource views. We will not have any mass-actions currently enabled for these flags.\r\n\r\nWe will also not be including hospital affiliation in text searching.\r\n\r\n## Tech Changes\r\n\r\n### RAD Record Changes\r\n\r\nWe will add the fields outlined above to the `RadRecord` structure.\r\n\r\nWe will have a general-purpose `convert_boolean` that will coerce values into `True`, `False`, or `None` as appropriate according to the guidelines above.\r\n\r\nWe will also add a `normalize_record` method on the RadRecord structure that will perform value coercion on the new flag fields. In addition, it will also call the existing `convert_category_name` and `convert_population_names` methods to have a single normalization function that can be used.\r\n\r\nIn that vein, we will update `get_radrecord` in the `data_importer` module to call this new `normalize_record` method.\r\n\r\n### Database/Model Changes\r\n\r\nWe will add the following fields to the `Resource` model:\r\n\r\n- `is_icath`: Boolean, nullable\r\n- `is_wpath`: Boolean, nullable\r\n- `is_accessible`: Boolean, nullable\r\n- `has_sliding_scale`: Boolean, nullable\r\n- `hospital_affiliation`: Unicode text, nullable\r\n\r\nThe `normalize_resource` method will be updated to add keywords to the category_text field based on the presence of the field as outlined above.\r\n\r\nWe will update the `get_or_create_resource` method in the `db_fun` module to copy over the equivalent RadRecord fields over to the resource model it sets up.\r\n\r\n### Admin Changes\r\n\r\nWe will add filters to the Resource view as outlined above. We will also be adding custom labels for these fields so that they display a little more nicely.\r\n\r\n### Provider/Searching Pages\r\n\r\nWe will update `resourceservice.search` to support filtering on provided boolean values for the relevant flag fields (using the following keys in the provided `search_params` dict):\r\n\r\n- `icath`\r\n- `wpath`\r\n- `sliding_scale`\r\n- `wheelchair_accessible`\r\n\r\nThe `searchutils` module will be expanded with an additional `add_bool` value that will coerce a form value (which should be `0` or `1`, although we will currently only expose a value of `1`) to a `True` or `False` value as appropriate.\r\n\r\nThe `remedyblueprint.resource_search` endpoint will be updated to accept form values that mirror what is supported by the above `resourceservice.search` method.\r\n\r\nThe `provider.html` and `find-provider.html` templates will be updated to support displaying/searching on the fields provided."}}