A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | type | name | label | hint | default | appearance | constraint | constraint message | relevance | disabled | required | required message | read only | calculation | repeat_count | media:image | media:audio | media:video | choice_filter | note | response_note | publishable | minimum_seconds | |||
2 | start | starttime | ||||||||||||||||||||||||
3 | end | endtime | ||||||||||||||||||||||||
4 | deviceid | deviceid | ||||||||||||||||||||||||
5 | subscriberid | subscriberid | ||||||||||||||||||||||||
6 | simserial | simid | ||||||||||||||||||||||||
7 | phonenumber | devicephonenum | ||||||||||||||||||||||||
8 | ||||||||||||||||||||||||||
9 | ||||||||||||||||||||||||||
10 | integer | child_num | How many children is it in the household? | . > 0 and . <= 10 | In this example you can only list up to 10 children | yes | Since the two reapeat groups below needs to be the same length, it is important that they both have a pre-determined length. It might be possible to get around this, but that code will be much more complex | |||||||||||||||||||
11 | ||||||||||||||||||||||||||
12 | begin repeat | child_roster | Child Roster | ${child_num} | ||||||||||||||||||||||
13 | calculate | child_index | index() | |||||||||||||||||||||||
14 | text | child_name | What is the name of child number ${child_index}? | |||||||||||||||||||||||
15 | integer | child_age | What is the age of child ${child_name}? | . > 0 and . <= 18 | Age must be greater than 0 and equal or less than 18. Use age 1 for children under the age of 1. | yes | not(selected(${crops}, filter)) | |||||||||||||||||||
16 | end repeat | child_roster | child roster | |||||||||||||||||||||||
17 | ||||||||||||||||||||||||||
18 | calculate | child_ages | de-duplicate(' ', join(' ', ${child_age})) | |||||||||||||||||||||||
19 | calculate | unique_ages_num | count-selected(${child_ages}) | |||||||||||||||||||||||
20 | calculate | child_name_calc1 | Child number 1 | indexed-repeat(${child_name},${child_roster},1) | Currently the limit of number of children is 10, if that number is added, more slots must be added here and in the choice list where these values are used | |||||||||||||||||||||
21 | calculate | child_name_calc2 | Child number 2 | indexed-repeat(${child_name},${child_roster},2) | ||||||||||||||||||||||
22 | calculate | child_name_calc3 | Child number 3 | indexed-repeat(${child_name},${child_roster},3) | ||||||||||||||||||||||
23 | calculate | child_name_calc4 | Child number 4 | indexed-repeat(${child_name},${child_roster},4) | ||||||||||||||||||||||
24 | calculate | child_name_calc5 | Child number 5 | indexed-repeat(${child_name},${child_roster},5) | ||||||||||||||||||||||
25 | calculate | child_name_calc6 | Child number 6 | indexed-repeat(${child_name},${child_roster},6) | ||||||||||||||||||||||
26 | calculate | child_name_calc7 | Child number 7 | indexed-repeat(${child_name},${child_roster},7) | ||||||||||||||||||||||
27 | calculate | child_name_calc8 | Child number 8 | indexed-repeat(${child_name},${child_roster},8) | ||||||||||||||||||||||
28 | calculate | child_name_calc9 | Child number 9 | indexed-repeat(${child_name},${child_roster},9) | ||||||||||||||||||||||
29 | calculate | child_name_calc10 | Child number 10 | indexed-repeat(${child_name},${child_roster},10) | ||||||||||||||||||||||
30 | ||||||||||||||||||||||||||
31 | ||||||||||||||||||||||||||
32 | begin repeat | mother_select | select mother | ${mother_select_repeat_count} | ||||||||||||||||||||||
33 | calculate | mother_index | index() | |||||||||||||||||||||||
34 | select_one children | select_mother_present | Select the child that has the mother present. If the mother of the child listed or none of the mothers of the children listed are not present, select "Not Present" | rank-value(indexed-repeat(${child_age},${child_roster},filter),${child_ages}) = ${unique_ages_num} + 1 - ${mother_index} or filter = 0 | ||||||||||||||||||||||
35 | calculate_here | child_index_mother_present | if(${select_mother_present} = 0,0,${select_mother_present}) | |||||||||||||||||||||||
36 | end repeat | mother_select | ||||||||||||||||||||||||
37 | calculate | child_index_selected | max(${child_index_mother_present}) | |||||||||||||||||||||||
38 | calculate | mother_select_repeat_count | if(${child_index_selected}>0,0,${unique_ages_num}) | |||||||||||||||||||||||
39 | calculate | child_name_selected | indexed-repeat(${child_name},${child_roster},${child_index_selected}) | |||||||||||||||||||||||
40 | note | no_selected | No child was selected | ${child_index_selected}=0 | ||||||||||||||||||||||
41 | note | selected_note | child index selected : ${child_index_selected} child name : ${child_name_selected} | ${child_index_selected}>0 | ||||||||||||||||||||||
42 | ||||||||||||||||||||||||||
43 | ||||||||||||||||||||||||||
44 | ||||||||||||||||||||||||||
45 | ||||||||||||||||||||||||||
46 | ||||||||||||||||||||||||||
47 | ||||||||||||||||||||||||||
48 | ||||||||||||||||||||||||||
49 | ||||||||||||||||||||||||||
50 | ||||||||||||||||||||||||||
51 | ||||||||||||||||||||||||||
52 | ||||||||||||||||||||||||||
53 | ||||||||||||||||||||||||||
54 | ||||||||||||||||||||||||||
55 | ||||||||||||||||||||||||||
56 | ||||||||||||||||||||||||||
57 | ||||||||||||||||||||||||||
58 | ||||||||||||||||||||||||||
59 | ||||||||||||||||||||||||||
60 | ||||||||||||||||||||||||||
61 | ||||||||||||||||||||||||||
62 | ||||||||||||||||||||||||||
63 | ||||||||||||||||||||||||||
64 | ||||||||||||||||||||||||||
65 | ||||||||||||||||||||||||||
66 | ||||||||||||||||||||||||||
67 | ||||||||||||||||||||||||||
68 | ||||||||||||||||||||||||||
69 | ||||||||||||||||||||||||||
70 | ||||||||||||||||||||||||||
71 | ||||||||||||||||||||||||||
72 | ||||||||||||||||||||||||||
73 | ||||||||||||||||||||||||||
74 | ||||||||||||||||||||||||||
75 | ||||||||||||||||||||||||||
76 | ||||||||||||||||||||||||||
77 | ||||||||||||||||||||||||||
78 | ||||||||||||||||||||||||||
79 | ||||||||||||||||||||||||||
80 | ||||||||||||||||||||||||||
81 | ||||||||||||||||||||||||||
82 | ||||||||||||||||||||||||||
83 | ||||||||||||||||||||||||||
84 | ||||||||||||||||||||||||||
85 | ||||||||||||||||||||||||||
86 | ||||||||||||||||||||||||||
87 | ||||||||||||||||||||||||||
88 | ||||||||||||||||||||||||||
89 | ||||||||||||||||||||||||||
90 | ||||||||||||||||||||||||||
91 | ||||||||||||||||||||||||||
92 | ||||||||||||||||||||||||||
93 | ||||||||||||||||||||||||||
94 | ||||||||||||||||||||||||||
95 | ||||||||||||||||||||||||||
96 | ||||||||||||||||||||||||||
97 | ||||||||||||||||||||||||||
98 | ||||||||||||||||||||||||||
99 | ||||||||||||||||||||||||||
100 |