forked from Gaduo/FHIRSampleCreator
-
Notifications
You must be signed in to change notification settings - Fork 3
/
profileDiffB4Change.html
657 lines (501 loc) · 28 KB
/
profileDiffB4Change.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
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
<!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/moment.min.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",['ui.bootstrap','ngStorage']).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/profileDiffCtl.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/profileDiffSvc.js"></script>
<script src="js/logicalModelSvc.js"></script>
<script src="js/modellerFilters.js"></script>
<script src="resourceBuilder/vsBrowser.js"></script>
<script src="resourceBuilder/rbServices.js"></script>
<!--
<script src="js/appConfigSvc.js"></script>
<script src="js/libs/ngStorage.min.js"></script>
<script src="resourceBuilder/rbServices.js"></script>
<script src="js/components/dataTypes.js"></script>
<script src="js/services.js"></script>
<script src="js/filters.js"></script>
<script src="js/documentBuilder.js"></script>
<script src="resourceBuilder/rbServices.js"></script>
<script src="js/reporterCtrl.js"></script>
<script src="js/libs/ngStorage.min.js"></script>
<script src="js/profileCreatorSvc.js"></script>
-->
<style>
.myScroll {
height: 800px;
overflow-y: scroll;
}
.myRequired {
color:red;
background-color: mistyrose;
}
.extension {
color:blue;
background-color: powderblue;
}
.borderTop {
border-top: 2pt solid black
}
</style>
<title>Profile Diff</title>
</head>
<body style="padding: 8px;padding-top: 80px" >
<div ng-app="sampleApp" ng-controller="profileDiffCtrl" class="container-fluid">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="col-md-2">
<a class="navbar-brand" href="#">
Profile Explorer
</a>
</div>
<div class="col-md-5 col-sm-5">
<div class="navbar-text">
Conformance:{{appConfigSvc.getCurrentConformanceServer().name}}
<div>Terminology:{{appConfigSvc.getCurrentTerminologyServer().name}}</div>
</div>
</div>
<div class="col-md-2 col-sm-2">
<form class="navbar-form navbar-left">
<img ng-show="waiting" src="css/ajax_loader_blue_32.gif"/>
</form>
</div>
<div class="col-md-3 col-sm-3">
<div class="navbar-text pull-right">
User: {{orionUser.primaryActor.fullName}}
</div>
</div>
</div>
</nav>
<!--
<div class="row">
<div class="col-sm-2 col-md-2">
Profile set to display:
</div>
<div class="col-sm-3 col-md-3">
<select class="form-control" ng-model = 'pr' ng-options="pair.name for pair in pairs" ng-change="loadPair(pr.name)">
</select>
</div>
<div class="col-sm-6 col-md-6">
</div>
</div>
<hr/>
-->
<uib-tabset>
<uib-tab heading="Implementation Guides">
<div class="row">
<div class="col-sm-3 col-md-3">
<h4>Implementation Guides</h4>
<div class="row">
<div class="col-sm-9 col-md-9">
<select class="form-control" ng-model="input.selIG"
ng-options="ig.description for ig in listOfIG">
</select>
</div>
<div class="col-sm-3 col-md-3">
<button class="btn btn-success pull-right" ng-click="selectIG(input.selIG)">Load</button>
</div>
</div>
<br/>
<div class="myScroll">
<uib-accordion ng-show="artifacts">
<div uib-accordion-group class="panel-default">
<uib-accordion-heading>
Profiles
<div class="pull-right badge">{{artifacts.profile.length}}</div>
</uib-accordion-heading>
<ul class="list-group">
<li ng-class="{'list-group-item':true, listItemSelected:selectedItem == item}"
ng-repeat="item in artifacts.profile"
ng-click = "selectItem(item,'profile')">
<div class="clickable">{{item.url | referenceType}}</div>
<div><em>{{item.description}}</em></div>
</li>
</ul>
</div>
<div uib-accordion-group class="panel-default">
<uib-accordion-heading>
Extensions
<div class="pull-right badge">{{artifacts.extension.length}}</div>
</uib-accordion-heading>
<ul class="list-group">
<li ng-class="{'list-group-item':true, listItemSelected:selectedItem == item}"
ng-repeat="item in artifacts.extension"
ng-click = "selectItem(item,'extension')">
<div class="clickable">{{item.url | referenceType}}</div>
<div><em>{{item.description}}</em></div>
</li>
</ul>
</div>
<div uib-accordion-group class="panel-default">
<uib-accordion-heading>
Terminology
<div class="pull-right badge">{{artifacts.terminology.length}}</div>
</uib-accordion-heading>
<ul class="list-group">
<li class="list-group-item" ng-repeat="item in artifacts.terminology"
ng-click = "selectItem(item,'terminology')">
<div class="clickable">{{item.url | referenceType}}</div>
<div><em>{{item.description}}</em></div>
</li>
</ul>
</div>
</uib-accordion>
</div>
</div>
<div class="col-sm-9 col-md-9">
<div ng-show="selectedItemType == 'profile'">
<h4>Profiled resource</h4>
<uib-tabset>
<uib-tab heading="Logical">
<div class="row">
<div class="col-sm-4 col-md-4">
<div id="profileTree1"></div>
</div>
<div class="col-sm-8 col-md-8">
<div class="myScroll">
<pre>{{selectedED1 | json}}</pre>
</div>
</div>
</div>
</uib-tab>
<uib-tab heading="Table">
<div class="myScroll">
<table class="table">
<tr><th></th><th>Path</th><th>Mult</th><th>DataTypes</th><th>Notes</th></tr>
<tr ng-repeat="item in canonical.item" ng-class="{myRequired:item.min==1,borderTop:item.groupParent}">
<!-- <tr ng-repeat="item in canonical.item"
ng-class="{myRequired:item.min==1,extension:item.extension}"> -->
<td>
<!--<span ng-show="item.min==1" style="color: red">R</span>-->
<strong ng-show="item.extension" style="color: darkblue">Ext</strong>
</td>
<td ng-click="showED(item.ed)" style="cursor: pointer">
<div ng-style="{ 'padding-left': (item.path | pathindent) -10 }">
{{item.path}}
</div>
</td>
<td>{{item.min}}..{{item.max}}</td>
<td>
<div ng-repeat="typ in item.type">
<div ng-show="typ.code == 'Reference'">
--> {{typ.profile | referenceType}} {{typ.targetProfile | referenceType}}<!-- The filter takes the first entry if an array-->
</div>
<div ng-hide="typ.code == 'Reference'">{{typ.code}}</div>
</div>
</td>
<td>
<div>{{item.extension.name}}</div>
<div ng-show="item.extension.url" class="clickable" ng-click="selectExtensionFromProfile(item.extension)">
Ext: {{item.extension.url}}</div>
<div ng-show="item.extension.analysis.isComplexExtension">
<table class="table">
<tr ng-class="{myRequired:child.min==1}" ng-repeat="child in item.extension.analysis.children">
<td>{{child.code}}</td>
<td>
<div ng-repeat="typ in child.ed.type">
{{typ.code}}
</div>
</td>
<td>{{child.min}}..{{child.max}}</td>
<td><div ng-repeat="typ in child.type">
{{typ.code}}
</div></td>
<td>
<span class="clickable" ng-click="showValueSet(child.boundValueSet,'uri')">
{{child.boundValueSet}}
</span>
</td>
<td>{{child.bindingStrength}} </td>
</tr>
</table>
<!--
<pre>{{item.extension.analysis | json}}</pre>
-->
</div>
<!-- If a coded item...-->
<div ng-show="item.coded.valueSetUri">
VS:
<span class="clickable" ng-click="showValueSet(item.coded.valueSetReference,'uri')">
{{item.coded.valueSetUri}}
</span>
</div>
<!-- if a coded simple extension -->
<div ng-show="item.extension.analysis.binding">
<span class="clickable" ng-click="showValueSet(item.extension.analysis.boundValueSet,'uri')">
VS: {{item.extension.analysis.boundValueSet}}
</span>
</div>
<div ng-show="item.coded.valueSetReference">
Reference:
<span class="clickable" ng-click="showValueSet(item.coded.valueSetReference,'ref')">
{{item.coded.valueSetReference}}
</span>
</div>
<div ng-show="item.coded.strength">Strength {{item.coded.strength}}</div>
<div ng-repeat="discriminator in item.slicing.discriminator">
Sliced Element: Discriminator = {{discriminator}}
</div>
<div ng-repeat="fixed in item.fixed">
{{fixed.k}} = {{fixed.v}}
</div>
<!--
<pre>{{item.extension.analysis | json}}</pre>
-->
</td>
</tr>
</table>
</div>
</uib-tab>
<uib-tab heading="Required Elements">
<br/>
<div class="row">
<div class="col-sm-8 col-md-8">
<table>
<tr ng-repeat="req in profileReport.required">
<td>{{req.path}}</td>
</tr>
</table>
</div>
<div class="col-sm-4 col-md-4">
</div>
</div>
</uib-tab>
<uib-tab heading="ValueSets used">
<br/>
<div class="row">
<div class="col-sm-12 col-md-12">
<table class="table">
<tr><th>ValueSet</th><th>Paths & Binding Strength</th></tr>
<tr ng-repeat="item in profileReport.valueSetArray">
<td width="40%"><span class="clickable" ng-click="showValueSet(item.url)">{{item.url}}</span> </td>
<td>
<table width="100%">
<tr ng-repeat="row in item.paths">
<td>{{row.path}} ({{row.min}}..{{row.max}})</td>
<td width="15%">{{row.strength}}</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</uib-tab>
<uib-tab heading="Tree">
<div class="row">
<div class="col-sm-4 col-md-4">
<div class="myScroll">
<div id="profileTree"></div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<pre>{{selectedED | json}}</pre>
</div>
</div>
</uib-tab>
<uib-tab heading="Paths">
<div class="row">
<div class="col-sm-4 col-md-4">
<ul class="list-group">
<li class="list-group-item" ng-repeat="element in selectedSD.snapshot.element"
ng-click = "input.selectedPathED = element">
{{element.path}}
</li>
</ul>
</div>
<div class="col-sm-8 col-md-8">
<pre>{{input.selectedPathED | json}}</pre>
</div>
</div>
</uib-tab>
<uib-tab heading="Json">
<div class="row">
<div class="col-sm-12 col-md-12">
<pre>{{selectedSD | json}}</pre>
</div>
</div>
</uib-tab>
</uib-tabset>
</div>
<div ng-show="selectedItemType == 'extension'">
<h4>Extension: {{selectedExtension.url}}</h4>
<uib-tabset>
<uib-tab heading="Analysis">
<br/>
<pre>{{selectedExtensionAnalysis | json}}</pre>
</uib-tab>
<uib-tab heading="Json">
<br/>
<pre>{{selectedExtension | json}}</pre>
</uib-tab>
</uib-tabset>
</div>
<div ng-show="selectedItemType == 'terminology'">
<h4>Terminology</h4>
<uib-tabset>
<uib-tab heading="Analysis">
<br/>
</uib-tab>
<uib-tab heading="Json">
<br/>
<pre>{{selectedValueSet | json}}</pre>
</uib-tab>
</uib-tabset>
</div>
</div>
</div>
</uib-tab>
<uib-tab heading="Profile Comparison">
<div class="row">
<div class="col-sm-6 col-md-6">
<h3>Primary profile ({{primary.display}})</h3>
<uib-tabset>
<uib-tab heading="Model">
<div class="myScroll">
<table class="table">
<tr ng-repeat="item in primary.canonical.item"
ng-class="{myRequired:item.min==1,extension:item.extension}">
<td ng-click="showED(item.ed)" style="cursor: pointer">{{item.path}}</td>
<td>{{item.min}}..{{item.max}}</td>
<td>
<div ng-repeat="typ in item.type">
{{typ.code}}
</div>
</td>
<td>
<div>{{item.extension.name}}</div>
<div>{{item.extension.url}}</div>
<div ng-show="item.coded.valueSetUri">Uri: {{item.coded.valueSetUri}}</div>
<div ng-show="item.coded.valueSetReference">Ref: {{item.coded.valueSetReference}}</div>
<div>{{item.coded.strength}}</div>
</td>
</tr>
</table>
</div>
</uib-tab>
<uib-tab heading="Json">
<pre>{{primary.json | json}}</pre>
</uib-tab>
</uib-tabset>
</div>
<div class="col-sm-6 col-md-6">
<h3>Secondary profile ({{secondary.display}})</h3>
<uib-tabset>
<uib-tab heading="Model">
<div class="myScroll">
<table class="table">
<tr ng-repeat="item in secondary.canonical.item "
ng-class="{myRequired:item.min==1,extension:item.extension}" >
<td style="cursor: pointer" ng-click="showED(item.ed)">{{item.path}}</td>
<td>{{item.min}}..{{item.max}}</td>
<td>
<div ng-repeat="typ in item.type">
{{typ.code}}
</div>
</td>
<td>
<div>{{item.extension.name}}</div>
<div>{{item.extension.url}}</div>
<div ng-show="item.coded.valueSetUri">Uri: {{item.coded.valueSetUri}}</div>
<div ng-show="item.coded.valueSetReference">Ref: {{item.coded.valueSetReference}}</div>
<div>{{item.coded.strength}}</div>
</td>
<td>
<span ng-show="item.difference.nip" title="Not in primary">
<i class="glyphicon glyphicon-remove"></i></span>
<span ng-show="item.difference.brk" title="Not in primary - required field">
<i class="glyphicon glyphicon-remove-sign"></i></span>
<span ng-show="item.difference.mc" title="Multiplicity is different">
<i class="glyphicon glyphicon-random"></i></span>
<span ng-show="item.difference.vsd" title="ValueSet is different">
<i class="glyphicon glyphicon-chevron-down"></i></span>
</td>
</tr>
</table>
</div>
</uib-tab>
<uib-tab heading="Tree">
<div id="pdSecondary"></div>
</uib-tab>
<uib-tab heading="Json">
<pre>{{secondary.json | json}}</pre>
</uib-tab>
<uib-tab heading="Canonical">
<pre>{{secondary.canonical | json}}</pre>
</uib-tab>
</uib-tabset>
</div>
</div>
</uib-tab>
<uib-tab heading="Report">
<div class="row">
<div class="col-sm-2 col-md-2">
</div>
<div class="col-sm-10 col-md-10">
<h4>ValueSets</h4>
<table class="table table-bordered table-condensed">
<tr ng-repeat = "item in secondary.canonical.report.valueSet">
<td>{{item.path}}</td>
<td>{{item.different}}</td>
<td>{{item.vsUri}}</td>
<td>{{item.vsReference}}</td>
</tr>
</table>
<h4>Path's in secondary not in primary</h4>
<table class="table table-bordered table-condensed">
<tr ng-repeat = "item in secondary.canonical.report.missing">
<td>{{item.path}}</td>
<td>{{item.min}}</td>
<td>{{item.extension}}</td>
</tr>
</table>
<h4>Fixed values in the secondary</h4>
<table class="table table-bordered table-condensed">
<tr ng-repeat = "item in secondary.canonical.report.fixed">
<!--<td><pre>{{item | json}}</pre></td> -->
<td>{{item.item.path}}</td>
<td>{{item.item.difference.fixed.key}}</td>
<td>{{item.item.difference.fixed.value}}</td>
</tr>
</table>
<pre>{{secondary.canonical.report.fixed | json}}</pre>
</div>
</div>
</uib-tab>
</uib-tabset>
<vs-browser trigger="showVSBrowserDialog" hidesearch="true"
vs-selected="vsSelected"></vs-browser>
</div>
</body>
</html>