Routing for UAS241

if getCovid19Preload("endtime") != "" then
FLDateEarlierSurvey := date("F j Y", strtotime(getCovid19Preload("endtime")))
End of if
laresident := getCovidLACounty()
covidday := getCovidDay()
Fill code of question 'FLTimeReference' executed
Fill code of question 'FLTimeReferenceCR002' executed
Fill code of question 'FLCadence' executed
cr_intro
Thank you for agreeing to participate in our ongoing survey which focuses on the impact of the novel coronavirus (COVID-19). We will send you a reminder to check in [Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday/once a week/every other week/], on [day[]], to let us know how the coronavirus epidemic is affecting you. Most of the questions in this survey were asked in previous surveys. Thank you for answering them accurately again, to ensure we always have the most up-to-date information.
cr001_questions := array(1 => "cr001a", 2 => "cr001b", 3 => "cr001c", 4 => "cr001d", 5 => "cr001e", 6 => "cr001f", 7 => "cr001g", 8 => "cr001h", 9 => "cr001i", 10 => "cr001j", 11 => "cr001k", 12 => "cr001l", 13 => "cr001m", 14 => "cr001n", 15 => "cr001o", 16 => "cr001p", 17 => "cr001q", 18 => "cr001r")
if sizeof(cr001_order) = 0 then
cr001_order := shuffleArray(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18))
End of if
Group of questions presented on the same screen
cr001_intro
Have you experienced any of the following symptoms in the past 7 days?

Subgroup of questions
Loop from 1 to 18
Value of question 'cr001_questions[cr001_order[cnt]]' asked as question
End of loop
End of subgroup of questions
End of group of questions
cr002 (tested for the coronavirus)
Have you been tested for coronavirus[ since ^FLDateEarlierSurvey (when you last took our coronavirus survey)]? If so, what was the result?
1 I have been tested and I tested positive (I had coronavirus)
2 I have been tested and I tested negative (I did not have coronavirus)
3 I have been tested and I do not know the result
4 I have not been tested
cr005 (diagnosed with the coronavirus)
Whether or not you have had a coronavirus test, has a doctor or another healthcare professional diagnosed you as having or probably having the coronavirus[ since ^FLDateEarlierSurvey]?
1 Yes
2 No
3 Unsure
if cr002 != 1 AND cr005 !=1 then
cr007 (think infected with coronavirus)
Do you think you have been infected with the coronavirus[ since ^FLDateEarlierSurvey]?
1 (YES) Yes
2 (NO) No
End of if
cr003 (cost of getting tested)
How much do you think it would cost for you to get tested?
RANGE 0..9223372036854775807
if cr002 = 1 OR cr005 = 1 OR cr007 = 1 then
Fill code of question 'FL_cr011' executed
cr011 (contacted a doctor, employer, family)
Have you contacted anyone[, other than the medical professionals that tested or diagnosed or treated you, ] to inform them you have coronavirus[ since ^FLDateEarlierSurvey]?
1 (YES) Yes
2 (NO) No
if cr011 = 1 then
cr012_questions := array(1 => "cr012a", 2 => "cr012b", 3 => "cr012c", 4 => "cr012d", 5 => "cr012e", 6 => "cr012f", 7 => "cr012g", 8 => "cr012h")
if sizeof(cr012_order) = 0 then
cr012_order := shuffleArray(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7))
cr012_order[8] := 8
End of if
Group of questions presented on the same screen
cr012_intro
Who have you contacted[ since ^FLDateEarlierSurvey] to let them know that you think you have coronavirus? Please check all that apply.

Subgroup of questions
Loop from 1 to 8
Value of question 'cr012_questions[cr012_order[cnt]]' asked as question
End of loop
End of subgroup of questions
cr012h_other (specify other contacted)
STRING
End of group of questions
End of if
End of if
cr004 (sought care)
Whether or not you have been tested, or diagnosed, have you sought medical care for coronavirus[ since ^FLDateEarlierSurvey]?
1 (YES) Yes
2 (NO) No
if cr004 = 1 then
Group of questions presented on the same screen
cr009 (where seek help)
When you sought medical care for coronavirus[ since ^FLDateEarlierSurvey], where did you first seek care?
1 Hospital or emergency room
2 Urgent care
3 My primary care doctor or another doctor
4 A local health department
5 Other, please specify:
6 I did not seek care
cr009_other (other where seek help)
STRING
End of group of questions
if cr009 = response then
Loop from 1 to 5
if cnt in cr009 then
Fill code of question 'FL_cr009_dummy' executed
cr010a (find care)
When you sought care from [hospital or emergency room/urgent care/your primary care doctor or another doctor/a local health department/^cr009_other] did you obtain care?
1 Yes, in person
2 Yes, phone or video visit
3 Did not obtain care
if cr010a[cnt] = 1 then
cr010b (called ahead before seeking care)
Did you call ahead before seeking care in person?
1 (YES) Yes
2 (NO) No
End of if
End of if
End of loop
End of if
End of if
cr014_questions := array(1 => "cr014a", 2 => "cr014b", 3 => "cr014c", 4 => "cr014d", 5 => "cr014e", 6 => "cr014f", 7 => "cr014g", 8 => "cr014h", 9 => "cr014i", 10 => "cr014j", 11 => "cr014k", 12 => "cr014l", 13 => "cr014m", 14 => "cr014n", 15 => "cr014o", 16 => "cr014p", 17 => "cr014q", 18 => "cr014r")
if sizeof(cr014_order) = 0 then
cr014_order := shuffleArray(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18))
End of if
Group of questions presented on the same screen
cr014_intro
Which of the following are the main symptoms people infected with the coronavirus experience?

Subgroup of questions
Loop from 1 to 18
Value of question 'cr014_questions[cr014_order[cnt]]' asked as question
End of loop
End of subgroup of questions
End of group of questions
cr015_questions := array(1 => "cr015a", 2 => "cr015b", 3 => "cr015c", 4 => "cr015d", 5 => "cr015e", 6 => "cr015f", 7 => "cr015g", 8 => "cr015h", 9 => "cr015i", 10 => "cr015j", 11 => "cr015k", 12 => "cr015l")
if sizeof(cr015_order) = 0 then
cr015_order := shuffleArray(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12))
End of if
Group of questions presented on the same screen
cr015_intro
In the last seven days, have you done the following:

Subgroup of questions
Loop from 1 to 12
Value of question 'cr015_questions[cr015_order[cnt]]' asked as question
End of loop
End of subgroup of questions
End of group of questions
cr016_questions := array(1 => "cr016b", 2 => "cr016c", 3 => "cr016d", 4 => "cr016e", 5 => "cr016f", 6 => "cr016g", 7 => "cr016h", 8 => "cr016i", 9 => "cr016j", 10 => "cr016k", 11 => "cr016l", 12 => "cr016m", 13 => "cr016n", 14 => "cr016o", 15 => "cr016p", 16 => "cr016r")
if sizeof(cr016_order) = 0 then
cr016_order := shuffleArray(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16))
End of if
Group of questions presented on the same screen
cr016_intro
Which of the following have you done in the last seven days to keep yourself safe from coronavirus?

Only consider actions that you took or decisions that you made personally.

Subgroup of questions
Loop from 1 to 16
Value of question 'cr016_questions[cr016_order[cnt]]' asked as question
End of loop
End of subgroup of questions
End of group of questions
cr021 (how many family or close friends)
We'd like to ask about your family, as well as your close friends. How many family or close friends do you have? Only include people who are still alive, regardless of where they live.
RANGE 0..9223372036854775807
if cr021 > 999 then
cr021_warning (warning how many family or close friends)
Do you really have [how many family or close friends[]] family and close friends? If so, click "Next" to continue.
End of if
if cr021 > 0 then
cr022 (infected how many family or close friends)
You said that you have [how many family or close friends[]] family and close friends. Of these people, how many do you think have been infected with the coronavirus?
RANGE 0..9223372036854775807
if cr022 > cr021 then
cr022_warning
You said you know [how many family or close friends[]] people but that [infected how many family or close friends[]] people have been infected. Please go back and correct your answer(s).
elseif cr022 > 999 then
cr022_warning2
Do you really know [infected how many family or close friends[]] people who have been infected? If so, click "Next" to continue.
End of if
cr022a (hospitalized how many family or close friends)
You said that you have [how many family or close friends[]] family and close friends. Of these people, how many do you think have been hospitalized (spent at least one night in the hospital) from the coronavirus?
RANGE 0..9223372036854775807
if cr022a > cr021 then
cr022a_warning
You said you know [how many family or close friends[]] people but that [hospitalized how many family or close friends[]] people have been hospitalized. Please go back and correct your answer(s).
elseif cr022a > 999 then
cr022a_warning2
Do you really know [hospitalized how many family or close friends[]] people who have been hospitalized? If so, click "Next" to continue.
End of if
cr022b (died how many family or close friends)
You said that you have [how many family or close friends[]] family and close friends. Of these people, how many do you think have died from the coronavirus?
RANGE 0..9223372036854775807
if cr022b > cr021 then
cr022b_warning
You said you know [how many family or close friends[]] people but that [died how many family or close friends[]] people have died. Please go back and correct your answer(s).
elseif cr022b > 999 then
cr022b_warning2
Do you really know [died how many family or close friends[]] people who have been died? If so, click "Next" to continue.
End of if
End of if
Group of questions presented on the same screen
cr023 (chance get coronavirus)
On a scale of 0 to 100 percent, what is the chance that you will get the coronavirus in the next three months? If you’re not sure, please give your best guess.
cr_error
End of group of questions
Group of questions presented on the same screen
cr023b (chance hospitalized if get coronavirus)
If you do get the coronavirus, what is the percent chance you will be hospitalized (spend at least one night in the hospital) from it? If you’re not sure, please give your best guess.
cr_error
End of group of questions
Group of questions presented on the same screen
cr024 (chance die from coronavirus)
If you do get the coronavirus, what is the percent chance you will die from it? If you’re not sure, please give your best guess.
cr_error
End of group of questions
cr032_questions := array(1 => "cr032a", 2 => "cr032b", 3 => "cr032c", 4 => "cr032d", 5 => "cr032e", 6 => "cr032f", 7 => "cr032g", 8 => "cr032h", 9 => "cr032i", 10 => "cr032j")
if sizeof(cr032_order) = 0 then
cr032_order := shuffleArray(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10))
End of if
Group of questions presented on the same screen
cr032_intro
How much do you trust the following sources of information about the coronavirus:

Subgroup of questions
Loop from 1 to 10
Value of question 'cr032_questions[cr032_order[cnt]]' asked as question
End of loop
End of subgroup of questions
End of group of questions
cr033_questions := array(1 => "cr033a", 2 => "cr033b", 3 => "cr033c", 4 => "cr033d", 5 => "cr033e", 6 => "cr033f", 7 => "cr033g", 8 => "cr033h", 9 => "cr033i", 10 => "cr033j")
if sizeof(cr033_order) = 0 then
cr033_order := shuffleArray(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10))
End of if
Group of questions presented on the same screen
cr033_intro
Which of the following information sources have you used to learn about the coronavirus in the past 7 days?

Subgroup of questions
Loop from 1 to 10
Value of question 'cr033_questions[cr033_order[cnt]]' asked as question
End of loop
End of subgroup of questions
End of group of questions
ei002 (worried you would run out of food)
In the past seven days, were you worried you would run out of food because of a lack of money or other resources?
1 Yes
2 No
3 Unsure
preload_hadjob := getCovid19Preload("cr008")
preload_lr001 := getCovid19Preload("lr001")
IF preload_hadjob = 1 THEN
Group of questions presented on the same screen
lr001 (employment status)
The next set of questions are about your primary job. If you have multiple jobs, think of the job in which you work the most hours or receive the most pay.

You told us on [date of earlier survey[]] that you had a job. Which statement best reflects your current employment status:
1 I am still working in the same job
2 I lost my job and I am looking for work
3 I have been temporarily laid off from the same job
4 I am on sick leave or other leave from the same job
5 I am now working at a different job
6 None of these, please specify:
lr001_other (other employment status)
STRING
End of group of questions
IF lr001 = 2 OR lr001 = 3 OR lr001 = 4 THEN
lr002 (still receiving benefits)
Are you still receiving benefits such as health insurance through your former job?
1 Yes
2 No
3 Unsure
End of if
Else
if preload_hadjob = response then
if preload_lr001 = 3 then
Group of questions presented on the same screen
lr003aa (job status after laid off)
You told us on [ since ^FLDateEarlierSurvey] that you were temporarily laid off from your job. Which statement best reflects your current employment status?
1 I have resumed working at the same job
2 I am still temporarily laid off from the same job
3 I have lost my job and I am looking for work
4 I am on sick leave or other leave from the same job
5 I am now working at a different job
6 None of these, please specify:
lr003aa_other (other job status after laid off)
STRING
End of group of questions
elseif preload_lr001 = 4 then
Group of questions presented on the same screen
lr003bb (job status after sick leave)
You told us on [ since ^FLDateEarlierSurvey] that you were on sick leave or other leave from your job. Which statement best reflects your current employment status?
1 I have resumed working at the same job
2 I am still on sick leave or other leave from the same job
3 I have lost my job and I am looking for work
4 I have been temporarily laid off from the same job
5 I am now working at a different job
6 None of these, please specify:
lr003bb_other (other job status after sick leave)
STRING
End of group of questions
Else
Group of questions presented on the same screen
lr003 (employment status prev no job)
You told us on [date of earlier survey[]] that you did not have a job. Which statement best reflects your current employment status:
1 I still do not have a job
2 I now have a job
3 None of these, please specify:
lr003_other (other employment status prev no job)
STRING
End of group of questions
End of if
Else
lr003a (currently have job)
Do you currently have a job?
1 (YES) Yes
2 (NO) No
End of if
End of if
lr004 := 2
IF (preload_hadjob = 1 AND (lr001 = 1 OR lr001 = 5)) OR (preload_hadjob = 2 and preload_lr001 = 3 and lr003aa in [1,5]) OR (preload_hadjob = 2 and preload_lr001 = 4 and lr003bb in [1,5]) OR (preload_hadjob = 2 and preload_lr001 != 3 and preload_lr001 != 4 and lr003 = 2) OR (preload_hadjob = empty and lr003a = 1) THEN
lr004 := 1
End of if
IF lr004 = 1 THEN
Group of questions presented on the same screen
lr005 (self employed or work for employer)
In your primary job, are you self-employed or do you work for an employer?
1 Self-employed
2 Work for an employer
3 Other (specify)
lr005_other (self employed or work for employer other)
Are you self-employed or do you work for an employer?
STRING
End of group of questions
lr019 (describe primary job)
Do any of the following describe your primary job? Please check all that apply.
1 Independent contractor (for example, freelance worker, Uber driver, Instacart worker, independent consultant)
2 On-call worker or day laborer
3 Temporary agency worker
4 Contract company worker
5 None of the above
lr006 (how many day work past seven days)
Out of the past seven days, how many days did you work at your job?

0 0 days
1 1 day
2 2 days
3 3 days
4 4 days
5 5 days
6 6 days
7 7 days
lr006a (home how many day work past seven days)
Out of the past seven days, how many days did you work from home?

0 0 days
1 1 day
2 2 days
3 3 days
4 4 days
5 5 days
6 6 days
7 7 days
lr008 (home many hours work for pay past 7 days)
Think of every day you worked in the past seven days. How many total hours did you work for pay across all the days?
RANGE 0..150
Else
lr016 (received unemployment insurance past 14 days)
Have you received unemployment insurance benefits in the past fourteen days?
1 Yes
2 No
3 Unsure
IF lr016 = 1 THEN
lr017 (amount unemployment insurance)
How much did you receive in unemployment insurance in your most recent payment?
RANGE 1..10000
IF lr017 > 5000 THEN
check_lr017 (amount over 5k)
You entered an amount over $5,000. Is this correct?
1 Yes
2 No
End of if
ELSEIF LR016 = response then
lr018 (why not received unemployment insurance benefits)
Why haven’t you received unemployment insurance benefits? Mark all that apply.
1 My former employer has not made me eligible
2 I am not eligible for other reasons
3 I am unsure how to apply
4 I was approved but I haven’t been paid yet
5 I applied and was rejected
6 I decided not to apply
7 Other
End of if
End of if
CS_001 (HOW PLEASANT INTERVIEW)
Could you tell us how interesting or uninteresting you found the questions in this interview?
1 Very interesting
2 Interesting
3 Neither interesting nor uninteresting
4 Uninteresting
5 Very uninteresting
CS_003 (comments)
Do you have any other comments on the interview? Please type these in the box below.(If you have no comments, please click next to complete this survey.)
STRING
dummy := setCovid19DayPayment(241)