-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsimple-search.html
More file actions
353 lines (293 loc) · 27.5 KB
/
Copy pathsimple-search.html
File metadata and controls
353 lines (293 loc) · 27.5 KB
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
<!doctype html>
<!--
FHIR Drills
Copyright 2016 Australian Digital Health Agency. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="FHIR Tutorials by the Australian Digital Health Agency to help you understand FHIR and its spec! No technical experience required.">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>Simple Search | FHIR® tutorials</title>
<!-- Add to homescreen for Chrome on Android -->
<!-- <meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="images/android-desktop.png"> -->
<!-- Add to homescreen for Safari on iOS -->
<!-- <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Material Design Lite">
<link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png"> -->
<!-- Tile icon for Win8 (144x144 + tile color) -->
<!-- <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
<meta name="msapplication-TileColor" content="#3372DF"> -->
<link rel="shortcut icon" href="images/favicon.ico">
<!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
<!--
<link rel="canonical" href="http://www.example.com/">
-->
<!-- CodeMirror -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.13.4/codemirror.min.css"></link>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.3.0/material.deep_purple-pink.min.css">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="css/language-switcher.css">
<style>
#view-source {
position: fixed;
display: block;
right: 0;
bottom: 0;
margin-right: 40px;
margin-bottom: 40px;
z-index: 900;
}
</style>
<link href="css/lightbox.min.css" rel="stylesheet">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-80290058-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body class="mdl-demo mdl-color--grey-100 mdl-color-text--grey-700 mdl-base lang-en">
<!-- The drawer is always open in large screens. The header is always shown,
even in small screens. -->
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer
mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<div class="mdl-layout-spacer"></div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
mdl-textfield--floating-label mdl-textfield--align-right">
<label class="mdl-button mdl-js-button mdl-button--icon"
for="fixed-header-drawer-exp">
<i class="material-icons">search</i>
</label>
<div class="mdl-textfield__expandable-holder">
<input class="mdl-textfield__input" type="text" name="sample"
id="fixed-header-drawer-exp">
</div>
</div>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">
<span class="lang-content lang-en">FHIR<sup>®</sup> tutorials</span>
<span class="lang-content lang-ru">FHIR<sup>®</sup> уроки</span>
</span>
<nav class="mdl-navigation">
<a href="./index.html" class="mdl-navigation__link">
<span class="lang-content lang-en">Overview</span>
<span class="lang-content lang-ru">Обзор</span>
</a>
<a href="./simple-patient.html" id="simple-patient" class="mdl-navigation__link">
<span class="lang-content lang-en">Simple Patient</span>
<span class="lang-content lang-ru">Пациент </span>
</a>
<a href="./simple-search.html" id="simple-search" class="mdl-navigation__link is-active-tab">
<span class="lang-content lang-en">Simple Search</span>
<span class="lang-content lang-ru">Поиск</span>
</a>
<a href="./patient-with-references.html" id="patient-with-references" class="mdl-navigation__link">
<span class="lang-content lang-en">Patient with References</span>
<span class="lang-content lang-ru">Пациент со ссылками</span>
</a>
<a href="./bundle.html" id="bundle" class="mdl-navigation__link">
<span class="lang-content lang-en">Bundle</span>
<span class="lang-content lang-ru">Пакет</span>
</a>
<a href="./operations.html" id="operations" class="mdl-navigation__link">
<span class="lang-content lang-en">Operations</span>
<span class="lang-content lang-ru">Операции</span>
</a>
<a href="./ValueSet-And-CodeSystem.html" id="ValueSet-And-CodeSystem" class="mdl-navigation__link">
<span class="lang-content lang-en">ValueSet & CodeSystem</span>
<span class="lang-content lang-ru">ValueSet и CodeSystem</span>
</a>
<a href="./conceptmap.html" id="conceptmap" class="mdl-navigation__link">
<span class="lang-content lang-en">ConceptMap</span>
<span class="lang-content lang-ru">ConceptMap</span>
</a>
<a href="./fhir-api.html" id="conceptmap" class="mdl-navigation__link">
<span class="lang-content lang-en">FHIR APIs</span>
<span class="lang-content lang-ru">FHIR API</span>
</a>
<a href="#" class="mdl-navigation__link"></a>
<a href="./exercises.html" class="mdl-navigation__link">
<span class="lang-content lang-en">FHIR exercises</span>
<span class="lang-content lang-ru">FHIR упражнения</span>
</a>
</nav>
</div>
<main class="mdl-layout__content">
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp">
<div class="mdl-card mdl-cell mdl-cell--12-col-desktop mdl-cell--6-col-tablet mdl-cell--4-col-phone">
<div class="mdl-card__supporting-text">
<!-- English Content -->
<div class="lang-content lang-en">
<h4>Simple Search</h4>
<p>This tutorial will build on the foundation laid out in the <a href="./simple-patient.html">Simple Patient</a> tutorial to introduce searching against FHIR resources.</p>
<ul class="toc">
<h4>Contents</h4>
<!-- pr prefix stands for 'patient references'-->
<a href="#ss-step1">Step 1: Name Searching</a>
<a href="#ss-step2">Step 2: Extended Search</a>
<a href="#ss-step3">Step 3: Search Parameter Types</a>
</ul>
<h5 id="ss-step1">Step 1: Name Searching</h5>
<p>Let's start with the simplest of searches, a patient's family name search.</p>
<p>The <a href="./simple-patient.html">Simple Patient</a> tutorial uploaded a Patient resource for a <b>Mr Sam Fhirman</b>. Let's try and find that Patient resource by searching on family name. To do this we need to construct a URL starting with the <b><code>[Service Root URL]</code></b> followed by the resource type <b>Patient</b>, a question mark character '<b>?</b>' and finished with the search parameters we wish to search with <b>family=Fhirman</b> in this case.</p>
<p>Perform this search in your Postman client using he Http verb <b>GET</b>. Now, take a few minutes to examine the result returned:</p>
<p><code id="fhir-server"></code><code>/Patient<b>?family=fhirman</b></code></p>
<p>Did you notice that you received a <b>Bundle</b> resource in return? When you perform a search you are more than likely to receive many resource matching your search. In FHIR, search results are always returned as a <b>Bundle</b>. A <b>Bundle</b> is used in FHIR to gather a collection of resource into a single instance. The reason there are so many <b>Mr Sam Fhirman</b> Patient resources is due to every student taking part in the <a href="./simple-patient.html">Simple Patient</a> tutorial uploading their own instance of the same patient. <i>This may explain why our PAS team is so busy with duplicate patient merging.</i> Of course this should not be the case in the real world. <i>Although the PAS team may have another opinion.</i></p>
<p>Don't worry about knowing the structure of the Bundle resource extensively - we'll go over Bundles shortly in our <a href="bundle.html">Bundle</a> tutorial.</p>
<h5 id="ss-step2">Step 2: Extended Search</h5>
<p>In the previous step we searched by the patient's family name, but what else can we search upon? The search parameters you can use are Resource type dependant. Each resource type defines the parameters which you can search upon it. Right click and open the <b><a href="http://hl7.org/fhir/R4/patient.html">Patient</a></b> resource page in a second browser tab and scroll to the very bottom of the page. Here you will find the list of possible search parameters for the Patient resource. Take a look at some other resource types and the search parameters they define.</p>
<p>In the previous tutorial, <a href="./simple-patient.html">Simple Patient</a>, you should have created a new patient resource with your own name as the patient's name. Try and find that resource using your own surname and first name. <i>Remember to reference the FHIR specification to work out which search parameters you will need.</i></p>
<h5 id="ss-step3">Step 3: Search Parameter Types</h5>
<p>The searches we have done so far, family & given, were on simple string datatypes. FHIR defines eight different search datatypes as follows: </p>
<p>
<li><a href="http://hl7.org/fhir/R4/search.html#number">Number</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#date">Date/DateTime</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#string">String</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#token">Token</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#reference">Reference</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#composite">Composite</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#quantity">Quantity</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#uri">URI</a></li>
</p>
<p>Each and every search parameter on each resource page also defines the search parameter data type it uses. The screenshot below is taken from the Patient resource page. Notice that <b>given</b> uses <b>string</b> in column two and that <b>identifier</b> uses datatype <b>token</b>.</p>
<p><img src="images/PatientSearchParameter-SimpleSearch.PNG" width="100%"></p>
<b><a href="http://hl7.org/fhir/R4/search.html#number">FHIR specification Search page</a></b>
<h6><b>Using the references above try and answer these questions:</b></h6>
<li>What datatype does the search parameter <b>length</b> use on the <b>Encounter</b> resource?</li>
<br>
<li>Using the references above try and find the patient with an <b>old</b> address in the suburb of <b>'Erinsborough'</b>?</li>
<br>
<li>Try and find the patient name for the person with an IHI (Individual Health Identifier) of '<b>8003601043886154</b>'?</li>
<br>
<p>These few questions have focused on the <b>token</b> search parameter datatype but I strongly encourage you to read then entire <a href="http://hl7.org/fhir/R4/search.html#uri">Search</a> page in the FHIR specification at a later date.</p>
</div>
<!-- Russian Content -->
<div class="lang-content lang-ru">
<h4>Поиск</h4>
<p>Этот урок будет основываться на фундаменте, заложенном в уроке <a href="./simple-patient.html">Пациент</a>, чтобы представить поиск по ресурсам FHIR.</p>
<ul class="toc">
<h4>Содержание</h4>
<a href="#ss-step1">Шаг 1: Поиск по имени</a>
<a href="#ss-step2">Шаг 2: Расширенный поиск</a>
<a href="#ss-step3">Шаг 3: Типы параметров поиска</a>
</ul>
<h5 id="ss-step1">Шаг 1: Поиск по имени</h5>
<p>Начнем с самого простого поиска - поиска по фамилии пациента.</p>
<p>В уроке <a href="./simple-patient.html">Пациент</a> был загружен ресурс Patient для <b>г-на Сэма Файрмэна</b>. Давайте попробуем найти этот ресурс Patient, выполнив поиск по фамилии. Для этого нам нужно построить URL, начинающийся с <b><code>[Service Root URL]</code></b>, за которым следует тип ресурса <b>Patient</b>, символ вопроса '<b>?</b>' и заканчивающийся параметрами поиска, с которыми мы хотим искать <b>family=Fhirman</b> в данном случае.</p>
<p>Выполните этот поиск в вашем клиенте Postman, используя HTTP-глагол <b>GET</b>. Сейчас, потратьте несколько минут на изучение возвращенного результата:</p>
<p><code id="fhir-server-ru"></code><code>/Patient<b>?family=fhirman</b></code></p>
<p>Заметили ли вы, что в ответ получили ресурс <b>Bundle</b>? Когда вы выполняете поиск, вы, скорее всего, получите много ресурсов, соответствующих вашему поиску. В FHIR результаты поиска всегда возвращаются как <b>Bundle</b>. <b>Bundle</b> используется в FHIR для сбора коллекции ресурсов в один экземпляр. Причина, по которой существует так много ресурсов Patient <b>г-на Сэма Файрмэна</b>, заключается в том, что каждый студент, участвующий в уроке <a href="./simple-patient.html">Пациент</a>, загружает свой собственный экземпляр того же пациента. <i>Это может объяснить, почему наша команда PAS так занята объединением дублирующихся пациентов.</i> Конечно, этого не должно быть в реальном мире. <i>Хотя команда PAS может иметь другое мнение.</i></p>
<p>Не беспокойтесь о том, чтобы обширно знать структуру ресурса Bundle - мы вскоре рассмотрим Bundle в нашем уроке <a href="bundle.html">Bundle</a>.</p>
<h5 id="ss-step2">Шаг 2: Расширенный поиск</h5>
<p>На предыдущем шаге мы искали по фамилии пациента, но по чему еще мы можем искать? Параметры поиска, которые вы можете использовать, зависят от типа ресурса. Каждый тип ресурса определяет параметры, по которым вы можете искать в нем. Щелкните правой кнопкой мыши и откройте страницу ресурса <b><a href="http://hl7.org/fhir/R4/patient.html">Patient</a></b> во второй вкладке браузера и прокрутите до самого низа страницы. Здесь вы найдете список возможных параметров поиска для ресурса Patient. Посмотрите на некоторые другие типы ресурсов и параметры поиска, которые они определяют.</p>
<p>В предыдущем уроке <a href="./simple-patient.html">Пациент</a> вы должны были создать новый ресурс пациента с вашим собственным именем в качестве имени пациента. Попробуйте найти этот ресурс, используя вашу собственную фамилию и имя. <i>Не забудьте обратиться к спецификации FHIR, чтобы выяснить, какие параметры поиска вам понадобятся.</i></p>
<h5 id="ss-step3">Шаг 3: Типы параметров поиска</h5>
<p>Поиски, которые мы делали до сих пор, family и given, были по простым строковым типам данных. FHIR определяет восемь различных типов данных поиска следующим образом: </p>
<p>
<li><a href="http://hl7.org/fhir/R4/search.html#number">Число</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#date">Дата/Время</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#string">Строка</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#token">Токен</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#reference">Ссылка</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#composite">Составной</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#quantity">Количество</a></li>
<li><a href="http://hl7.org/fhir/R4/search.html#uri">URI</a></li>
</p>
<p>Каждый параметр поиска на каждой странице ресурса также определяет тип данных параметра поиска, который он использует. Скриншот ниже взят со страницы ресурса Patient. Обратите внимание, что <b>given</b> использует <b>string</b> во втором столбце, а <b>identifier</b> использует тип данных <b>token</b>.</p>
<p><img src="images/PatientSearchParameter-SimpleSearch.PNG" width="100%"></p>
<b><a href="http://hl7.org/fhir/R4/search.html#number">Страница поиска спецификации FHIR</a></b>
<h6><b>Используя приведенные выше ссылки, попробуйте ответить на эти вопросы:</b></h6>
<li>Какой тип данных использует параметр поиска <b>length</b> в ресурсе <b>Encounter</b>?</li>
<br>
<li>Используя приведенные выше ссылки, попробуйте найти пациента со <b>старым</b> адресом в пригороде <b>'Erinsborough'</b>?</li>
<br>
<li>Попробуйте найти имя пациента для человека с IHI (Individual Health Identifier) '<b>8003601043886154</b>'?</li>
<br>
<p>Эти несколько вопросов были сосредоточены на типе данных параметра поиска <b>token</b>, но я настоятельно рекомендую вам прочитать всю страницу <a href="http://hl7.org/fhir/R4/search.html#uri">Поиск</a> в спецификации FHIR позже.</p>
</div>
</div>
</section>
<footer class="mdl-mega-footer">
<div class="mdl-mega-footer--middle-section">
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">
<span class="lang-content lang-en">The Agency</span>
<span class="lang-content lang-ru">Агентство</span>
</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="https://www.digitalhealth.gov.au/">digitalhealth.gov.au</a></li>
<li><a href="https://myhealthrecord.gov.au/internet/mhr/publishing.nsf/content/home" title="Australian national health record">
<span class="lang-content lang-en">My Health Record</span>
<span class="lang-content lang-ru">Моя медицинская карта</span>
</a></li>
</ul>
</div>
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">FHIR</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="https://confluence.hl7.org/spaces/FHIR/pages/391191767/2026-01+Connectathon+41" title="Virtual FHIR Connectathon, January 13-15, 2026">Connectathon 41</a></li>
<li><a href="http://hl7.org/fhir/R4" title="FHIR R4 Release">FHIR R4 Release</a></li>
<li><a href="http://build.fhir.org/" title="The latest FHIR as it is in development">FHIR Continuous Integration Build</a></li>
</ul>
</div>
<!-- Language Selector -->
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">
<span class="lang-content lang-en">Language</span>
<span class="lang-content lang-ru">Язык</span>
</h1>
<div class="language-selector">
<select id="language-dropdown" class="lang-dropdown" onchange="switchLanguage(this.value)">
<option value="en">English</option>
<option value="ru" title="Russian language support for Central Asian countries adopting FHIR">Русский</option>
</select>
</div>
</div>
</div>
</footer>
</main>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.13.4/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.13.4/mode/xml/xml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.14.2/mode/javascript/javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.3.0/material.min.js"></script>
<script src="js/lightbox-plus-jquery.min.js"></script>
<!-- lua.vm.js -->
<script src="js/lua.vm.js/dist/lua.vm.js"></script>
<!-- main javascript for this page-->
<script src="js/main.js"></script>
<script>
$( document ).ready((document) => {
$("#fhir-server").html("<span> " + servers.hapiFhirR4 + "</<span>");
$("#fhir-server-ru").html("<span> " + servers.hapiFhirR4 + "</<span>");
});
</script>
<script src="js/language-switcher.js"></script>
<!-- supporting javascript to actually do the uploading -->
<script src="js/post-resources.js"></script>
</body>
</html>