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 |
{
"resourceType" : "OperationDefinition",
"id" : "ViewDefinitionExport",
"text" : {
"status" : "generated",
"div" : "<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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</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>\n</div></td></tr></table></div>"
},
"url" : "http://sql-on-fhir.org/OperationDefinition/$export",
"version" : "2.1.0-pre",
"name" : "ViewDefinitionExport",
"title" : "ViewDefinition Export",
"status" : "active",
"kind" : "operation",
"date" : "2025-12-02T20:25:18+00:00",
"publisher" : "SQL on FHIR Working Group",
"contact" : [
{
"name" : "SQL on FHIR Working Group",
"telecom" : [
{
"system" : "url",
"value" : "https://sql-on-fhir.org"
}
]
}
],
"description" : "Export a view definition. User can provide view definition references and/or resources as part of the input parameters.",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001",
"display" : "World"
}
]
}
],
"code" : "export",
"resource" : [
"CanonicalResource"
],
"system" : false,
"type" : true,
"instance" : true,
"parameter" : [
{
"name" : "view",
"use" : "in",
"scope" : [
"type"
],
"min" : 1,
"max" : "*",
"documentation" : "One or more ViewDefinitions to export. Each repetition identifies a single view.",
"part" : [
{
"name" : "name",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "Optional friendly name for the exported view output.",
"type" : "string"
},
{
"name" : "viewReference",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "Reference to a ViewDefinition stored on the server.",
"type" : "Reference"
},
{
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type",
"valueUri" : "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition"
}
],
"name" : "viewResource",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "Inline ViewDefinition resource to export.",
"type" : "Resource"
}
]
},
{
"name" : "clientTrackingId",
"use" : "in",
"scope" : [
"type"
],
"min" : 0,
"max" : "1",
"documentation" : "Client-provided tracking identifier for the export operation.",
"type" : "string"
},
{
"name" : "_format",
"use" : "in",
"scope" : [
"type"
],
"min" : 0,
"max" : "1",
"documentation" : "Bulk export output format (for example csv, ndjson, parquet, json).",
"type" : "code",
"binding" : {
"strength" : "extensible",
"valueSet" : "https://sql-on-fhir.org/ig/ValueSet/OutputFormatCodes"
}
},
{
"name" : "patient",
"use" : "in",
"scope" : [
"type"
],
"min" : 0,
"max" : "*",
"documentation" : "Filter exported data to the supplied patient(s).",
"type" : "Reference"
},
{
"name" : "group",
"use" : "in",
"scope" : [
"type"
],
"min" : 0,
"max" : "*",
"documentation" : "Filter exported data to members of the supplied group(s).",
"type" : "Reference"
},
{
"name" : "_since",
"use" : "in",
"scope" : [
"type"
],
"min" : 0,
"max" : "1",
"documentation" : "Export only resources updated since this instant.",
"type" : "instant"
},
{
"name" : "source",
"use" : "in",
"scope" : [
"type"
],
"min" : 0,
"max" : "1",
"documentation" : "External data source to use for the export (for example a URI or bucket name).",
"type" : "string"
},
{
"name" : "exportId",
"use" : "out",
"min" : 1,
"max" : "1",
"documentation" : "Server-generated identifier assigned to the export request.",
"type" : "string"
},
{
"name" : "clientTrackingId",
"use" : "out",
"min" : 0,
"max" : "1",
"documentation" : "Echoed client tracking identifier when provided.",
"type" : "string"
},
{
"name" : "status",
"use" : "out",
"min" : 1,
"max" : "1",
"documentation" : "Status of the export (accepted, in-progress, completed, cancelled, failed).",
"type" : "code",
"binding" : {
"strength" : "required",
"valueSet" : "https://sql-on-fhir.org/ig/ValueSet/ExportStatusCodes"
}
},
{
"name" : "location",
"use" : "out",
"min" : 1,
"max" : "1",
"documentation" : "URL to poll for export status updates.",
"type" : "uri"
},
{
"name" : "cancelUrl",
"use" : "out",
"min" : 0,
"max" : "1",
"documentation" : "Optional URL for cancelling the export.",
"type" : "uri"
},
{
"name" : "_format",
"use" : "out",
"min" : 0,
"max" : "1",
"documentation" : "Format of the exported files (echoed from input if supplied).",
"type" : "code",
"binding" : {
"strength" : "extensible",
"valueSet" : "https://sql-on-fhir.org/ig/ValueSet/OutputFormatCodes"
}
},
{
"name" : "exportStartTime",
"use" : "out",
"min" : 0,
"max" : "1",
"documentation" : "Timestamp when the export operation began.",
"type" : "instant"
},
{
"name" : "exportEndTime",
"use" : "out",
"min" : 0,
"max" : "1",
"documentation" : "Timestamp when the export operation completed.",
"type" : "instant"
},
{
"name" : "exportDuration",
"use" : "out",
"min" : 0,
"max" : "1",
"documentation" : "Duration of the export in seconds.",
"type" : "integer"
},
{
"name" : "estimatedTimeRemaining",
"use" : "out",
"min" : 0,
"max" : "1",
"documentation" : "Estimated seconds remaining until completion.",
"type" : "integer"
},
{
"name" : "output",
"use" : "out",
"min" : 0,
"max" : "*",
"documentation" : "Output information for each exported view.",
"part" : [
{
"name" : "name",
"use" : "out",
"min" : 1,
"max" : "1",
"documentation" : "Name assigned to the exported view output.",
"type" : "string"
},
{
"name" : "location",
"use" : "out",
"min" : 1,
"max" : "*",
"documentation" : "Download URL(s) for the exported file(s).",
"type" : "uri"
}
]
}
]
}