Attachment.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="Attachment" />
  4   <meta>
  5     <lastUpdated value="2023-03-26T06:21:02.749+02:00" />
  6   </meta>
  7   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
  8     <valueCode value="normative" />
  9   </extension>
 10   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
 11     <valueCode value="4.0.0" />
 12   </extension>
 13   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics">
 14     <valueCode value="do-translations" />
 15   </extension>
 16   <url value="http://hl7.org/fhir/StructureDefinition/Attachment" />
 17   <version value="5.0.0" />
 18   <name value="Attachment" />
 19   <status value="active" />
 20   <experimental value="false" />
 21   <date value="2023-03-26T06:21:02.0000000+02:00" />
 22   <publisher value="HL7 FHIR Standard" />
 23   <contact>
 24     <telecom>
 25       <system value="url" />
 26       <value value="http://hl7.org/fhir" />
 27     </telecom>
 28   </contact>
 29   <description value="Attachment Type: For referring to data content defined in other formats." />
 30   <jurisdiction>
 31     <coding>
 32       <system value="http://unstats.un.org/unsd/methods/m49/m49.htm" />
 33       <code value="001" />
 34       <display value="World" />
 35     </coding>
 36   </jurisdiction>
 37   <purpose value="Many models need to include data defined in other specifications that is complex and opaque to the healthcare model. This includes documents, media recordings, structured data, etc." />
 38   <fhirVersion value="5.0.0" />
 39   <mapping>
 40     <identity value="v2" />
 41     <uri value="http://hl7.org/v2" />
 42     <name value="HL7 V2 Mapping" />
 43   </mapping>
 44   <mapping>
 45     <identity value="rim" />
 46     <uri value="http://hl7.org/v3" />
 47     <name value="RIM Mapping" />
 48   </mapping>
 49   <kind value="complex-type" />
 50   <abstract value="false" />
 51   <type value="Attachment" />
 52   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DataType" />
 53   <derivation value="specialization" />
 54   <snapshot>
 55     <element id="Attachment">
 56       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
 57         <valueCode value="normative" />
 58       </extension>
 59       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
 60         <valueCode value="4.0.0" />
 61       </extension>
 62       <path value="Attachment" />
 63       <short value="Content in a format defined elsewhere" />
 64       <definition value="For referring to data content defined in other formats." />
 65       <comment value="When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as "Signed Procedure Consent"." />
 66       <min value="0" />
 67       <max value="*" />
 68       <base>
 69         <path value="Attachment" />
 70         <min value="0" />
 71         <max value="*" />
 72       </base>
 73       <constraint>
 74         <key value="att-1" />
 75         <severity value="error" />
 76         <human value="If the Attachment has data, it SHALL have a contentType" />
 77         <expression value="data.empty() or contentType.exists()" />
 78         <source value="http://hl7.org/fhir/StructureDefinition/Attachment" />
 79       </constraint>
 80       <constraint>
 81         <key value="ele-1" />
 82         <severity value="error" />
 83         <human value="All FHIR elements must have a @value or children" />
 84         <expression value="hasValue() or (children().count() > id.count())" />
 85         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
 86       </constraint>
 87       <isModifier value="false" />
 88       <mapping>
 89         <identity value="rim" />
 90         <map value="n/a,ED" />
 91       </mapping>
 92       <mapping>
 93         <identity value="v2" />
 94         <map value="ED/RP" />
 95       </mapping>
 96     </element>
 97     <element id="Attachment.id">
 98       <path value="Attachment.id" />
 99       <representation value="xmlAttr" />
100       <short value="Unique id for inter-element referencing" />
101       <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
102       <min value="0" />
103       <max value="1" />
104       <base>
105         <path value="Element.id" />
106         <min value="0" />
107         <max value="1" />
108       </base>
109       <type>
110         <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
111           <valueUrl value="id" />
112         </extension>
113         <code value="http://hl7.org/fhirpath/System.String" />
114       </type>
115       <condition value="ele-1" />
116       <isModifier value="false" />
117       <isSummary value="false" />
118       <mapping>
119         <identity value="rim" />
120         <map value="n/a" />
121       </mapping>
122     </element>
123     <element id="Attachment.extension">
124       <path value="Attachment.extension" />
125       <slicing>
126         <discriminator>
127           <type value="value" />
128           <path value="url" />
129         </discriminator>
130         <description value="Extensions are always sliced by (at least) url" />
131         <rules value="open" />
132       </slicing>
133       <short value="Additional content defined by implementations" />
134       <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." />
135       <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
136       <alias value="extensions" />
137       <alias value="user content" />
138       <min value="0" />
139       <max value="*" />
140       <base>
141         <path value="Element.extension" />
142         <min value="0" />
143         <max value="*" />
144       </base>
145       <type>
146         <code value="Extension" />
147       </type>
148       <constraint>
149         <key value="ele-1" />
150         <severity value="error" />
151         <human value="All FHIR elements must have a @value or children" />
152         <expression value="hasValue() or (children().count() > id.count())" />
153         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
154       </constraint>
155       <constraint>
156         <key value="ext-1" />
157         <severity value="error" />
158         <human value="Must have either extensions or value[x], not both" />
159         <expression value="extension.exists() != value.exists()" />
160         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
161       </constraint>
162       <isModifier value="false" />
163       <isSummary value="false" />
164       <mapping>
165         <identity value="rim" />
166         <map value="n/a" />
167       </mapping>
168     </element>
169     <element id="Attachment.contentType">
170       <path value="Attachment.contentType" />
171       <short value="Mime type of the content, with charset etc." />
172       <definition value="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." />
173       <requirements value="Processors of the data need to be able to know how to interpret the data." />
174       <min value="0" />
175       <max value="1" />
176       <base>
177         <path value="Attachment.contentType" />
178         <min value="0" />
179         <max value="1" />
180       </base>
181       <type>
182         <code value="code" />
183       </type>
184       <example>
185         <label value="General" />
186         <valueCode value="text/plain; charset=UTF-8, image/png" />
187       </example>
188       <condition value="att-1" />
189       <constraint>
190         <key value="ele-1" />
191         <severity value="error" />
192         <human value="All FHIR elements must have a @value or children" />
193         <expression value="hasValue() or (children().count() > id.count())" />
194         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
195       </constraint>
196       <isModifier value="false" />
197       <isSummary value="true" />
198       <binding>
199         <extension url="http://hl7.org/fhir/tools/StructureDefinition/binding-definition">
200           <valueString value="The mime type of an attachment. Any valid mime type is allowed." />
201         </extension>
202         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
203           <valueString value="MimeType" />
204         </extension>
205         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
206           <valueBoolean value="true" />
207         </extension>
208         <strength value="required" />
209         <description value="BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)" />
210         <valueSet value="http://hl7.org/fhir/ValueSet/mimetypes|5.0.0" />
211       </binding>
212       <mapping>
213         <identity value="v2" />
214         <map value="ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used" />
215       </mapping>
216       <mapping>
217         <identity value="rim" />
218         <map value="./mediaType, ./charset" />
219       </mapping>
220     </element>
221     <element id="Attachment.language">
222       <path value="Attachment.language" />
223       <short value="Human language of the content (BCP-47)" />
224       <definition value="The human language of the content. The value can be any valid value according to BCP 47." />
225       <requirements value="Users need to be able to choose between the languages in a set of attachments." />
226       <min value="0" />
227       <max value="1" />
228       <base>
229         <path value="Attachment.language" />
230         <min value="0" />
231         <max value="1" />
232       </base>
233       <type>
234         <code value="code" />
235       </type>
236       <example>
237         <label value="General" />
238         <valueCode value="en-AU" />
239       </example>
240       <constraint>
241         <key value="ele-1" />
242         <severity value="error" />
243         <human value="All FHIR elements must have a @value or children" />
244         <expression value="hasValue() or (children().count() > id.count())" />
245         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
246       </constraint>
247       <isModifier value="false" />
248       <isSummary value="true" />
249       <binding>
250         <extension url="http://hl7.org/fhir/tools/StructureDefinition/binding-definition">
251           <valueString value="IETF language tag for a human language." />
252         </extension>
253         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
254           <valueString value="Language" />
255         </extension>
256         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
257           <valueBoolean value="true" />
258         </extension>
259         <strength value="required" />
260         <description value="IETF language tag for a human language." />
261         <valueSet value="http://hl7.org/fhir/ValueSet/all-languages|5.0.0" />
262       </binding>
263       <mapping>
264         <identity value="rim" />
265         <map value="./language" />
266       </mapping>
267     </element>
268     <element id="Attachment.data">
269       <path value="Attachment.data" />
270       <short value="Data inline, base64ed" />
271       <definition value="The actual data of the attachment - a sequence of bytes, base64 encoded." />
272       <comment value="The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON." />
273       <requirements value="The data needs to able to be transmitted inline." />
274       <min value="0" />
275       <max value="1" />
276       <base>
277         <path value="Attachment.data" />
278         <min value="0" />
279         <max value="1" />
280       </base>
281       <type>
282         <code value="base64Binary" />
283       </type>
284       <condition value="att-1" />
285       <constraint>
286         <key value="ele-1" />
287         <severity value="error" />
288         <human value="All FHIR elements must have a @value or children" />
289         <expression value="hasValue() or (children().count() > id.count())" />
290         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
291       </constraint>
292       <isModifier value="false" />
293       <isSummary value="false" />
294       <mapping>
295         <identity value="v2" />
296         <map value="ED.5" />
297       </mapping>
298       <mapping>
299         <identity value="rim" />
300         <map value="./data" />
301       </mapping>
302     </element>
303     <element id="Attachment.url">
304       <path value="Attachment.url" />
305       <short value="Uri where the data can be found" />
306       <definition value="A location where the data can be accessed." />
307       <comment value="If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data." />
308       <requirements value="The data needs to be transmitted by reference." />
309       <min value="0" />
310       <max value="1" />
311       <base>
312         <path value="Attachment.url" />
313         <min value="0" />
314         <max value="1" />
315       </base>
316       <type>
317         <code value="url" />
318       </type>
319       <example>
320         <label value="General" />
321         <valueUrl value="http://www.acme.com/logo-small.png" />
322       </example>
323       <constraint>
324         <key value="ele-1" />
325         <severity value="error" />
326         <human value="All FHIR elements must have a @value or children" />
327         <expression value="hasValue() or (children().count() > id.count())" />
328         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
329       </constraint>
330       <isModifier value="false" />
331       <isSummary value="true" />
332       <mapping>
333         <identity value="v2" />
334         <map value="RP.1+RP.2 - if they refer to a URL (see v2.6)" />
335       </mapping>
336       <mapping>
337         <identity value="rim" />
338         <map value="./reference/literal" />
339       </mapping>
340     </element>
341     <element id="Attachment.size">
342       <path value="Attachment.size" />
343       <short value="Number of bytes of content (if url provided)" />
344       <definition value="The number of bytes of data that make up this attachment (before base64 encoding, if that is done)." />
345       <comment value="The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference." />
346       <requirements value="Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all." />
347       <min value="0" />
348       <max value="1" />
349       <base>
350         <path value="Attachment.size" />
351         <min value="0" />
352         <max value="1" />
353       </base>
354       <type>
355         <code value="integer64" />
356       </type>
357       <constraint>
358         <key value="ele-1" />
359         <severity value="error" />
360         <human value="All FHIR elements must have a @value or children" />
361         <expression value="hasValue() or (children().count() > id.count())" />
362         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
363       </constraint>
364       <isModifier value="false" />
365       <isSummary value="true" />
366       <mapping>
367         <identity value="rim" />
368         <map value="N/A (needs data type R3 proposal)" />
369       </mapping>
370     </element>
371     <element id="Attachment.hash">
372       <path value="Attachment.hash" />
373       <short value="Hash of the data (sha-1, base64ed)" />
374       <definition value="The calculated hash of the data using SHA-1. Represented using base64." />
375       <comment value="The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature." />
376       <requirements value="Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version)." />
377       <min value="0" />
378       <max value="1" />
379       <base>
380         <path value="Attachment.hash" />
381         <min value="0" />
382         <max value="1" />
383       </base>
384       <type>
385         <code value="base64Binary" />
386       </type>
387       <constraint>
388         <key value="ele-1" />
389         <severity value="error" />
390         <human value="All FHIR elements must have a @value or children" />
391         <expression value="hasValue() or (children().count() > id.count())" />
392         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
393       </constraint>
394       <isModifier value="false" />
395       <isSummary value="true" />
396       <mapping>
397         <identity value="rim" />
398         <map value=".integrityCheck[parent::ED/integrityCheckAlgorithm="SHA-1"]" />
399       </mapping>
400     </element>
401     <element id="Attachment.title">
402       <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
403         <valueBoolean value="true" />
404       </extension>
405       <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
406         <valueBoolean value="true" />
407       </extension>
408       <path value="Attachment.title" />
409       <short value="Label to display in place of the data" />
410       <definition value="A label or set of text to display in place of the data." />
411       <comment value="May sometimes be derived from the source filename." />
412       <requirements value="Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer." />
413       <min value="0" />
414       <max value="1" />
415       <base>
416         <path value="Attachment.title" />
417         <min value="0" />
418         <max value="1" />
419       </base>
420       <type>
421         <code value="string" />
422       </type>
423       <example>
424         <label value="General" />
425         <valueString value="Official Corporate Logo" />
426       </example>
427       <constraint>
428         <key value="ele-1" />
429         <severity value="error" />
430         <human value="All FHIR elements must have a @value or children" />
431         <expression value="hasValue() or (children().count() > id.count())" />
432         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
433       </constraint>
434       <isModifier value="false" />
435       <isSummary value="true" />
436       <mapping>
437         <identity value="rim" />
438         <map value="./title/data" />
439       </mapping>
440     </element>
441     <element id="Attachment.creation">
442       <path value="Attachment.creation" />
443       <short value="Date attachment was first created" />
444       <definition value="The date that the attachment was first created." />
445       <requirements value="This is often tracked as an integrity issue for use of the attachment." />
446       <min value="0" />
447       <max value="1" />
448       <base>
449         <path value="Attachment.creation" />
450         <min value="0" />
451         <max value="1" />
452       </base>
453       <type>
454         <code value="dateTime" />
455       </type>
456       <constraint>
457         <key value="ele-1" />
458         <severity value="error" />
459         <human value="All FHIR elements must have a @value or children" />
460         <expression value="hasValue() or (children().count() > id.count())" />
461         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
462       </constraint>
463       <isModifier value="false" />
464       <isSummary value="true" />
465       <mapping>
466         <identity value="rim" />
467         <map value="N/A (needs data type R3 proposal)" />
468       </mapping>
469     </element>
470     <element id="Attachment.height">
471       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
472         <valueCode value="trial-use" />
473       </extension>
474       <path value="Attachment.height" />
475       <short value="Height of the image in pixels (photo/video)" />
476       <definition value="Height of the image in pixels (photo/video)." />
477       <min value="0" />
478       <max value="1" />
479       <base>
480         <path value="Attachment.height" />
481         <min value="0" />
482         <max value="1" />
483       </base>
484       <type>
485         <code value="positiveInt" />
486       </type>
487       <constraint>
488         <key value="ele-1" />
489         <severity value="error" />
490         <human value="All FHIR elements must have a @value or children" />
491         <expression value="hasValue() or (children().count() > id.count())" />
492         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
493       </constraint>
494       <isModifier value="false" />
495       <isSummary value="false" />
496       <mapping>
497         <identity value="rim" />
498         <map value=".outboundRelationship[typeCode="COMP].target[classCode="OBS", moodCode="EVN",code="<CODE>"].value" />
499       </mapping>
500     </element>
501     <element id="Attachment.width">
502       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
503         <valueCode value="trial-use" />
504       </extension>
505       <path value="Attachment.width" />
506       <short value="Width of the image in pixels (photo/video)" />
507       <definition value="Width of the image in pixels (photo/video)." />
508       <min value="0" />
509       <max value="1" />
510       <base>
511         <path value="Attachment.width" />
512         <min value="0" />
513         <max value="1" />
514       </base>
515       <type>
516         <code value="positiveInt" />
517       </type>
518       <constraint>
519         <key value="ele-1" />
520         <severity value="error" />
521         <human value="All FHIR elements must have a @value or children" />
522         <expression value="hasValue() or (children().count() > id.count())" />
523         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
524       </constraint>
525       <isModifier value="false" />
526       <isSummary value="false" />
527       <mapping>
528         <identity value="rim" />
529         <map value=".outboundRelationship[typeCode="COMP].target[classCode="OBS", moodCode="EVN",code="<CODE>"].value" />
530       </mapping>
531     </element>
532     <element id="Attachment.frames">
533       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
534         <valueCode value="trial-use" />
535       </extension>
536       <path value="Attachment.frames" />
537       <short value="Number of frames if > 1 (photo)" />
538       <definition value="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required." />
539       <comment value="if the number of frames is not supplied, the value may be unknown. Applications should not assume that there is only one frame unless it is explicitly stated." />
540       <min value="0" />
541       <max value="1" />
542       <base>
543         <path value="Attachment.frames" />
544         <min value="0" />
545         <max value="1" />
546       </base>
547       <type>
548         <code value="positiveInt" />
549       </type>
550       <constraint>
551         <key value="ele-1" />
552         <severity value="error" />
553         <human value="All FHIR elements must have a @value or children" />
554         <expression value="hasValue() or (children().count() > id.count())" />
555         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
556       </constraint>
557       <isModifier value="false" />
558       <isSummary value="false" />
559       <mapping>
560         <identity value="rim" />
561         <map value=".outboundRelationship[typeCode="COMP].target[classCode="OBS", moodCode="EVN",code="<CODE>"].value" />
562       </mapping>
563     </element>
564     <element id="Attachment.duration">
565       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
566         <valueCode value="trial-use" />
567       </extension>
568       <path value="Attachment.duration" />
569       <short value="Length in seconds (audio / video)" />
570       <definition value="The duration of the recording in seconds - for audio and video." />
571       <comment value="The duration might differ from occurrencePeriod if recording was paused." />
572       <min value="0" />
573       <max value="1" />
574       <base>
575         <path value="Attachment.duration" />
576         <min value="0" />
577         <max value="1" />
578       </base>
579       <type>
580         <code value="decimal" />
581       </type>
582       <constraint>
583         <key value="ele-1" />
584         <severity value="error" />
585         <human value="All FHIR elements must have a @value or children" />
586         <expression value="hasValue() or (children().count() > id.count())" />
587         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
588       </constraint>
589       <isModifier value="false" />
590       <isSummary value="false" />
591       <mapping>
592         <identity value="rim" />
593         <map value=".outboundRelationship[typeCode="COMP].target[classCode="OBS", moodCode="EVN",code="<CODE>"].value" />
594       </mapping>
595     </element>
596     <element id="Attachment.pages">
597       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
598         <valueCode value="trial-use" />
599       </extension>
600       <path value="Attachment.pages" />
601       <short value="Number of printed pages" />
602       <definition value="The number of pages when printed." />
603       <min value="0" />
604       <max value="1" />
605       <base>
606         <path value="Attachment.pages" />
607         <min value="0" />
608         <max value="1" />
609       </base>
610       <type>
611         <code value="positiveInt" />
612       </type>
613       <constraint>
614         <key value="ele-1" />
615         <severity value="error" />
616         <human value="All FHIR elements must have a @value or children" />
617         <expression value="hasValue() or (children().count() > id.count())" />
618         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
619       </constraint>
620       <isModifier value="false" />
621       <isSummary value="false" />
622     </element>
623   </snapshot>
624   <differential>
625     <element id="Attachment">
626       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
627         <valueCode value="normative" />
628       </extension>
629       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
630         <valueCode value="4.0.0" />
631       </extension>
632       <path value="Attachment" />
633       <short value="Content in a format defined elsewhere" />
634       <definition value="For referring to data content defined in other formats." />
635       <comment value="When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as "Signed Procedure Consent"." />
636       <min value="0" />
637       <max value="*" />
638       <constraint>
639         <key value="att-1" />
640         <severity value="error" />
641         <human value="If the Attachment has data, it SHALL have a contentType" />
642         <expression value="data.empty() or contentType.exists()" />
643         <source value="http://hl7.org/fhir/StructureDefinition/Attachment" />
644       </constraint>
645       <mapping>
646         <identity value="v2" />
647         <map value="ED/RP" />
648       </mapping>
649       <mapping>
650         <identity value="rim" />
651         <map value="ED" />
652       </mapping>
653     </element>
654     <element id="Attachment.contentType">
655       <path value="Attachment.contentType" />
656       <short value="Mime type of the content, with charset etc." />
657       <definition value="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." />
658       <requirements value="Processors of the data need to be able to know how to interpret the data." />
659       <min value="0" />
660       <max value="1" />
661       <type>
662         <code value="code" />
663       </type>
664       <example>
665         <label value="General" />
666         <valueCode value="text/plain; charset=UTF-8, image/png" />
667       </example>
668       <condition value="att-1" />
669       <isSummary value="true" />
670       <binding>
671         <extension url="http://hl7.org/fhir/tools/StructureDefinition/binding-definition">
672           <valueString value="The mime type of an attachment. Any valid mime type is allowed." />
673         </extension>
674         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
675           <valueString value="MimeType" />
676         </extension>
677         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
678           <valueBoolean value="true" />
679         </extension>
680         <strength value="required" />
681         <description value="BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)" />
682         <valueSet value="http://hl7.org/fhir/ValueSet/mimetypes|5.0.0" />
683       </binding>
684       <mapping>
685         <identity value="v2" />
686         <map value="ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used" />
687       </mapping>
688       <mapping>
689         <identity value="rim" />
690         <map value="./mediaType, ./charset" />
691       </mapping>
692     </element>
693     <element id="Attachment.language">
694       <path value="Attachment.language" />
695       <short value="Human language of the content (BCP-47)" />
696       <definition value="The human language of the content. The value can be any valid value according to BCP 47." />
697       <requirements value="Users need to be able to choose between the languages in a set of attachments." />
698       <min value="0" />
699       <max value="1" />
700       <type>
701         <code value="code" />
702       </type>
703       <example>
704         <label value="General" />
705         <valueCode value="en-AU" />
706       </example>
707       <isSummary value="true" />
708       <binding>
709         <extension url="http://hl7.org/fhir/tools/StructureDefinition/binding-definition">
710           <valueString value="IETF language tag for a human language." />
711         </extension>
712         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
713           <valueString value="Language" />
714         </extension>
715         <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
716           <valueBoolean value="true" />
717         </extension>
718         <strength value="required" />
719         <description value="IETF language tag for a human language." />
720         <valueSet value="http://hl7.org/fhir/ValueSet/all-languages|5.0.0" />
721       </binding>
722       <mapping>
723         <identity value="rim" />
724         <map value="./language" />
725       </mapping>
726     </element>
727     <element id="Attachment.data">
728       <path value="Attachment.data" />
729       <short value="Data inline, base64ed" />
730       <definition value="The actual data of the attachment - a sequence of bytes, base64 encoded." />
731       <comment value="The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON." />
732       <requirements value="The data needs to able to be transmitted inline." />
733       <min value="0" />
734       <max value="1" />
735       <type>
736         <code value="base64Binary" />
737       </type>
738       <condition value="att-1" />
739       <mapping>
740         <identity value="v2" />
741         <map value="ED.5" />
742       </mapping>
743       <mapping>
744         <identity value="rim" />
745         <map value="./data" />
746       </mapping>
747     </element>
748     <element id="Attachment.url">
749       <path value="Attachment.url" />
750       <short value="Uri where the data can be found" />
751       <definition value="A location where the data can be accessed." />
752       <comment value="If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data." />
753       <requirements value="The data needs to be transmitted by reference." />
754       <min value="0" />
755       <max value="1" />
756       <type>
757         <code value="url" />
758       </type>
759       <example>
760         <label value="General" />
761         <valueUrl value="http://www.acme.com/logo-small.png" />
762       </example>
763       <isSummary value="true" />
764       <mapping>
765         <identity value="v2" />
766         <map value="RP.1+RP.2 - if they refer to a URL (see v2.6)" />
767       </mapping>
768       <mapping>
769         <identity value="rim" />
770         <map value="./reference/literal" />
771       </mapping>
772     </element>
773     <element id="Attachment.size">
774       <path value="Attachment.size" />
775       <short value="Number of bytes of content (if url provided)" />
776       <definition value="The number of bytes of data that make up this attachment (before base64 encoding, if that is done)." />
777       <comment value="The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference." />
778       <requirements value="Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all." />
779       <min value="0" />
780       <max value="1" />
781       <type>
782         <code value="integer64" />
783       </type>
784       <isSummary value="true" />
785       <mapping>
786         <identity value="rim" />
787         <map value="N/A (needs data type R3 proposal)" />
788       </mapping>
789     </element>
790     <element id="Attachment.hash">
791       <path value="Attachment.hash" />
792       <short value="Hash of the data (sha-1, base64ed)" />
793       <definition value="The calculated hash of the data using SHA-1. Represented using base64." />
794       <comment value="The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature." />
795       <requirements value="Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version)." />
796       <min value="0" />
797       <max value="1" />
798       <type>
799         <code value="base64Binary" />
800       </type>
801       <isSummary value="true" />
802       <mapping>
803         <identity value="rim" />
804         <map value=".integrityCheck[parent::ED/integrityCheckAlgorithm="SHA-1"]" />
805       </mapping>
806     </element>
807     <element id="Attachment.title">
808       <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
809         <valueBoolean value="true" />
810       </extension>
811       <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
812         <valueBoolean value="true" />
813       </extension>
814       <path value="Attachment.title" />
815       <short value="Label to display in place of the data" />
816       <definition value="A label or set of text to display in place of the data." />
817       <comment value="May sometimes be derived from the source filename." />
818       <requirements value="Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer." />
819       <min value="0" />
820       <max value="1" />
821       <type>
822         <code value="string" />
823       </type>
824       <example>
825         <label value="General" />
826         <valueString value="Official Corporate Logo" />
827       </example>
828       <isSummary value="true" />
829       <mapping>
830         <identity value="rim" />
831         <map value="./title/data" />
832       </mapping>
833     </element>
834     <element id="Attachment.creation">
835       <path value="Attachment.creation" />
836       <short value="Date attachment was first created" />
837       <definition value="The date that the attachment was first created." />
838       <requirements value="This is often tracked as an integrity issue for use of the attachment." />
839       <min value="0" />
840       <max value="1" />
841       <type>
842         <code value="dateTime" />
843       </type>
844       <isSummary value="true" />
845       <mapping>
846         <identity value="rim" />
847         <map value="N/A (needs data type R3 proposal)" />
848       </mapping>
849     </element>
850     <element id="Attachment.height">
851       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
852         <valueCode value="trial-use" />
853       </extension>
854       <path value="Attachment.height" />
855       <short value="Height of the image in pixels (photo/video)" />
856       <definition value="Height of the image in pixels (photo/video)." />
857       <min value="0" />
858       <max value="1" />
859       <type>
860         <code value="positiveInt" />
861       </type>
862       <mapping>
863         <identity value="rim" />
864         <map value=".outboundRelationship[typeCode="COMP].target[classCode="OBS", moodCode="EVN",code="<CODE>"].value" />
865       </mapping>
866     </element>
867     <element id="Attachment.width">
868       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
869         <valueCode value="trial-use" />
870       </extension>
871       <path value="Attachment.width" />
872       <short value="Width of the image in pixels (photo/video)" />
873       <definition value="Width of the image in pixels (photo/video)." />
874       <min value="0" />
875       <max value="1" />
876       <type>
877         <code value="positiveInt" />
878       </type>
879       <mapping>
880         <identity value="rim" />
881         <map value=".outboundRelationship[typeCode="COMP].target[classCode="OBS", moodCode="EVN",code="<CODE>"].value" />
882       </mapping>
883     </element>
884     <element id="Attachment.frames">
885       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
886         <valueCode value="trial-use" />
887       </extension>
888       <path value="Attachment.frames" />
889       <short value="Number of frames if > 1 (photo)" />
890       <definition value="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required." />
891       <comment value="if the number of frames is not supplied, the value may be unknown. Applications should not assume that there is only one frame unless it is explicitly stated." />
892       <min value="0" />
893       <max value="1" />
894       <type>
895         <code value="positiveInt" />
896       </type>
897       <mapping>
898         <identity value="rim" />
899         <map value=".outboundRelationship[typeCode="COMP].target[classCode="OBS", moodCode="EVN",code="<CODE>"].value" />
900       </mapping>
901     </element>
902     <element id="Attachment.duration">
903       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
904         <valueCode value="trial-use" />
905       </extension>
906       <path value="Attachment.duration" />
907       <short value="Length in seconds (audio / video)" />
908       <definition value="The duration of the recording in seconds - for audio and video." />
909       <comment value="The duration might differ from occurrencePeriod if recording was paused." />
910       <min value="0" />
911       <max value="1" />
912       <type>
913         <code value="decimal" />
914       </type>
915       <mapping>
916         <identity value="rim" />
917         <map value=".outboundRelationship[typeCode="COMP].target[classCode="OBS", moodCode="EVN",code="<CODE>"].value" />
918       </mapping>
919     </element>
920     <element id="Attachment.pages">
921       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
922         <valueCode value="trial-use" />
923       </extension>
924       <path value="Attachment.pages" />
925       <short value="Number of printed pages" />
926       <definition value="The number of pages when printed." />
927       <min value="0" />
928       <max value="1" />
929       <type>
930         <code value="positiveInt" />
931       </type>
932     </element>
933   </differential>
934 </StructureDefinition>