QuestionnaireItem constructor

const QuestionnaireItem({
  1. @JsonKey(name: 'id') FhirId? fhirId,
  2. @JsonKey(name: 'extension') List<FhirExtension>? extension_,
  3. List<FhirExtension>? modifierExtension,
  4. required String linkId,
  5. @JsonKey(name: '_linkId') Element? linkIdElement,
  6. FhirUri? definition,
  7. @JsonKey(name: '_definition') Element? definitionElement,
  8. List<Coding>? code,
  9. String? prefix,
  10. @JsonKey(name: '_prefix') Element? prefixElement,
  11. String? text,
  12. @JsonKey(name: '_text') Element? textElement,
  13. required FhirCode type,
  14. @JsonKey(name: '_type') Element? typeElement,
  15. List<QuestionnaireEnableWhen>? enableWhen,
  16. FhirCode? enableBehavior,
  17. @JsonKey(name: '_enableBehavior') Element? enableBehaviorElement,
  18. @JsonKey(name: 'required') FhirBoolean? required_,
  19. @JsonKey(name: '_required') Element? requiredElement,
  20. FhirBoolean? repeats,
  21. @JsonKey(name: '_repeats') Element? repeatsElement,
  22. FhirBoolean? readOnly,
  23. @JsonKey(name: '_readOnly') Element? readOnlyElement,
  24. FhirInteger? maxLength,
  25. @JsonKey(name: '_maxLength') Element? maxLengthElement,
  26. FhirCanonical? answerValueSet,
  27. List<QuestionnaireAnswerOption>? answerOption,
  28. List<QuestionnaireInitial>? initial,
  29. List<QuestionnaireItem>? item,
})

QuestionnaireItem A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.

id Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

extension_ May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

modifierExtension May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

linkId An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.

linkIdElement Extensions for linkId

definition This element is a URI that refers to an

[[ElementDefinition]] that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value:

  • code (ElementDefinition.code)
  • type (ElementDefinition.type)
  • required (ElementDefinition.min)
  • repeats (ElementDefinition.max)
  • maxLength (ElementDefinition.maxLength)
  • answerValueSet (ElementDefinition.binding)
  • options (ElementDefinition.binding).

definitionElement Extensions for definition

code A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).

prefix A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.

prefixElement Extensions for prefix

text The name of a section, the text of a question or text content for a display item.

textElement Extensions for text

type The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).

typeElement Extensions for type

enableWhen A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.

enableBehavior Controls how multiple enableWhen values are interpreted

  • whether all or any must be true.

enableBehaviorElement Extensions for enableBehavior

required An indication, if true, that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.

requiredElement Extensions for required

repeats An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.

repeatsElement Extensions for repeats

readOnly An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.

readOnlyElement Extensions for readOnly

maxLength The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse.

maxLengthElement Extensions for maxLength

answerValueSet A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question.

answerOption One of the permitted answers for a "choice" or "open-choice" question.

initial One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.

item Text, questions and other groups to be nested beneath a question or group.

Implementation

const factory QuestionnaireItem({
  /// [id] Unique id for the element within a resource (for internal
  ///  references). This may be any string value that does not contain spaces.
  @JsonKey(name: 'id') FhirId? fhirId,

  /// [extension_] May be used to represent additional information that is not
  /// part of the basic definition of the element. To make the use of extensions
  /// safe and manageable, there is a strict set of governance  applied to the
  /// definition and use of extensions. Though any implementer can define an
  /// extension, there is a set of requirements that SHALL be met as part of the
  ///  definition of the extension.
  @JsonKey(name: 'extension') List<FhirExtension>? extension_,

  /// [modifierExtension] May be used to represent additional information that
  /// is not part of the basic definition of the element and that modifies the
  /// understanding of the element in which it is contained and/or the
  /// understanding of the containing element's descendants. Usually modifier
  /// elements provide negation or qualification. To make the use of extensions
  /// safe and manageable, there is a strict set of governance applied to the
  /// definition and use of extensions. Though any implementer can define an
  /// extension, there is a set of requirements that SHALL be met as part of the
  /// definition of the extension. Applications processing a resource are
  ///  required to check for modifier extensions.
  /// Modifier extensions SHALL NOT change the meaning of any elements on
  /// Resource or DomainResource (including cannot change the meaning of
  ///  modifierExtension itself).
  List<FhirExtension>? modifierExtension,

  /// [linkId] An identifier that is unique within the Questionnaire allowing
  ///  linkage to the equivalent item in a QuestionnaireResponse resource.
  required String linkId,

  /// [linkIdElement] Extensions for linkId
  @JsonKey(name: '_linkId') Element? linkIdElement,

  /// [definition] This element is a URI that refers to an
  FhirUri? definition,

  /// [definitionElement] Extensions for definition
  @JsonKey(name: '_definition') Element? definitionElement,

  /// [code] A terminology code that corresponds to this group or question
  ///  (e.g. a code from LOINC, which defines many questions and answers).
  List<Coding>? code,

  /// [prefix] A short label for a particular group, question or set of display
  /// text within the questionnaire used for reference by the individual
  ///  completing the questionnaire.
  String? prefix,

  /// [prefixElement] Extensions for prefix
  @JsonKey(name: '_prefix') Element? prefixElement,

  /// [text] The name of a section, the text of a question or text content for
  ///  a display item.
  String? text,

  /// [textElement] Extensions for text
  @JsonKey(name: '_text') Element? textElement,

  /// [type] The type of questionnaire item this is - whether text for display,
  /// a grouping of other items or a particular type of data to be captured
  ///  (string, integer, coded choice, etc.).
  required FhirCode type,

  /// [typeElement] Extensions for type
  @JsonKey(name: '_type') Element? typeElement,

  /// [enableWhen] A constraint indicating that this item should only be
  /// enabled (displayed/allow answers to be captured) when the specified
  ///  condition is true.
  List<QuestionnaireEnableWhen>? enableWhen,

  /// [enableBehavior] Controls how multiple enableWhen values are interpreted
  ///  -  whether all or any must be true.
  FhirCode? enableBehavior,

  /// [enableBehaviorElement] Extensions for enableBehavior
  @JsonKey(name: '_enableBehavior') Element? enableBehaviorElement,

  /// [required] An indication, if true, that the item must be present in a
  /// "completed" QuestionnaireResponse.  If false, the item may be skipped when
  ///  answering the questionnaire.
  @JsonKey(name: 'required') FhirBoolean? required_,

  /// [requiredElement] Extensions for required
  @JsonKey(name: '_required') Element? requiredElement,

  /// [repeats] An indication, if true, that the item may occur multiple times
  /// in the response, collecting multiple answers for questions or multiple
  ///  sets of answers for groups.
  FhirBoolean? repeats,

  /// [repeatsElement] Extensions for repeats
  @JsonKey(name: '_repeats') Element? repeatsElement,

  /// [readOnly] An indication, when true, that the value cannot be changed by
  ///  a human respondent to the Questionnaire.
  FhirBoolean? readOnly,

  /// [readOnlyElement] Extensions for readOnly
  @JsonKey(name: '_readOnly') Element? readOnlyElement,

  /// [maxLength] The maximum number of characters that are permitted in the
  ///  answer to be considered a "valid" QuestionnaireResponse.
  FhirInteger? maxLength,

  /// [maxLengthElement] Extensions for maxLength
  @JsonKey(name: '_maxLength') Element? maxLengthElement,

  /// [answerValueSet] A reference to a value set containing a list of codes
  ///  representing permitted answers for a "choice" or "open-choice" question.
  FhirCanonical? answerValueSet,

  /// [answerOption] One of the permitted answers for a "choice" or
  ///  "open-choice" question.
  List<QuestionnaireAnswerOption>? answerOption,

  /// [initial] One or more values that should be pre-populated in the answer
  ///  when initially rendering the questionnaire for user input.
  List<QuestionnaireInitial>? initial,

  /// [item] Text, questions and other groups to be nested beneath a question
  ///  or group.
  List<QuestionnaireItem>? item,
}) = _QuestionnaireItem;