| 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 | AA | AB | AC | AD | AE | AF | AG | AH | AI | AJ | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | type | name | label::en | required | relevant | appearance | read_only | constraint | constraint_message | calculation | choice_filter | hint::en | default | notes | repeat_count | trigger | |||||||||||||||||||||
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 | |||||||||||||||||||||||||||||||||||||
10 | |||||||||||||||||||||||||||||||||||||
11 | begin group | start | field-list | ||||||||||||||||||||||||||||||||||
12 | begin group | lookup | NO_LABEL | hidden | |||||||||||||||||||||||||||||||||
13 | string | _id | NO_LABEL | select-contact type-dwelling | ../../../PLACE_TYPE/parent | ||||||||||||||||||||||||||||||||
14 | string | name | NO_LABEL | ||||||||||||||||||||||||||||||||||
15 | string | parent_place_name | ../name | ||||||||||||||||||||||||||||||||||
16 | end group | lookup | |||||||||||||||||||||||||||||||||||
17 | note | note_place | Belongs to **${parent_place_name}** | ||||||||||||||||||||||||||||||||||
18 | |||||||||||||||||||||||||||||||||||||
19 | calculate | prev_name | once(../../PLACE_TYPE/name) | ||||||||||||||||||||||||||||||||||
20 | calculate | prev_reg_date | once(../../PLACE_TYPE/reg_date) | ||||||||||||||||||||||||||||||||||
21 | calculate | prev_additional_address_info | once(../../PLACE_TYPE/additional_address_info) | ||||||||||||||||||||||||||||||||||
22 | calculate | prev_consent | once(../../PLACE_TYPE/consent_granted) | ||||||||||||||||||||||||||||||||||
23 | calculate | prev_share_data | once(../../PLACE_TYPE/share_data_granted) | ||||||||||||||||||||||||||||||||||
24 | calculate | prev_contact | once(../../PLACE_TYPE/contact/_id) | ||||||||||||||||||||||||||||||||||
25 | |||||||||||||||||||||||||||||||||||||
26 | string | name | Household Name | yes | string-length(.) <= 50 | A name can be maximum 50 characters long. | once(../prev_name) | ||||||||||||||||||||||||||||||
27 | date | reg_date | Household Registration Date | yes | . <= now() | A future date can not be selected | once(../prev_reg_date) | ||||||||||||||||||||||||||||||
28 | string | additional_address_info | Additional address information | once(../prev_additional_address_info) | |||||||||||||||||||||||||||||||||
29 | select_one yes_no | consent_granted | Was verbal consent received for COPC services? | yes | once(../prev_consent) | ||||||||||||||||||||||||||||||||
30 | select_one yes_no | share_data_granted | Do you grant permission for data to be shared with the Department of Health? | yes | string(../consent_granted)='yes' | once(../prev_share_data) | |||||||||||||||||||||||||||||||
31 | |||||||||||||||||||||||||||||||||||||
32 | end group | ||||||||||||||||||||||||||||||||||||
33 | |||||||||||||||||||||||||||||||||||||
34 | begin group | init | NO_LABEL | string(../start/consent_granted)='yes' | field-list | ||||||||||||||||||||||||||||||||
35 | select_one contact | create_new_person | Set the household head | yes | string(../../start/consent_granted)='yes' | once(if(../../start/prev_contact != '', 'old_person', '')) | |||||||||||||||||||||||||||||||
36 | begin group | lookup | NO_LABEL | string(../../start/consent_granted)='yes' and selected(${create_new_person},'old_person') | |||||||||||||||||||||||||||||||||
37 | string | select_person | Select the household head | yes | select-contact type-hhm | ${selected_years} > 9 | Please ensure the household head is 9 years or older. | once(../../../start/prev_contact) | |||||||||||||||||||||||||||||
38 | hidden | date_of_birth | Retrieves value from above selection | ||||||||||||||||||||||||||||||||||
39 | integer | selected_years | hidden | cht:extension-lib(“date_diff.js”, ../date_of_birth, substring-before(now(),'T'),"years") | |||||||||||||||||||||||||||||||||
40 | end group | lookup | |||||||||||||||||||||||||||||||||||
41 | end group | ||||||||||||||||||||||||||||||||||||
42 | |||||||||||||||||||||||||||||||||||||
43 | begin group | contact | New Person | selected(${create_new_person},'new_person') | field-list | ||||||||||||||||||||||||||||||||
44 | hidden | parent | NO_LABEL | PARENT | |||||||||||||||||||||||||||||||||
45 | hidden | type | NO_LABEL | contact | |||||||||||||||||||||||||||||||||
46 | string | first_name | First Name | yes | string-length(.) <= 20 | A first name can be maximum 20 characters long. | |||||||||||||||||||||||||||||||
47 | string | middle_name | Middle Name | string-length(.) <= 20 | A first name can be maximum 20 characters long. | ||||||||||||||||||||||||||||||||
48 | string | last_name | Surname/Last Name | yes | string-length(.) <= 20 | A surname/last name can be maximum 20 characters long. | |||||||||||||||||||||||||||||||
49 | string | maiden_name | Maiden Name | string-length(.) <= 20 | A last name can be maximum 20 characters long. | ||||||||||||||||||||||||||||||||
50 | calculate | name | NO_LABEL | join(' ',${first_name}, ${last_name}) | |||||||||||||||||||||||||||||||||
51 | |||||||||||||||||||||||||||||||||||||
52 | select_one yes_no | resident | Resident *member* of household? | yes | horizontal | ||||||||||||||||||||||||||||||||
53 | begin group | non_resident | string(../resident)='no' | ||||||||||||||||||||||||||||||||||
54 | select_one non_resident_area | area | Where does this person live most of the time (Residential Address area) | yes | minimal | Add a lookup for each selection that can be made | |||||||||||||||||||||||||||||||
55 | string | address | Residential Address details | multiline | string-length(.) <= 250 | ||||||||||||||||||||||||||||||||
56 | end group | ||||||||||||||||||||||||||||||||||||
57 | |||||||||||||||||||||||||||||||||||||
58 | string | phone_raw | Cell Number | selected(${create_new_person},'new_person') | regex(., "^(?:\+27|0)\d{9}$") | Please enter a number starting with zero (0) or a plus sign (+) followed by 27. For example: 0xx xxx xxxx OR +27xx xxx xxxx | |||||||||||||||||||||||||||||||
59 | calculate | phone | string-length(${phone_raw}) > 9 | if(starts-with(${phone_raw}, "+27"), ${phone_raw},concat("+27", substr(${phone_raw}, 1, string-length(${phone_raw})))) | |||||||||||||||||||||||||||||||||
60 | string | phone_raw_alt | Alternate Cell Number | selected(${create_new_person},'new_person') | regex(., "^(?:\+27|0)\d{9}$") | Please enter a number starting with zero (0) or a plus sign (+) followed by 27. For example: 0xx xxx xxxx OR +27xx xxx xxxx | |||||||||||||||||||||||||||||||
61 | calculate | phone_alt | string-length(${phone_raw_alt}) > 9 | if(starts-with(${phone_raw_alt}, "+27"), ${phone_raw_alt},concat("+27", substr(${phone_raw_alt}, 1, string-length(${phone_raw_alt})))) | |||||||||||||||||||||||||||||||||
62 | select_one details_obtained | obtained_personal_details | Were civilian ID details obtained? | yes | selected(${create_new_person},'new_person') | horizontal | |||||||||||||||||||||||||||||||
63 | string | id_number | What is the Civilian ID Number | yes | string(../obtained_personal_details)!='' and string(../obtained_personal_details)!='no' | string(.)='9999999999999' or cht:extension-lib("validate_id.js", .) | A valid 13-digit ID number is required. If no ID number is available, then enter 9 thirteen times, e.g. 9999999999999. | ||||||||||||||||||||||||||||||
64 | integer | pmi_number | PMI/Clinic Number | selected(${create_new_person},'new_person') | number(.) > 0 | A PMI number cannot be negative or 0. | |||||||||||||||||||||||||||||||
65 | select_one male_female | sex | Sex | yes | selected(${create_new_person},'new_person') | horizontal | |||||||||||||||||||||||||||||||
66 | date | date_of_birth | Date of Birth | yes | selected(${create_new_person},'new_person') | . <= now() | Date of birth cannot be in the future | ||||||||||||||||||||||||||||||
67 | select_one dob_method | dob_method | Is this a confirmed or estimated DOB? | yes | selected(${create_new_person},'new_person') | horizontal | |||||||||||||||||||||||||||||||
68 | |||||||||||||||||||||||||||||||||||||
69 | integer | weeks | hidden | cht:extension-lib(“date_diff.js”, ../date_of_birth, substring-before(now(),'T'),"weeks") | |||||||||||||||||||||||||||||||||
70 | integer | months | hidden | cht:extension-lib(“date_diff.js”, ../date_of_birth, substring-before(now(),'T'),"months") | |||||||||||||||||||||||||||||||||
71 | integer | years | hidden | cht:extension-lib(“date_diff.js”, ../date_of_birth, substring-before(now(),'T'),"years") | |||||||||||||||||||||||||||||||||
72 | calculate | age_unit | if(../date_of_birth != '', if(../years >= 5, "Years", if(../weeks > 14,"Months","Weeks")), 'Years') | ||||||||||||||||||||||||||||||||||
73 | integer | age | Age (${age_unit}) | yes | selected(${create_new_person},'new_person') | TRUE | . >= 9 and . < 120 | Please ensure the household head is 9 years or older. | if(../years >= 5, ../years, if(../weeks > 14, ../months, ../weeks)) | ||||||||||||||||||||||||||||
74 | |||||||||||||||||||||||||||||||||||||
75 | select_one when_member | when_member | When did this person become a household member? | yes | selected(${create_new_person},'new_person') | ||||||||||||||||||||||||||||||||
76 | date | membership_start_date | Membership start date | yes | string(../when_member)='on_in_migration' | . <= now() and . > ../date_of_birth | Date cannot be in the future and has to be after birth. | ||||||||||||||||||||||||||||||
77 | hidden | contact_type | NO_LABEL | minimal | hhm | ||||||||||||||||||||||||||||||||
78 | begin group | meta | NO_LABEL | hidden | |||||||||||||||||||||||||||||||||
79 | calculate | created_by | ../../../inputs/user/name | ||||||||||||||||||||||||||||||||||
80 | calculate | created_by_person_uuid | ../../../inputs/user/contact_id | ||||||||||||||||||||||||||||||||||
81 | calculate | created_by_place_uuid | ../../../inputs/user/facility_id | ||||||||||||||||||||||||||||||||||
82 | start | form_start | This field captures when the form is opened. It will be used in conjunction with the `reported_date` to calculate form completion duration. This is because the `end` question type has a known bug: https://forum.communityhealthtoolkit.org/t/start-end-xlsform-meta-fields-returns-same-value/3416 | ||||||||||||||||||||||||||||||||||
83 | end group | ||||||||||||||||||||||||||||||||||||
84 | end group | ||||||||||||||||||||||||||||||||||||
85 | |||||||||||||||||||||||||||||||||||||
86 | begin group | PLACE_TYPE | NO_LABEL | field-list | |||||||||||||||||||||||||||||||||
87 | hidden | parent | NO_LABEL | PARENT | |||||||||||||||||||||||||||||||||
88 | hidden | type | NO_LABEL | ||||||||||||||||||||||||||||||||||
89 | |||||||||||||||||||||||||||||||||||||
90 | calculate | name | ../../start/name | ||||||||||||||||||||||||||||||||||
91 | calculate | reg_date | ../../start/reg_date | ||||||||||||||||||||||||||||||||||
92 | calculate | additional_address_info | ../../start/additional_address_info | ||||||||||||||||||||||||||||||||||
93 | calculate | consent_granted | ../../start/consent_granted | ||||||||||||||||||||||||||||||||||
94 | calculate | share_data_granted | ../../start/share_data_granted | ||||||||||||||||||||||||||||||||||
95 | |||||||||||||||||||||||||||||||||||||
96 | begin group | contact | |||||||||||||||||||||||||||||||||||
97 | calculate | _id | if(selected(../../consent_granted,'no'), "", coalesce(${select_person},"NEW")) | ||||||||||||||||||||||||||||||||||
98 | end group | contact | |||||||||||||||||||||||||||||||||||
99 | calculate | geolocation | concat(../../inputs/meta/location/lat, concat(' ', ../../inputs/meta/location/long)) | ||||||||||||||||||||||||||||||||||
100 | begin group | meta | NO_LABEL | hidden |