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

FHIR IG analytics

Packagehl7.fhir.uv.sql-on-fhir
Resource TypeOperationDefinition
IdOperationDefinition-SQLQueryRun.json
FHIR VersionR5
Sourcehttps://build.fhir.org/ig/HL7/sql-on-fhir/OperationDefinition-SQLQueryRun.html
URLhttp://hl7.org/fhir/uv/sql-on-fhir/OperationDefinition/SQLQueryRun
Version3.0.0-ballot
Statusactive
Date2026-08-05T23:37:23+00:00
NameSQLQueryRun
TitleSQLQuery Run
Realmuv
Authorityhl7
DescriptionExecute a SQLQuery Library against ViewDefinition tables.
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 SQLQueryRun

URL: [base]/$sqlquery-run

URL: [base]/Library/$sqlquery-run

URL: [base]/Library/[id]/$sqlquery-run

Parameters

UseNameScopeCardinalityTypeBindingDocumentation
IN_formatsystem, type, instance0..1codeOutput Format Codes (Extensible)

Output format for the result (json, ndjson, csv, parquet, fhir). Use fhir to return results as a FHIR Parameters resource. Optional; if omitted, the server returns ndjson by default. See Common Operation Behavior (operations-common.html).

INheadersystem, type, instance0..1boolean

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

INqueryReferencesystem, type0..1Reference (SQL Query Library, SQL View Library)

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

INqueryResourcesystem, type0..1Library (SQL Query Library, SQL View Library)

Inline SQLQuery or SQLView Library resource to execute.

INviewsystem, type, instance0..*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).

INparameterssystem, type, instance0..1Parameters

Input parameters for the query. Parameters are bound by name to parameters declared in the SQLQuery Library (Library.parameter.name). Parameter types are mapped using the appropriate value[x] type matching the declared parameter type.

INsourcesystem, type, instance0..1string

External data source containing the ViewDefinition tables.

IN_limitsystem, type, instance0..1integer

Maximum number of rows to return.

OUTreturn1..1Binary

Query results in the requested output format, returned as a raw binary stream in the format's native media type, not a serialized Binary resource envelope. When _format=fhir is requested, the response is a Parameters resource instead. See Common Operation Behavior (operations-common.html).


Source1

{
  "resourceType": "OperationDefinition",
  "id": "SQLQueryRun",
  "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/SQLQueryRun",
  "identifier": [
    {
      "system": "urn:ietf:rfc:3986",
      "value": "urn:oid:2.16.840.1.113883.4.642.40.77.33.2"
    }
  ],
  "version": "3.0.0-ballot",
  "versionAlgorithmString": "semver",
  "name": "SQLQueryRun",
  "title": "SQLQuery Run",
  "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": "Execute a SQLQuery Library against ViewDefinition tables.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "code": "sqlquery-run",
  "resource": [
    "Library"
  ],
  "system": true,
  "type": true,
  "instance": true,
  "parameter": [
    {
      "name": "_format",
      "use": "in",
      "scope": [
        "system",
        "type",
        "instance"
      ],
      "min": 0,
      "max": "1",
      "documentation": "Output format for the result (json, ndjson, csv, parquet, fhir). Use fhir to return results as a FHIR Parameters resource. Optional; if omitted, the server returns ndjson by default. See Common Operation Behavior (operations-common.html).",
      "type": "code",
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/uv/sql-on-fhir/ValueSet/OutputFormatCodes"
      }
    },
    {
      "name": "header",
      "use": "in",
      "scope": [
        "system",
        "type",
        "instance"
      ],
      "min": 0,
      "max": "1",
      "documentation": "Include CSV headers (default true). Applies only when csv output is requested.",
      "type": "boolean"
    },
    {
      "name": "queryReference",
      "use": "in",
      "scope": [
        "system",
        "type"
      ],
      "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",
      "scope": [
        "system",
        "type"
      ],
      "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": "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": "parameters",
      "use": "in",
      "scope": [
        "system",
        "type",
        "instance"
      ],
      "min": 0,
      "max": "1",
      "documentation": "Input parameters for the query. Parameters are bound by name to parameters declared in the SQLQuery Library (Library.parameter.name). Parameter types are mapped using the appropriate value[x] type matching the declared parameter type.",
      "type": "Parameters"
    },
    {
      "name": "source",
      "use": "in",
      "scope": [
        "system",
        "type",
        "instance"
      ],
      "min": 0,
      "max": "1",
      "documentation": "External data source containing the ViewDefinition tables.",
      "type": "string"
    },
    {
      "name": "_limit",
      "use": "in",
      "scope": [
        "system",
        "type",
        "instance"
      ],
      "min": 0,
      "max": "1",
      "documentation": "Maximum number of rows to return.",
      "type": "integer"
    },
    {
      "name": "return",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "Query results in the requested output format, returned as a raw binary stream in the format's native media type, not a serialized Binary resource envelope. When _format=fhir is requested, the response is a Parameters resource instead. See Common Operation Behavior (operations-common.html).",
      "type": "Binary"
    }
  ]
}