-
Notifications
You must be signed in to change notification settings - Fork 3
/
greenPanda.html
442 lines (438 loc) · 32.9 KB
/
greenPanda.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
<!-- Icon -->
<title>RedPanda2</title>
<!-- CSS -->
<link href="../css/external/boostrap-5.2.0/bootstrap.min.css" rel="stylesheet" />
<link href="../css/external/MDB5-STANDARD-UI-KIT-Free-5.0.0/mdb.min.css" rel="stylesheet" />
<link href="../css/external/fontawesome-free-6.2.0-web/fontawesome.min.css" rel="stylesheet">
<link href="../css/external/fontawesome-free-6.2.0-web/brands.min.css" rel="stylesheet">
<link href="../css/external/fontawesome-free-6.2.0-web/solid.min.css" rel="stylesheet">
<link href="../css/external/sweetalert2.min.css" rel="stylesheet">
<link href="../css/greenPanda.css" rel="stylesheet">
<link rel="icon" href="../img/RedPanda.jpg">
</head>
<body>
<div id="app" class="container-fluid h-100 px-0" v-cloak>
<!-- settingTable -->
<nav class="navbar navbar-expand-md navbar-light bg-light">
<div class="container-fluid">
<!-- Logo -->
<div class="navbar-brand">
<div id='settingLogo' class="d-inline-block" onclick="location.href=location.origin + location.pathname">
<img id='icon' src="../img/RedPanda.jpg" class="rounded me-1">
<h2 class="text-danger fw-bold d-inline align-bottom">RedPanda</h2>
</div>
</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<i class="fa-regular fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- For desktop -->
<div id='settingBar' class="d-none d-md-block me-2">
<div class="input-group">
<input type="text" class="form-control rounded-start" v-model="requestURL" disabled placeholder="Please set search settings...">
<button id="searchBtn" class="btn btn-success rounded-end" type="button" data-mdb-ripple-color="dark" @click="getFHIR()">
<i class="fa-solid fa-magnifying-glass"></i>
</button>
</div>
</div>
<div id='settingBtns' class="d-none d-md-block">
<ul class="nav nav-tabs nav-fill" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link p-3" id="settingBtns-tab-1" data-mdb-toggle="offcanvas" data-mdb-target="#SearchParamOffcanvas" role="tab" aria-controls="settingBtns-tabs-1" aria-selected="true">
<i class="fa-regular fa-gear me-2"></i>Setting
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link p-3" id="settingBtns-tab-2" data-mdb-toggle="offcanvas" data-mdb-target="#DisplaySettingOffcanvas" role="tab" aria-controls="settingBtns-tabs-3" aria-selected="false">
<i class="fa-solid fa-list me-2"></i>Display
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link p-3" id="settingBtns-tab-3" data-mdb-toggle="modal" data-mdb-target="#CreateModal" role="tab" aria-controls="settingBtns-tabs-2" aria-selected="false">
<i class="fa-regular fa-file-circle-plus me-2"></i>Create
</button>
</li>
</ul>
</div>
<!-- For mobile -->
<div class="d-md-none me-2">
<div class="input-group mt-2">
<input type="text" class="form-control rounded-start" v-model="requestURL" disabled placeholder="Please set search settings...">
<button id="searchBtn" class="btn btn-success rounded-end" type="button" data-mdb-ripple-color="dark" @click="getFHIR()">
<i class="fa-solid fa-magnifying-glass"></i>
</button>
</div>
</div>
<div class="d-md-none">
<ul class="nav nav-tabs nav-fill" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link p-3" id="settingBtns-tab-1" data-mdb-toggle="offcanvas" data-mdb-target="#SearchParamOffcanvas" role="tab" aria-controls="settingBtns-tabs-1" aria-selected="true">
<i class="fa-regular fa-gear me-2"></i>Setting
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link p-3" id="settingBtns-tab-2" data-mdb-toggle="offcanvas" data-mdb-target="#DisplaySettingOffcanvas" role="tab" aria-controls="settingBtns-tabs-3" aria-selected="false">
<i class="fa-solid fa-list me-2"></i>Display
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link p-3" id="settingBtns-tab-3" data-mdb-toggle="modal" data-mdb-target="#CreateModal" role="tab" aria-controls="settingBtns-tabs-2" aria-selected="false">
<i class="fa-regular fa-file-circle-plus me-2"></i>Create
</button>
</li>
</ul>
</div>
</div>
</div>
</nav>
<!-- resultTable -->
<div id="resultTable" class="text-center rounded bg-light px-3">
<div class="row">
<!-- Console -->
<!-- for desktop -->
<div class="col-12 mb-2 d-none d-md-block pt-4" v-if="requestStatus">
<h3 class="float-start">
{{requestStatus.resource}}:<span class="text-uppercase">{{requestStatus.method}} {{requestStatus.status}}</span>
</h3>
<a class="btn btn-sm btn-info float-start ms-3" :href="requestStatus.url" target="_blank">
<i class="fa-regular fa-up-right-from-square me-2"></i>View
</a>
<button class="btn btn-sm btn-primary float-start ms-2" @click="downLoadJSON(-1, setting.resource)" :class="{'disabled': Object.keys(requestResult).length==0}">
<i class="fa-solid fa-download me-2"></i>download
</button>
<div class="btn-group btn-group-sm float-end ms-2">
<button class="btn btn-secondary fw-bold" :disabled="!requestStatus.link.previous" @click="getFHIR(requestStatus.link.previous)"><i class="fa-solid fa-angle-left me-1"></i>Prev</button>
<button class="btn btn-outline-secondary fw-bold" :disabled="!requestStatus.link.self" @click="getFHIR(requestStatus.link.self)">{{requestStatus.page.now}} / {{requestStatus.page.total}}</button>
<button class="btn btn-secondary fw-bold" :disabled="!requestStatus.link.next" @click="getFHIR(requestStatus.link.next)">Next<i class="fa-solid fa-angle-right ms-1"></i></button>
</div>
<strong class="float-end mt-1">Total {{(requestResult.total) ? (requestResult.total) : '0'}} rows</strong>
</div>
<!-- for mobile -->
<div class="col-12 mb-2 d-md-none pt-2" v-if="requestStatus">
<div class="row">
<div class="col-12">
{{requestStatus.resource}}:<span class="text-uppercase">{{requestStatus.method}} {{requestStatus.status}}</span>
<small>( total {{(requestResult.total) ? (requestResult.total) : '0'}} rows )</small>
</div>
<div class="col-12 mb-2 text-center">
<a class="btn btn-sm btn-info" :href="requestStatus.url" target="_blank">
<i class="fa-regular fa-up-right-from-square me-2"></i>View
</a>
<button class="btn btn-sm btn-primary ms-1" @click="downLoadJSON(-1, setting.resource)">
<i class="fa-solid fa-download me-2"></i>download
</button>
</div>
<div class="col-12 mb-2 text-center">
<div class="btn-group btn-group-sm">
<button class="btn btn-secondary fw-bold" :disabled="!requestStatus.link.previous" @click="getFHIR(requestStatus.link.previous)"><i class="fa-solid fa-angle-left me-1"></i>Prev</button>
<button class="btn btn-outline-secondary fw-bold" :disabled="!requestStatus.link.self" @click="getFHIR(requestStatus.link.self)">{{requestStatus.page.now}} / {{requestStatus.page.total}}</button>
<button class="btn btn-secondary fw-bold" :disabled="!requestStatus.link.next" @click="getFHIR(requestStatus.link.next)">Next<i class="fa-solid fa-angle-right ms-1"></i></button>
</div>
</div>
</div>
</div>
<!-- Display -->
<div class="col-12">
<div v-html="resultDisplay"></div>
</div>
<!-- Error info-->
<div class="col-12" v-if="requestStatus && requestStatus.errorInfo">
<div class="alert alert-danger" v-for="err of requestStatus.errorInfo">
<i class="fa-regular fa-circle-exclamation me-2"></i>
<strong class="text-capitalize">{{err.code}}</strong>
<strong class="text-uppercase ms-1">{{err.severity}}:</strong>
<span v-html="err.diagnostics"></span>
</div>
</div>
</div>
</div>
<!-- SearchParamOffcanvas -->
<div class="offcanvas offcanvas-start" tabindex="-1" id="SearchParamOffcanvas">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="exampleModalLabel">Search Setting</h5>
<button type="button" class="btn-close" data-mdb-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="container-fluid">
<div class="row">
<div class="col-12 mb-3">
<label class="col-form-label col-form-label-sm fw-bold">Server</label>
<div class="input-group">
<input type="text" class="form-control form-control-sm" v-model="setting.server" @change="upFhirServer">
<button class="btn btn-sm btn-outline-secondary" @click="setting.server=''"><i class="fa-solid fa-xmark"></i></button>
</div>
</div>
<div class="col-12 mb-3">
<label class="col-form-label col-form-label-sm fw-bold">Resource / ID</label>
<div class="input-group">
<select class="form-control form-control-sm toggle" v-model="setting.resource" @change="setting.id='';searchParameter.list=[];displayParameter._sort={key: '',order: true}">
<option v-for='resource in resourceList'>{{resource}}</option>
</select>
<input type="text" class="form-control form-control-sm" v-model="setting.id" @change="upFhirServer">
<button class="btn btn-sm btn-outline-secondary" @click="setting.id=''"><i class="fa-solid fa-xmark"></i></button>
</div>
</div>
<div class="col-12 mb-3">
<label class="col-form-label col-form-label-sm fw-bold">Token</label>
<div class="input-group">
<input type="text" class="form-control form-control-sm" v-model="setting.token" @change="upFhirServer">
<label class="btn btn-sm btn-outline-secondary" @click="setting.token=''"><i class="fa-solid fa-xmark"></i></label>
</div>
</div>
<!-- Setting paramters -->
<div class="col-12">
<label class="col-form-label col-form-label-sm fw-bold">Parameters:</label>
</div>
<div class="col-12">
<div class="input-group">
<!-- Key -->
<select class="form-control" v-model="searchParameter.key" :disabled="setting.id!=''" data-bs-toggle="tooltip" :title="getParameterType(setting.resource,searchParameter.key)">
<option class='d-none' value="" default>Choose...</option>
<optgroup :label="setting.resource">
<option v-for="opt in Object.keys(config.SearchParameter[setting.resource])" data-bs-toggle="tooltip" data-bs-placement="top" :title="config.SearchParameter[setting.resource][opt].description">{{opt}}</option>
</optgroup>
<optgroup label="Common">
<option v-for="opt in Object.keys(config.SearchParameter['_common'])" data-bs-toggle="tooltip" data-bs-placement="top" :title="config.SearchParameter['_common'][opt].description">{{opt}}</option>
</optgroup>
</select>
<!-- Modifier -->
<button class="btn btn-sm btn-outline-secondary" data-mdb-toggle="dropdown" :disabled="setting.id!=''" v-html="searchParameter.modifier.display">
</button>
<ul class="dropdown-menu">
<li>
<button class="dropdown-item" @click="searchParameter.modifier=searchParameter.modifierDefault">None</button>
</li>
<li v-for="(attr, key) in getParameterModifier(setting.resource ,searchParameter.key)">
<button class="dropdown-item" @click="searchParameter.modifier=attr" data-bs-toggle="tooltip" :title="attr.description" v-html="attr.display"></button>
</li>
</ul>
<!-- Value -->
<input type="number" class="form-control" v-model="searchParameter.value" :disabled="setting.id!=''" v-if="getParameterType(setting.resource,searchParameter.key)=='number'">
<input type="date" class="form-control" v-model="searchParameter.value" :disabled="setting.id!=''" v-else-if="getParameterType(setting.resource,searchParameter.key)=='date'">
<input type="text" class="form-control" v-model="searchParameter.value" :disabled="setting.id!=''" v-else=>
<!-- Add buttoon -->
<button type="button" class="btn btn-sm btn-success" @click="addSearchParameter()" :disabled="setting.id!=''">
<i class="fa-solid fa-plus"></i>
</button>
</div>
</div>
<!-- Paramters table-->
<div class="col-12 mt-3" v-for="(param, index) in searchParameter.list" v-if="setting.id==''">
<div class="input-group">
<!-- Key -->
<select class="form-control" v-model="param.key">
<option class='d-none' value="" default>Choose...</option>
<optgroup :label="setting.resource">
<option v-for="opt in Object.keys(config.SearchParameter[setting.resource])" data-bs-toggle="tooltip" data-bs-placement="top" :title="config.SearchParameter[setting.resource][opt].description">{{opt}}</option>
</optgroup>
<optgroup label="Common">
<option v-for="opt in Object.keys(config.SearchParameter['_common'])" data-bs-toggle="tooltip" data-bs-placement="top" :title="config.SearchParameter['_common'][opt].description">{{opt}}</option>
</optgroup>
</select>
<!-- Modifier -->
<button class="btn btn-sm btn-outline-secondary" data-mdb-toggle="dropdown" v-html="param.modifier.display">
</button>
<ul class="dropdown-menu">
<li>
<button class="dropdown-item" @click="param.modifier=searchParameter.modifierDefault">None</button>
</li>
<li v-for="(attr, key) in getParameterModifier(setting.resource ,param.key)">
<button class="dropdown-item" @click="param.modifier=attr" data-bs-toggle="tooltip" :title="attr.description" v-html="attr.display"></button>
</li>
</ul>
<!-- Value -->
<input type="number" class="form-control" v-model="param.value" :disabled="setting.id!=''" v-if="getParameterType(setting.resource,param.key)=='number'">
<input type="date" class="form-control" v-model="param.value" :disabled="setting.id!=''" v-else-if="getParameterType(setting.resource,param.key)=='date'">
<input type="text" class="form-control" v-model="param.value" :disabled="setting.id!=''" v-else=>
<!-- Remove buttoon -->
<button type="button" class="btn btn-sm btn-danger" @click="rmSearchParameter(index)"><i class="fa-solid fa-minus"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- DisplaySettingOffcanvas -->
<div class="offcanvas offcanvas-start" tabindex="-1" id="DisplaySettingOffcanvas">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="exampleModalLabel">Display Setting</h5>
<button type="button" class="btn-close" data-mdb-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="container-fluid">
<div class="row">
<div class="col-12 mb-3">
<label class="col-form-label col-form-label-sm fw-bold">Display rows:{{displayParameter._count}}</label>
<div class="input-group">
<input type="range" class="form-range" min="1" max="200" v-model="displayParameter._count">
</div>
</div>
<div class="col-12 mb-3">
<label class="col-form-label col-form-label-sm fw-bold">Sort by</label>
<div class="input-group">
<select class="form-control" v-model="displayParameter._sort.key">
<option value="" default>None</option>
<option v-for="opt in Object.keys(config.SearchParameter[setting.resource])" data-bs-toggle="tooltip" data-bs-placement="top" :title="config.SearchParameter[setting.resource][opt].description">{{opt}}</option>
</select>
<button class="btn btn-primary px-3" type="button" data-mdb-ripple-color="dark" @click="displayParameter._sort.order=!displayParameter._sort.order">
<i class="fa-regular fa-arrow-up-a-z" v-if="displayParameter._sort.order"></i>
<i class="fa-regular fa-arrow-down-z-a" v-if="!displayParameter._sort.order"></i>
</button>
</div>
</div>
<!-- Setting paramters -->
<div class="col-12">
<label class="col-form-label col-form-label-sm fw-bold">Other</label>
</div>
<div class="col-12">
<div class="input-group">
<select class="form-control" v-model="displayParameter.key" required>
<option class='d-none' value="" default>Choose...</option>
<option v-for="opt in Object.keys(config.SearchParameter['_result'])" data-bs-toggle="tooltip" data-bs-placement="top" :title="config.SearchParameter['_result'][opt].description">{{opt}}</option>
</select>
<button class="btn btn-sm btn-outline-secondary"><i class="fa-solid fa-equals"></i></button>
<input type="text" class="form-control" v-model="displayParameter.value" required>
<button type="submit" class="btn btn-sm btn-success" @click="addDisplayParameter()"><i class="fa-solid fa-plus"></i></button>
</div>
</div>
<!-- Display paramters -->
<div class="col-12 mt-3" v-for="(param, index) in displayParameter.list">
<div class="input-group">
<input type="text" class="form-control form-control-sm" v-model="param.key" readonly>
<button class="btn btn-sm btn-outline-secondary"><i class="fa-solid fa-equals"></i></button>
<input type="text" class="form-control form-control-sm" v-model="param.value">
<button class="btn btn-sm btn-danger" @click="rmDisplayParameter()"><i class="fa-solid fa-minus"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- ViewModal -->
<div class="modal fade" id="ViewModal" tabindex="-1">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" v-html="viewModal.title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<div class="container-flued">
<div class="row">
<div class="col-12 mb-2">
<!-- Tabs navs -->
<ul class="nav nav-tabs mb-3" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="viewModalNavTab_table" data-mdb-toggle="tab" data-mdb-target="#viewModalNavTable" role="tab">
<i class="fa-regular fa-table me-2"></i>Table
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="viewModalNavTab_json" data-mdb-toggle="tab" data-mdb-target="#viewModalNavJson" role="tab">
<i class="fa-regular fa-list-ul me-2"></i>Json
</button>
</li>
<li class="nav-item" role="presentation" :class="{'d-none':!viewModal.editData}">
<button class="nav-link" id="viewModalNavTab_edit" data-mdb-toggle="tab" data-mdb-target="#viewModalNavEdit" role="tab">
<i class="fa-regular fa-pen-to-square me-2"></i>Edit
</button>
</li>
</ul>
<!-- Tabs navs -->
<!-- Tabs content -->
<div class="tab-content">
<div class="tab-pane fade show active table-responsive" id="viewModalNavTable" v-html='viewModal.table'></div>
<div class="tab-pane fade" id="viewModalNavJson">
<pre class='text-start bg-light p-2' v-html="viewModal.data"></pre>
</div>
<div class="tab-pane fade" id="viewModalNavEdit" :class="{'d-none':!viewModal.editData}">
<button class="btn btn-sm btn-info float-start mb-2" @click="viewModal.editData = jsonToStr(viewModal.editData)"><i class="fa-regular fa-align-justify me-2"></i>Format</button>
<button class="btn btn-sm btn-primary float-start mb-2 ms-2" onclick="viewModalImportFile.click()"><i class="fa-regular fa-file-import me-2"></i>Import</button>
<input type="file" class="d-none" id="viewModalImportFile" accept="application/json" @change="importViewModalJSON" />
<button class="btn btn-sm btn-success float-end mb-2 ms-2" @click="putFHIR(viewModal.data, viewModal.editData)"><i class="fa-regular fa-check me-2"></i>Update</button>
<button class="btn btn-sm btn-warning float-end mb-2" @click="viewModal.editData = JSON.stringify(viewModal.data, null, 4)"><i class="fa-regular fa-rotate-right me-2"></i>Reset</button>
<textarea class="form-control bg-light" rows="20" v-model='viewModal.editData'></textarea>
</div>
</div>
</div>
<div class="col-12" v-html="viewModal.body"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- CreateModal-->
<div class="modal fade" id="CreateModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Create data</h5>
<button type="button" class="btn-close" data-mdb-dismiss="modal"></button>
</div>
<div class="modal-body">
<div class="container-flued">
<div class="row gx-3">
<div class="col-12 col-md-4 mb-3">
<label class="col-form-label col-form-label-sm fw-bold">Server</label>
<div class="input-group">
<input type="text" class="form-control form-control-sm" v-model="setting.server" @change="upFhirServer">
<button class="btn btn-sm btn-outline-secondary" @click="setting.server=''"><i class="fa-solid fa-xmark"></i></button>
</div>
</div>
<div class="col-12 col-md-4 mb-3">
<label class="col-form-label col-form-label-sm fw-bold">Resource / ID</label>
<div class="input-group">
<select class="form-control form-control-sm toggle" v-model="setting.resource" @change="searchParameter.list=[];displayParameter._sort={key: '',order: true}">
<option v-for='resource in resourceList'>{{resource}}</option>
</select>
</div>
</div>
<div class="col-12 col-md-4 mb-3">
<label class="col-form-label col-form-label-sm fw-bold">Token (optional)</label>
<div class="input-group">
<input type="text" class="form-control form-control-sm" v-model="setting.token" @change="upFhirServer">
<label class="btn btn-sm btn-outline-secondary" @click="setting.token=''"><i class="fa-solid fa-xmark"></i></label>
</div>
</div>
<div class="col-12">
<label class="col-form-label col-form-label-sm fw-bold">Data</label>
<button class="btn btn-sm btn-link float-start ms-2 float-end p-2" @click="createModal.data = ''"><i class="fa-regular fa-trash-can me-2"></i>Clear</button>
<button class="btn btn-sm btn-link float-start ms-2 float-end p-2" @click="createModal.data = jsonToStr(createModal.data)"><i class="fa-regular fa-align-justify me-2"></i>Format</button>
<button class="btn btn-sm btn-link float-start float-end p-2" onclick="createModalImportFile.click()"><i class="fa-regular fa-file-import me-2"></i>Import</button>
<input type="file" class="d-none" id="createModalImportFile" accept="application/json" @change="importCreateModalJSON" />
<textarea class="form-control bg-light" rows="10" v-model='createModal.data'></textarea>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-mdb-dismiss="modal">Close</button>
<button type="button" class="btn btn-success" @click="postFHIR()" :class="{'disabled': !createModal.data}">Create</button>
</div>
</div>
</div>
</div>
</div>
<!-- Other -->
<button id="btn-back-to-top" class="btn btn-warning btn-floating"><i class="fa-regular fa-arrow-up"></i></button>
<!-- Scripts -->
<script type="text/javascript" src="../js/external/bootstrap-5.2.0/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src="../js/external/MDB5-STANDARD-UI-KIT-Free-5.0.0/mdb.min.js"></script>
<script type="text/javascript" src="../js/external/fontawesome-free-6.2.0-web/fontawesome.min.js"></script>
<script type="text/javascript" src="../js/external/fontawesome-free-6.2.0-web/brands.min.js"></script>
<script type="text/javascript" src="../js/external/fontawesome-free-6.2.0-web/solid.min.js"></script>
<script type="text/javascript" src="../js/external/sweetalert2.all.min.js"></script>
<script type="text/javascript" src="../js/external/axios/axios.min.js"></script>
<script type="text/javascript" src="../js/external/vue.min.js"></script>
<script type="module" src="../js/greenPanda.js"></script>
</body>
</html>