-
Notifications
You must be signed in to change notification settings - Fork 5
/
results.html
322 lines (292 loc) · 14.8 KB
/
results.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html lang="en">
<head>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-66892235-1', 'auto');
ga('send', 'pageview');
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Analysis Tool</title>
{% load staticfiles %}
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" type="text/css" href="{% static 'home/css/bootstrap.min.css' %}" />
<!-- Custom CSS -->
<link rel="stylesheet" type="text/css" href="{% static 'home/css/grayscale.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'home/css/style.css' %}" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<!-- Custom Fonts -->
<link href="{% static 'home/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Raleway:300,400,500,600' rel='stylesheet' type='text/css'>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<!--<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div"></div> -->
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script>
<script type="text/javascript">
// w.document.write("<html><head><title>Print Page</title>");
// w.document.write("{% load staticfiles %}");
// w.document.write("<link rel='stylesheet' type='text/css' href='{% static 'home/css/bootstrap.min.css' %}' />");
// w.document.write("<link rel='stylesheet' type='text/css' href='{% static 'home/css/style.css' %}' />");
// w.document.write("<link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>");
// w.document.write('</head><body>');
// w.document.write('</body></html>');
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
console.log(printContents);
w=window.open();
w.document.write(printContents);
w.print();
w.close();
}
// Load the Visualization API and the piechart package.
google.charts.load('current', {callback: drawChart,packages: ['bar', 'corechart', 'line', 'table']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var djangoDataTable = {{ tableArr|safe }};
var dataTable = google.visualization.arrayToDataTable(djangoDataTable);
var djangoDataDeathHBV = {{ deathHBV_Final|safe }}
var dataDeathHBV = google.visualization.arrayToDataTable(djangoDataDeathHBV);
var djangoDataHcc = {{ hcc_Final|safe }}
var dataHcc = google.visualization.arrayToDataTable(djangoDataHcc);
var djangoDataCirrhosis = {{ cirrhosis_Final|safe }}
var dataCirrhosis = google.visualization.arrayToDataTable(djangoDataCirrhosis);
var MortalityRate = {
title: "Death Risk",
titleTextStyle :{
fontSize:26,
fontName:'Raleway',
},
colors: ['#ff7f50','#49B7A8'],
width: 400,
height: 400,
vAxis: {
title:'Percentage (%)',
maxValue: 100,
},
hAxis:{
title:'Year',
},
legend:{
position:'none',
maxLines: 2,
}
};
var CirrhosisGraph = {
title: "Cirrhosis Risk",
titleTextStyle :{
fontSize:26,
fontName:'Raleway',
},
colors: ['#ff7f50','#49B7A8'],
width: 400,
height: 400,
vAxis: {
title:'Percentage (%)',
maxValue: 100,
},
hAxis:{
title:'Year',
},
legend:{
position:'none',
maxLines: 2,
}
};
var LiverCancer = {
title: "Liver Cancer Risk",
titleTextStyle :{
fontSize:26,
fontName:'Raleway',
},
colors: ['#ff7f50','#49B7A8'],
width: 400,
height: 400,
vAxis: {
title:'Percentage (%)',
maxValue: 100,
},
hAxis:{
title:'Year',
},
legend:{
position:'none',
maxLines: 2,
}
};
var optionsTable = {
'showRowNumber': false,
'width': '100%',
'height': '100%',
'allowHtml': true,
};
var chart3 = new google.visualization.LineChart(document.getElementById('linechart1'));
chart3.draw(dataDeathHBV, MortalityRate);
if({{ ifCirr }} == 1){
var chart4 = new google.visualization.LineChart(document.getElementById('linechart2'));
chart4.draw(dataCirrhosis, CirrhosisGraph);
}
var chart5 = new google.visualization.LineChart(document.getElementById('linechart3'));
chart5.draw(dataHcc, LiverCancer);
for (y = 0; y < 3; y++){
dataTable.setCell(y,0,String(djangoDataTable[y+1][0]),null,{'style': 'font-size:20px; border: 1px solid white;'})
//dataTable.addColumn('number', djangoDataTable[y+1][0]);
}
for (j = 1; j < djangoDataTable[1].length; j += 2){
for (i = 0; i < 3; i++) {
dataTable.setCell(i,j,String(djangoDataTable[i+1][j]),null,{'style': 'background-color: rgba(255,127,80,0.7); border: 1px solid white; font-size:18px;'})
}
}
for (j = 2; j < djangoDataTable[1].length; j += 2){
for (i = 0; i < 3; i++) {
dataTable.setCell(i,j,String(djangoDataTable[i+1][j]),null,{'style': 'background-color: #49b7a8; border: 1px solid white; font-size:18px;'})
}
}
var table = new google.visualization.Table(document.getElementById('table_div'));
table.draw(dataTable, optionsTable);
}
$('#mailform').submit(function(){
var formAction = $("#selectmail").val() == "technical" ? "research.cs.alc@gmail.com" : "mtoy@stanford.edu";
$("#mailform").attr("action", "MAILTO:" + formAction);
});
</script>
</head>
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
<style>
.google-visualization-table-td {
text-align: center !important;
}
</style>
<!-- Results Section -->
<section id="Result" class="container content-section text-center">
<br><br><br>
<div class="col-lg-8 col-lg-offset-2">
<h2 style="margin-top: 75px;">Your Responses</h2>
<div id="user-input">
<p>{{inputStr}}</p>
</div>
<div id="chart_div" style= "width:750; height:750"></div>
</div>
<div id='divToPrint'>
<div class="row">
<div>
<div class="graph-row">
<div id="linechart1"></div>
<div id="linechart3"></div>
</div>
<div class="graph-row">
<div id="linechart2"></div>
<div id="linechart4"></div>
</div>
<div>
</div>
<div>
<h2 style="padding-top:75px;"> <span style="color:#ff7f50">Do Nothing</span> | <span style="color:#49B7A8">{{t_heading}}</span> </h2>
</div>
<div style= "width: 800px; height: 350px;"id="table_div"></div>
</div>
</div>
<br>
<div id="user-input">
<p>Your mortality rate by HBV will decrease by {{deathDiff}}% in 20 years if monitored</p>
</div>
<h2 style="margin-top: 75px;"> World Health Organizations Recommendation</h2>
<!-- <div id="user-input" style="padding-bottom: 50px;">
<p>{{whoRec}}</p>
</div> -->
<div style="width: 80%; display: table; margin: 0 auto; border-collapse: separate;">
<div style="display: table-row;">
<div id='who-row' style="display: table-cell; border-left: 3px #000 solid; border-top: solid 3px #000; border-bottom: solid 3px #000; padding-left:30px;">
<p>
{{whoRec}}. All people with CHB should be monitored regularly for disease activity/progression and detection of HCC, and after stopping treatment for evidence of reactivation.</p>
</p>
</div>
<div id = 'who-row' style="display: table-cell; border-right: 3px #000 solid; border-top: solid 3px #000; border-bottom: solid 3px #000;">
</div>
</div>
<br> </br>
<!-- <br> <p> Click <a href="https://www.who.int/hepatitis/publications/hepatitis-b-guidelines/en/" target="_blank">here</a> for WHO Treatment Guidelines </p> </br> -->
</div>
<h3> WHO Treatment Guidelines </h3>
<center>
<embed src="https://sidnath21.github.io/heptool/HBV_Treatment.pdf" width="600px" height="500px" />
</center>
</div>
<h1> </h1>
<h2> Click <a href ="https://sidnath21.github.io/heptool/HepB_Treatment.pdf" target ="_blank">here</a> for more information </h2>
</section>
<section id="Contact" class="container content-section text-center">
<div>
<input type="button" class="btn btn-square" value="Print" onclick="printDiv('divToPrint')" />
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2>Contact The Asian Liver Center</h2>
<p>Feel free to fill out <a href ="https://forms.gle/QoyZbuM17Kpm2eah9">this</a> form!</p>
<!--<a href="mailto:research.cs.alc@gmail.com" target="_blank">email</a> us to -->
<p> You can also send us an <a href ="mailto:research.cs.alc@gmail.com">email<a/>!</p>
<!--
<p>For suggestions on how to improve the site, please select technical.</p>
<p>For questions about the data or Markov model, please select clinical.</p>
<div style="padding-bottom: 20px;">
<select id ="selectmail" name="email">
<option value="technical">Technical</option>
<option value="clinical">Clinical</option>
</select> <br><br>
<form id="mailform" action="MAILTO:research.cs.alc@gmail.com" method="post" enctype="text/plain">
Name:
<input type="text" name="name" value=""><br><br>
E-mail:
<input type="text" name="mail" value=""><br><br>
Comment:<br>
<textarea rows="5" cols="50" name="comment" id="comment"></textarea>
<br><br>
<input class="btn btn-default btn-lg" type="submit" value="Send">
</form>
</div>
-->
<ul class="list-inline banner-social-buttons">
<li>
<a href="https://twitter.com/asianliverctr" class="btn btn-default btn-lg"><i class="fa fa-twitter fa-fw"></i> <span class="network-name">Twitter</span></a>
</li>
<li>
<a href="https://github.com/MehlikaToy/Django_AnalysisTool" class="btn btn-default btn-lg"><i class="fa fa-github fa-fw"></i> <span class="network-name">Github</span></a>
</li>
</ul>
<ul class="list-inline banner-social-buttons" style="padding-top: 75px;">
</ul>
</div>
</div>
</section>
<section id="Contact" class="container content-section text-center">
<div>
<h2> Return back to <a href="http://www.heptool.org/"> Home</a> Page </h2>
</div>
<footer>
<div class="container text-center">
<p>Copyright © <a href="http://liver.stanford.edu/" target="_blank">Asian Liver Center</a></p>
</div>
</footer>
<script src="{% static 'home/js/jquery.js' %}" >"</script>
<script src="{% static 'home/js/bootstrap.min.js' %}"></script>
<script src="{% static 'home/js/jquery.easing.min.js' %}"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCWgoJVJgzqUcbnYRL1CIfZglQN8rlMUs8&sensor=false"></script>
<!-- Custom Theme JavaScript -->
<script src="{% static 'home/js/grayscale.js' %}"></script>
</body>
</html>