PackagesCanonicalsLogsProblems
    Packages
    ch.fhir.ig.ch-orf@0.9.1
    http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-questionnaire
description: Profile on Questionnaire for CH-ORF
package_name: ch.fhir.ig.ch-orf
derivation: constraint
name: ORFQuestionnaire
type: Questionnaire
elements:
  extension:
    isModifier: false
    short: Map to artifacts that can be populated from this Questionnaire
    type: Extension
    mustSupport: false
    url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-targetStructureMap
    isSummary: false
    index: 0
    slicing:
      slices:
        targetStructureMap:
          match: {}
          schema: {isModifier: false, short: Map to artifacts that can be populated from this Questionnaire, type: Extension, mustSupport: false, url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-targetStructureMap', isSummary: false, index: 0}
          min: 1
          max: 1
  item:
    constraint:
      que-6: {human: Required and repeat aren't permitted for display items, severity: error, expression: type!='display' or (required.empty() and repeats.empty())}
      que-3: {human: Display items cannot have a "code" asserted, severity: error, expression: type!='display' or code.empty()}
      que-4: {human: A question cannot have both answerOption and answerValueSet, severity: error, expression: answerOption.empty() or answerValueSet.empty()}
      que-8: {human: Initial values can't be specified for groups or display items, severity: error, expression: (type!='group' and type!='display') or initial.empty()}
      que-13: {human: Can only have multiple initial values for repeating items, severity: error, expression: repeats=true or initial.count() <= 1}
      que-12: {human: 'If there are more than one enableWhen, enableBehavior must be specified', severity: error, expression: enableWhen.count() > 2 implies enableBehavior.exists()}
      que-11: {human: 'If one or more answerOption is present, initial[x] must be missing', severity: error, expression: answerOption.empty() or initial.empty()}
      que-9: {human: Read-only can't be specified for "display" items, severity: error, expression: type!='display' or readOnly.empty()}
      que-1: {human: 'Group items must have nested items, display items cannot have nested items', severity: error, expression: (type='group' implies item.empty().not()) and (type.trace('type')='display' implies item.trace('item').empty())}
      que-10: {human: Maximum length can only be declared for simple question types, severity: error, expression: (type in ('boolean' | 'decimal' | 'integer' | 'string' | 'text' | 'url' | 'open-choice')) or maxLength.empty()}
      que-5: {human: Only 'choice' and 'open-choice' items can have answerValueSet, severity: error, expression: (type ='choice' or type = 'open-choice' or type = 'decimal' or type = 'integer' or type = 'date' or type = 'dateTime' or type = 'time' or type = 'string' or type = 'quantity') or (answerValueSet.empty() and answerOption.empty())}
    short: Questions and sections within the Questionnaire
    type: BackboneElement
    array: true
    index: 1
    elements:
      enableBehavior:
        short: all | any
        type: code
        binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/questionnaire-enable-behavior|4.0.1'}
        index: 23
      definition: {short: ElementDefinition - details for the item, type: uri, index: 3}
      linkId: {short: Unique id for item in questionnaire, type: string, index: 2}
      repeats: {short: Whether the item may repeat, type: boolean, meaningWhenMissing: Items are generally assumed not to repeat unless explicitly specified. Systems SHOULD always populate this value, index: 25}
      item:
        elementReference: ['http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-questionnaire', elements, item]
        short: Nested questionnaire items
        array: true
        index: 54
      type:
        short: group | display | boolean | decimal | integer | date | dateTime +
        type: code
        binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/item-type|4.0.1'}
        index: 7
      enableWhen:
        constraint:
          que-7: {human: 'If the operator is ''exists'', the value must be a boolean', severity: error, expression: operator = 'exists' implies (answer is Boolean)}
        isModifier: true
        short: Only allow data when
        index: 8
        type: BackboneElement
        array: true
        elements:
          answerQuantity: {short: Value for question comparison based on operator, type: Quantity, choiceOf: answer, index: 21}
          answerDecimal: {short: Value for question comparison based on operator, type: decimal, choiceOf: answer, index: 14}
          answerDate: {short: Value for question comparison based on operator, type: date, choiceOf: answer, index: 16}
          answerReference:
            short: Value for question comparison based on operator
            refers: ['http://hl7.org/fhir/StructureDefinition/Resource']
            type: Reference
            choiceOf: answer
            index: 22
          answerInteger: {short: Value for question comparison based on operator, type: integer, choiceOf: answer, index: 15}
          question: {short: Question that determines whether item is enabled, type: string, index: 9}
          answerDateTime: {short: Value for question comparison based on operator, type: dateTime, choiceOf: answer, index: 17}
          answer:
            short: Value for question comparison based on operator
            choices: [answerBoolean, answerDecimal, answerInteger, answerDate, answerDateTime, answerTime, answerString, answerCoding, answerQuantity, answerReference]
            index: 12
          answerString: {short: Value for question comparison based on operator, type: string, choiceOf: answer, index: 19}
          operator:
            short: exists | = | != | > | < | >= | <=
            type: code
            binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/questionnaire-enable-operator|4.0.1'}
            index: 10
          answerBoolean: {short: Value for question comparison based on operator, type: boolean, choiceOf: answer, index: 13}
          answerCoding: {short: Value for question comparison based on operator, type: Coding, choiceOf: answer, index: 20}
          answerTime: {short: Value for question comparison based on operator, type: time, choiceOf: answer, index: 18}
        isModifierReason: If enableWhen is present and the condition evaluates to false, then the Questionnaire behaves as though the elements weren't actually present
        required: [answerReference, operator, answerDate, answerTime, answerString, answerCoding, question, answerInteger, answerQuantity, answerDateTime, answerBoolean, answerDecimal, answer]
      answerOption:
        short: Permitted answer
        type: BackboneElement
        array: true
        index: 29
        elements:
          value:
            short: Answer value
            choices: [valueInteger, valueDate, valueTime, valueString, valueCoding, valueReference]
            index: 31
          valueInteger: {short: Answer value, type: integer, choiceOf: value, index: 32}
          valueDate: {short: Answer value, type: date, choiceOf: value, index: 33}
          valueTime: {short: Answer value, type: time, choiceOf: value, index: 34}
          valueString: {short: Answer value, type: string, choiceOf: value, index: 35}
          valueCoding: {short: Answer value, type: Coding, choiceOf: value, index: 36}
          valueReference:
            short: Answer value
            refers: ['http://hl7.org/fhir/StructureDefinition/Resource']
            type: Reference
            choiceOf: value
            index: 37
          initialSelected: {short: Whether option is selected by default, type: boolean, meaningWhenMissing: Only selected items explicitly marked to be selected, index: 38}
        required: [valueCoding, valueString, valueReference, value, valueDate, valueTime, valueInteger]
      prefix: {short: 'E.g. "1(a)", "2.5.3"', type: string, index: 5}
      readOnly: {short: Don't allow human editing, type: boolean, index: 26}
      answerValueSet: {short: Valueset containing permitted answers, type: canonical, index: 28}
      code:
        short: Corresponding concept for this item in a terminology
        type: Coding
        binding: {strength: extensible, valueSet: 'http://fhir.ch/ig/ch-orf/ValueSet/minimaldataset'}
        index: 4
      initial:
        short: Initial value(s) when item is first rendered
        type: BackboneElement
        array: true
        index: 39
        elements:
          valueReference:
            short: Actual value for initializing the question
            refers: ['http://hl7.org/fhir/StructureDefinition/Resource']
            type: Reference
            choiceOf: value
            index: 53
          valueUri: {short: Actual value for initializing the question, type: uri, choiceOf: value, index: 49}
          valueTime: {short: Actual value for initializing the question, type: time, choiceOf: value, index: 47}
          valueDecimal: {short: Actual value for initializing the question, type: decimal, choiceOf: value, index: 43}
          valueQuantity: {short: Actual value for initializing the question, type: Quantity, choiceOf: value, index: 52}
          value:
            short: Actual value for initializing the question
            choices: [valueBoolean, valueDecimal, valueInteger, valueDate, valueDateTime, valueTime, valueString, valueUri, valueAttachment, valueCoding, valueQuantity, valueReference]
            index: 41
          valueString: {short: Actual value for initializing the question, type: string, choiceOf: value, index: 48}
          valueBoolean: {short: Actual value for initializing the question, type: boolean, choiceOf: value, index: 42}
          valueDateTime: {short: Actual value for initializing the question, type: dateTime, choiceOf: value, index: 46}
          valueDate: {short: Actual value for initializing the question, type: date, choiceOf: value, index: 45}
          valueCoding: {short: Actual value for initializing the question, type: Coding, choiceOf: value, index: 51}
          valueInteger: {short: Actual value for initializing the question, type: integer, choiceOf: value, index: 44}
          valueAttachment: {short: Actual value for initializing the question, type: Attachment, choiceOf: value, index: 50}
        required: [valueCoding, valueUri, valueString, valueReference, valueDecimal, valueAttachment, valueDateTime, value, valueBoolean, valueDate, valueTime, valueQuantity, valueInteger]
      maxLength: {short: No more than this many characters, type: integer, index: 27}
      required: {short: Whether the item must be included in data results, type: boolean, meaningWhenMissing: Items are generally assumed not to be required unless explicitly specified. Systems SHOULD always populate this value, index: 24}
      text: {short: Primary text for the item, type: string, index: 6}
    required: [type, linkId]
package_version: 0.9.1
extensions:
  targetStructureMap: {min: 1, isModifier: false, short: Map to artifacts that can be populated from this Questionnaire, index: 0, type: Extension, mustSupport: false, max: 1, url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-targetStructureMap', isSummary: false}
class: profile
kind: resource
url: http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-questionnaire
base: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-extract
version: 0.9.1