-
Notifications
You must be signed in to change notification settings - Fork 8
/
conceptmap.html
295 lines (269 loc) · 17.1 KB
/
conceptmap.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
<!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>ConceptMap | 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">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 is-active-tab">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>ConceptMap tutorial</h4>
<p><a href="http://hl7.org/fhir/STU3/conceptmap.html">ConceptMap</a> is a FHIR resource that allows you to establish a one-way map between codes. We'll use latter as an example in this tutorial to demonstrate how two concepts can be related (mapped) to each other and how their equivalence (or lack of) can be specified.</p>
<note>This describes ConceptMap as it is in the <a href="http://hl7.org/fhir/STU3/conceptmap.html">FHIR STU3</a></note>
<ul class="toc">
<h4>Contents</h4>
<!-- pr prefix stands for 'patient references'-->
<a href="#cm-about-conceptmap">Step 1: About ConceptMap</a>
<a href="#cm-sample-data-mapping">Step 2: Sample data mapping</a>
<a href="#cm-sample-resource">Step 3: Sample resources</a>
<a href="#cm-advanced-features">Step 4: Advanced features</a>
<a href="#cm-translate-operation">Step 5: $translate operation</a>
</ul>
<h5 id="cm-about-conceptmap">Step 1: About ConceptMap</h5>
<p>The <a href="http://hl7.org/fhir/STU3/conceptmap.html">ConceptMap</a> resource in general has <a href="images/conceptmap-overview.png" data-lightbox="conceptmap-overview">four parts</a> to it:
<p>
<li>Metadata about the resource</li>
<li>The source of the data</li>
<li>The target the data is mapped to, and </li>
<li>The groups of mappings themselves:</li>
</p>
<a href="images/conceptmap-overview.png" data-lightbox="conceptmap-overview"><img src="images/conceptmap-overview-thumbnail.png" class="thumbnail"/></a>
<p><b>Metadata</b> describes general information about the mapping - who made it, what version it is, copyright...etc.</p>
<p><b>Source</b> is a reference to the ValueSet that you are mapping from. Remember that ConceptMap is a one-way mapping so there's always a clear source and a target.</p>
<p><b>Target</b> is similar to source - it is a reference to the ValueSet you are mapping to.</p>
<p><b>Mappings</b> are the translations themselves, organised in groups. Each mapping (called an 'element' in the data) can have one or more <b>target</b> elements, which specify a connection between a code from one ValueSet to code(s) in another ValueSet. The type/strength of connection is described by the <b>equivalence</b> property. The equivalence expresses that the two elements are exactly the same, wider than, narrower than or the two concepts aren't related at all. The full list of equivalence values is available in the <a href="http://hl7.org/fhir/STU3/valueset-concept-map-equivalence.html">ConceptMap Equivalence</a> ValueSet.</p>
<h5 id="cm-sample-data-mapping">Step 2: Sample data mapping</h5>
<p>As an example, let's say you have a (very poorly designed) ValueSet based on a CodeSystem representing employee presence at work with just three codes: present, not-present, and sick which is in use by your system. You start importing data from a new system which has finer granularity:</p>
<table class="table-fill">
<tr>
<th>Current valueset</th>
<th>New system's valueset</th>
</tr>
<tr>
<td>present</td>
<td>in-office</td>
</tr>
<tr>
<td>not-present</td>
<td>away-travelling</td>
</tr>
<tr>
<td>sick</td>
<td>working-from-home</td>
</tr>
<tr>
<td></td>
<td>annual-leave</td>
</tr>
<tr>
<td></td>
<td>personal-leave</td>
</tr>
<tr>
<td></td>
<td>jury-duty</td>
</tr>
</table>
<p>Your task is to create a FHIR ConceptMap translating the codes your receive to codes you already have, making use of the available <a href="http://hl7.org/fhir/STU3/valueset-concept-map-equivalence.html">equivalence</a> values. You come up with this sample mapping that maps in the direction from the new system to your system's ValueSet:</p>
<table class="table-fill">
<tr>
<th>New system's valueset</th>
<th>Current valueset</th>
<th>Equivalence code</th>
</tr>
<tr>
<td>in-office</td>
<td>present</td>
<td>equal</td>
</tr>
<tr>
<td>away-travelling</td>
<td>not-present</td>
<td>wider</td>
</tr>
<tr>
<td>working-from-home</td>
<td>not-present</td>
<td>wider</td>
</tr>
<tr>
<td>annual-leave</td>
<td>not-present</td>
<td>wider</td>
</tr>
<tr>
<td>personal-leave</td>
<td>sick</td>
<td>equal</td>
</tr>
<tr>
<td>jury-duty</td>
<td>not-present</td>
<td>wider</td>
</tr>
<tr>
<td>away-travelling</td>
<td>present</td>
<td>disjoint</td>
</tr>
</table>
<h5 id="cm-sample-resource">Step 3: Sample resources</h5>
<p>A sample <a href="resource-examples/ConceptMap-resources/ConceptMap.xml">ConceptMap</a> resource containing these mappings is available. The supporting <a href="resource-examples/ConceptMap-resources/Codesystem.xml">CodeSystem</a>, <a href="resource-examples/ConceptMap-resources/Old-ValueSet.xml">old ValueSet</a> and <a href="resource-examples/ConceptMap-resources/New-ValueSet.xml">new ValueSet</a> are available as well.</p>
<p>Press the button below to upload these resources to the FHIR server!</p>
<p>
<center>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" id="conceptmap-button">
Upload</button>
<br>
<div id="conceptmap-progress" class="mdl-progress mdl-js-progress" style="display: none;"></div>
</center>
</p>
<p>The ConceptMap resource will be available at this URL:</p>
<note class="conceptmap-location-full" id="cm-conceptmap"><i>(press Upload to get a ConceptMap)</i></note>
<p>Once uploaded, it'll look something <a href="images/conceptmap-in-postman.png" data-lightbox="conceptmap-in-postman">like this</a>when you GET the ConceptMap via Postman.</p>
<h5 id="cm-advanced-features">Step 4: Advanced features</h5>
<p>ConceptMap is actually pretty powerful, and besides the basic code-to-code mapping described above, it also supports the following usecases:</p>
<ul>
<li>Mapping one code to many codes at once given the same equivalence property (by utilising multiple <a href="http://hl7.org/fhir/STU3/conceptmap-definitions.html#ConceptMap.group.element.target">target</a> properties within one <a href="http://hl7.org/fhir/STU3/conceptmap-definitions.html#ConceptMap.group.element">element</a> property)</li>
<li>Having a dependency for a mapping, a mapping could only be applicable if a selected element exists in the data and has the specified value (see <a href="http://hl7.org/fhir/STU3/conceptmap-definitions.html#ConceptMap.group.element.target.dependsOn">dependsOn</a>)</li>
</ul>
<h5 id="cm-translate-operation">Step 5: $translate operation</h5>
<p>The <a href="http://hl7.org/fhir/STU3/conceptmap-operations.html#translate">$translate</a> operation allows you to utilise a FHIR terminology server to get an equivalent code as specified by a ConceptMap mapping. To use it, you need to provide the ConceptMap you'd like to use, the input code and its CodeSystem, and the valueset you'd like to get a translation from. Try the <a href="http://hl7.org/fhir/STU3/conceptmap-operations.html#translate">$translate</a> operation on the four sample resources uploaded above (a CodeSystem, two ValueSets, and a ConceptMap) via Postman using this template:</p>
<p><code>https://ontoserver.csiro.au/stu3-latest/ConceptMap/ConceptMap/servers-conceptmap-id/$translate?code=my-code&system=codes-codesystem&target=target-valueset</code></p>
<p>Here's a sample code you could try, once you've uploaded your conceptmap to a terminology server of choice:</p>
<p><code>https://ontoserver.csiro.au/stu3-latest/ConceptMap/a912ee54-30e8-4a1a-8f2a-1a4337aaf69c/$translate?code=in-office&system=urn:uuid:bb6efb79-2b93-4569-a51e-6fcf103b6e9a&target=urn:uuid:a5f94e22-ddba-474e-80e3-b067d9c27a55</code></p>
<p>That's it! You're done for now.</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>
<!-- supporting javascript to actually do the uploading -->
<script src="js/post-resources.js"></script>
</body>
</html>