Created
March 22, 2020 21:17
-
-
Save rmbarnett-rice/a7e49ce699a1fbaa73882e144c30e8df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> | |
<link rel="stylesheet" type="text/css" href="css/main.css"> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> | |
<script src="js/survey.js"></script> | |
<title>CovidSense</title> | |
</head> | |
<body> | |
<div id="header"> | |
CovidSense | |
</div> | |
<div id="questions"> | |
</div> | |
<script> | |
// Question 1 | |
appendMultipleChoiceQuestion("How is your mood today?", ["1", "2", "3","4","5","10"]); | |
// Question 2 | |
appendCheckboxQuestion("Do you currently have any of the following symptoms?", ["Cough", "Fever", "Sore Throat", "Runny Nose", "Difficulty Breathing", "Body aches and pains", "Gastrointestinal symptoms"]); | |
// Question 3 | |
appendMultipleChoiceQuestion("Please describe the severity of cough:", ["Extremely Severe", "Moderately Severe", "Severe", "Moderate", "Mild", "None"]); | |
// Question 4 | |
appendMultipleChoiceQuestion("Please describe the severity of fever:", [">105", "103-105", "101-103", "<101"]); | |
// Question 5 | |
appendMultipleChoiceQuestion("Please describe the severity of sore throat:", ["Extremely Severe", "Moderately Severe", "Severe", "Moderate", "Mild", "None"]); | |
// Question 6 | |
appendMultipleChoiceQuestion("Please describe the severity of runny nose:", ["Extremely Severe", "Moderately Severe", "Severe", "Moderate", "Mild", "None"]); | |
// Question 7 | |
appendMultipleChoiceQuestion("Please describe the severity of difficulty breathing:", ["Extremely Severe", "Moderately Severe", "Severe", "Moderate", "Mild", "None"]); | |
// Question 8 | |
appendMultipleChoiceQuestion("Please describe the severity of body aches and pains:", ["Extremely Severe", "Moderately Severe", "Severe", "Moderate", "Mild", "None"]); | |
// Question 9 | |
appendMultipleChoiceQuestion("Please describe the gastrointestinal symptoms:", ["Extremely Severe", "Moderately Severe", "Severe", "Moderate", "Mild", "None"]); | |
// Question 10 | |
appendCheckboxQuestion("Are you [please check all that apply]?", ["Self-quarantined", "Lockdown", "Shelter-in-place", "Voluntary work from home"]); | |
// Question 11 | |
appendMultipleChoiceQuestion("Are you worried about your health?", ["Very worried", "Worried", "Cautious", "Not worried"]); | |
// Question 12 | |
appendMultipleChoiceQuestion("(If they were not officially diagnosed with Corona till this point) Do you suspect that you might have Covid-19?", ["Yes", "No"], handleSuspectCovid19Response); | |
function handleSuspectCovid19Response(answer) | |
{ | |
if(answer === "No") | |
return null; // end the survey | |
else if(answer === "Yes") | |
return 13; // send the user to question 13 | |
throw "Unknown answer" + answer; | |
} | |
// Question 13 | |
appendMultipleChoiceQuestion("Have you been officially diagnosed with Corona-Virus?", ["Yes", "No"]); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment