Clinical Practice Guidelines, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 2.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cqf-recommendations/ and changes regularly. See the Directory of published versions
| Page standards status: Trial-use | Maturity Level: 5 |
<OperationDefinition xmlns="http://hl7.org/fhir">
<id value="cpg-structureDefinition-questionnaire"/>
<language value="en"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition cpg-structureDefinition-questionnaire</b></p><a name="cpg-structureDefinition-questionnaire"> </a><a name="hccpg-structureDefinition-questionnaire"> </a><p>URL: [base]/StructureDefinition/$questionnaire</p><p>URL: [base]/StructureDefinition/[id]/$questionnaire</p><h3>Parameters</h3><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>identifier</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#Identifier">Identifier</a></td><td/><td><div><p>A logical identifier (i.e. 'StructureDefinition.identifier'). The server must know the StructureDefinition or be able to retrieve it from other known repositories.</p>
</div></td></tr><tr><td>IN</td><td>resource</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/structuredefinition.html">StructureDefinition</a></td><td/><td><div><p>The StructureDefinition is provided directly as part of the request. Servers may choose not to accept resources in this fashion</p>
</div></td></tr><tr><td>IN</td><td>url</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#canonical">canonical</a> (<a href="http://hl7.org/fhir/R4/structuredefinition.html" title="http://hl7.org/fhir/StructureDefinition/StructureDefinition">StructureDefinition</a>)</td><td/><td><div><p>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.</p>
</div></td></tr><tr><td>IN</td><td>supportedOnly</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#boolean">boolean</a></td><td/><td><div><p>If true, the questionnaire will only include those elements marked as "mustSupport='true'" in the StructureDefinition.</p>
</div></td></tr><tr><td>IN</td><td>minimalOnly</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#boolean">boolean</a></td><td/><td><div><p>If true, the questionnaire items are limited to the minimal set of elements from the StructureDefinition.</p>
</div></td></tr><tr><td>IN</td><td>artifactEndpointConfiguration</td><td/><td>0..*</td><td/><td/><td><div><p>Configuration information to resolve canonical artifacts</p>
<p>Processing Semantics:</p>
<p>Create a canonical-like reference (e.g.
<code>{canonical.url}|{canonical.version}</code> or similar extensions for non-canonical artifacts).</p>
<ul>
<li>Given a single <code>artifactEndpointConfiguration</code>
<ul>
<li>When <code>artifactRoute</code> is present
<ul>
<li>And the canonical or artifact reference starts with the <code>artifactRoute</code> (up to and including the entire uri)</li>
<li>Then attempt to resolve with <code>endpointUri</code> or <code>endpoint</code></li>
</ul>
</li>
<li>When <code>artifactRoute</code> is not present
<ul>
<li>Then attempt to resolve with <code>endpointUri</code> or <code>endpoint</code></li>
</ul>
</li>
</ul>
</li>
<li>Given multiple <code>artifactEndpointConfiguration</code>s
<ul>
<li>Then rank order each configuration (see below)</li>
<li>And attempt to resolve with <code>endpointUri</code> or <code>endpoint</code> in order until resolved</li>
</ul>
</li>
</ul>
<p>Rank each <code>artifactEndpointConfiguration</code> such that:</p>
<ul>
<li>if <code>artifactRoute</code> is present <em>and</em> <code>artifactRoute</code> <em>starts with</em> canonical or artifact reference: rank based on number of matching characters</li>
<li>if <code>artifactRoute</code> is <em>not</em> present: include but rank lower</li>
</ul>
<p>NOTE: For evenly ranked <code>artifactEndpointConfiguration</code>s, order as defined in the
OperationDefinition.</p>
</div></td></tr><tr><td>IN</td><td>artifactEndpointConfiguration.artifactRoute</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#uri">uri</a></td><td/><td><div><p>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)</p>
</div></td></tr><tr><td>IN</td><td>artifactEndpointConfiguration.endpointUri</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#uri">uri</a></td><td/><td><div><p>The URI of the endpoint, exclusive with the <code>endpoint</code> parameter</p>
</div></td></tr><tr><td>IN</td><td>artifactEndpointConfiguration.endpoint</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/endpoint.html">Endpoint</a></td><td/><td><div><p>An Endpoint resource describing the endpoint, exclusive with the <code>endpointUri</code> parameter</p>
</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/questionnaire.html">Questionnaire</a></td><td/><td><div><p>The questionnaire form generated based on the StructureDefinition.</p>
</div></td></tr></table><div><p>If the operation is not called at the instance level, one of the <em>identifier</em>, <em>profile</em> or <em>url</em> '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 <a href="https://hl7.org/fhir/R4/questionnaire.html">Questionnaire</a> instance based on the specified <a href="https://hl7.org/fhir/R4/structuredefinition.html">StructureDefinition</a> and/or an <a href="https://hl7.org/fhir/R4/operationoutcome.html">OperationOutcome</a> 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:</p>
<ol>
<li>The element is a part of the differential; or</li>
<li>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</li>
<li>The element is not constrained by fixed[x] or pattern[x]</li>
</ol>
<p>Of note, supportedOnly is not recommended for use with minimalOnly within CPG. See <a href="interactive-cds.html#questionnaire-generation-processing-semantics">Questionnaire Processing Semantics</a> for further details.</p>
</div></div>
</text>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="5"/>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
<valueCode value="trial-use"/>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
<valueCode value="cds"/>
</extension>
<url
value="http://hl7.org/fhir/uv/cpg/OperationDefinition/cpg-structureDefinition-questionnaire"/>
<version value="2.0.0"/>
<name value="CPGStructureDefinitionQuestionnaire"/>
<title value="CPG StructureDefinition Questionnaire"/>
<status value="active"/>
<kind value="operation"/>
<experimental value="false"/>
<date value="2026-06-10T15:28:01+00:00"/>
<publisher value="HL7 International / Clinical Decision Support"/>
<contact>
<name value="HL7 International / Clinical Decision Support"/>
<telecom>
<system value="url"/>
<value value="http://www.hl7.org/Special/committees/dss"/>
</telecom>
</contact>
<description
value="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 value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
<display value="World"/>
</coding>
</jurisdiction>
<code value="questionnaire"/>
<comment
value="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:
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](interactive-cds.html#questionnaire-generation-processing-semantics) for further details."/>
<resource value="StructureDefinition"/>
<system value="false"/>
<type value="true"/>
<instance value="true"/>
<parameter>
<name value="identifier"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="A logical identifier (i.e. 'StructureDefinition.identifier'). The server must know the StructureDefinition or be able to retrieve it from other known repositories."/>
<type value="Identifier"/>
</parameter>
<parameter>
<name value="resource"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="The StructureDefinition is provided directly as part of the request. Servers may choose not to accept resources in this fashion"/>
<type value="StructureDefinition"/>
</parameter>
<parameter>
<name value="url"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="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 value="canonical"/>
<targetProfile
value="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
</parameter>
<parameter>
<name value="supportedOnly"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="If true, the questionnaire will only include those elements marked as "mustSupport='true'" in the StructureDefinition."/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="minimalOnly"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="If true, the questionnaire items are limited to the minimal set of elements from the StructureDefinition."/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="artifactEndpointConfiguration"/>
<use value="in"/>
<min value="0"/>
<max value="*"/>
<documentation
value="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 `artifactEndpointConfiguration`s
* 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 `artifactEndpointConfiguration`s, order as defined in the
OperationDefinition."/>
<part>
<name value="artifactRoute"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="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 value="uri"/>
</part>
<part>
<name value="endpointUri"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="The URI of the endpoint, exclusive with the `endpoint` parameter"/>
<type value="uri"/>
</part>
<part>
<name value="endpoint"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="An Endpoint resource describing the endpoint, exclusive with the `endpointUri` parameter"/>
<type value="Endpoint"/>
</part>
</parameter>
<parameter>
<name value="return"/>
<use value="out"/>
<min value="1"/>
<max value="1"/>
<documentation
value="The questionnaire form generated based on the StructureDefinition."/>
<type value="Questionnaire"/>
</parameter>
</OperationDefinition>