FHIR IG analytics| Package | hl7.fhir.uv.sql-on-fhir |
| Resource Type | OperationDefinition |
| Id | OperationDefinition-SQLQueryExport.json |
| FHIR Version | R5 |
| Source | https://build.fhir.org/ig/HL7/sql-on-fhir/OperationDefinition-SQLQueryExport.html |
| URL | http://hl7.org/fhir/uv/sql-on-fhir/OperationDefinition/SQLQueryExport |
| Version | 3.0.0-ballot |
| Status | active |
| Date | 2026-08-05T23:37:23+00:00 |
| Name | SQLQueryExport |
| Title | SQLQuery Export |
| Realm | uv |
| Authority | hl7 |
| Description | Export SQLQuery Library results asynchronously using the FHIR Asynchronous Interaction Request Pattern. |
| Type | true |
| Kind | operation |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
Generated Narrative: OperationDefinition SQLQueryExport
URL: [base]/$sqlquery-export
URL: [base]/Library/$sqlquery-export
URL: [base]/Library/[id]/$sqlquery-export
| Use | Name | Scope | Cardinality | Type | Binding | Documentation |
| IN | query | system, type | 1..* | One or more SQLQuery or SQLView Libraries to export. Each repetition identifies a single query. Applies at system and type level only; at instance level the bound Library identified by the request URL is the query source and this parameter does not apply. | ||
| IN | query.name | 0..1 | string | Optional friendly name for the exported query output. | ||
| IN | query.queryReference | 0..1 | Reference (SQL Query Library, SQL View Library) | Reference to a SQLQuery or SQLView Library stored on the server. | ||
| IN | query.queryResource | 0..1 | Library (SQL Query Library, SQL View Library) | Inline SQLQuery or SQLView Library resource to execute. | ||
| IN | query.parameters | 0..1 | Parameters | Input parameters for this query. Parameters are bound by name to parameters declared in the SQLQuery Library (Library.parameter.name). | ||
| IN | view | system, type, instance | 0..* | CanonicalResource (View Definition, SQL View Library) | Inline ViewDefinition or SQLView Library supplying a table source the query depends on. Matched by its url (and version, when the depends-on canonical is versioned) to a relatedArtifact depends-on entry in the transitive dependency closure of the executed queries. See Table-Source Dependencies (operations-common.html). | |
| IN | clientTrackingId | system, type | 0..1 | string | Client-provided tracking identifier for the export operation. | |
| IN | _format | system, type | 0..1 | code | Export Output Format Codes (Extensible) | Output format for the exported files (csv, ndjson, parquet, json). See Common Operation Behavior (operations-common.html). |
| IN | header | system, type | 0..1 | boolean | Include CSV headers (default true). Applies only when csv output is requested. | |
| IN | patient | system, type | 0..* | Reference | Filter exported data to the supplied patient(s). | |
| IN | group | system, type | 0..* | Reference | Filter exported data to members of the supplied group(s). | |
| IN | _since | system, type | 0..1 | instant | Export only resources updated since this instant. | |
| IN | source | system, type | 0..1 | string | External data source containing the ViewDefinition tables. | |
| OUT | exportId | 1..1 | string | Server-generated identifier assigned to the export request. | ||
| OUT | clientTrackingId | 0..1 | string | Echoed client tracking identifier when provided. | ||
| OUT | status | 1..1 | code | Export Status Codes (Required) | Status of the export (accepted, in-progress, completed, cancelled, failed). | |
| OUT | location | 1..1 | uri | URL to poll for export status updates. | ||
| OUT | cancelUrl | 0..1 | uri | Optional URL for cancelling the export. | ||
| OUT | _format | 0..1 | code | Output Format Codes (Extensible) | Format of the exported files (echoed from input if supplied). | |
| OUT | exportStartTime | 0..1 | instant | Timestamp when the export operation began. | ||
| OUT | exportEndTime | 0..1 | instant | Timestamp when the export operation completed. | ||
| OUT | exportDuration | 0..1 | integer | Duration of the export in seconds. | ||
| OUT | estimatedTimeRemaining | 0..1 | integer | Estimated seconds remaining until completion. | ||
| OUT | output | 0..* | Output information for each exported SQL query result. One entry per query; resources supplied via the view parameter do not produce output entries. | |||
| OUT | output.name | 1..1 | string | Name assigned to the exported output. | ||
| OUT | output.location | 1..* | uri | Download URL(s) for the exported file(s). |
{
"resourceType": "OperationDefinition",
"id": "SQLQueryExport",
"text": {
"status": "generated",
"div": "<!-- snip (see above) -->"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode": "fhir"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode": "draft",
"_valueCode": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
"valueCanonical": "http://hl7.org/fhir/uv/sql-on-fhir/ImplementationGuide/hl7.fhir.uv.sql-on-fhir"
}
]
}
}
],
"url": "http://hl7.org/fhir/uv/sql-on-fhir/OperationDefinition/SQLQueryExport",
"identifier": [
{
"system": "urn:ietf:rfc:3986",
"value": "urn:oid:2.16.840.1.113883.4.642.40.77.33.1"
}
],
"version": "3.0.0-ballot",
"versionAlgorithmString": "semver",
"name": "SQLQueryExport",
"title": "SQLQuery Export",
"status": "active",
"kind": "operation",
"date": "2026-08-05T23:37:23+00:00",
"publisher": "HL7 International / FHIR Infrastructure",
"contact": [
{
"name": "HL7 International / FHIR Infrastructure",
"telecom": [
{
"system": "url",
"value": "http://www.hl7.org/Special/committees/fiwg"
}
]
}
],
"description": "Export SQLQuery Library results asynchronously using the FHIR Asynchronous Interaction Request Pattern.",
"jurisdiction": [
{
"coding": [
{
"system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code": "001",
"display": "World"
}
]
}
],
"code": "sqlquery-export",
"resource": [
"Library"
],
"system": true,
"type": true,
"instance": true,
"parameter": [
{
"name": "query",
"use": "in",
"scope": [
"system",
"type"
],
"min": 1,
"max": "*",
"documentation": "One or more SQLQuery or SQLView Libraries to export. Each repetition identifies a single query. Applies at system and type level only; at instance level the bound Library identified by the request URL is the query source and this parameter does not apply.",
"part": [
{
"name": "name",
"use": "in",
"min": 0,
"max": "1",
"documentation": "Optional friendly name for the exported query output.",
"type": "string"
},
{
"name": "queryReference",
"use": "in",
"min": 0,
"max": "1",
"documentation": "Reference to a SQLQuery or SQLView Library stored on the server.",
"type": "Reference",
"targetProfile": [
"http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/SQLQuery",
"http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/SQLView"
]
},
{
"name": "queryResource",
"use": "in",
"min": 0,
"max": "1",
"documentation": "Inline SQLQuery or SQLView Library resource to execute.",
"type": "Library",
"targetProfile": [
"http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/SQLQuery",
"http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/SQLView"
]
},
{
"name": "parameters",
"use": "in",
"min": 0,
"max": "1",
"documentation": "Input parameters for this query. Parameters are bound by name to parameters declared in the SQLQuery Library (Library.parameter.name).",
"type": "Parameters"
}
]
},
{
"name": "view",
"use": "in",
"scope": [
"system",
"type",
"instance"
],
"min": 0,
"max": "*",
"documentation": "Inline ViewDefinition or SQLView Library supplying a table source the query depends on. Matched by its url (and version, when the depends-on canonical is versioned) to a relatedArtifact depends-on entry in the transitive dependency closure of the executed queries. See Table-Source Dependencies (operations-common.html).",
"type": "CanonicalResource",
"targetProfile": [
"http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition",
"http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/SQLView"
]
},
{
"name": "clientTrackingId",
"use": "in",
"scope": [
"system",
"type"
],
"min": 0,
"max": "1",
"documentation": "Client-provided tracking identifier for the export operation.",
"type": "string"
},
{
"name": "_format",
"use": "in",
"scope": [
"system",
"type"
],
"min": 0,
"max": "1",
"documentation": "Output format for the exported files (csv, ndjson, parquet, json). See Common Operation Behavior (operations-common.html).",
"type": "code",
"binding": {
"strength": "extensible",
"valueSet": "http://hl7.org/fhir/uv/sql-on-fhir/ValueSet/ExportOutputFormatCodes"
}
},
{
"name": "header",
"use": "in",
"scope": [
"system",
"type"
],
"min": 0,
"max": "1",
"documentation": "Include CSV headers (default true). Applies only when csv output is requested.",
"type": "boolean"
},
{
"name": "patient",
"use": "in",
"scope": [
"system",
"type"
],
"min": 0,
"max": "*",
"documentation": "Filter exported data to the supplied patient(s).",
"type": "Reference"
},
{
"name": "group",
"use": "in",
"scope": [
"system",
"type"
],
"min": 0,
"max": "*",
"documentation": "Filter exported data to members of the supplied group(s).",
"type": "Reference"
},
{
"name": "_since",
"use": "in",
"scope": [
"system",
"type"
],
"min": 0,
"max": "1",
"documentation": "Export only resources updated since this instant.",
"type": "instant"
},
{
"name": "source",
"use": "in",
"scope": [
"system",
"type"
],
"min": 0,
"max": "1",
"documentation": "External data source containing the ViewDefinition tables.",
"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": "http://hl7.org/fhir/uv/sql-on-fhir/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": "http://hl7.org/fhir/uv/sql-on-fhir/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 SQL query result. One entry per query; resources supplied via the view parameter do not produce output entries.",
"part": [
{
"name": "name",
"use": "out",
"min": 1,
"max": "1",
"documentation": "Name assigned to the exported output.",
"type": "string"
},
{
"name": "location",
"use": "out",
"min": 1,
"max": "*",
"documentation": "Download URL(s) for the exported file(s).",
"type": "uri"
}
]
}
]
}