-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
359 lines (326 loc) · 16.2 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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Heracles Analysis Runner</title>
<link rel="stylesheet" type="text/css" href="build/css/Heracles.min.css">
</head>
<body>
<div class="container">
<!-- Header and app info -->
<div id="header" class="row page-one">
<div class="col-md-12">
<div class="row " style="margin-top:10px">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="jumbotron">
<h2>Heracles</h2>
<h4 class="header-sub">Analysis Runner</h4>
<p class="sub-text">Heracles is the cohort analysis tool for the OMOP Common Data Model (CDM). Begin your analyses by selecting a cohort.</p>
</div>
</div>
<div class="col-md-1"></div>
</div>
</div>
<!-- Cohort search bar -->
<div class="col-md-12">
<div id="cohort-search" class="row ">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="row">
<div class="col-xs-11" style="padding-right:0px; margin-right: 0px">
<div id="cohorts-typeahead" class="heracles-typeahead">
<input id="cohorts" type="text" placeholder="Search Cohorts"
class="form-control large-input typeahead" />
</div>
</div>
<div class="col-xs-1" style="padding-left:0px; margin-left: 0px">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-expanded="true" style="height: 50px">
<span class="glyphicon glyphicon-cog" aria-hidden="true"
style="font-size: 25px"></span>
</button>
<ul class="dropdown-menu webpai-dropdown" role="menu" aria-labelledby="dropdownMenu1">
<!-- <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li> -->
</ul>
</div>
</div>
</div>
<div align="center" class="heracles-link">
<a href="viewer.html">Switch to <b>view</b> Heracles Analyses</a>
</div>
</div>
<div class="col-md-2"></div>
</div>
</div>
</div>
</div>
<div id="cohort-explorer-main" class="row" style="display:none" ng-controller="CohortExplorerCtrl">
<input type="hidden" id="selectedSourceKey" value="{{selectedSource.sourceKey}}" />
<!-- Cohort Explorer -->
<div>
<div class="navmenu navmenu-default navmenu-fixed-left offcanvas-sm" style="width:200px">
<a class="navmenu-brand visible-md visible-lg" ng-click="goBack($event)" style="font-weight: bold">OHDSI Heracles</a>
<ul class="nav navmenu-nav" style="border-bottom:1px solid #898989;">
<li><a ng-click="goBack($event)" style="font-size:16px">«Back</a>
</li>
<li><a ng-click="refreshCohort($event)" style="font-size:16px">Refresh</a>
</li>
<li style="margin-left:10px" ng-hide="hasOneSource()">
<select id="sourcepicker" class="selectpicker" multiple data-selected-text-format="count">
<option ng-repeat="(k, s) in sources" value="{{k}}" ng-selected="selectedSouresForAnalysis.indexOf(s) >= 0">
{{s.sourceName}}
</option>
</select>
</li>
<li><a ng-href="viewer.html?cohortId={{cohort.cohortDefinition.id}}">Heracles Viewer</a>
</li>
</ul>
<a class="navmenu-brand" style="font-weight: bold" ng-click="scrollAnalysesClick($event, cohort.firstAnalysis)">Visualization Packs</a>
<ul class="nav navmenu-nav">
<li ng-repeat="(k, v) in visualizationPacks" key="{{k}}">
<label viz-type="{{k}}" style="padding:2px 0px 2px 15px; cursor: pointer">
<input type="checkbox" ng-click="selectVizPack($event, k)" class="viz-pack-checkbox" viz-type="{{k}}" /> {{k}}</label>
</li>
</ul>
<!--
<a class="navmenu-brand" style="font-weight: bold" ng-click="scrollAnalysesClick($event, cohort.firstAnalysis)">Analysis Types</a>
<ul class="nav navmenu-nav">
<li ng-repeat="(k, v) in cohort.analysesMap" key="{{k}}" >
<a ng-click="scrollAnalysesClick($event, k)">{{k}}</a>
</li>
</ul>
-->
</div>
<div class="navbar navbar-default navbar-fixed-top hidden-md hidden-lg">
<button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target=".navmenu">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">OHDSI Heracles</a>
</div>
<div id="run-analysis-container" class="container detail-container" style="padding-left: 30px; padding-right: 30px;display: none">
<div id="cohort-explorer-summary" class="row">
<div class="col-sm-4">
<div>
<h4 id="cohort-name">{{cohort.cohortDefinition.name}} <small>({{clickedSourceName}})</small>
<!--
<small ng-show="cohort.cohortDefinition.description != null"
data-toggle="tooltip" data-placement="bottom" title="{{cohort.cohortDefinition.description}}">
<a class="definition">definition</a>
</small>
-->
</h4>
<div>
<p class="cohort-description">
{{cohort.cohortDefinition.description}}
</p>
</div>
<div class="summary-grouper">
<div ng-show="cohort.totalPatients != null">
<label style="text-decoration:underline">Summary</label>
</div>
<div ng-show="cohort.totalPatients != null">
<label class="cohort-desc">Total Patients: </label>{{cohort.totalPatients}}</div>
<div ng-show="cohort.meanObsPeriod != null">
<label class="cohort-desc">Mean Observation Period: </label>{{cohort.meanObsPeriod}}</div>
<div ng-show="cohort.meanAge != null">
<label class="cohort-desc">Median Age: </label>{{cohort.meanAge}}</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div>
<h4 style="text-align:center">Age Distribution</h4>
<div id="age_dist" class="d3-wrapper" />
</div>
</div>
</div>
<div class="col-sm-4">
<div>
<h4 style="text-align:center">Gender Distribution</h4>
<div id="gender_dist" class="d3-wrapper" style="margin-left:20%" />
</div>
</div>
</div>
<div class="col-md-12">
<span>
<label style="font-size:120%">Run Cohort Analyses ({{analysisCount}})</label>
<span style="float:right">
<div class="btn-group btn-group-xs" style="margin-right:15px">
<button type="button" class="btn btn-default auto-filter-check-list-select" filter-key="cohort-analyses" id="select-filter-button" >Select all</button>
<button type="button" class="btn btn-default auto-filter-check-list-clear" filter-key="cohort-analyses" id="deselect-filter-button">Deselect all</button>
</div>
</span>
</span>
<span class="toggle-filter-span" filter-key="cohort-analyses">
<input id="auto-filter-input" placeholder="Type to filter..." type="text" class="form-control auto-filter-check-list-input" style="margin-top:8px" filter-key="cohort-analyses"/>
<div class="multiselect-wrapper" filter-key="cohort-analyses">
<div id="auto-filter-div" class="multiselect form-control" style="margin:3px;height:270px;overflow-y:auto;width:100%;" filter-key="cohort-analyses">
<div ng-repeat="(k, v) in cohort.analysesMap">
<label class="toggle-parent-label" key="{{k}}" ng-click="parentAnalysesClick($event)">
<input type="checkbox" class="toggle-checkbox-parent-item" filter-key="cohort-analyses"
style="margin:4px" value="{{k}}" />
{{k}}
</label>
<div ng-repeat="item in v">
<label class="toggle-child-label {{item.class}}" title="Analysis ID#: {{item.analysisId}}">
<input type="checkbox" class="toggle-checkbox-item" ng-click="analysisClick()" ran="{{item.lastUpdateTimeFormatted}}"
style="margin:2px" filter-key="cohort-analyses" value="{{item.analysisName}}" analysis-id="{{item.analysisId}}" parent="{{k}}" />
{{item.analysisName}}
<span ng-show="item.lastUpdateTimeFormatted != null" class="last-update-time"> (Last Run {{item.lastUpdateTimeFormatted}})</span>
</label>
</div>
</div>
</div>
</div>
</span>
</div>
<!--toggle buttons-->
<div class="col-sm-8">
<h4>Concept Filters</h4>
<span class="label label-default toggle-filter-control" toggle-filter="condition" down="false">
<span class="toggle-operator">+</span><span class="toggle-label">Condition</span></span>
<span class="label label-default toggle-filter-control" toggle-filter="drug" down="false">
<span class="toggle-operator">+</span><span class="toggle-label">Drug</span></span>
<span class="label label-default toggle-filter-control" toggle-filter="procedure" down="false">
<span class="toggle-operator">+</span><span class="toggle-label">Procedure</span></span>
<span class="label label-default toggle-filter-control" toggle-filter="observation" down="false">
<span class="toggle-operator">+</span><span class="toggle-label">Observation</span></span>
<span class="label label-default toggle-filter-control" toggle-filter="measurement" down="false">
<span class="toggle-operator">+</span><span class="toggle-label">Measurement</span></span>
</div>
<div class="col-sm-4" style="height:30px"> </div>
<!--inputs-->
<div class="col-sm-8" id="concept-input-div" style="padding-top:5px">
<div class="toggle-filter-input-wrapper" toggle-filter="condition" style="display:none;">
<input type="text" class="form-control toggle-filter-input" toggle-filter="condition" />
</div>
<div class="toggle-filter-input-wrapper" toggle-filter="drug" style="display:none;">
<input type="text" class="form-control toggle-filter-input" toggle-filter="drug" />
</div>
<div class="toggle-filter-input-wrapper" toggle-filter="procedure" style="display:none;">
<input type="text" class="form-control toggle-filter-input" toggle-filter="procedure" />
</div>
<div class="toggle-filter-input-wrapper" toggle-filter="observation" style="display:none;">
<input type="text" class="form-control toggle-filter-input" toggle-filter="observation" />
</div>
<div class="toggle-filter-input-wrapper" toggle-filter="measurement" style="display:none;">
<input type="text" class="form-control toggle-filter-input" toggle-filter="measurement" />
</div>
</div>
<div class="col-sm-4" style="height:45px"> </div>
<div class="col-md-12">
<label>Small Cell Count: <span style="color:#aaa"> (Cell size to exclude)</span>
</label>
<br/>
<input type="number" value="10" id="smallCellCount" />
<br/>
</div>
<div class="col-md-12" style="margin-top:10px">
<label>
<input type="checkbox" id="heraclesHeel" /> Run Heracles Heel <span style="color:#aaa">(Evaluates data for errors)</span>
</label>
</div>
<div class="col-md-12" style="margin-top:10px">
<label>
<input type="checkbox" id="cohortPeriodOnly" /> Cohort Period Only <span style="color:#aaa">(Limit to inside the cohort period)</span>
</label>
</div>
<div class="col-sm-12">
<button id="btnSubmitJob" class="btn btn-lg btn-heracles analyses-button pull-right" filter-key="cohort-analyses"
ng-disabled="selectedSouresForAnalysis.length == 0"
ng-click="submitJob($event)" data-loading-text="...">Begin Analysis {{selectedSourceString}}</button>
</div>
<div class="col-sm-12" style="padding:10px"> </div>
</div>
</div>
<div class="row">
<div class="modal fade" id="jobStatusModal" tabindex="-1" role="dialog" aria-labelledby="jobStatusModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="jobStatusModalLabel">{{job.label}}</h4>
</div>
<div class="modal-body">
<p>{{job.message}}</p>
<span ng-show="job.job_link != null">
<br /><br />
<a href="{{job.job_link}}" target="_blank">Click here to view Job Status</a>
</span>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="modal fade" id="alreadyRanJobsModal" tabindex="-1" role="dialog" aria-labelledby="alreadyRanJobsModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="alreadyRanJobsModalLabel">Selected Jobs Previously Ran</h4>
</div>
<div class="modal-body">
<b>Oops.</b> {{selectJobMessage}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" ng-click="runOnlyNewJobs()">Yes, remove previously run jobs from my selection</button>
<button type="button" class="btn btn-primary" ng-click="runAllJobs()">No, run all selected jobs</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="spinner-modal">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-body text-center">
<h3><i class="fa fa-cog fa-spin"></i> Loading...</h3>
<h5>(Click to run in background.)</h5>
</div>
</div>
</div>
</div>
<div class="row">
<div class="modal fade" id="messageModal" tabindex="-1" role="dialog" aria-labelledby="messageModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="messageModalLabel">{{message.label}}</h4>
</div>
<div class="modal-body">
{{message.text}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="lib/jquery/jquery.js" type="text/javascript"></script>
<script src="build/js/Heracles.config.js" type="text/javascript"></script>
<script src="lib/requirejs/require.js" type="text/javascript"></script>
<script>
require(['src/js/require.main'], function(){
require([]);
require(['heracles-analysis']);
});
</script>
<script type="application/javascript">
</script>
</body>
</html>