| 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 | begin | field-list | ||||||||||||||||||||||||
15 | string | _name | Organisation name | yes | |||||||||||||||||||||||
16 | select_multiple projects | sm_projects | Projects | minimal | |||||||||||||||||||||||
17 | select_one location_type | so_location_type | Location type | yes | minimal | ||||||||||||||||||||||
18 | calculate | is_rural | if(${so_location_type}='rural',1,0) | ||||||||||||||||||||||||
19 | select_multiple districts | sm_districts | Districts | yes | minimal | is_rural=${is_rural} | |||||||||||||||||||||
20 | calculate | sm_district_count | NO_LABEL | count-selected(${sm_districts}) | |||||||||||||||||||||||
21 | string | _external_id | External ID | ||||||||||||||||||||||||
22 | string | _notes | Notes | multiline | |||||||||||||||||||||||
23 | end group | begin | |||||||||||||||||||||||||
24 | |||||||||||||||||||||||||||
41 | |||||||||||||||||||||||||||
42 | |||||||||||||||||||||||||||
43 | begin group | g_municipalities | ${is_rural}=1 | field-list | |||||||||||||||||||||||
44 | begin repeat | r_municipalities | Municipalities | count-selected(${sm_districts}) | |||||||||||||||||||||||
45 | calculate | district | selected-at(${sm_districts}, position(..)-1) | ||||||||||||||||||||||||
46 | |||||||||||||||||||||||||||
47 | select_multiple municipalities | sm_municipalities | Select municipalities for district ${district} | yes | minimal | district=${district} | |||||||||||||||||||||
48 | |||||||||||||||||||||||||||
49 | calculate | map_municipalities_for_district | join(':', ${sm_municipalities}, ${district}) | ||||||||||||||||||||||||
50 | end repeat | r_municipalities | |||||||||||||||||||||||||
51 | calculate | mapping_municipalities_for_districts | join(',',${map_municipalities_for_district}) | ||||||||||||||||||||||||
52 | note | test1 | ${mapping_municipalities_for_districts} | ||||||||||||||||||||||||
53 | calculate | all_selected_municipalities | join(' ', ${sm_municipalities}) | ||||||||||||||||||||||||
54 | end group | g_municipalities | |||||||||||||||||||||||||
55 | |||||||||||||||||||||||||||
56 | |||||||||||||||||||||||||||
57 | begin group | g_main_places | ${is_rural}=1 | field-list | |||||||||||||||||||||||
58 | begin repeat | r_main_places | Main Places | count-selected(${all_selected_municipalities}) | |||||||||||||||||||||||
59 | calculate | municipality | selected-at(${all_selected_municipalities}, position(..)-1) | ||||||||||||||||||||||||
60 | |||||||||||||||||||||||||||
61 | select_multiple main_places | sm_main_places | Select main places for municipality: ${municipality} | yes | minimal | municipality=${municipality} | |||||||||||||||||||||
62 | |||||||||||||||||||||||||||
63 | calculate | map_main_places_for_municipality | join(':', ${sm_main_places}, ${municipality}) | ||||||||||||||||||||||||
64 | end repeat | r_main_places | |||||||||||||||||||||||||
65 | calculate | mapping_main_places_for_municipalities | join(',',${map_main_places_for_municipality}) | ||||||||||||||||||||||||
66 | note | test2 | ${mapping_main_places_for_municipalities} | ||||||||||||||||||||||||
67 | calculate | all_selected_main_places | join(' ', ${sm_main_places}) | ||||||||||||||||||||||||
68 | end group | g_main_places | |||||||||||||||||||||||||
69 | |||||||||||||||||||||||||||
70 | |||||||||||||||||||||||||||
71 | begin group | g_sub_places | ${is_rural}=1 | field-list | |||||||||||||||||||||||
72 | begin repeat | r_sub_places | Sub Places | count-selected(${all_selected_main_places}) | |||||||||||||||||||||||
73 | calculate | main_place | selected-at(${all_selected_main_places}, position(..)-1) | ||||||||||||||||||||||||
74 | |||||||||||||||||||||||||||
75 | select_multiple sub_places | sm_sub_places | Select sub place for main place: ${main_place} | yes | minimal | main_place=${main_place} | |||||||||||||||||||||
76 | |||||||||||||||||||||||||||
77 | calculate | map_sub_places_for_main_place | join(':', ${sm_sub_places}, ${main_place}) | ||||||||||||||||||||||||
78 | end repeat | r_sub_places | |||||||||||||||||||||||||
79 | calculate | mapping_sub_places_for_main_places | join(',',${map_sub_places_for_main_place}) | ||||||||||||||||||||||||
80 | note | test3 | ${mapping_sub_places_for_main_places} | ||||||||||||||||||||||||
81 | end group | g_sub_places | |||||||||||||||||||||||||
82 | |||||||||||||||||||||||||||
83 | |||||||||||||||||||||||||||
84 | |||||||||||||||||||||||||||
85 | begin group | g_district_direct_main_places | ${is_rural}=0 | field-list | |||||||||||||||||||||||
86 | begin repeat | r_district_direct_main_places | Main Places | count-selected(${sm_districts}) | |||||||||||||||||||||||
87 | calculate | d | selected-at(${sm_districts}, position(..)-1) | ||||||||||||||||||||||||
88 | |||||||||||||||||||||||||||
89 | select_multiple main_places | sm_district_direct_main_places | Select main places for district: ${d} | yes | minimal | district=${d} and municipality='NONE' | |||||||||||||||||||||
90 | |||||||||||||||||||||||||||
91 | calculate | map_main_places_for_district | join(':', ${sm_district_direct_main_places}, ${d}) | ||||||||||||||||||||||||
92 | end repeat | r_district_direct_main_places | |||||||||||||||||||||||||
93 | calculate | mapping_main_places_for_districts | join(',',${map_main_places_for_district}) | ||||||||||||||||||||||||
94 | note | test2 | ${mapping_main_places_for_districts} | ||||||||||||||||||||||||
95 | calculate | all_selected_district_direct_main_places | join(' ', ${sm_district_direct_main_places}) | ||||||||||||||||||||||||
96 | end group | g_district_direct_main_places | |||||||||||||||||||||||||
97 | |||||||||||||||||||||||||||
98 | |||||||||||||||||||||||||||
99 | begin group | g_district_direct_sub_places | ${is_rural}=0 | field-list | |||||||||||||||||||||||
100 | begin repeat | r_district_direct_sub_places | Sub Places | count-selected(${all_selected_district_direct_main_places}) | |||||||||||||||||||||||
101 | calculate | mp | selected-at(${all_selected_district_direct_main_places}, position(..)-1) | ||||||||||||||||||||||||
102 | |||||||||||||||||||||||||||
103 | select_multiple sub_places | sm_sub_places_ | Select sub place for main place: ${mp} | yes | minimal | municipality='NONE' and main_place=${mp} | |||||||||||||||||||||
104 | |||||||||||||||||||||||||||
105 | calculate | map_sub_places_for_main_place_ | join(':', ${sm_sub_places_}, ${mp}) | ||||||||||||||||||||||||
106 | end repeat | r_district_direct_sub_places | |||||||||||||||||||||||||
107 | calculate | mapping_district_direct_sub_places_for_main_places | join(',',${map_sub_places_for_main_place_}) | ||||||||||||||||||||||||
108 | note | test3 | ${mapping_district_direct_sub_places_for_main_places} | ||||||||||||||||||||||||
109 | end group | g_district_direct_sub_places | |||||||||||||||||||||||||
110 | |||||||||||||||||||||||||||
111 | |||||||||||||||||||||||||||
112 | begin group | PLACE_TYPE | NO_LABEL | field-list | |||||||||||||||||||||||
113 | hidden | parent | NO_LABEL | PARENT | |||||||||||||||||||||||
114 | hidden | type | NO_LABEL | ||||||||||||||||||||||||
115 | calculate | name | NO_LABEL | ${_name} | |||||||||||||||||||||||
116 | calculate | projects | NO_LABEL | ${sm_projects} |