R4 Ballot #2 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.5.0: R4 Ballot #2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

Extension: context

FHIR Infrastructure Work Group Maturity Level: 1InformativeUse Context: Any

URL for this extension:

http://hl7.org/fhir/StructureDefinition/questionnaire-context

Status: draft. Extension maintained by: HL7

Resources that provide context for form processing logic (pre-population, flow-control, drop-down selection, etc.) when creating/displaying/editing a QuestionnaireResponse.

Context of Use: Use on Element ID Questionnaire

usage info: insert a list of places where this extension is used

Extension Content

Summary

NameFlagsCard.TypeDescription & Constraintsdoco
.. context0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-context
context: Resources that provide context for form processing logic (pre-population, flow-control, drop-down selection, etc.) when creating/displaying/editing a QuestionnaireResponse.


Use on Element ID Questionnaire
... name1..1idThe variable name the passed resource will be referenced by within the Questionnaire logic.

... type1..1codeThe kind of resource to be provided.

... description0..1stringGuidance on the resource to be provided and what impact providing it will have on questionnaire behavior.


doco Documentation for this format

Full Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. extension0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-context
context: Resources that provide context for form processing logic (pre-population, flow-control, drop-down selection, etc.) when creating/displaying/editing a QuestionnaireResponse.


Use on Element ID Questionnaire
... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
... extension 1..1ExtensionVariable name
.... extension 0..0
.... url 1..1uri"name"
.... valueId 0..1idValue of extension
... extension 1..1ExtensionResource type
.... extension 0..0
.... url 1..1uri"type"
.... valueCode 0..1codeValue of extension
Binding: ResourceType (required)
... extension 0..1ExtensionExplanation of context element
.... extension 0..0
.... url 1..1uri"description"
.... valueString 0..1stringValue of extension
... url 1..1uri"http://hl7.org/fhir/StructureDefinition/questionnaire-context"
... value[x] 0..0

doco Documentation for this format

XML Template

<!-- context -->doco

<extension xmlns="http://hl7.org/fhir"
     url="http://hl7.org/fhir/StructureDefinition/questionnaire-context" >
 <-- extension sliced by value:url  in the specified orderOpen-->
 <extension url="name"> 1..1 Extension  <!-- 1..1 Variable name -->
  <valueId value="[id]"/><!-- 0..1 Value of extension -->
 </extension>
 <extension url="type"> 1..1 Extension  <!-- 1..1 Resource type -->
  <valueCode value="[code]"/><!-- 0..1 Value of extension -->
 </extension>
 <extension url="description"> 0..1 Extension  <!-- 0..1 Explanation of context element -->
  <valueString value="[string]"/><!-- 0..1 Value of extension -->
 </extension>
</extension>

JSON Template

{ // context
    "extension" : [ //  sliced by value:url  in the specified order, Open 
      { // Variable name // R! 
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "name", // R! 
        "valueId" : "<id>" //Value of extension
      },
      { // Resource type // R! 
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "type", // R! 
        "valueCode" : "<code>" //Value of extension
      },
      { // Explanation of context element //
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "description", // R! 
        "valueString" : "<string>" //Value of extension
      }
    ],
    "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-context", // R! 
// value[x]: Value of extension. One of these 49:
  }

Summary

NameFlagsCard.TypeDescription & Constraintsdoco
.. context0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-context
context: Resources that provide context for form processing logic (pre-population, flow-control, drop-down selection, etc.) when creating/displaying/editing a QuestionnaireResponse.


Use on Element ID Questionnaire
... name1..1idThe variable name the passed resource will be referenced by within the Questionnaire logic.

... type1..1codeThe kind of resource to be provided.

... description0..1stringGuidance on the resource to be provided and what impact providing it will have on questionnaire behavior.


doco Documentation for this format

Full Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. extension0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-context
context: Resources that provide context for form processing logic (pre-population, flow-control, drop-down selection, etc.) when creating/displaying/editing a QuestionnaireResponse.


Use on Element ID Questionnaire
... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
... extension 1..1ExtensionVariable name
.... extension 0..0
.... url 1..1uri"name"
.... valueId 0..1idValue of extension
... extension 1..1ExtensionResource type
.... extension 0..0
.... url 1..1uri"type"
.... valueCode 0..1codeValue of extension
Binding: ResourceType (required)
... extension 0..1ExtensionExplanation of context element
.... extension 0..0
.... url 1..1uri"description"
.... valueString 0..1stringValue of extension
... url 1..1uri"http://hl7.org/fhir/StructureDefinition/questionnaire-context"
... value[x] 0..0

doco Documentation for this format

XML Template

<!-- context -->doco

<extension xmlns="http://hl7.org/fhir"
     url="http://hl7.org/fhir/StructureDefinition/questionnaire-context" >
 <-- extension sliced by value:url  in the specified orderOpen-->
 <extension url="name"> 1..1 Extension  <!-- 1..1 Variable name -->
  <valueId value="[id]"/><!-- 0..1 Value of extension -->
 </extension>
 <extension url="type"> 1..1 Extension  <!-- 1..1 Resource type -->
  <valueCode value="[code]"/><!-- 0..1 Value of extension -->
 </extension>
 <extension url="description"> 0..1 Extension  <!-- 0..1 Explanation of context element -->
  <valueString value="[string]"/><!-- 0..1 Value of extension -->
 </extension>
</extension>

JSON Template

{ // context
    "extension" : [ //  sliced by value:url  in the specified order, Open 
      { // Variable name // R! 
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "name", // R! 
        "valueId" : "<id>" //Value of extension
      },
      { // Resource type // R! 
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "type", // R! 
        "valueCode" : "<code>" //Value of extension
      },
      { // Explanation of context element //
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "description", // R! 
        "valueString" : "<string>" //Value of extension
      }
    ],
    "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-context", // R! 
// value[x]: Value of extension. One of these 49:
  }

 

Constraints

  • ele-1: All FHIR elements must have a @value or children (xpath: @value|f:*|h:div)
  • ext-1: Must have either extensions or value[x], not both (xpath: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')]))