-
Notifications
You must be signed in to change notification settings - Fork 8
/
simple-search.html
231 lines (190 loc) · 14.8 KB
/
simple-search.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
<!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://code.getmdl.io/1.1.3/material.deep_purple-pink.min.css">
<link rel="stylesheet" href="styles.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">
<!-- 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">FHIR<sup>®</sup> tutorials</span>
<nav class="mdl-navigation">
<a href="./index.html" class="mdl-navigation__link">Overview</a>
<a href="./simple-patient.html" id="simple-patient" class="mdl-navigation__link">Simple Patient</a>
<a href="./simple-search.html" id="simple-search" class="mdl-navigation__link is-active-tab">Simple Search</a>
<a href="./patient-with-references.html" id="patient-with-references" class="mdl-navigation__link">Patient with References</a>
<a href="./bundle.html" id="bundle" class="mdl-navigation__link">Bundle</a>
<a href="./operations.html" id="operations" class="mdl-navigation__link">Operations</a>
<a href="./ValueSet-And-CodeSystem.html" id="ValueSet-And-CodeSystem" class="mdl-navigation__link">ValueSet & CodeSystem</a>
<a href="./conceptmap.html" id="conceptmap" class="mdl-navigation__link">ConceptMap</a>
<a href="./fhir-api.html" id="conceptmap" class="mdl-navigation__link">FHIR APIs</a>
<a href="#" class="mdl-navigation__link"></a>
<a href="./exercises.html" class="mdl-navigation__link">FHIR exercises</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">
<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/STU3/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/STU3/search.html#number">Number</a></li>
<li><a href="http://hl7.org/fhir/STU3/search.html#date">Date/DateTime</a></li>
<li><a href="http://hl7.org/fhir/STU3/search.html#string">String</a></li>
<li><a href="http://hl7.org/fhir/STU3/search.html#token">Token</a></li>
<li><a href="http://hl7.org/fhir/STU3/search.html#reference">Reference</a></li>
<li><a href="http://hl7.org/fhir/STU3/search.html#composite">Composite</a></li>
<li><a href="http://hl7.org/fhir/STU3/search.html#quantity">Quantity</a></li>
<li><a href="http://hl7.org/fhir/STU3/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/STU3/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/STU3/search.html#uri">Search</a> page in the FHIR specification at a later date.</p>
</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">The Agency</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">My Health Record</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="http://wiki.hl7.org/index.php?title=FHIR_Connectathon_15" title="Next FHIR get-together in Madrid in May 2017">Connectathon 15</a></li>
<li><a href="http://hl7.org/fhir/STU3" title="Latest release of FHIR, for use in Madrid Connectathon">FHIR STU3 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>
</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://code.getmdl.io/1.1.3/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.wildfhir3 + "</<span>");
});
</script>
<!-- supporting javascript to actually do the uploading -->
<script src="js/post-resources.js"></script>
</body>
</html>