APCSmartSurveyTask does not support skipping to the end of the survey, only skipping to another question identifier.
APCSmartSurveyTask does not support conditionally skipping based on combination answers to multi-choice questions. For example, "Did you consume alcohol, medication, and / or caffeine today?". In this case we wish to skip to questions asking only about the amount of consumption of each drug taken.
Actions
Add logic in APCSmartSurveyTask to end the task if the rule "end" is written in json as follows:
"rules": [ { "skipTo": "end", "type": "SurveyRule" } ] },
Support conditional logic of multiple choices by OR'ing the integer values of selections in a reduceChoiceAnswers method.
Note: Values defined in json for choices should be of type integer and expressed in binary like this:
Tested by writing a json survey where "allowMultiple":true, "dataType": "integer", APCGenericSurveyTaskViewController is the taskClassName, and "skipTo":"end" is used as a rule to direct the task to end the survey.
Tested multiple-choice questions in Breast Cancer to ensure this change has no effect on string data type multi-choice questions.
Existing surveys that use integer data type with "allowMultiple":true will be impacted by this change and should use "dataType": "string" instead to ensure that results (even numeric results) are returned in an array rather than reduced.
Issues
APCSmartSurveyTask does not support conditionally skipping based on combination answers to multi-choice questions. For example, "Did you consume alcohol, medication, and / or caffeine today?". In this case we wish to skip to questions asking only about the amount of consumption of each drug taken.
Actions
"rules": [ { "skipTo": "end", "type": "SurveyRule" } ] },
Tests
Notes
@insha @jwarmkessel @Erin-Mounts @peculiar @PacificCoaster