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

FHIR IG analytics

Packageorg.sql-on-fhir.ig
Resource TypeOperationDefinition
IdOperationDefinition-SQLQueryRun.json
FHIR VersionR5
Sourcehttps://build.fhir.org/ig/FHIR/sql-on-fhir-v2/OperationDefinition-SQLQueryRun.html
URLhttp://sql-on-fhir.org/OperationDefinition/$sqlquery-run
Version2.1.0-pre
Statusactive
Date2026-03-31T14:17:59+00:00
NameSQLQueryRun
TitleSQLQuery Run
Realmuv
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, instance1..1codeSQLQuery Run Output Format Codes (Extensible)

Output format for the result (json, ndjson, csv, parquet, fhir). Use fhir to return results as a FHIR Parameters resource.

INheadersystem, type, instance0..1boolean

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

INqueryReferencesystem, type0..1Reference

Reference to a SQLQuery Library stored on the server.

INqueryResourcesystem, type0..1https://sql-on-fhir.org/ig/StructureDefinition/SQLQuery

Inline SQLQuery Library resource to execute.

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.

OUTreturn1..1Binary | Parameters

Query results. Returns Binary for flat formats (csv, json, ndjson, parquet) or Parameters for _format=fhir.


Source1

{
  "resourceType": "OperationDefinition",
  "id": "SQLQueryRun",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://sql-on-fhir.org/OperationDefinition/$sqlquery-run",
  "version": "2.1.0-pre",
  "versionAlgorithmString": "semver",
  "name": "SQLQueryRun",
  "title": "SQLQuery Run",
  "status": "active",
  "kind": "operation",
  "date": "2026-03-31T14:17:59+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": "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": 1,
      "max": "1",
      "documentation": "Output format for the result (json, ndjson, csv, parquet, fhir). Use fhir to return results as a FHIR Parameters resource.",
      "type": "code",
      "binding": {
        "strength": "extensible",
        "valueSet": "https://sql-on-fhir.org/ig/ValueSet/SQLQueryRunOutputFormatCodes"
      }
    },
    {
      "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 Library stored on the server.",
      "type": "Reference"
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type",
          "valueUri": "https://sql-on-fhir.org/ig/StructureDefinition/SQLQuery"
        }
      ],
      "name": "queryResource",
      "use": "in",
      "scope": [
        "system",
        "type"
      ],
      "min": 0,
      "max": "1",
      "documentation": "Inline SQLQuery Library resource to execute.",
      "type": "Resource"
    },
    {
      "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"
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type",
          "valueUri": "Binary"
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type",
          "valueUri": "Parameters"
        }
      ],
      "name": "return",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "Query results. Returns Binary for flat formats (csv, json, ndjson, parquet) or Parameters for _format=fhir.",
      "type": "Resource"
    }
  ]
}