Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop treating any field with partial yesno coding as yesno-only #386

Open
shippy opened this issue Jun 12, 2020 · 1 comment
Open

Stop treating any field with partial yesno coding as yesno-only #386

shippy opened this issue Jun 12, 2020 · 1 comment

Comments

@shippy
Copy link
Contributor

shippy commented Jun 12, 2020

Descendant of #277; see sibis-platform/ncanda-operations#9422 for bug instance. The trouble:

youthreport2_acc2 is a field that gets mistakenly recognized as a YN field because its Redcap options are 1, Yes | 0, No | 1717, Refused - and the 1, Yes | 0, No makes it subject to map_yn_to_binary, which will drop any non-YN/10 values.

To resolve, fix the regex in

re.match('([^0-9]*0, No[^0-9]*1, Yes.*|[^0-9]*1, Yes[^0-9]*0, No.*)',
.

@jimklo jimklo closed this as completed in 26a9011 Jul 13, 2020
jimklo added a commit that referenced this issue Jul 13, 2020
Fix #386 - only treat YN fields when yes and no are the only options
@shippy
Copy link
Contributor Author

shippy commented Jul 14, 2020

Well, it turns out that we were sinning against the liberal definition: there's several fields in Youth Report 1 that are defined as 1, Yes | 0, Not selected and were relying on Y/N handling. I'm currently running import/laptops/update_visit_data -a --forms youth_report_1,youth_report_1b to determine if there are any other such fields that we need to handle like this.

@shippy shippy reopened this Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant