Problem with parser when dependency condition on a text field#6
Problem with parser when dependency condition on a text field#6
Conversation
|
Although it would be nice if the redcap parser produced valid DSL for handling a dependency on a text field, what is higher priority is making the normal parser able to handle a dependency on a text field. We can make hand corrections to the DSL if needed. |
|
Gustavo. Please explain what you did to indirectly address the issue. And what the workflow will be to use your fix. |
|
Well, the problem that I solved here is that the parser doesn't allow a validation condition and a dependency condition at the same time, so I changed the logic to allow that to happen. The problem, is that by some reason the answer_id is not linked to the condition when the survey is created, so I did a rake task in HeH that make that link. To be more explicit, the Question has a Dependency that has a Dependency Condition (DC), this DC has the question that depends of it, and it should have the answer id, but is not assigned, so I check that if the answer_id is nil, but we have a question id, then I just assign the answer id of that question to that field. I think that we just going to have that nil if we have this case. So after creating a survey that have dependency conditions, you just need to go to HeH an run surveyor:fix_dependencies |
|
Another redcap csv with this issue is second hand smoke with branching logic [spouse_smoke_yrs] > 0. spouse_smoke_yrs is the referrant answer and is a textbox; |
When you build redcap_siblings.csv, unparse it to a DSL, then build from DSL, this build fails. This appears to be the inverse of the problem solved by #3. I think the regular parser needs to be updated like the redcap parser was in #3.
appears to be issue with the following line from DSL. q_sibs is a text field.