This repository has been archived by the owner on Jul 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
405 lines (372 loc) · 19.5 KB
/
index.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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Body</title>
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<link href="./css/style.css" rel="stylesheet">
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0-rc.1/Chart.min.js"></script>
<script src="./js/app.js"></script>
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aVertexNormal;
attribute vec3 aVertexPosition;
attribute vec4 aVertexColor;
uniform mat4 uMVMatrix;
uniform mat4 uPMatrix;
uniform mat3 uNMatrix;
uniform vec3 uLightPosition;
uniform vec3 uAmbientLightColor;
uniform vec3 uSpecularLightColor;
const float shininess = 40.0;
varying vec4 vColor;
void main(void) {
// Get the vertex position in eye coordinates
vec4 vertexPositionEye4 = uMVMatrix * vec4(aVertexPosition, 1.0);
vec3 vertexPositionEye3 = vertexPositionEye4.xyz / vertexPositionEye4.w;
// Calculate the vector (l) to the light source
vec3 vectorToLightSource = normalize(uLightPosition - vertexPositionEye3);
// Transform the normal (n) to eye coordinates
vec3 normalEye = normalize(uNMatrix * aVertexNormal);
// Calculate n dot l for diffuse lighting
float diffuseLightWeightning = max(dot(normalEye,
vectorToLightSource), 0.0);
// Calculate the reflection vector (r) that is needed for specular light
vec3 reflectionVector = normalize(reflect(-vectorToLightSource,
normalEye));
// The camera in eye coordinates is located in the origin and is pointing
// along the negative z-axis. Calculate viewVector (v)
// in eye coordinates as:
// (0.0, 0.0, 0.0) - vertexPositionEye3
vec3 viewVectorEye = -normalize(vertexPositionEye3);
float rdotv = max(dot(reflectionVector, viewVectorEye), 0.0);
float specularLightWeightning = pow(rdotv, shininess);
// Sum up all three reflection components and send to the fragment shader
vColor = vec4((uAmbientLightColor
+ aVertexColor.xyz * diffuseLightWeightning
+ uSpecularLightColor * specularLightWeightning), aVertexColor[3]);
gl_Position = uPMatrix*uMVMatrix*vec4(aVertexPosition, 1.0);
}
</script>
<script id="shader-fs" type="x-shader/x-fragment">
precision mediump float;
varying vec4 vColor;
void main(void) {
gl_FragColor = vec4(vColor.x,vColor.y,vColor.z,vColor.w);
}
</script>
<script src="./js/gl-matrix-min.js"></script><script src="./js/webgl-utils.js"></script><script src="./js/body.js"></script><script src="./js/webgl-obj-loader.js"></script></head>
<body ng-app="myApp" cz-shortcut-listen="true">
<div class="container-fluid" ng-controller="myAppController">
<div class="row">
<div class="col-sm-6">
<h1>Patient Report</h1>
</div>
<div class="col-sm-6 text-right">
<h1>{{info["Name"]}}</h1>
</div>
</div>
<div class="row">
<div class="col-md-6" id="canvasHolder">
<canvas id="myGLCanvas"></canvas>
</div>
<div class="col-md-6">
<ul class="nav nav-tabs">
<li class="nav active"><a href="#A" data-toggle="tab">Basic Info</a>
</li>
<li class="nav"><a href="#B" data-toggle="tab">Injury</a>
</li>
<li class="nav"><a href="#C" data-toggle="tab">Medical History</a>
</li>
<li class="nav"><a href="#D" data-toggle="tab">Prescription</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade in active" id="A">
<h3>Basic Info</h3>
<div class="alert alert-info" role="alert">
<div class="row">
<div class="col-sm-3">
<strong>Name:</strong>
</div>
<div class="col-sm-3">
{{info["Name"]}}
</div>
<div class="col-sm-3">
<strong>DOB:</strong>
</div>
<div class="col-sm-3">
{{info["Date of Birth"]}}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<strong>Age:</strong>
</div>
<div class="col-sm-3">
{{info["Age"]}}
</div>
<div class="col-sm-3">
<strong>Sex:</strong>
</div>
<div class="col-sm-3">
{{info["Gender"]}}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<strong>Address:</strong>
</div>
<div class="col-sm-3">
{{info["Street Address"]}}, {{info["City"]}}, {{info["State"]}} {{info["Zip Code"]}}
</div>
<div class="col-sm-6">
</div>
</div>
</div>
<h3>Hospital Info</h3>
<div class="alert alert-info" role="alert">
<div class="row">
<div class="col-sm-3">
<strong>Hospital Name:</strong>
</div>
<div class="col-sm-3">
{{info["Hospital"]}}
</div>
<div class="col-sm-3">
<strong>Doctor Name:</strong>
</div>
<div class="col-sm-3">
{{info["Doctor"]}}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<strong>Hospital Address:</strong>
</div>
<div class="col-sm-3">
{{info["Hospital Address"]}}
</div>
<div class="col-sm-3">
<strong>Visit Type:</strong>
</div>
<div class="col-sm-3">
{{info["Visit Type"]}}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<strong>Emergency Medical Care Given:</strong>
</div>
<div class="col-sm-3">
{{info["Emergency Medical Care Given"]}}
</div>
<div class="col-sm-3">
<strong>Date of Visit:</strong>
</div>
<div class="col-sm-3">
{{info["Date of Visit"]}}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<strong>Chief Complaint:</strong>
</div>
<div class="col-sm-3">
{{info["Chief Complaint"]}}
</div>
<div class="col-sm-3">
<strong>Pharmacy:</strong>
</div>
<div class="col-sm-3">
{{info["Pharmacy"]}}
</div>
</div>
</div>
<h3>Vital Info</h3>
<div class="alert alert-info" role="alert">
<div class="row">
<div class="col-sm-3">
<strong>BMI:</strong>
</div>
<div class="col-sm-3">
{{info["MedicalHistory"]["Visit1"]["BMI"]}}
</div>
<div class="col-sm-3">
<strong>Blood Pressure:</strong>
</div>
<div class="col-sm-3">
{{info["MedicalHistory"]["Visit1"]["BloodPressure"]}}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<strong>Blood Sugar:</strong>
</div>
<div class="col-sm-3">
{{info["MedicalHistory"]["Visit1"]["BloodSugar"]}}
</div>
<div class="col-sm-3">
<strong>Heart Rate:</strong>
</div>
<div class="col-sm-3">
{{info["MedicalHistory"]["Visit1"]["HeartRate"]}}
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="B">
<div >
<div class="radio inline">
<label>
<input type="radio" name="optionsRadios" id="whole" value="whole" checked>
Whole
</label>
</div>
<div class="radio inline">
<label>
<input type="radio" name="optionsRadios" id="upper" value="upper" >
Upper
</label>
</div>
<div class="radio inline">
<label>
<input type="radio" name="optionsRadios" id="lower" value="lower" >
Lower
</label>
</div>
<div class="radio inline">
<label>
<input type="radio" name="optionsRadios" id="torso" value="torso" >
Torso
</label>
</div>
<div class="radio inline">
<label>
<input type="radio" name="optionsRadios" id="legs" value="legs" >
Legs
</label>
</div>
<div class="radio inline">
<label>
<input type="radio" name="optionsRadios" id="head" value="head" >
Head
</label>
</div>
<div class="inline">
<label>
<input id="rotSpeed" type="range" min="0" max="1000" step="50" />
Rotation speed
</label>
</div>
</div>
<br>
<div class="panel panel-info">
<div class="panel-heading">
<label>
<input type="checkbox" id="allOptions" value="All" checked>
All afflictions
</label>
</div>
</div>
<div class="checkbox" ng-repeat='(key, value) in info["Affected Regions"]'>
<div class="panel panel-info">
<div class="panel-heading">
<label>
<input type="checkbox" id="option" value="{{key}}" ng-click="change(key)">
{{key}}
</label>
</div>
<div class="panel-body">
{{value}}
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="C">
<h3>Graphs of Medical History</h3>
<select ng-model="graphType" class="form-control" ng-change="generateGraph()">
<option>BMI</option>
<option>Blood Pressure</option>
<option>Blood Sugar</option>
<option>Heart Rate</option>
</select>
<div ng-if="graphType">
<h4>{{graphType}} Graph</h4>
</div>
<div id="chartHolder">
<canvas id="chart"></canvas>
</div>
</div>
<div class="tab-pane fade" id="D">
<h3>Prescription</h3>
<h4>{{info["Prescription1"]}}</h4>
<div class="alert alert-info" role="alert">
<p class="text-center">{{info["PrescriptionAmount"]}} <br> {{info["PrescriptionTime"]}} <br> {{info["PrescriptionRefill"]}}
</p class="text-center">
<div class="Hover Rows">
<table class="table table-hover">
<thead>
<tr>
<th></th>
<th style="text-align: center">Sun</th>
<th style="text-align: center">Mon</th>
<th style="text-align: center">Tues</th>
<th style="text-align: center">Wed</th>
<th style="text-align: center">Thurs</th>
<th style="text-align: center">Fri</th>
<th style="text-align: center">Sat</th>
</tr>
</thead>
<tbody>
<tr>
<th>Morning</th>
<td align="center">{{info["PrescriptionSchedule"]["SunM"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["MM"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["TuesM"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["WM"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["ThursM"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["FM"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["SatM"]}}</td>
</tr>
<tr>
<th>Afternoon</th>
<td align="center">{{info["PrescriptionSchedule"]["SunA"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["MA"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["TuesA"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["WA"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["ThursA"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["FA"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["SatA"]}}</td>
</tr>
<tr>
<th>Evening</th>
<td align="center">{{info["PrescriptionSchedule"]["SunE"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["ME"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["TuesE"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["WE"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["ThursE"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["FE"]}}</td>
<td align="center">{{info["PrescriptionSchedule"]["SatE"]}}</td>
</tr>
</tbody>
</table>
</div>
<img src={{info["Picture"]}} class="center-block img-responsive"/>
</div>
</div>
</div>
</div>
</div>
</div>
</body></html>