### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/Questionnaire.json
### ----------------------------------------------------
### -- Chunk 18 of 18
 referred to by .definition.",
      "requirements" : "Items may be used to create set of (related) questions that can be repeated to give multiple answers to such a set.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "meaningWhenMissing" : "Items are generally assumed not to repeat unless explicitly specified. Systems SHOULD always populate this value",
      "condition" : ["que-6"],
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.readOnly",
      "path" : "Questionnaire.item.readOnly",
      "short" : "Don't allow human editing",
      "definition" : "An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.",
      "comment" : "The value of readOnly elements can be established by asserting  extensions for defaultValues, linkages that support pre-population and/or extensions that support calculation based on other answers.",
      "requirements" : "Allows certain information to be phrased (and rendered) as a question and an answer, while keeping users from changing it.  May also be useful for preventing changes to pre-populated portions of a questionnaire, for calculated values, etc.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "condition" : ["que-9"],
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.maxLength",
      "path" : "Questionnaire.item.maxLength",
      "short" : "No more than this many characters",
      "definition" : "The maximum number of characters that are permitted in the answer to be considered a \"valid\" QuestionnaireResponse.",
      "comment" : "For base64binary, reflects the number of characters representing the encoded data, not the number of bytes of the binary data. The value may come from the ElementDefinition referred to by .definition.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "integer"
      }],
      "condition" : ["que-10"],
      "mapping" : [{
        "identity" : "v2",
        "map" : "N/A"
      },
      {
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.answerValueSet",
      "path" : "Questionnaire.item.answerValueSet",
      "short" : "Valueset containing permitted answers",
      "definition" : "A reference to a value set containing a list of codes representing permitted answers for a \"choice\" or \"open-choice\" question.",
      "comment" : "LOINC defines many useful value sets for questionnaire responses. See [LOINC Answer Lists](loinc.html#alist). The value may come from the ElementDefinition referred to by .definition.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "canonical",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/ValueSet"]
      }],
      "condition" : ["que-4",
      "que-5"],
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.answerOption",
      "path" : "Questionnaire.item.answerOption",
      "short" : "Permitted answer",
      "definition" : "One of the permitted answers for a \"choice\" or \"open-choice\" question.",
      "comment" : "This element can be used when the value set machinery of answerValueSet is deemed too cumbersome or when there's a need to capture possible answers that are not codes.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["que-4",
      "que-5"],
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.answerOption.value[x]",
      "path" : "Questionnaire.item.answerOption.value[x]",
      "short" : "Answer value",
      "definition" : "A potential answer that's allowed as the answer to this question.",
      "comment" : "The data type of the value must agree with the item.type.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "integer"
      },
      {
        "code" : "date"
      },
      {
        "code" : "time"
      },
      {
        "code" : "string"
      },
      {
        "code" : "Coding"
      },
      {
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Resource"]
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "QuestionnaireQuestionOption"
        }],
        "strength" : "example",
        "description" : "Allowed values to answer questions.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/questionnaire-answers"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.answerOption.initialSelected",
      "path" : "Questionnaire.item.answerOption.initialSelected",
      "short" : "Whether option is selected by default",
      "definition" : "Indicates whether the answer value is selected when the list of possible answers is initially shown.",
      "comment" : "Use this instead of initial[v] if answerValueSet is present.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "meaningWhenMissing" : "Only selected items explicitly marked to be selected",
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.initial",
      "path" : "Questionnaire.item.initial",
      "short" : "Initial value(s) when item is first rendered",
      "definition" : "One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.",
      "comment" : "The user is allowed to change the value and override the default (unless marked as read-only). If the user doesn't change the value, then this initial value will be persisted when the QuestionnaireResponse is initially created.  Note that initial values can influence results.  The data type of initial[x] must agree with the item.type, and only repeating items can have more then one initial value.",
      "requirements" : "In some workflows, having defaults saves time.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["que-8",
      "que-13"],
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.initial.value[x]",
      "path" : "Questionnaire.item.initial.value[x]",
      "short" : "Actual value for initializing the question",
      "definition" : "The actual value to for an initial answer.",
      "comment" : "The type of the initial value must be consistent with the type of the item.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      },
      {
        "code" : "decimal"
      },
      {
        "code" : "integer"
      },
      {
        "code" : "date"
      },
      {
        "code" : "dateTime"
      },
      {
        "code" : "time"
      },
      {
        "code" : "string"
      },
      {
        "code" : "uri"
      },
      {
        "code" : "Attachment"
      },
      {
        "code" : "Coding"
      },
      {
        "code" : "Quantity"
      },
      {
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Resource"]
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "QuestionnaireQuestionOption2"
        }],
        "strength" : "example",
        "description" : "Allowed values to answer questions.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/questionnaire-answers"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A - MIF rather than RIM level"
      }]
    },
    {
      "id" : "Questionnaire.item.item",
      "path" : "Questionnaire.item.item",
      "short" : "Nested questionnaire items",
      "definition" : "Text, questions and other groups to be nested beneath a question or group.",
      "comment" : "There is no specified limit to the depth of nesting.  However, Questionnaire authors are encouraged to consider the impact on the user and user interface of overly deep nesting.",
      "requirements" : "Reports can consist of complex nested groups.",
      "min" : 0,
      "max" : "*",
      "contentReference" : "#Questionnaire.item",
      "condition" : ["que-1"],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=COMP].target"
      }]
    }]
  }
}


