-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
158 lines (153 loc) · 6.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DICOM Web Query</title>
<!-- 引入 Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="./oauth.js"></script>
<script src="utils.js"></script>
<script src="dicomQueries.js"></script>
<script src="fhirConversion.js"></script>
<script src="uiHelpers.js"></script>
<script src="main.js"></script>
<!-- 其他現有的 head 內容 -->
<script src="https://cdn.jsdelivr.net/npm/json-formatter-js@2.3.4/dist/json-formatter.umd.min.js"></script>
<style>
#json-result {
max-height: 500px;
overflow-y: auto;
background-color: #f8f9fa;
padding: 15px;
border-radius: 5px;
font-family: 'Courier New', Courier, monospace;
}
.json-formatter-row {
margin-left: 20px;
border-left: 1px solid #ddd;
padding-left: 5px;
}
.json-formatter-row:hover {
background-color: #f0f0f0;
}
/* 鍵名稱 */
.json-formatter-key {
color: #881391;
font-weight: bold;
}
/* 字符串值 */
.json-formatter-string {
color: #268bd2;
}
/* 數字值 */
.json-formatter-number {
color: #d33682;
}
/* 布爾值 */
.json-formatter-boolean {
color: #b58900;
}
/* null 值 */
.json-formatter-null {
color: #6c71c4;
}
/* 可展開的物件和陣列 */
.json-formatter-row .json-formatter-row > a > .json-formatter-bracket {
color: #2aa198;
font-weight: bold;
}
/* 展開/收起圖標 */
.json-formatter-toggler:after {
content: "▶";
font-size: 0.8em;
margin-right: 6px;
color: #586e75;
}
.json-formatter-toggler.json-formatter-open:after {
content: "▼";
}
/* 為每個層級添加不同的左邊框顏色 */
.json-formatter-row .json-formatter-row {
border-left-color: #cb4b16;
}
.json-formatter-row .json-formatter-row .json-formatter-row {
border-left-color: #dc322f;
}
.json-formatter-row .json-formatter-row .json-formatter-row .json-formatter-row {
border-left-color: #d33682;
}
</style>
</head>
<body class="bg-light">
<div class="container mt-5">
<h1 class="text-center mb-4">DICOM Web Query to FHIR ImagingStudy</h1>
<div class="card p-4 shadow-sm">
<div class="mb-3">
<label for="dicom-url" class="form-label">DICOM Web URL:</label>
<input type="text" class="form-control" id="dicom-url" value="https://raccoon.dicom.org.tw/dicom-web">
</div>
<div class="mb-3">
<label for="patient-id" class="form-label">Patient ID:</label>
<input type="text" class="form-control" id="patient-id">
</div>
<div class="mb-3">
<label for="study-uid" class="form-label">Study Instance UID:</label>
<input type="text" class="form-control" id="study-uid">
</div>
<div class="mb-3">
<label for="accession-number" class="form-label">Accession Number:</label>
<input type="text" class="form-control" id="accession-number">
</div>
<button class="btn btn-primary w-100 mb-3" onclick="queryStudies()">查詢 Studies</button>
<div class="mt-4">
<ul class="nav nav-tabs" id="resultTabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="study-list-tab" data-bs-toggle="tab" data-bs-target="#study-list-content" type="button" role="tab" aria-controls="study-list-content" aria-selected="true">查詢結果</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="fhir-result-tab" data-bs-toggle="tab" data-bs-target="#fhir-result-content" type="button" role="tab" aria-controls="fhir-result-content" aria-selected="false">FHIR ImagingStudy 結果</button>
</li>
</ul>
<div class="tab-content" id="resultTabsContent">
<div class="tab-pane fade show active" id="study-list-content" role="tabpanel" aria-labelledby="study-list-tab">
<ul id="study-list" class="list-group mt-3"></ul>
<nav aria-label="Page navigation" class="mt-3">
<ul class="pagination justify-content-center">
<li class="page-item">
<button class="page-link" onclick="changePage(-1)">上一頁</button>
</li>
<li class="page-item">
<span class="page-link" id="current-page">1</span>
</li>
<li class="page-item">
<button class="page-link" onclick="changePage(1)">下一頁</button>
</li>
</ul>
</nav>
<div class="mt-3 text-center">
<label for="items-per-page" class="form-label">每頁顯示筆數:</label>
<select class="form-select d-inline-block w-auto" id="items-per-page" onchange="changeItemsPerPage()">
<option value="10">10</option>
<option value="20">20</option>
<option value="50">50</option>
</select>
</div>
</div>
<div class="tab-pane fade" id="fhir-result-content" role="tabpanel" aria-labelledby="fhir-result-tab">
<div class="d-flex justify-content-end mb-2">
<button id="copy-result" class="btn btn-secondary btn-sm">複製結果</button>
</div>
<div id="json-result" class="mt-3"></div>
</div>
</div>
</div>
</div>
</div>
<!-- 引入 Bootstrap JS 和 Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
<style>
/* 移除了 .json-viewer 相關的樣式 */
</style>
</body>
</html>