Skip to content

Align $sqlquery-run parameters with CQL $evaluate pattern#321

Open
niquola wants to merge 1 commit intomasterfrom
align-sqlquery-params-with-cql
Open

Align $sqlquery-run parameters with CQL $evaluate pattern#321
niquola wants to merge 1 commit intomasterfrom
align-sqlquery-params-with-cql

Conversation

@niquola
Copy link
Member

@niquola niquola commented Mar 3, 2026

Summary

  • BREAKING: Replace custom parameter (0..*) with {name, value} parts with a standard nested parameters: Parameters (0..1) resource
  • Follows the CQL IG $evaluate operation pattern for passing arbitrary typed parameters to a library by name
  • Updated all documentation examples to use the new calling convention

Motivation

The previous parameter input with custom part[name, value] reinvented what the FHIR Parameters resource already provides. The CQL $evaluate operation — the closest analogy (both execute a Library with user-supplied typed parameters) — uses parameters: Parameters (0..1). See CQL IG source and CQL community discussion.

Changes

  • input/fsh/operations.fsh — replaced parameter[4] definition (19 lines of parts → 4 lines with type: Parameters)
  • OperationDefinition-SQLQueryRun-intro.md — minor wording update
  • OperationDefinition-SQLQueryRun-notes.md — rewrote all HTTP examples, added "Parameter Passing" section with CQL reference
  • OpenSpec change artifacts in openspec/changes/align-sqlquery-run-with-cql/

Before / After

Before:

{ "name": "parameter", "part": [
  { "name": "name", "valueString": "patient_id" },
  { "name": "value", "valueString": "Patient/123" }
]}

After:

{ "name": "parameters", "resource": {
  "resourceType": "Parameters",
  "parameter": [
    { "name": "patient_id", "valueString": "Patient/123" },
    { "name": "from_date", "valueDate": "2024-01-01" }
  ]
}}

Test plan

  • SUSHI compiles with 0 errors
  • IG builds successfully, no new QA errors
  • Review parameter table renders correctly on operation page

Closes #318
See also #320 (follow-up: GET parameter support)

🤖 Generated with Claude Code

Replace custom `parameter` (0..*) with parts {name, value} with a standard
nested `parameters: Parameters (0..1)` resource, following the CQL IG
Library/$evaluate operation pattern for passing arbitrary typed parameters
to a library by name.

Closes #318

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@johngrimes
Copy link
Collaborator

This will need to be reconciled with #327 before merging.

Copy link
Collaborator

@johngrimes johngrimes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, but we should merge #327 first, then merge master back into this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlquery-run parameters

2 participants