ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
typenamelabelhintdefaultappearanceconstraintconstraint messagerelevancedisabledrequiredrequired messageread onlycalculationrepeat_countmedia:imagemedia:audiomedia:videochoice_filternoteresponse_notepublishableminimum_seconds
2
startstarttime
3
endendtime
4
deviceiddeviceid
5
subscriberidsubscriberid
6
simserialsimid
7
phonenumberdevicephonenum
8
usernameusername
9
calculatedurationduration()
10
caseidcaseid
11
12
noteintronoteWelcome to the SurveyCTO sample form <b>Virological Tests</b>. This form stores all virological test results from all cases: confirmed cases, suspected cases, and close contacts.

<i>It is part of our Use case: Contact Tracing.</i>
intro
13
14
select_one typetypeFor which type of case are you reporting test results?
15
16
select_one casecaseSelect the case:
search('confirmed_cases', 'matches', 'status', 'Still ill') custom-table-list(delimiter='|', headers='ID, Name, Age')
selected(${type}, '1')
17
select_one suspectedsuspected_caseSelect the suspected case:
search('suspected_cases', 'matches', 'status', 'Active') custom-table-list(delimiter='|', headers='ID, Name, Age')
selected(${type}, '2')
18
select_one contactcontactSelect the contact:
search('contacts', 'matches', 'status', 'Not a case') custom-table-list(delimiter='|', headers='ID, Name, Age')
selected(${type}, '3')
19
20
calculatename_casePreloads the name of the case.selected(${type}, '1')
pulldata('confirmed_cases', 'name', 'id', ${case})
21
calculateage_casePreloads the age of the case.selected(${type}, '1')
pulldata('confirmed_cases', 'age', 'id', ${case})
22
calculategender_casePreloads the gender of the case.selected(${type}, '1')
pulldata('confirmed_cases', 'gender', 'id', ${case})
23
calculateoccupation_casePreloads the occupation of the case.selected(${type}, '1')
pulldata('confirmed_cases', 'occupation', 'id', ${case})
24
calculatephonenumber_case
Preloads the phone number of the case.
selected(${type}, '1')
pulldata('confirmed_cases', 'phone_number', 'id', ${case})
25
26
calculatename_suspected
Preloads the name of the suspected case.
selected(${type}, '2')
pulldata('suspected_cases', 'name', 'id', ${suspected_case})
27
calculateage_suspected
Preloads the age of the suspected case.
selected(${type}, '2')
pulldata('suspected_cases', 'age', 'id', ${suspected_case})
28
calculategender_suspected
Preloads the gender of the suspected case.
selected(${type}, '2')
pulldata('suspected_cases', 'gender', 'id', ${suspected_case})
29
calculateoccupation_suspected
Preloads the occupation of the suspected case.
selected(${type}, '2')
pulldata('suspected_cases', 'occupation', 'id', ${suspected_case})
30
calculate
phonenumber_suspected
Preloads the phone number of the suspected case.
selected(${type}, '2')
pulldata('suspected_cases', 'phone_number', 'id', ${suspected_case})
31
32
calculatename_contactPreloads the name of the contact.selected(${type}, '3')
pulldata('contacts', 'name', 'contact_id', ${contact})
33
calculateage_contactPreloads the age of the contact.selected(${type}, '3')
pulldata('contacts', 'age', 'contact_id', ${contact})
34
calculateoccupation_contactPreloads the gender of the contact.selected(${type}, '3')
pulldata('contacts', 'occupation', 'contact_id', ${contact})
35
calculategender_contact
Preloads the occupation of the contact.
selected(${type}, '3')
pulldata('contacts', 'gender', 'contact_id', ${contact})
36
calculatephonenumber_contact
Preloads the phone number of the contact.
selected(${type}, '3')
pulldata('contacts', 'phone_number', 'contact_id', ${contact})
37
38
calculatename
Stores the relevant name, based on the type of "case".
coalesce(${name_case}, ${name_suspected}, ${name_contact})
39
calculateage
Stores the relevant age, based on the type of "case".
coalesce(${age_case}, ${age_suspected}, ${age_contact})
40
calculategender
Stores the relevant gender, based on the type of "case".
coalesce(${gender_case}, ${gender_suspected}, ${gender_contact})
41
calculateoccupation
Stores the relevant occupation, based on the type of "case".
coalesce(${occupation_case}, ${occupation_contact}, ${occupation_suspected}, '')
42
calculatephone_number
Stores the relevant phone number, based on the type of "case".
coalesce(${phonenumber_case}, ${phonenumber_contact}, ${phonenumber_suspected}, '')
43
44
integerspecimenHow many specimen were collected for <strong>virology tests</strong>?
45
46
begin repeatvirology_resultsVirology Results${specimen}
47
textlaboratory_idLaboratory identification numberThe ID should have 5 charactersstring-length(.)=5Please insert an ID with 5 characters.yes
48
noteduplicate_warningWarning, you have entered the value ${laboratory_id} before. Go back and enter something different.
count-selected(${join_laboratory_id}) < index()
49
begin groupsampleSamplefield-list
50
datesample_collectedDate sample collected:no-calendar.<=today()Please insert a date up to today.yes
51
datesample_receivedDate sample received:no-calendar.<=today()Please insert a date up to today.yes
52
select_one samplesample_typeType of sampleyes
53
end groupsample
54
textsample_type_othrSpecify the other type of sample:
selected(${sample_type}, '555')
yes
55
begin grouptestTestfield-list
56
select_one testtest_type<strong>Type of test</strong>yes
57
select_one resulttest_result<strong>Result</strong>compactyes
58
dateresult_date<strong>Result date:</strong>no-calendar.<=today()Please insert a date up to today.yes
59
end grouptest
60
texttest_type_othrSpecify the other type of test:
selected(${test_type}, '555')
yes
61
end repeatvirology_results
62
calculatejoin_laboratory_id
de-duplicate(' ',join(' ', ${laboratory_id}))
63
calculatepositiveReturns "1" if any result of the repeat group is positive.
if(min(${test_result})=1, 1, 0)
64
65
select_one yesnoconfirmationCan you confirm that this is a positive case?${positive}=1yes
66
begin groupcreate_caseCreating a case
not(selected(${type}, '1')) and selected(${confirmation}, '1')
67
calculateformidsAll formids to be calculated for the case.
"case_initial_report,case_followup, contact_listing"
68
calculatelabelThe label of the case.
concat(${name}, ", ", ${age})
69
calculatetable_infoThe table_info for the case.
concat(${id}, '|', ${name}, "|", ${age})
70
calculatefollowupCreates a "follow-up date" for today, which means that enumerators should follow-up this case today.
format-date-time(today(), '%e-%b-%Y')
71
calculatesortbyNew sortby value, directly based on the followup date, but in a purely numeric format so it can be sorted.
format-date-time(today(), '%d%m')
72
notecase_createdOnce you submit this form, a new confirmed case will be created with the following details:<br>
<br>
<b>ID:</b> ${id}<br>
<b>Label:</b> ${label}</b>
73
end groupcreate_case
74
75
textsms
Click the button to send a sms message:
custom-launch-sms(number=${phone_number},message='Your test came back negative. Thank you for conducting the test, you may receive a phone call soon for a quick follow-up.')
${positive}=0 or selected(${confirmation}, '0')
76
77
calculateidReturns the id of the case.
coalesce(${suspected_case}, ${contact}, ${case})
78
79
calculateis_case
Returns "1" if this form is to be published for the cases dataset.
selected(${type}, '1') or (not(selected(${type}, '1')) and selected(${confirmation}, '1'))
1
80
calculateis_suspected
Returns "1" if this form is to be published for the suspected cases dataset.
selected(${type}, '2')1
81
calculateis_contact
Returns "1" if this form is to be published for the contacts dataset.
selected(${type}, '3')1
82
83
calculatesuspected_statusUpdates the status of a suspected case.selected(${type}, '2')
if(selected(${confirmation}, '1'), "Confirmed case", "Closed")
84
calculatecontact_statusUpdates the status of a contact.
selected(${type}, '3') and selected(${confirmation}, '1')
"Confirmed secondary case"
85
calculatecase_statusUpdates the status of a case.
selected(${type}, '1') or (not(selected(${type}, '1')) and selected(${confirmation}, '1'))
if(selected(${confirmation}, '1'), "Still ill", "Recovered")
86
87
calculatepub_to_users
${case_status}="Recovered"
"Closed"
88
calculate
update_contact_followup2
Update the status of "contact_followup2"
selected(${type}, '3') and selected(${confirmation}, '1')
"yes"
89
90
calculatelast_test
Returns the last test result for a case, to be published in the cases dataset.
if(${confirmation}=1, 'positive', 'negative')
91
calculatenumber_tests_case
Returns the total number of virological tests conducted for this case.
selected(${type}, '1') or (not(selected(${type}, '1')) and selected(${confirmation}, '1'))
if(pulldata('confirmed_cases', 'number_tests', 'id', ${case})=null, 1, int(pulldata('confirmed_cases', 'number_tests', 'id', ${case}))+1)
92
calculatenumber_tests_contact
Returns the total number of virological tests conducted for this contact.
selected(${type}, '3')
if(pulldata('contacts', 'number_tests', 'id', ${case})=null, 1, int(pulldata('contacts', 'number_tests', 'id', ${case}))+1)
93
94
noteendnoteThank you! You have reached the end of the <b>Virological testing</b> form.
<br>
<br>
Please swipe forward and submit this form to register these virological test results.
95
96
97
98
99
100