forked from Gaduo/FHIRSampleCreator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
codeSystem.html
367 lines (272 loc) · 12.8 KB
/
codeSystem.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
<!DOCTYPE html>
<html>
<head lang="en">
<base href="/" />
<meta charset="UTF-8">
<script src="js/libs/angular.min1-5.js"></script>
<script src="js/libs/ui-bootstrap-tpls-2.0.1.min.js"></script>
<script src="js/libs/lodash.core.js"></script>
<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"/>
<script src="js/libs/angular-sanitize.js"></script>
<style>
.myLabel {
vertical-align: middle;
}
.myMargin {
margin-bottom: 8px;
}
</style>
<script>
angular.module("sampleApp",['ui.bootstrap','ngStorage','ngSanitize']).config(function($locationProvider) {
// enable html5Mode for pushstate ('#'-less URLs)
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
});
angular.module("sampleApp").constant("moment", moment);
</script>
<script src="js/codeSystem.js"></script>
<script src="js/modalDialogSvc.js"></script>
<script src="js/appConfigSvc.js"></script>
<script src="js/libs/ngStorage.min.js"></script>
<script src="js/autoFocus.js"></script>
<script src="js/components/dataTypes.js"></script>
<script src="resourceBuilder/rbServices.js"></script>
<!--
<script src="js/services.js"></script>
<script src="js/resourceCreatorSvc.js"></script>
<script src="js/filters.js"></script>
<script src="js/documentBuilder.js"></script>
<script src="js/reporterCtrl.js"></script>
<script src="js/libs/ngStorage.min.js"></script>
<script src="js/profileCreatorSvc.js"></script>
-->
<title>CodeSystem editor</title>
</head>
<body style="padding: 8px;padding-top:80px">
<div ng-app="sampleApp" ng-controller="codeSystemCtrl" class="container-fluid">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid-row">
<div class="col-md-3 col-sm-3">
<span class="navbar-brand" href="#"
uib-popover-html="displayServers"
popover-trigger="'mouseenter'"
popover-placement="right">
CodeSystem Builder
</span>
<!--
<a class="navbar-brand" href="#">
clinFHIR CodeSystem Editor
</a>
-->
</div>
<div class="col-md-3 col-sm-3">
</div>
<div class="col-md-3 col-sm-3">
<div class="pull-right navbar-form" ng-show="waiting">
<img src="css/ajax_loader_blue_32.gif"/>
</div>
</div>
<div class="col-md-3 col-sm-3">
<form class="navbar-form navbar-right">
<div class="form-group" ng-hide="isDirty" >
<button class="btn btn-primary pull-right" ng-hide="state=='find' || state=='preview'"
ng-click="state='find'">Find</button>
<button class="btn btn-default" ng-show="state=='find' || state=='preview'" ng-click="newCS()">New</button>
<!-- <button class="btn btn-default" ng-hide="isDirty" ng-click="newCS()">New</button>-->
</div>
<div class="form-group" ng-show="isDirty" >
<button class="btn btn-danger pull-right" ng-show="isDirty" ng-click="saveCS()">Save</button>
<button class="btn btn-link" ng-click="cancelUpdate()">Cancel</button>
</div>
</form>
</div>
</div>
</nav>
<!-- ------------------------- Find ---------------------->
<div class="row" ng-show="state == 'find' || state == 'preview'">
<div class="col-md-6 col-sm-6">
<h5>Find CodeSystem</h5>
<div class="row">
<div class="col-md-5 col-sm-5">
<strong>Name</strong>
</div>
<div class="col-md-5 col-sm-5">
<strong>Publisher</strong>
</div>
<div class="col-md-2 col-sm-2">
</div>
</div>
<div class="row">
<div class="col-md-5 col-sm-5">
<input type="text" ng-model="input.searchName"
autocapitalize="off"
class="form-control" placeholder="Search text for name"/>
</div>
<div class="col-md-5 col-sm-5">
<input type="text" ng-model="input.searchPublisher"
autocapitalize="off"
class="form-control" placeholder="Search text for publisher"/>
</div>
<div class="col-md-2 col-sm-2">
<button class="btn btn-link" ng-click="searchForCS(input.searchName,input.searchPublisher)">Find</button>
</div>
</div>
<br/>
<div>{{url}}</div>
<div uib-alert class="alert-warning" ng-show="message">
{{message}}
</div>
<div uib-alert class="alert-info" ng-hide="searchResultBundle.entry">
Enter a search string into the text box above and click 'Find'.
The app will find all CodeSystems where the string you enter is in the name of the CodeSystem.
<br /><br />
Alternatively, click the 'New' button at the top right to create a new CodeSystem.
</div>
<div class="list-group">
<div href="#" ng-class="{'list-group-item':true, active:entry.resource.id == input.cs.id}"
style="cursor: pointer" ng-repeat="entry in searchResultBundle.entry"
ng-click="previewCS(entry.resource)">
{{entry.resource.name}} ({{entry.resource.id}})
<div style="margin-left: 10px"><em>{{entry.resource.description}}</em></div>
</div>
</div>
<!--
<div class="row display-row" ng-repeat="entry in searchResultBundle.entry" style="margin-bottom: 5px">
<div class="col-md-8 col-sm-8">
<div ng-click="selectVs(entry.resource)">
{{entry.resource.name}} ({{entry.resource.id}})
<div style="margin-left: 10px"><em>{{entry.resource.description}}</em></div>
</div>
</div>
<div class="col-md-4 col-sm-4">
<button class="btn btn-link" ng-click="input.vspreview=entry.resource">JSON</button>
<button class="btn btn-link" ng-click="selectCS(entry.resource)">Select</button>
</div>
</div>
-->
</div>
<div class="col-md-6 col-sm-6">
<button ng-show="isAuthoredByClinFhir" ng-click="editCS()" class="btn btn-link pull-right">Edit</button>
<uib-tabset ng-show="cs.concept.length > 0">
<uib-tab heading="Contents">
<table class="table table-bordered">
<tr><th>Code</th><th>Display</th><th>Definition</th></tr>
<tr ng-repeat="concept in cs.concept">
<td>{{concept.code}}</td>
<td>{{concept.display}}</td>
<td>{{concept.definition}}</td>
</tr>
</table>
</uib-tab>
<uib-tab heading="Json">
<pre>{{cs| json}}</pre>
</uib-tab>
<uib-tab heading="Version 2 ValueSet">
<div class="row" style="padding: 8px">
<div class="col-md-3 col-sm-3">
<strong>Copy to v2 server</strong>
</div>
<div class="col-md-6 col-sm-6">
<select class="form-control" ng-model="input.v2server"
ng-options="svr.name for svr in appConfigSvc.getAllServers(2)">
</select>
</div>
<div class="col-md-3 col-sm-3">
<button class="btn btn-danger" ng-show="input.v2server" ng-click="copyV2VS(input.v2server)">Copy ValueSet</button>
</div>
</div>
<pre>{{v2ValueSet | json}}</pre>
</uib-tab>
</uib-tabset>
</div>
</div>
<!-- ------------------------- Edit or show ---------------------->
<div class="row" ng-show="state=='edit' || state=='show'">
<div class="col-md-6 col-sm-6">
<div class="banner">Metadata</div>
<uib-tabset>
<uib-tab heading="Text">
<br/>
<div class="row myMargin">
<div class="col-md-3 col-sm-3">
<div class="myLabel">CodeSystem Url</div>
</div>
<div class="col-md-9 col-sm-9">
<div>{{cs.url}}</div>
</div>
</div>
<div class="row myMargin">
<div class="col-md-3 col-sm-3">
<div class="myLabel">ValueSet Url</div>
</div>
<div class="col-md-9 col-sm-9">
<div>{{cs.valueSet}}</div>
</div>
</div>
<div class="row myMargin">
<div class="col-md-3 col-sm-3">
<div class="myLabel">Name</div>
</div>
<div class="col-md-9 col-sm-9">
<div>{{cs.name}}</div>
<!--<input class="form-control" ng-model="cs.name"/>-->
</div>
</div>
<div class="row myMargin">
<div class="col-md-3 col-sm-3">
<div class="myLabel">Description</div>
</div>
<div class="col-md-9 col-sm-9">
<textarea class="form-control" ng-model="cs.description" ng-blur="changeDescription()"></textarea>
</div>
</div>
</uib-tab>
<uib-tab heading="Json">
<br/>
<pre>{{cs | json}}</pre>
</uib-tab>
</uib-tabset>
</div>
<div class="col-md-6 col-sm-6">
<div class="banner">Contents</div>
<table class="table table-bordered">
<tr><th>Code</th><th>Display</th><th>Definition</th><th ng-show="isAuthoredByClinFhir">Action</th></tr>
<tr ng-repeat="concept in cs.concept">
<td>{{concept.code}}</td>
<td>{{concept.display}}</td>
<td>{{concept.definition}}</td>
<td ng-show="isAuthoredByClinFhir">
<i class="glyphicon glyphicon-arrow-down" ng-show="$index < cs.concept.length-1"
title="Move Down"
ng-click="moveConcept($index,'dn')" style="cursor: pointer">
</i>
<i class="glyphicon glyphicon-arrow-up" ng-show="$index > 0"
title="Move Up"
ng-click="moveConcept($index,'up')" style="cursor: pointer">
</i>
<i class="glyphicon glyphicon-remove"
title="Delete"
ng-click="removeConcept($index)" style="cursor: pointer">
</i>
</td>
</tr>
<tr ng-show="isAuthoredByClinFhir">
<td><input class="form-control" ng-model="input.code" placeholder="Code"/> </td>
<td><input class="form-control" ng-model="input.display" placeholder="Display"/> </td>
<td><textarea class="form-control" ng-model="input.definition" placeholder="Definition"></textarea> </td>
<td width="15%">
<i class="glyphicon glyphicon-plus"
title="Add concept"
ng-click="addConcept()" style="cursor: pointer">
</i>
</td>
</tr>
</table>
</div>
</div>
<br/>
</div>
</body>
</html>