SQL on FHIR
2.1.0-pre - release
SQL on FHIR, published by SQL on FHIR Working Group. This guide is not an authorized publication; it is the continuous build for version 2.1.0-pre built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/FHIR/sql-on-fhir-v2/ and changes regularly. See the Directory of published versions
| Active as of 2025-12-02 |
<OperationDefinition xmlns="http://hl7.org/fhir">
<id value="ViewDefinitionExport"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition ViewDefinitionExport</b></p><a name="ViewDefinitionExport"> </a><a name="hcViewDefinitionExport"> </a><p>URL: [base]/CanonicalResource/$export</p><p>URL: [base]/CanonicalResource/[id]/$export</p><h3>Parameters</h3><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</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>view</td><td>type</td><td>1..*</td><td/><td/><td><div><p>One or more ViewDefinitions to export. Each repetition identifies a single view.</p>
</div></td></tr><tr><td>IN</td><td>view.name</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#string">string</a></td><td/><td><div><p>Optional friendly name for the exported view output.</p>
</div></td></tr><tr><td>IN</td><td>view.viewReference</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/references.html#Reference">Reference</a></td><td/><td><div><p>Reference to a ViewDefinition stored on the server.</p>
</div></td></tr><tr><td>IN</td><td>view.viewResource</td><td/><td>0..1</td><td><a href="StructureDefinition-ViewDefinition.html">https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition</a></td><td/><td><div><p>Inline ViewDefinition resource to export.</p>
</div></td></tr><tr><td>IN</td><td>clientTrackingId</td><td>type</td><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#string">string</a></td><td/><td><div><p>Client-provided tracking identifier for the export operation.</p>
</div></td></tr><tr><td>IN</td><td>_format</td><td>type</td><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#code">code</a></td><td><a href="ValueSet-OutputFormatCodes.html">Output Format Codes</a> (Extensible)</td><td><div><p>Bulk export output format (for example csv, ndjson, parquet, json).</p>
</div></td></tr><tr><td>IN</td><td>patient</td><td>type</td><td>0..*</td><td><a href="http://hl7.org/fhir/R5/references.html#Reference">Reference</a></td><td/><td><div><p>Filter exported data to the supplied patient(s).</p>
</div></td></tr><tr><td>IN</td><td>group</td><td>type</td><td>0..*</td><td><a href="http://hl7.org/fhir/R5/references.html#Reference">Reference</a></td><td/><td><div><p>Filter exported data to members of the supplied group(s).</p>
</div></td></tr><tr><td>IN</td><td>_since</td><td>type</td><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#instant">instant</a></td><td/><td><div><p>Export only resources updated since this instant.</p>
</div></td></tr><tr><td>IN</td><td>source</td><td>type</td><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#string">string</a></td><td/><td><div><p>External data source to use for the export (for example a URI or bucket name).</p>
</div></td></tr><tr><td>OUT</td><td>exportId</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#string">string</a></td><td/><td><div><p>Server-generated identifier assigned to the export request.</p>
</div></td></tr><tr><td>OUT</td><td>clientTrackingId</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#string">string</a></td><td/><td><div><p>Echoed client tracking identifier when provided.</p>
</div></td></tr><tr><td>OUT</td><td>status</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#code">code</a></td><td><a href="ValueSet-ExportStatusCodes.html">Export Status Codes</a> (Required)</td><td><div><p>Status of the export (accepted, in-progress, completed, cancelled, failed).</p>
</div></td></tr><tr><td>OUT</td><td>location</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#uri">uri</a></td><td/><td><div><p>URL to poll for export status updates.</p>
</div></td></tr><tr><td>OUT</td><td>cancelUrl</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#uri">uri</a></td><td/><td><div><p>Optional URL for cancelling the export.</p>
</div></td></tr><tr><td>OUT</td><td>_format</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#code">code</a></td><td><a href="ValueSet-OutputFormatCodes.html">Output Format Codes</a> (Extensible)</td><td><div><p>Format of the exported files (echoed from input if supplied).</p>
</div></td></tr><tr><td>OUT</td><td>exportStartTime</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#instant">instant</a></td><td/><td><div><p>Timestamp when the export operation began.</p>
</div></td></tr><tr><td>OUT</td><td>exportEndTime</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#instant">instant</a></td><td/><td><div><p>Timestamp when the export operation completed.</p>
</div></td></tr><tr><td>OUT</td><td>exportDuration</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#integer">integer</a></td><td/><td><div><p>Duration of the export in seconds.</p>
</div></td></tr><tr><td>OUT</td><td>estimatedTimeRemaining</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#integer">integer</a></td><td/><td><div><p>Estimated seconds remaining until completion.</p>
</div></td></tr><tr><td>OUT</td><td>output</td><td/><td>0..*</td><td/><td/><td><div><p>Output information for each exported view.</p>
</div></td></tr><tr><td>OUT</td><td>output.name</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#string">string</a></td><td/><td><div><p>Name assigned to the exported view output.</p>
</div></td></tr><tr><td>OUT</td><td>output.location</td><td/><td>1..*</td><td><a href="http://hl7.org/fhir/R5/datatypes.html#uri">uri</a></td><td/><td><div><p>Download URL(s) for the exported file(s).</p>
</div></td></tr></table></div>
</text>
<url value="http://sql-on-fhir.org/OperationDefinition/$export"/>
<version value="2.1.0-pre"/>
<name value="ViewDefinitionExport"/>
<title value="ViewDefinition Export"/>
<status value="active"/>
<kind value="operation"/>
<date value="2025-12-02T20:25:18+00:00"/>
<publisher value="SQL on FHIR Working Group"/>
<contact>
<name value="SQL on FHIR Working Group"/>
<telecom>
<system value="url"/>
<value value="https://sql-on-fhir.org"/>
</telecom>
</contact>
<description
value="Export a view definition. User can provide view definition references and/or resources as part of the input parameters."/>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
<display value="World"/>
</coding>
</jurisdiction>
<code value="export"/>
<resource value="CanonicalResource"/>
<system value="false"/>
<type value="true"/>
<instance value="true"/>
<parameter>
<name value="view"/>
<use value="in"/>
<scope value="type"/>
<min value="1"/>
<max value="*"/>
<documentation
value="One or more ViewDefinitions to export. Each repetition identifies a single view."/>
<part>
<name value="name"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="Optional friendly name for the exported view output."/>
<type value="string"/>
</part>
<part>
<name value="viewReference"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="Reference to a ViewDefinition stored on the server."/>
<type value="Reference"/>
</part>
<part>
<extension
url="http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type">
<valueUri
value="https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition"/>
</extension>
<name value="viewResource"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation value="Inline ViewDefinition resource to export."/>
<type value="Resource"/>
</part>
</parameter>
<parameter>
<name value="clientTrackingId"/>
<use value="in"/>
<scope value="type"/>
<min value="0"/>
<max value="1"/>
<documentation
value="Client-provided tracking identifier for the export operation."/>
<type value="string"/>
</parameter>
<parameter>
<name value="_format"/>
<use value="in"/>
<scope value="type"/>
<min value="0"/>
<max value="1"/>
<documentation
value="Bulk export output format (for example csv, ndjson, parquet, json)."/>
<type value="code"/>
<binding>
<strength value="extensible"/>
<valueSet
value="https://sql-on-fhir.org/ig/ValueSet/OutputFormatCodes"/>
</binding>
</parameter>
<parameter>
<name value="patient"/>
<use value="in"/>
<scope value="type"/>
<min value="0"/>
<max value="*"/>
<documentation value="Filter exported data to the supplied patient(s)."/>
<type value="Reference"/>
</parameter>
<parameter>
<name value="group"/>
<use value="in"/>
<scope value="type"/>
<min value="0"/>
<max value="*"/>
<documentation
value="Filter exported data to members of the supplied group(s)."/>
<type value="Reference"/>
</parameter>
<parameter>
<name value="_since"/>
<use value="in"/>
<scope value="type"/>
<min value="0"/>
<max value="1"/>
<documentation value="Export only resources updated since this instant."/>
<type value="instant"/>
</parameter>
<parameter>
<name value="source"/>
<use value="in"/>
<scope value="type"/>
<min value="0"/>
<max value="1"/>
<documentation
value="External data source to use for the export (for example a URI or bucket name)."/>
<type value="string"/>
</parameter>
<parameter>
<name value="exportId"/>
<use value="out"/>
<min value="1"/>
<max value="1"/>
<documentation
value="Server-generated identifier assigned to the export request."/>
<type value="string"/>
</parameter>
<parameter>
<name value="clientTrackingId"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<documentation value="Echoed client tracking identifier when provided."/>
<type value="string"/>
</parameter>
<parameter>
<name value="status"/>
<use value="out"/>
<min value="1"/>
<max value="1"/>
<documentation
value="Status of the export (accepted, in-progress, completed, cancelled, failed)."/>
<type value="code"/>
<binding>
<strength value="required"/>
<valueSet
value="https://sql-on-fhir.org/ig/ValueSet/ExportStatusCodes"/>
</binding>
</parameter>
<parameter>
<name value="location"/>
<use value="out"/>
<min value="1"/>
<max value="1"/>
<documentation value="URL to poll for export status updates."/>
<type value="uri"/>
</parameter>
<parameter>
<name value="cancelUrl"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<documentation value="Optional URL for cancelling the export."/>
<type value="uri"/>
</parameter>
<parameter>
<name value="_format"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<documentation
value="Format of the exported files (echoed from input if supplied)."/>
<type value="code"/>
<binding>
<strength value="extensible"/>
<valueSet
value="https://sql-on-fhir.org/ig/ValueSet/OutputFormatCodes"/>
</binding>
</parameter>
<parameter>
<name value="exportStartTime"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<documentation value="Timestamp when the export operation began."/>
<type value="instant"/>
</parameter>
<parameter>
<name value="exportEndTime"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<documentation value="Timestamp when the export operation completed."/>
<type value="instant"/>
</parameter>
<parameter>
<name value="exportDuration"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<documentation value="Duration of the export in seconds."/>
<type value="integer"/>
</parameter>
<parameter>
<name value="estimatedTimeRemaining"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<documentation value="Estimated seconds remaining until completion."/>
<type value="integer"/>
</parameter>
<parameter>
<name value="output"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<documentation value="Output information for each exported view."/>
<part>
<name value="name"/>
<use value="out"/>
<min value="1"/>
<max value="1"/>
<documentation value="Name assigned to the exported view output."/>
<type value="string"/>
</part>
<part>
<name value="location"/>
<use value="out"/>
<min value="1"/>
<max value="*"/>
<documentation value="Download URL(s) for the exported file(s)."/>
<type value="uri"/>
</part>
</parameter>
</OperationDefinition>