<?xml version="1.0" encoding="UTF-8"?>

<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="export"/>
  <text>
    <status value="extensions"/><div xmlns="http://www.w3.org/1999/xhtml"><h2>BulkDataExport</h2><p>OPERATION: BulkDataExport</p><p>The official URL for this operation definition is: </p><pre>http://hl7.org/fhir/uv/bulkdata/OperationDefinition/export</pre><div><p>Export data from a FHIR server whether or not it is associated with a patient. This supports use cases like backing up a server or exporting terminology data by restricting the resources returned using the _type parameter. The FHIR server SHALL support invocation of this operation using the <a href="http://hl7.org/fhir/async.html">FHIR Asynchronous Request Pattern</a></p>
</div><p>URL: [base]/$export</p><p>Parameters</p><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>_outputFormat</td><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td/><td><div><p>The format for the requested bulk data files to be generated. Defaults to <code>application/fhir+ndjson</code>.</p>
</div></td></tr><tr><td>IN</td><td>_since</td><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#instant">instant</a></td><td/><td><div><p>Resources will be included in the response if their state has changed after the supplied time (e.g.  if Resource.meta.lastUpdated is later than the supplied <code>_since</code> time).</p>
</div></td></tr><tr><td>IN</td><td>_type</td><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td/><td><div><p>A string of comma-delimited FHIR resource types. The response SHALL be filtered to only include resources of the specified resource types(s).</p>
</div></td></tr><tr><td>IN</td><td>_elements</td><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td/><td><div><p>Experimental. String of comma-delimited FHIR Elements. The server SHOULD omit unlisted, non-mandatory elements from the resources returned. Elements should be of the form <code>[resource type].[element name]</code> (eg. <code>Patient.id</code>) or <code>[element name]</code> (eg. <code>id</code>) and only root elements in a resource are permitted. If the resource type is omitted, the element should be returned for all resources in the response where it is applicable.</p>
<p>Servers are not obliged to return just the requested elements. Servers SHOULD always return mandatory elements whether they are requested or not. Servers SHOULD mark the resources with the tag SUBSETTED to ensure that the incomplete resource is not actually used to overwrite a complete resource.</p>
</div></td></tr><tr><td>IN</td><td>includeAssociatedData</td><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#code">code</a></td><td><a href="ValueSet-include-associated-data.html">http://hl7.org/fhir/uv/bulkdata/ValueSet/include-associated-data</a> (Extensible)</td><td><div><p>Experimental. Servers with support for the requested values SHALL return or omit a pre-defined set of FHIR resources associated with the request.</p>
</div></td></tr><tr><td>IN</td><td>_typeFilter</td><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td/><td><div><p>Experimental. String of comma separated FHIR REST search queries. Servers with support for the requested search queries SHALL filter the data in the response to only include resources that meet the specified criteria.</p>
</div></td></tr></table></div>
  </text>
  <url value="http://hl7.org/fhir/uv/bulkdata/OperationDefinition/export"/>
  <version value="1.1.0"/>
  <name value="BulkDataExport"/>
  <title value="FHIR Bulk Data System Level Export"/>
  <status value="active"/>
  <kind value="operation"/>
  <date value="2020-08-16"/>
  <publisher value="HL7 International - FHIR Infrastructure Work Group"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.hl7.org/Special/committees/fiwg/index.cfm"/>
    </telecom>
  </contact>
  <description value="Export data from a FHIR server whether or not it is associated with a patient. This supports use cases like backing up a server or exporting terminology data by restricting the resources returned using the _type parameter. The FHIR server SHALL support invocation of this operation using the [FHIR Asynchronous Request Pattern](http://hl7.org/fhir/async.html)"/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>
  <code value="export"/>
  <system value="true"/>
  <type value="false"/>
  <instance value="false"/>
  <parameter>
    <name value="_outputFormat"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="The format for the requested bulk data files to be generated. Defaults to `application/fhir+ndjson`."/>
    <type value="string"/>
  </parameter>
  <parameter>
    <name value="_since"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Resources will be included in the response if their state has changed after the supplied time (e.g.  if Resource.meta.lastUpdated is later than the supplied `_since` time)."/>
    <type value="instant"/>
  </parameter>
  <parameter>
    <name value="_type"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="A string of comma-delimited FHIR resource types. The response SHALL be filtered to only include resources of the specified resource types(s)."/>
    <type value="string"/>
  </parameter>
  <parameter>
    <name value="_elements"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Experimental. String of comma-delimited FHIR Elements. The server SHOULD omit unlisted, non-mandatory elements from the resources returned. Elements should be of the form `[resource type].[element name]` (eg. `Patient.id`) or `[element name]` (eg. `id`) and only root elements in a resource are permitted. If the resource type is omitted, the element should be returned for all resources in the response where it is applicable.&#xA;&#xA;Servers are not obliged to return just the requested elements. Servers SHOULD always return mandatory elements whether they are requested or not. Servers SHOULD mark the resources with the tag SUBSETTED to ensure that the incomplete resource is not actually used to overwrite a complete resource."/>
    <type value="string"/>
  </parameter>
  <parameter>
    <name value="includeAssociatedData"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Experimental. Servers with support for the requested values SHALL return or omit a pre-defined set of FHIR resources associated with the request."/>
    <type value="code"/>
    <binding>
      <strength value="extensible"/>
      <valueSet value="http://hl7.org/fhir/uv/bulkdata/ValueSet/include-associated-data"/>
    </binding>
  </parameter>
  <parameter>
    <name value="_typeFilter"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Experimental. String of comma separated FHIR REST search queries. Servers with support for the requested search queries SHALL filter the data in the response to only include resources that meet the specified criteria."/>
    <type value="string"/>
  </parameter>
</OperationDefinition>