FHIR IG analytics| Package | hl7.fhir.uv.sql-on-fhir |
| Resource Type | OperationDefinition |
| Id | OperationDefinition-SQLQueryRun.json |
| FHIR Version | R5 |
| Source | https://build.fhir.org/ig/HL7/sql-on-fhir/OperationDefinition-SQLQueryRun.html |
| URL | http://hl7.org/fhir/uv/sql-on-fhir/OperationDefinition/SQLQueryRun |
| Version | 3.0.0-ballot |
| Status | active |
| Date | 2026-08-05T23:37:23+00:00 |
| Name | SQLQueryRun |
| Title | SQLQuery Run |
| Realm | uv |
| Authority | hl7 |
| Description | Execute a SQLQuery Library against ViewDefinition tables. |
| Type | true |
| Kind | operation |
No resources found
No resources found
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
| Use | Name | Scope | Cardinality | Type | Binding | Documentation |
| IN | _format | system, type, instance | 0..1 | code | Output 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). |
| IN | header | system, type, instance | 0..1 | boolean | Include CSV headers (default true). Applies only when csv output is requested. | |
| IN | queryReference | system, type | 0..1 | Reference (SQL Query Library, SQL View Library) | Reference to a SQLQuery or SQLView Library stored on the server. | |
| IN | queryResource | system, type | 0..1 | Library (SQL Query Library, SQL View Library) | Inline SQLQuery or SQLView Library resource to execute. | |
| 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 | parameters | system, type, instance | 0..1 | Parameters | 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. | |
| IN | source | system, type, instance | 0..1 | string | External data source containing the ViewDefinition tables. | |
| IN | _limit | system, type, instance | 0..1 | integer | Maximum number of rows to return. | |
| OUT | return | 1..1 | Binary | 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). |
{
"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"
}
]
}