-
Notifications
You must be signed in to change notification settings - Fork 4
/
ePI_template.xml
193 lines (193 loc) · 8.58 KB
/
ePI_template.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a template for a FHIR resource, and needs items (marked with "${}") replacing to make a real instance [template comment] --><!-- The resulting instance is a Bundle of Bundles, each of which is a document (having a Composition, and supporting resources) [template comment] --><!-- 2020-09-14 post consultation
removed "relatesTo" never used
added list entry flag (document type) and an extension for language [template comment] --><!-- This is for FHIR version R5 Preview 2 (May 2020) --><!-- This is an Envelope Bundle example --><Bundle xmlns="http://hl7.org/fhir">
<type value="transaction"/>
<!-- timestamp possible future use for a business time (but see also meta.lastUpdated - which is the resource time) -->
<!--timestamp></timestamp> -->
<!-- one document bundle list, covers all the documents -->
<entry>
<fullUrl value="${instance.listFullUrlUrnUuid}"/>
<resource>
<!-- This is a PI List. It says this PI set has one document in it -->
<List>
<status value="current"/>
<mode value="working"/>
<!-- repeat per document Bundle -->
<entry>
<flag> <!-- flag is used to give the type of document -->
<coding>
<system value="http://spor.ema.europa.eu/v1/100000155531"/>
<code value="${instance.bundle[n].documentTypeCode}"/>
<display value="${instance.bundle[n].documentTypeDisplay}"/>
</coding>
</flag>
<item>
<extension url="http://ema.europa.eu/fhir/extension/language">
<valueCoding>
<system value="http://spor.ema.europa.eu/v1/100000072057"/>
<code value="${instance.bundle[n].languageCode}"/>
<display value="${instance.bundle[n].languageDisplay}"/>
</valueCoding>
</extension>
<!-- matches fullUrl of the Nth Bundle [template comment] -->
<reference value="${instance.bundle[n].fullUrlUrnUuid}"/>
</item>
</entry>
</List>
</resource>
<request>
<method value="POST"/>
<url value="List"/>
</request>
</entry>
<!-- Repeat this per document -->
<entry>
<fullUrl value="${instance.bundle[n].fullUrlUrnUuid}"/>
<!-- Top level of each document is a also FHIR Bundle, of type "document"
see http://hl7.org/fhir/documents.html, http://hl7.org/fhir/bundle.html
All the other resources for this document are within this. -->
<resource>
<Bundle>
<!-- When PUTing, some servers mandate an id here to match the existing id -->
<!--id value="${instance.bundle[n].idUuid}"/-->
<!-- document bundles must have an identifier (bdl-9) -->
<identifier>
<!-- possibly different identifier types may be needed here -->
<system value="http://ema.europa.eu/fhir/identifier/documentid"/>
<value value="${instance.bundle[n].Identifier}"/>
</identifier>
<!-- fixed code -->
<type value="document"/>
<!-- document bundles must have a date (bdl-10) -->
<timestamp value="${document[n].authoringDateTime}"/>
<!-- a repeating set of entry elements, each with a FHIR resource inside -->
<entry>
<!-- fullUrl is mandatory for each entry in document Bundle. It is a random uuid. http://build.fhir.org/bundle.html#bundle-unique -->
<fullUrl value="${instance.bundle[n].compositionFullUrlUuid}"/>
<resource>
<!-- the first resource must be Composition (bdl-11) -->
<!-- This is the overall document structure. -->
<!-- see definition http://hl7.org/fhir/composition.html, and similar for other resources -->
<Composition>
<!-- images if required within html text of this document -->
<contained>
<Binary>
<id value="${document[n].image[n].id}"/>
<!-- example format -->
<contentType value="${document[n].image[n].mediaType}"/>
<!-- data is base 64 encoded, actual bytes of the image png file -->
<data value="${document[n].image[n].base64data}"/>
</Binary>
</contained>
<!-- this exension is necessary per image -->
<extension url="http://ema.europa.eu/fhir/extension/dummyValidationReference">
<valueReference>
<reference value="#${document[n].image[n].id}"/>
</valueReference>
</extension>
<status value="final"/>
<!-- document type -->
<type>
<coding>
<system value="https://spor.ema.europa.eu/v1/lists/100000155531"/>
<code value="${document[n].documentTypeCode}"/>
<display value="${document[n].documentTypeDisplay}"/>
</coding>
</type>
<subject>
<extension url="https://ema.europa.eu/fhir/extension/domain">
<valueCoding>
<system value="https://spor.ema.europa.eu/v1/100000000004"/>
<code value="${instance.bundle[n].domainCode}"/>
<display value="${instance.bundle[n].domainDisplay}"/>
</valueCoding>
</extension>
<!--extension url="http://ema.europa.eu/fhir/extension/medicine-name">
<valueString value="Karvea" />
</extension-->
<!-- links to the List resource in this bundle -->
<!-- uuid url format -->
<reference value="${instance.bundle[n].listUuid}"/>
<!-- local url format [template comment] -->
<!--reference value="List/${instance.bundle[n].listId}"/ [template comment] -->
<display value="${instance.bundle[n].productName}"/>
</subject>
<!-- mandatory date of the document -->
<date value="${document[n].authoringDate}"/>
<author>
<identifier>
<system value="http://spor.ema.europa.eu/v1/locations"/>
<value value="${document[n].organizationOMSCode}"/>
</identifier>
</author>
<title value="${document[n].title}"/>
<!-- removed 2021-07-07 no longer using relatesTo -->
<!-- main sections of the document, to follow the QRD template -->
<section>
<title value="${document[n].section[n].title}"/>
<code>
<coding>
<!-- sections will all have codes to identify them -->
<system value="http://spor.ema.europa.eu/v1/example-sections"/>
<code value="${document[n].section[n].typeCode}"/>
<display value="${document[n].section[n].typeDisplay}"/>
</coding>
</code>
<!-- text is optional, if this is just a heading it may not be necessary -->
<text>
<status value="additional"/>
<!-- HTML goes here, must start with
<div xmlns="http://www.w3.org/1999/xhtml">
-->
<!-- any xhtml is valid, with a few exceptions
(e.g. head, body, scripts etc).
See http://hl7.org/fhir/narrative.html#Narrative -->
${document[n].section[n].bodyHtml}
</text>
<!-- a section within a section -->
<section>
<title value="${document[n].section[n].subsection[n].title}"/>
<code>
<coding>
<system value="http://spor.ema.europa.eu/v1/example-sections"/>
<code value="${document[n].section[n].subsection[n].typeCode}"/>
<display value="${document[n].section[n].subsection[n].typeDisplay}"/>
</coding>
</code>
<text>
<status value="additional"/>
${document[n].section[n].subsection[n].bodyHtml}
</text>
</section>
</section>
<!-- sections can repeat as necessary -->
</Composition>
</resource>
</entry>
<!-- an entry that is a list of PMS Product references -->
<entry>
<fullUrl value="${instance.bundle[n].listFullUrlUuid}"/>
<resource>
<List>
<!-- any id will do [template comment]-->
<!--id value="${instance.bundle[n].listId}"/ [template comment] -->
<status value="current"/>
<mode value="working"/>
<entry>
<item>
<reference value="${instance.product[n].url}"/>
<display value="${instance.product[n].name}"/>
</item>
</entry>
</List>
</resource>
</entry>
</Bundle>
</resource>
<request>
<method value="POST"/>
<url value="Bundle"/>
</request>
</entry>
</Bundle>