Generated Narrative: StructureDefinition sdc-questionnaire-answerOptionsToggleExpression Name Flags Card. Type Description & Constraints Extension 0..* Extension Expression constraining allowed answers #xD; extension 2..* Extension Extension #xD; Slices for extension Content/Rules for all slices #xD; extension:option 1..* Extension Option(s) to toggle #xD; extension 0..0 Extension #xD; url 1..1 uri "option" #xD; value[x] 1..1 The option value to control #xD; valueDate date #xD; valueDateTime dateTime #xD; valueDecimal decimal #xD; valueInteger integer #xD; valueString string #xD; valueTime time #xD; valueUri uri #xD; valueCoding Coding #xD; valueQuantity Quantity(SimpleQuantity) #xD; valueReference Reference(Any) #xD; extension:expression 1..1 Extension The expression to toggle on #xD; extension 0..0 Extension #xD; url 1..1 uri "expression" #xD; value[x] 1..1 Expression Expression value #xD; url 1..1 uri "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-answerOptionsToggleExpression" #xD; value[x] 0..0 Value of extension #xD; Documentation for this format
A complex expression that provides a list of the allowed options that should be enabled or disabled based on the evaluation of a provided expression. It allows toggling of allowed answers based on context, including the answers provided to other expressions. Any options not listed by one of the answerOptionsToggleExpression occurrences are presumed to be 'enabled'. This expression should evaluate to a boolean. If it evaluates to an empty set, it will be interpretted as 'false'. If it evaluates to something other than a boolean, it is considered an error in the design of the Questionnaire. Form renderer behavior is undefined. Systems SHOULD present a warning to the user if a non-boolean valued expression result does not trigger an all-out error.
This is used when the set of options are fixed, but there is a need to toggle some of them on or off (as opposed to having the entire set of options dynamic, as is supported by answerExpression).
A complex expression that provides a list of the allowed options that should be enabled or disabled based on the evaluation of a provided expression. It allows toggling of allowed answers based on context, including the answers provided to other expressions.
For example, this allows a list of conditions to be modified based on the gender of the patient
All FHIR elements must have a @value or children
hasValue() or (children().count() > id.count())
Must have either extensions or value[x], not both
exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Extensions are always sliced by (at least) url
exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
Each repetition is an option to toggle based on the expression
Source of the definition for the extension code - a logical name or a URL.
The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.
Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).
If this expression evaluate's to 'true', then the specified options should be enabled, otherwise they should be disabled.