| 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::en | required | relevant | appearance | read_only | constraint | constraint_message | calculation | choice_filter | hint::en | default | notes | repeat_count | parameters | |||||||||||
2 | begin group | inputs | NO_LABEL | FALSE | |||||||||||||||||||||||
3 | begin group | user | NO_LABEL | ||||||||||||||||||||||||
4 | string | contact_id | NO_LABEL | Contact ID of the logged in user | |||||||||||||||||||||||
5 | string | facility_id | NO_LABEL | Place ID of the logged in user | |||||||||||||||||||||||
6 | string | name | NO_LABEL | Name of the logged in user | |||||||||||||||||||||||
7 | end group | ||||||||||||||||||||||||||
8 | end group | ||||||||||||||||||||||||||
9 | begin group | init | NO_LABEL | field-list | |||||||||||||||||||||||
10 | select_one contact | create_new_person | Set the Primary Contact | yes | |||||||||||||||||||||||
11 | db:person | select_person | Select the Primary Contact | yes | selected(${create_new_person},'old_person') | db-object | |||||||||||||||||||||
12 | end group | ||||||||||||||||||||||||||
13 | |||||||||||||||||||||||||||
14 | begin group | contact | New Person | selected(${create_new_person},'new_person') | field-list | ||||||||||||||||||||||
15 | hidden | parent | NO_LABEL | PARENT | |||||||||||||||||||||||
16 | hidden | type | NO_LABEL | person | |||||||||||||||||||||||
17 | string | name | Names | yes | |||||||||||||||||||||||
18 | tel | phone | Phone Number | TRUE | Please enter a valid local number, or use the standard international format, which includes a plus sign (+) and country code. For example: +254712345678 | ||||||||||||||||||||||
19 | tel | phone_alternate | Alternate Phone Number | TRUE | Please enter a valid local number, or use the standard international format, which includes a plus sign (+) and country code. For example: +254712345678 | ||||||||||||||||||||||
20 | select_one roles | role | Role | minimal | |||||||||||||||||||||||
21 | string | role_other | Specify other | yes | selected( ${role},'other') | ||||||||||||||||||||||
22 | string | external_id | External ID | ||||||||||||||||||||||||
23 | string | notes | Notes | multiline | |||||||||||||||||||||||
24 | begin group | meta | NO_LABEL | hidden | |||||||||||||||||||||||
25 | calculate | created_by | ../../../inputs/user/name | ||||||||||||||||||||||||
26 | calculate | created_by_person_uuid | ../../../inputs/user/contact_id | ||||||||||||||||||||||||
27 | calculate | created_by_place_uuid | ../../../inputs/user/facility_id | ||||||||||||||||||||||||
28 | end group | ||||||||||||||||||||||||||
29 | end group | ||||||||||||||||||||||||||
30 | |||||||||||||||||||||||||||
31 | |||||||||||||||||||||||||||
32 | begin group | begin | field-list | ||||||||||||||||||||||||
33 | string | _name | Organisation name | yes | |||||||||||||||||||||||
34 | select_multiple projects | sm_projects | Projects | minimal | |||||||||||||||||||||||
35 | select_one location_type | so_location_type | Location type | yes | minimal | ||||||||||||||||||||||
36 | calculate | is_rural | if(${so_location_type}='rural',1,0) | ||||||||||||||||||||||||
37 | select_multiple districts | sm_districts | Districts | yes | minimal | is_rural=${is_rural} | |||||||||||||||||||||
38 | calculate | sm_district_count | NO_LABEL | count-selected(${sm_districts}) | |||||||||||||||||||||||
39 | string | _external_id | External ID | ||||||||||||||||||||||||
40 | string | _notes | Notes | multiline | |||||||||||||||||||||||
41 | end group | begin | |||||||||||||||||||||||||
42 | |||||||||||||||||||||||||||
43 | begin group | g_municipalities | Local municipality selections | ${so_location_type} = 'rural' | field-list | ||||||||||||||||||||||
44 | note | municipality_note | Please select all the relevant local municipalities for each district: | ||||||||||||||||||||||||
45 | begin repeat | r_municipalities | NO_LABEL | ${sm_district_count} | |||||||||||||||||||||||
46 | calculate | district | NO_LABEL | selected-at(${sm_districts}, position(..)-1) | |||||||||||||||||||||||
47 | select_multiple municipalities | sm_municipalities | Select the "${district}" district's local municipalities | yes | minimal | district=${district} | |||||||||||||||||||||
48 | calculate | sm_municipality_count | count-selected(${sm_municipalities}) | ||||||||||||||||||||||||
49 | calculate | map_municipalities | NO_LABEL | join(':', ${district}, ${sm_municipalities}) | |||||||||||||||||||||||
50 | end repeat | r_municipalities | |||||||||||||||||||||||||
51 | calculate | mappings_municipalities | join(',',${map_municipalities}) | ||||||||||||||||||||||||
52 | end group | g_municipalities | |||||||||||||||||||||||||
53 | |||||||||||||||||||||||||||
54 | |||||||||||||||||||||||||||
55 | begin group | g_municipality_main_places | Main places | field-list | |||||||||||||||||||||||
56 | note | main_place_note | Please select main places for the following municipalities: | ||||||||||||||||||||||||
57 | begin repeat | r_municipality_district | ${sm_district_count} | ||||||||||||||||||||||||
58 | calculate | key_municipality_district | selected-at(${sm_districts}, position(..)-1) | ||||||||||||||||||||||||
59 | calculate | main_places_municipalities | indexed-repeat(${sm_municipalities},${r_municipalities}, position(..)) | ||||||||||||||||||||||||
60 | calculate | main_municipality_count | count-selected(${main_places_municipalities}) | ||||||||||||||||||||||||
61 | note | main_place_note_2 | In the district of "${key_municipality_district}": | ||||||||||||||||||||||||
62 | begin repeat | r_municipalities_main_places | if(${so_location_type}='rural',${main_municipality_count},1) | ||||||||||||||||||||||||
63 | calculate | key_municipality | if(${so_location_type}='rural',selected-at(${main_places_municipalities}, position(..)-1),'NONE') | ||||||||||||||||||||||||
64 | note | test_munc_key | Test Munc Key | ${key_municipality} | |||||||||||||||||||||||
65 | select_multiple main_places | sm_municipality_main_places | Select the "${key_municipality}" municipality's main places | yes | minimal | district=${key_municipality_district} and municipality=${key_municipality} | |||||||||||||||||||||
66 | note | lets_see_if_this_also_repeats | Some note title here | ||||||||||||||||||||||||
67 | calculate | sm_municipality_main_places_count | count-selected(${sm_municipality_main_places}) | ||||||||||||||||||||||||
68 | calculate | map_municipality_main_places | join(':', ${key_municipality}, ${sm_municipality_main_places}) | ||||||||||||||||||||||||
69 | |||||||||||||||||||||||||||
70 | begin repeat | r_municipality_sub_places | ${sm_municipality_main_places_count} | ||||||||||||||||||||||||
71 | calculate | key_municipality_main_place | selected-at(${sm_municipality_main_places}, position(..)-1) | ||||||||||||||||||||||||
72 | select_multiple sub_places | sm_municipality_main_place_sub_places | Select the "${key_municipality_main_place}" main place's sub places | yes | district=${key_municipality_district} and municipality=${key_municipality} and main_place=${key_municipality_main_place} | ||||||||||||||||||||||
73 | calculate | map_municipality_main_place_sub_places | join(':',${key_municipality_main_place},${sm_municipality_main_place_sub_places}) | ||||||||||||||||||||||||
74 | end repeat | r_municipality_sub_places | |||||||||||||||||||||||||
75 | calculate | mapping_municipality_sub_places | join(',',${map_municipality_main_place_sub_places}) | ||||||||||||||||||||||||
76 | |||||||||||||||||||||||||||
77 | |||||||||||||||||||||||||||
78 | end repeat | r_municipalities_main_places | |||||||||||||||||||||||||
79 | calculate | mapping_municipality_main_places | join(',',${map_municipality_main_places}) | ||||||||||||||||||||||||
80 | calculate | mapping_municipality_sub_places_ | join(',',${mapping_municipality_sub_places}) | ||||||||||||||||||||||||
81 | |||||||||||||||||||||||||||
82 | calculate | map_district_direct_main_places | if(${so_location_type}='metro',join(':',${key_municipality_district},indexed-repeat(${sm_municipality_main_places},${r_municipalities_main_places},1)),.) | ||||||||||||||||||||||||
83 | end repeat | r_municipality_district | |||||||||||||||||||||||||
84 | calculate | mapping_municipality_main_places_all | join(',',${mapping_municipality_main_places}) | ||||||||||||||||||||||||
85 | calculate | mapping_municipality_sub_places_all | join(',',${mapping_municipality_sub_places_}) | ||||||||||||||||||||||||
86 | |||||||||||||||||||||||||||
87 | calculate | mapping_district_direct_main_places_all | join(',',${map_district_direct_main_places}) | ||||||||||||||||||||||||
88 | end group | g_municipality_main_places | |||||||||||||||||||||||||
89 | |||||||||||||||||||||||||||
90 | |||||||||||||||||||||||||||
91 | begin group | PLACE_TYPE | NO_LABEL | field-list | |||||||||||||||||||||||
92 | hidden | parent | NO_LABEL | PARENT | |||||||||||||||||||||||
93 | hidden | type | NO_LABEL | ||||||||||||||||||||||||
94 | calculate | name | NO_LABEL | ${_name} | |||||||||||||||||||||||
95 | calculate | projects | NO_LABEL | ${sm_projects} | |||||||||||||||||||||||
96 | calculate | location_type | ${so_location_type} | ||||||||||||||||||||||||
97 | calculate | districts | NO_LABEL | ${sm_districts} | |||||||||||||||||||||||
98 | calculate | municipalities | if(${so_location_type}='metro','',${mappings_municipalities}) | ||||||||||||||||||||||||
99 | calculate | main_places | if(${so_location_type}='metro',${mapping_district_direct_main_places_all},${mapping_municipality_main_places_all}) | ||||||||||||||||||||||||
100 | calculate | sub_places | ${mapping_municipality_sub_places_all} |