Skip to content

Commit 0429a40

Browse files
authored
Merge pull request #1 from softbear/patch-4
Patch 4
2 parents dd554e1 + 9d712cb commit 0429a40

File tree

14 files changed

+828
-60
lines changed

14 files changed

+828
-60
lines changed

assets/css/styles.css

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,18 @@
77

88
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
99

10-
/* navigation bar at top */
11-
ul {
12-
list-style-type: none;
13-
margin: 0;
14-
padding: 0;
15-
}
1610

1711
.navbar {
1812
background-color: #333;
19-
overflow: hidden;
2013
}
2114

22-
.navbar a:hover {
23-
background-color: #ddd;
24-
color: black;
15+
/* drop down menu */
16+
@media only screen and (min-width: 768px) {
17+
.dropdown:hover .dropdown-menu {
18+
display: block;
19+
}
2520
}
2621

27-
2822
.material-icons {
2923
font-family: 'Material Icons';
3024
font-weight: normal;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Variant,Allele/Gene,Drug Sensitivity - Hypersensitive Reaction,Drug Ingredients Sensitivities,Source
2+
 rs1467558 T and C (one copy each),,"Acetaminophen (Tylenol) - higher ALT levels than having two Cs, a sign of liver toxicity",,https://www.snpedia.com/index.php/Acetaminophen
3+
rs2070959, UGT1A6,Aspirin - Aspirin Intolerance,,https://www.snpedia.com/index.php/Aspirin
4+
rs1105879, UGT1A6,Aspirin,,https://www.snpedia.com/index.php/Aspirin
5+
rs6759892, UGT1A6,Aspirin,,https://www.snpedia.com/index.php/Aspirin
6+
rs1133607,ACSM2,Aspirin,,https://www.snpedia.com/index.php/Aspirin
7+
rs1799853,CYP2C9 ,Aspirin,,https://www.snpedia.com/index.php/Aspirin
8+
rs1057910,CYP2C9 ,Aspirin,,https://www.snpedia.com/index.php/Aspirin
9+
rs28371686,CYP2C9 ,Aspirin,,https://www.snpedia.com/index.php/Aspirin
10+
rs9332131,CYP2C9 ,Aspirin,,https://www.snpedia.com/index.php/Aspirin
11+
rs28371685,CYP2C9 ,Aspirin,,https://www.snpedia.com/index.php/Aspirin
12+
 rs1799853,,Ibuprofen - GI Bleeding,,https://www.snpedia.com/index.php/Ibuprofen

drug.html

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<title> GeneCheck </title>
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
8+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
9+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
10+
11+
<div class="container">
12+
<p align="left"> <nav class="navbar navbar-default">
13+
<div class="container">
14+
<a href="home.html" class="btn btn-default">
15+
<span class="glyphicon glyphicon-triangle-left"></span> </a>
16+
<h2>Fitness</h2> </p>
17+
18+
</div>
19+
</head>
20+
<center>
21+
<h1>Welcome to GeneCheck!</h1>
22+
<br>
23+
</head>
24+
<script>
25+
26+
function identifyDrug()
27+
{
28+
setTimeout(function() {
29+
alert('Drug is tylenol, super strength');
30+
setTimeout(function() {
31+
alert('Searching for potentially harmful interactions between this drug and your genetic information');
32+
setTimeout(function() {alert('No potential harm detected');}, 1000);
33+
}, 500);
34+
}, 3000);
35+
}
36+
function search(userId)
37+
{
38+
alert("test search");
39+
var medName = document.getElementById("medicationName").value;
40+
setMedName(medName);
41+
alert("search:" +medName+ " for: "+userId);
42+
var file = "./data/Gene-to-Drug-Sensitivity-Relationships.csv";
43+
44+
$.ajax({
45+
url: file,
46+
dataType: 'text',
47+
}).done(searchInData);
48+
}
49+
50+
var medNameToSearch = "";
51+
52+
function setMedName(medName)
53+
{
54+
medNameToSearch = medName;
55+
alert("setMedName: "+medNameToSearch);
56+
}
57+
58+
function searchInData(data)
59+
{
60+
//alert(data);
61+
var allRows = data.split(/\r?\n|\r/);
62+
var rowNum = 0;
63+
while(rowNum < allRows.length)
64+
{
65+
//alert(allRows.length);
66+
var rowCells = allRows[rowNum].split(',');
67+
var url="";
68+
//alert("rowCells[2] = "+rowCells[2]+ " ----- medNameToSearch = "+medNameToSearch);
69+
var found = (rowCells[2] == medNameToSearch);
70+
alert(found);
71+
if(rowCells[2].toUpperCase() == medNameToSearch.toUpperCase())
72+
{
73+
alert("searchInData found med");
74+
url = "./fail.html";
75+
window.location.replace(url);
76+
break;
77+
}
78+
if(rowNum == allRows.length - 1)
79+
{
80+
url = "./success.html";
81+
window.location.replace(url);
82+
break;
83+
}
84+
85+
rowNum=rowNum+1;
86+
}
87+
}
88+
89+
// Register Service Worker.
90+
91+
if ('serviceWorker' in navigator) {
92+
// Path is relative to the origin, not project root.
93+
navigator.serviceWorker.register('/pwa-photobooth/sw.js')
94+
.then(function(reg) {
95+
console.log('Registration succeeded. Scope is ' + reg.scope);
96+
})
97+
.catch(function(error) {
98+
console.error('Registration failed with ' + error);
99+
});
100+
}
101+
</script>
102+
<script src="assets/js/script.js"></script>
103+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
104+
<head>
105+
106+
<meta charset="utf-8">
107+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
108+
<meta name="viewport" content="width=device-width, initial-scale=1">
109+
110+
<title>ToxScreen. Drug safety personalized to your genetic information.</title>
111+
112+
<link rel="stylesheet" href="assets/css/styles.css">
113+
114+
<!-- Meta tag for changing browser colors. -->
115+
<meta id="theme-color" name="theme-color" content="#37474F">
116+
117+
<!-- Meta tag for App-like behaviour in iOS -->
118+
<meta name=”apple-mobile-web-app-capable” content=”yes”>
119+
120+
<!-- Web Manifest -->
121+
<link rel="manifest" href="manifest.json">
122+
123+
</head>
124+
125+
<body>
126+
<div>
127+
<form class="form-inline">
128+
Search for Your Medication or take a picture:<br>
129+
<br>
130+
<br>
131+
<input type="text" id="medicationName" type="text" class="form-control" placeholder="Medication"><br>
132+
</form>
133+
134+
<button type="button" onclick="search('123456')">Search</button> <!-- hardcoded userId -->
135+
136+
</div>
137+
138+
<div class="container">
139+
140+
<div class="app">
141+
142+
<a href="#" id="start-camera" class="visible">Touch here to start the app.</a>
143+
<video muted id="camera-stream"></video>
144+
<img id="snap">
145+
146+
<p id="error-message"></p>
147+
148+
<div class="controls">
149+
<a href="#" id="delete-photo" title="Delete Photo" class="disabled"><i class="material-icons">delete</i></a>
150+
<a href="#" id="take-photo" title="Take Photo"><i class="material-icons">camera_alt</i></a>
151+
<a href="#" id="download-photo" download="selfie.png" title="Save Photo" class="disabled" onclick="identifyDrug();"><i class="material-icons">file_download</i></a>
152+
153+
</div>
154+
155+
<!-- Hidden canvas element. Used for taking snapshot of video. -->
156+
<canvas></canvas>
157+
158+
</div>
159+
160+
</div>
161+
162+
163+
<a href="druginsights.html" role="button" class "btn btn-default">Submit </a>
164+
165+
<br>
166+
<p id="demo">Click to check your drug sensitivities</p>
167+
168+
</script>
169+
</center>
170+
</body>
171+
</html>

druginsights.html

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<title> GeneCheck </title>
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
8+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
9+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
10+
11+
<div class="container">
12+
<p align="left"> <nav class="navbar navbar-default">
13+
<div class="container">
14+
<a href="home.html" class="btn btn-default">
15+
<span class="glyphicon glyphicon-triangle-left"></span> </a> </p>
16+
17+
<h2>Medication</h2>
18+
19+
</div>
20+
</head>
21+
<center>
22+
<br>
23+
24+
25+
26+
<h2>Your genetic insights for:</h2>
27+
<br>
28+
<h4>Tylenol Extra Strength</h4>
29+
<br>
30+
31+
<script>
32+
33+
<style>
34+
body {
35+
background-color: lightblue;
36+
}
37+
</style>
38+
</head>
39+
40+
<script src="assets/js/script.js"></script>
41+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
42+
<head>
43+
44+
<meta charset="utf-8">
45+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
46+
<meta name="viewport" content="width=device-width, initial-scale=1">
47+
48+
<title>ToxScreen. Drug safety personalized to your genetic information.</title>
49+
50+
<link rel="stylesheet" href="assets/css/styles.css">
51+
52+
<!-- Meta tag for changing browser colors. -->
53+
<meta id="theme-color" name="theme-color" content="#37474F">
54+
55+
<!-- Meta tag for App-like behaviour in iOS -->
56+
<meta name=”apple-mobile-web-app-capable” content=”yes”>
57+
58+
<!-- Web Manifest -->
59+
<link rel="manifest" href="manifest.json">
60+
61+
</head>
62+
<body>
63+
<li>Increased chance of adverse reactive to sodium starch glycolate</li>
64+
<li>Increased chance of adverse reactive to sodium starch glycolate</li>
65+
</body>
66+
</html>

fail.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<h1>Looks like it's dangerous for you to take this.</h1>
4+
<button type="button" onclick="location.href = 'http://localhost/~yuningbie/HackHealth/index.html';">Back</button>
5+
</html>

fitnessinsights.html

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<title> GeneCheck </title>
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
8+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
9+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
10+
11+
<div class="container">
12+
<p align="left"> <nav class="navbar navbar-default">
13+
<div class="container">
14+
<a href="index.html" class="btn btn-default">
15+
<span class="glyphicon glyphicon-triangle-left"></span> </a> </p>
16+
17+
<h2>Fitness</h2>
18+
19+
</div>
20+
</head>
21+
<center>
22+
<br>
23+
24+
25+
26+
<h2>Your genetic insights for:</h2>
27+
<br>
28+
<h4>The Squat Machine</h4>
29+
<br>
30+
31+
<script>
32+
33+
<style>
34+
body {
35+
background-color: lightblue;
36+
}
37+
</style>
38+
</head>
39+
40+
<script src="assets/js/script.js"></script>
41+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
42+
<head>
43+
44+
<meta charset="utf-8">
45+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
46+
<meta name="viewport" content="width=device-width, initial-scale=1">
47+
48+
<title>ToxScreen. Drug safety personalized to your genetic information.</title>
49+
50+
<link rel="stylesheet" href="assets/css/styles.css">
51+
52+
<!-- Meta tag for changing browser colors. -->
53+
<meta id="theme-color" name="theme-color" content="#37474F">
54+
55+
<!-- Meta tag for App-like behaviour in iOS -->
56+
<meta name=”apple-mobile-web-app-capable” content=”yes”>
57+
58+
<!-- Web Manifest -->
59+
<link rel="manifest" href="manifest.json">
60+
61+
</head>
62+
<body>
63+
<li>You have an above average tendency to tear your ACL. You may want to strengthen your quadriceps first.</li>
64+
</body>
65+
</html>

0 commit comments

Comments
 (0)