FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packageorg.sql-on-fhir.ig
Resource TypeOperationDefinition
IdOperationDefinition-SQLQueryExport.json
FHIR VersionR5
Sourcehttps://build.fhir.org/ig/HL7/sql-on-fhir/OperationDefinition-SQLQueryExport.html
URLhttp://sql-on-fhir.org/OperationDefinition/$sqlquery-export
Version2.1.0-pre
Statusactive
Date2026-06-26T10:42:04+00:00
NameSQLQueryExport
TitleSQLQuery Export
Realmuv
DescriptionExport SQLQuery Library results asynchronously using the FHIR Asynchronous Bulk Data Request Pattern.
Typetrue
Kindoperation

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

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

Parameters

UseNameScopeCardinalityTypeBindingDocumentation
INquerysystem, type1..*

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.

INquery.name0..1string

Optional friendly name for the exported query output.

INquery.queryReference0..1Reference (SQL Query Library, SQL View Library)

Reference to a SQLQuery or SQLView Library stored on the server.

INquery.queryResource0..1Library (SQL Query Library, SQL View Library)

Inline SQLQuery or SQLView Library resource to execute.

INquery.parameters0..1Parameters

Input parameters for this query. Parameters are bound by name to parameters declared in the SQLQuery Library (Library.parameter.name).

INviewsystem, type0..*

ViewDefinitions that serve as table sources for the SQL queries. Provides ViewDefinitions referenced in the Library's relatedArtifact entries. These are materialized as tables for the SQL to query against — they do not produce separate output entries.

INview.name0..1string

Optional friendly name for the ViewDefinition.

INview.viewReference0..1Reference (View Definition)

Reference to a ViewDefinition stored on the server.

INview.viewResource0..1CanonicalResource (View Definition)

Inline ViewDefinition resource.

INclientTrackingIdsystem, type0..1string

Client-provided tracking identifier for the export operation.

IN_formatsystem, type0..1codeExport Output Format Codes (Extensible)

Output format for the exported files (csv, ndjson, parquet, json). See Common Operation Behavior (operations-common.html).

INheadersystem, type0..1boolean

Include CSV headers (default true). Applies only when csv output is requested.

INpatientsystem, type0..*Reference

Filter exported data to the supplied patient(s).

INgroupsystem, type0..*Reference

Filter exported data to members of the supplied group(s).

IN_sincesystem, type0..1instant

Export only resources updated since this instant.

INsourcesystem, type0..1string

External data source containing the ViewDefinition tables.

OUTexportId1..1string

Server-generated identifier assigned to the export request.

OUTclientTrackingId0..1string

Echoed client tracking identifier when provided.

OUTstatus1..1codeExport Status Codes (Required)

Status of the export (accepted, in-progress, completed, cancelled, failed).

OUTlocation1..1uri

URL to poll for export status updates.

OUTcancelUrl0..1uri

Optional URL for cancelling the export.

OUT_format0..1codeOutput Format Codes (Extensible)

Format of the exported files (echoed from input if supplied).

OUTexportStartTime0..1instant

Timestamp when the export operation began.

OUTexportEndTime0..1instant

Timestamp when the export operation completed.

OUTexportDuration0..1integer

Duration of the export in seconds.

OUTestimatedTimeRemaining0..1integer

Estimated seconds remaining until completion.

OUToutput0..*

Output information for each exported SQL query result. One entry per query; ViewDefinitions supplied via the view parameter do not produce output entries.

OUToutput.name1..1string

Name assigned to the exported output.

OUToutput.location1..*uri

Download URL(s) for the exported file(s).


Source1

{
  "resourceType": "OperationDefinition",
  "id": "SQLQueryExport",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://sql-on-fhir.org/OperationDefinition/$sqlquery-export",
  "version": "2.1.0-pre",
  "versionAlgorithmString": "semver",
  "name": "SQLQueryExport",
  "title": "SQLQuery Export",
  "status": "active",
  "kind": "operation",
  "date": "2026-06-26T10:42:04+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 SQLQuery Library results asynchronously using the FHIR Asynchronous Bulk Data 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": [
            "https://sql-on-fhir.org/ig/StructureDefinition/SQLQuery",
            "https://sql-on-fhir.org/ig/StructureDefinition/SQLView"
          ]
        },
        {
          "name": "queryResource",
          "use": "in",
          "min": 0,
          "max": "1",
          "documentation": "Inline SQLQuery or SQLView Library resource to execute.",
          "type": "Library",
          "targetProfile": [
            "https://sql-on-fhir.org/ig/StructureDefinition/SQLQuery",
            "https://sql-on-fhir.org/ig/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"
      ],
      "min": 0,
      "max": "*",
      "documentation": "ViewDefinitions that serve as table sources for the SQL queries. Provides ViewDefinitions referenced in the Library's relatedArtifact entries. These are materialized as tables for the SQL to query against — they do not produce separate output entries.",
      "part": [
        {
          "name": "name",
          "use": "in",
          "min": 0,
          "max": "1",
          "documentation": "Optional friendly name for the ViewDefinition.",
          "type": "string"
        },
        {
          "name": "viewReference",
          "use": "in",
          "min": 0,
          "max": "1",
          "documentation": "Reference to a ViewDefinition stored on the server.",
          "type": "Reference",
          "targetProfile": [
            "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition"
          ]
        },
        {
          "name": "viewResource",
          "use": "in",
          "min": 0,
          "max": "1",
          "documentation": "Inline ViewDefinition resource.",
          "type": "CanonicalResource",
          "targetProfile": [
            "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition"
          ]
        }
      ]
    },
    {
      "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": "https://sql-on-fhir.org/ig/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": "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 SQL query result. One entry per query; ViewDefinitions 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"
        }
      ]
    }
  ]
}