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

FHIR IG analytics

Packagehl7.fhir.uv.cpg
Resource TypeOperationDefinition
IdOperationDefinition-cpg-structureDefinition-questionnaire.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/HL7/cqf-recommendations/OperationDefinition-cpg-structureDefinition-questionnaire.html
URLhttp://hl7.org/fhir/uv/cpg/OperationDefinition/cpg-structureDefinition-questionnaire
Version2.0.0
Statusactive
Date2026-06-10T15:28:01+00:00
NameCPGStructureDefinitionQuestionnaire
TitleCPG StructureDefinition Questionnaire
Realmuv
Authorityhl7
DescriptionGenerates a Questionnaire instance based on a specified StructureDefinition, creating questions for a minimal set of elements or extension elements found in the Structure Definition.
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 cpg-structureDefinition-questionnaire

URL: [base]/StructureDefinition/$questionnaire

URL: [base]/StructureDefinition/[id]/$questionnaire

Parameters

UseNameScopeCardinalityTypeBindingDocumentation
INidentifier0..1Identifier

A logical identifier (i.e. 'StructureDefinition.identifier'). The server must know the StructureDefinition or be able to retrieve it from other known repositories.

INresource0..1StructureDefinition

The StructureDefinition is provided directly as part of the request. Servers may choose not to accept resources in this fashion

INurl0..1canonical (StructureDefinition)

The StructureDefinition's official URL (i.e. 'StructureDefinition.url'). The server must know the StructureDefinition or be able to retrieve it from other known repositories.

INsupportedOnly0..1boolean

If true, the questionnaire will only include those elements marked as "mustSupport='true'" in the StructureDefinition.

INminimalOnly0..1boolean

If true, the questionnaire items are limited to the minimal set of elements from the StructureDefinition.

INartifactEndpointConfiguration0..*

Configuration information to resolve canonical artifacts

Processing Semantics:

Create a canonical-like reference (e.g. {canonical.url}|{canonical.version} or similar extensions for non-canonical artifacts).

  • Given a single artifactEndpointConfiguration
    • When artifactRoute is present
      • And the canonical or artifact reference starts with the artifactRoute (up to and including the entire uri)
      • Then attempt to resolve with endpointUri or endpoint
    • When artifactRoute is not present
      • Then attempt to resolve with endpointUri or endpoint
  • Given multiple artifactEndpointConfigurations
    • Then rank order each configuration (see below)
    • And attempt to resolve with endpointUri or endpoint in order until resolved

Rank each artifactEndpointConfiguration such that:

  • if artifactRoute is present and artifactRoute starts with canonical or artifact reference: rank based on number of matching characters
  • if artifactRoute is not present: include but rank lower

NOTE: For evenly ranked artifactEndpointConfigurations, order as defined in the OperationDefinition.

INartifactEndpointConfiguration.artifactRoute0..1uri

An optional route used to determine whether this endpoint is expected to be able to resolve artifacts that match the route (i.e. start with the route, up to and including the entire url)

INartifactEndpointConfiguration.endpointUri0..1uri

The URI of the endpoint, exclusive with the endpoint parameter

INartifactEndpointConfiguration.endpoint0..1Endpoint

An Endpoint resource describing the endpoint, exclusive with the endpointUri parameter

OUTreturn1..1Questionnaire

The questionnaire form generated based on the StructureDefinition.

If the operation is not called at the instance level, one of the identifier, profile or url 'in' parameters must be provided. If more than one is specified, servers may raise an error or may resolve with the parameter of their choice. If called at the instance level, these parameters will be ignored. The response will contain a Questionnaire instance based on the specified StructureDefinition and/or an OperationOutcome resource with errors or warnings. Nested groups are used to handle complex structures and data types. If the 'minimalOnly' parameter is set to true, only minimal elements from the structure definition will be included. These are defined as:

  1. The element is a part of the differential; or
  2. The element is a part of the snapshot and has a cardinality of at least 1..* (min > 0). Nested child elements with min > 0 should also be included if parent has min > 0; and
  3. The element is not constrained by fixed[x] or pattern[x]

Of note, supportedOnly is not recommended for use with minimalOnly within CPG. See Questionnaire Processing Semantics for further details.


Source1

{
  "resourceType": "OperationDefinition",
  "id": "cpg-structureDefinition-questionnaire",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 5
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "cds"
    }
  ],
  "url": "http://hl7.org/fhir/uv/cpg/OperationDefinition/cpg-structureDefinition-questionnaire",
  "version": "2.0.0",
  "name": "CPGStructureDefinitionQuestionnaire",
  "title": "CPG StructureDefinition Questionnaire",
  "status": "active",
  "kind": "operation",
  "experimental": false,
  "date": "2026-06-10T15:28:01+00:00",
  "publisher": "HL7 International / Clinical Decision Support",
  "contact": [
    {
      "name": "HL7 International / Clinical Decision Support",
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/dss"
        }
      ]
    }
  ],
  "description": "Generates a Questionnaire instance based on a specified StructureDefinition, creating questions for a minimal set of elements or extension elements found in the Structure Definition.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "code": "questionnaire",
  "comment": "If the operation is not called at the instance level, one of the *identifier*, *profile* or *url* 'in' parameters must be provided. If more than one is specified, servers may raise an error or may resolve with the parameter of their choice. If called at the instance level, these parameters will be ignored. The response will contain a [Questionnaire](https://hl7.org/fhir/R4/questionnaire.html) instance based on the specified [StructureDefinition](https://hl7.org/fhir/R4/structuredefinition.html) and/or an [OperationOutcome](https://hl7.org/fhir/R4/operationoutcome.html) resource with errors or warnings.  Nested groups are used to handle complex structures and data types. If the 'minimalOnly' parameter is set to true, only minimal elements from the structure definition will be included. These are defined as:\n 1. The element is a part of the differential; or\n 2. The element is a part of the snapshot and has a cardinality of at least 1..\\* (min > 0). Nested child elements with min > 0 should also be included if parent has min > 0; and\n 3. The element is not constrained by fixed[x] or pattern[x]\n \n\nOf note, supportedOnly is not recommended for use with minimalOnly within CPG. See [Questionnaire Processing Semantics](interactive-cds.html#questionnaire-generation-processing-semantics) for further details.",
  "resource": [
    "StructureDefinition"
  ],
  "system": false,
  "type": true,
  "instance": true,
  "parameter": [
    {
      "name": "identifier",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "A logical identifier (i.e. 'StructureDefinition.identifier'). The server must know the StructureDefinition or be able to retrieve it from other known repositories.",
      "type": "Identifier"
    },
    {
      "name": "resource",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "The StructureDefinition is provided directly as part of the request. Servers may choose not to accept resources in this fashion",
      "type": "StructureDefinition"
    },
    {
      "name": "url",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "The StructureDefinition's official URL (i.e. 'StructureDefinition.url'). The server must know the StructureDefinition or be able to retrieve it from other known repositories.",
      "type": "canonical",
      "targetProfile": [
        "http://hl7.org/fhir/StructureDefinition/StructureDefinition"
      ]
    },
    {
      "name": "supportedOnly",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "If true, the questionnaire will only include those elements marked as \"mustSupport='true'\" in the StructureDefinition.",
      "type": "boolean"
    },
    {
      "name": "minimalOnly",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "If true, the questionnaire items are limited to the minimal set of elements  from the StructureDefinition.",
      "type": "boolean"
    },
    {
      "name": "artifactEndpointConfiguration",
      "use": "in",
      "min": 0,
      "max": "*",
      "documentation": "Configuration information to resolve canonical artifacts\n\nProcessing Semantics:\n\nCreate a canonical-like reference (e.g.\n`{canonical.url}|{canonical.version}` or similar extensions for non-canonical artifacts).\n\n* Given a single `artifactEndpointConfiguration`\n  * When `artifactRoute` is present\n    * And the canonical or artifact reference starts with the `artifactRoute` (up to and including the entire uri)\n    * Then attempt to resolve with `endpointUri` or `endpoint`\n  * When `artifactRoute` is not present\n    * Then attempt to resolve with `endpointUri` or `endpoint`\n* Given multiple `artifactEndpointConfiguration`s\n  * Then rank order each configuration (see below)\n  * And attempt to resolve with `endpointUri` or `endpoint` in order until resolved\n\nRank each `artifactEndpointConfiguration` such that:\n* if `artifactRoute` is present *and* `artifactRoute` *starts with* canonical or artifact reference: rank based on number of matching characters\n* if `artifactRoute` is *not* present: include but rank lower\n\nNOTE: For evenly ranked `artifactEndpointConfiguration`s, order as defined in the\nOperationDefinition.",
      "part": [
        {
          "name": "artifactRoute",
          "use": "in",
          "min": 0,
          "max": "1",
          "documentation": "An optional route used to determine whether this endpoint is expected to be able to resolve artifacts that match the route (i.e. start with the route, up to and including the entire url)",
          "type": "uri"
        },
        {
          "name": "endpointUri",
          "use": "in",
          "min": 0,
          "max": "1",
          "documentation": "The URI of the endpoint, exclusive with the `endpoint` parameter",
          "type": "uri"
        },
        {
          "name": "endpoint",
          "use": "in",
          "min": 0,
          "max": "1",
          "documentation": "An Endpoint resource describing the endpoint, exclusive with the `endpointUri` parameter",
          "type": "Endpoint"
        }
      ]
    },
    {
      "name": "return",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "The questionnaire form generated based on the StructureDefinition.",
      "type": "Questionnaire"
    }
  ]
}