forked from Gaduo/FHIRSampleCreator
-
Notifications
You must be signed in to change notification settings - Fork 3
/
conceptMap.html
497 lines (359 loc) · 19.7 KB
/
conceptMap.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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
<!DOCTYPE html>
<html>
<head lang="en">
<base href="/" />
<meta charset="UTF-8">
<script src="js/libs/jquery-1.9.0.min.js"></script>
<script src="js/libs/angular.min1-5.js"></script>
<script src="js/libs/ui-bootstrap-tpls-2.0.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/vis.min.css"/>
<script src="js/libs/angular-sanitize.js"></script>
<script src="js/libs/moment.min.js"></script>
<script src="js/libs/lodash.core.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<link rel="stylesheet" type="text/css" href="css/jsTreeStyle.css"/>
<link rel="stylesheet" type="text/css" href="css/jsTreeThemes/proton/style.css"/>
<script src="js/libs/angular-sanitize.js"></script>
<script>
angular.module("sampleApp",['ngSanitize','ui.bootstrap','ngStorage','ui.checkbox']).config(function($locationProvider) {
// enable html5Mode for pushstate ('#'-less URLs)
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
});
angular.module("sampleApp").constant("moment", moment);
</script>
<script src="js/appConfigSvc.js"></script>
<script src="js/libs/ngStorage.min.js"></script>
<script src="js/libs/jstree.min.js"></script>
<script src="js/conceptMapCtl.js"></script>
<script src="js/modalDialogSvc.js"></script>
<script src="js/resourceCreatorSvc.js"></script>
<script src="resourceBuilder/rbServices.js"></script>
<script src="js/profileCreatorSvc.js"></script>
<script src="js/resourceSvc.js"></script>
<script src="js/builderSvc.js"></script>
<script src="js/services.js"></script>
<script src="js/filters.js"></script>
<script src="js/newVSFinder.js"></script>
<script src="js/libs/angular-bootstrap-checkbox.js"></script>
<style>
.myScroll {
height: 800px;
overflow-y: scroll;
}
.myRequired {
color:red;
background-color: mistyrose;
}
.extension {
color:blue;
background-color: powderblue;
}
</style>
<title>Concept Map builder</title>
</head>
<body style="padding: 8px;padding-top: 80px" >
<div ng-app="sampleApp" ng-controller="conceptMapCtrl" class="container-fluid">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="col-md-3 col-sm-3">
<span>
<a class="navbar-brand" href="#" ng-click="showVersion()">
ConceptMap: {{currentType.url | getLogicalID}}
</a>
</span>
<span>
</span>
</div>
<div class="col-md-2 col-sm-2">
<span style="cursor:pointer" ng-click='setServers()' class="navbar-text pull-right"> {{appConfigSvc.getCurrentConformanceServer().name}}</span>
</div>
<div class="col-md-1 col-sm-1">
<form class="navbar-form navbar-left">
<img ng-show="waiting" src="css/ajax_loader_blue_32.gif"/>
</form>
</div>
<div class="col-md-5 col-sm-5">
<form class="navbar-form">
<button ng-show="isDirty" class="btn btn-danger pull-right"
ng-click="saveCM()">Save model</button>
</form>
</div>
<div class="col-md-1 col-sm-1">
<div class="nav navbar-form navbar-right" ng-hide="firebase.auth().currentUser">
<span style="font-size:1.8em; cursor: pointer">
<div ng-click="login()">
<i class="glyphicon glyphicon-log-in"></i>
</div>
</span>
</div>
<div class="nav navbar-form navbar-right" ng-show="firebase.auth().currentUser">
<span style="font-size:1.8em; cursor: pointer"
uib-popover="{{firebase.auth().currentUser.email}}"
popover-placement="left"
popover-trigger="'mouseenter'">
<div href="#" ng-click="logout()"> <i class="glyphicon glyphicon-log-out"></i></div>
</span>
</div>
</div>
</div>
</nav>
<div class="row">
<div class="row">
<div class="col-md-3 col-sm-3">
<span class="pull-right"><span class="clickable" ng-click="addConceptMap()">New map</span></span>
<h4>Maps</h4>
<ul class="list-group" style=" height:500px; overflow: auto;" >
<li style = "cursor:pointer" class="list-group-item" ng-repeat="entry in bundleCM.entry"
ng-click="setCurrentCM(entry.resource)">
{{entry.resource.id}}
{{entry.resource.name}}
</li>
</ul>
</div>
<div class="col-md-9 col-sm-9">
<span class="pull-right">
<strong>{{currentCM.url}}</strong>
</span>
<uib-tabset ng-show="currentCM">
<uib-tab heading="Details">
<form>
<!--
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label>Url</label>
<input type="text" class="form-control" ng-model="currentCM.url">
</div>
</div>
<div class="col-md-6 col-sm-6">
</div>
</div>
-->
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<div ng-show="currentCM.id">
<label>Url</label>
<div><input class="form-control" type="text"
value="{{appConfigSvc.getCurrentConformanceServer().url + 'ConceptMap/' + currentCM.id}}"/></div>
</div>
<label>Name</label>
<input type="text" class="form-control" ng-model="currentCM.name"
placeholder="Name of map">
<label>Description</label>
<textarea ng-change="setDirty()"
ng-model="currentCM.description" class="form-control" placeholder="Description">
</textarea>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Source ValueSet Url</label>
<input type="text" class="form-control" ng-model="currentCM.sourceUri">
</div>
<div class="form-group">
<label>Target ValueSet Url</label>
<input type="text" class="form-control" ng-model="currentCM.targetUri">
</div>
</div>
<div class="col-md-4 col-sm-4">
<label>Purpose</label>
<textarea ng-change="setDirty()" rows="5"
ng-model="currentCM.purpose" class="form-control" placeholder="Purpose">
</textarea>
</div>
</div>
<div class="pull-right">
<button class="btn btn-link" ng-click="editHeader(currentCM)">Edit header</button>
</div>
<br/>
</form>
<!--
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label>Source ValueSet Url</label>
<input type="text" class="form-control" ng-model="currentCM.sourceUri">
</div>
</div>
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label>Target ValueSet Url</label>
<input type="text" class="form-control" ng-model="currentCM.targetUri">
</div>
</div>
</div>
-->
<div ng-repeat="group in currentCM.group">
<hr/>
<form>
<div class="row">
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Source CodeSystem Url</label>
<input type="text" class="form-control" ng-model="group.source">
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="form-group">
<label>Target CodeSystem Url</label>
<input type="text" class="form-control" ng-model="group.target">
</div>
</div>
<div class="col-md-4 col-sm-4">
<button ng-show="canEdit" style="margin-top: 20px"
class="btn btn-link pull-right" ng-click="addItem()">Add new mapping</button>
</div>
</div>
</form>
<div class="row">
<div class="col-md-2 col-sm-2">
<strong>Source code</strong>
</div>
<div class="col-md-9 col-sm-9">
<div class="row">
<div class="col-md-3 col-sm-3">
<strong>Equivalence</strong>
</div>
<div class="col-md-3 col-sm-3">
<strong>Target code</strong>
</div>
<div class="col-md-6 col-sm-6">
<strong>Comment</strong>
</div>
</div>
</div>
<div class="col-md-1 col-sm-1">
<strong class="text-center">Actions</strong>
</div>
</div>
<div class="row" ng-repeat="element in group.element">
<div class="col-md-2 col-sm-2">
{{element.code}}
</div>
<div class="col-md-9 col-sm-9">
<div class="row" ng-repeat="target in element.target">
<div class="col-md-3 col-sm-3">
<div uib-popover-html="showEquivalenceDescription(target.equivalence)"
popover-trigger="'mouseenter'"
popover-placement="top">
{{target.equivalence}}
</div>
</div>
<div class="col-md-3 col-sm-3">
{{target.code}}
</div>
<div class="col-md-6 col-sm-6">
{{target.comment}}
</div>
</div>
</div>
<div class="col-md-1 col-sm-1">
<div class="pull-right">
<i ng-show="canEdit" style="cursor: pointer"
ng-click="addItem(element)"
class="iconSpacing glyphicon glyphicon-edit"></i>
<i ng-show="canEdit" style="cursor: pointer"
ng-click="removeItem({source:element.code,target:target.code})"
class="iconSpacing glyphicon glyphicon-minus-sign"></i>
</div>
</div>
</div>
<div class="row" ng-show="canEdit" style="margin-top: 10px">
<div class="col-md-2 col-sm-2">
<input type="text" class="form-control" ng-model="input.sourceCode" placeholder="Source code"/>
</div>
<div class="col-md-9 col-sm-9">
<div class="row">
<div class="col-md-3 col-sm-3">
<select ng-model="input.eq" class="form-control" ng-options="eq for eq in equivalence"
uib-popover-html="showEquivalenceDescription(input.eq)"
popover-trigger="'mouseenter'"
popover-placement="top">
</select>
</div>
<div class="col-md-3 col-sm-3">
<input type="text" class="form-control" ng-model="input.targetCode" placeholder="Target code"/>
</div>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control" ng-model="input.comment" placeholder="Comment"/>
</div>
</div>
</div>
<div class="col-md-1 col-sm-1">
<i style="cursor: pointer"
ng-click="addItemDirect()"
class="iconSpacing pull-right glyphicon glyphicon-plus-sign"></i>
</div>
</div>
<!--
<table class="table table-condensed">
<tr><th>Code</th><th>Target</th><th><span class="pull-right"> Edit</span></th></tr>
<tr ng-repeat="element in group.element">
<td>{{element.code}}</td>
<td>
<table width="100%">
<tr ng-repeat="target in element.target">
<td valign = 'top' width="15%">{{target.code}}</td>
<td width="85%">{{target.comment}}</td>
</tr>
</table>
</td>
<td width="10%">
<div class="pull-right">
<i ng-show="canEdit" style="cursor: pointer"
ng-click="removeItem({source:element.code,target:target.code})"
class="iconSpacing glyphicon glyphicon-minus-sign"></i>
<i ng-show="canEdit" style="cursor: pointer"
ng-click="addItem(element)"
class="iconSpacing glyphicon glyphicon-edit"></i>
</div>
</td>
</tr>
</table>
-->
</div>
</uib-tab>
<uib-tab heading="Test Translate">
<br/>
<div class="row">
<div class="col-md-2 col-sm-2">
<input type="text" ng-model="lookupCode" class="form-control" ng-change="makeLookupUrl(lookupCode)"/>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-primary" ng-click="lookup()">Lookup</button>
</div>
<div class="col-md-7 col-sm-7">
<div ng-repeat="l in arLookupUrl">
{{l}}
</div>
<pre>{{lookupResponse | json}}</pre>
</div>
</div>
</uib-tab>
<uib-tab heading="Json">
<pre>{{currentCM | json}}</pre>
</uib-tab>
<uib-tab heading="Dev Notes">
<div><strong>Servers</strong></div>
<div>Conformance Server</div>
<ul>
<li>Holds ConceptMap</li>
<li>Use $translate for test translate function</li>
</ul>
<div>Terminology Server</div>
<ul>
<li>Holds ValueSet</li>
<li>Used when looking up VS for new ConceptMap</li>
<li>Uses $expand for item lookup when adding new items - NOTE filter seems broken hapi & grahame</li>
</ul>
</uib-tab>
</uib-tabset>
</div>
</div>
</div>
</div>
</body>
</html>