PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.r4.id.core@0.1.0
    https://fhir.kemkes.go.id/r4/StructureDefinition/Questionnaire
{
  "description": "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.",
  "_filename": "Questionnaire.json",
  "package_name": "hl7.fhir.r4.id.core",
  "date": "2019-11-01T09:29:23+11:00",
  "derivation": "specialization",
  "meta": {
    "lastUpdated": "2022-01-10T03:13:52.261+00:00"
  },
  "publisher": "Health Level Seven International (FHIR Infrastructure)",
  "fhirVersion": "4.0.1",
  "purpose": "To support structured, hierarchical registration of data gathered using digital forms and other questionnaires.  Questionnaires provide greater control over presentation and allow capture of data in a domain-independent way (i.e. capturing information that would otherwise require multiple distinct types of resources).",
  "name": "Questionnaire",
  "mapping": [ {
    "uri": "http://hl7.org/fhir/workflow",
    "name": "Workflow Pattern",
    "identity": "workflow"
  }, {
    "uri": "http://hl7.org/v3",
    "name": "RIM Mapping",
    "identity": "rim"
  }, {
    "uri": "http://hl7.org/fhir/fivews",
    "name": "FiveWs Pattern Mapping",
    "identity": "w5"
  }, {
    "uri": "http://hl7.org/fhir/object-implementation",
    "name": "Object Implementation Information",
    "identity": "objimpl"
  }, {
    "uri": "http://hl7.org/v2",
    "name": "HL7 v2 Mapping",
    "identity": "v2"
  } ],
  "abstract": false,
  "type": "Questionnaire",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": null,
  "package_version": "0.1.0",
  "extension": [ {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
    "valueString": "Specialized.Definitional Artifacts"
  }, {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
    "valueCode": "trial-use"
  }, {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
    "valueInteger": 3
  }, {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
    "valueCode": "business"
  }, {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
    "valueCode": "fhir"
  } ],
  "status": "draft",
  "id": "15ded691-39f9-4ea5-ade4-778412eb7e8a",
  "kind": "resource",
  "url": "https://fhir.kemkes.go.id/r4/StructureDefinition/Questionnaire",
  "_baseDefinition": {
    "extension": [ {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super",
      "valueString": "MetadataResource"
    } ]
  },
  "version": "4.0.1",
  "differential": {
    "element": [ {
      "id": "Questionnaire",
      "path": "Questionnaire",
      "alias": [ "Form", "CRF", "Survey" ],
      "short": "A structured set of questions",
      "mapping": [ {
        "map": "Definition",
        "identity": "workflow"
      }, {
        "map": "Observation[moodCode=DEF]",
        "identity": "rim"
      } ],
      "constraint": [ {
        "key": "que-2",
        "human": "The link ids for groups and questions must be unique within the questionnaire",
        "xpath": "count(descendant::f:linkId/@value)=count(distinct-values(descendant::f:linkId/@value))",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "descendants().linkId.isDistinct()"
      }, {
        "key": "que-0",
        "human": "Name should be usable as an identifier for the module by machine processing applications such as code generation",
        "xpath": "not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "warning",
        "expression": "name.matches('[A-Z]([A-Za-z0-9_]){0,254}')"
      } ],
      "definition": "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."
    }, {
      "path": "Questionnaire.url",
      "requirements": "…  This is the id that will be used to link a QuestionnaireResponse to the Questionnaire the response is for.",
      "definition": "An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.",
      "short": "Canonical identifier for this questionnaire, represented as a URI (globally unique)",
      "mapping": [ {
        "map": "Definition.url",
        "identity": "workflow"
      }, {
        "map": "FiveWs.identifier",
        "identity": "w5"
      }, {
        "map": ".identifier[scope=BUSN;reliability=ISS]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Questionnaire.url",
      "comment": "The name of the referenced questionnaire can be conveyed using the http://hl7.org/fhir/StructureDefinition/display extension.",
      "isSummary": true
    }, {
      "path": "Questionnaire.identifier",
      "requirements": "Allows externally provided and/or usable business identifiers to be easily associated with the module.",
      "definition": "A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.",
      "short": "Additional identifier for the questionnaire",
      "mapping": [ {
        "map": "Definition.identifier",
        "identity": "workflow"
      }, {
        "map": "FiveWs.identifier",
        "identity": "w5"
      }, {
        "map": ".identifier",
        "identity": "rim"
      }, {
        "map": "no-gen-base",
        "identity": "objimpl"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "id": "Questionnaire.identifier",
      "comment": "Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this questionnaire outside of FHIR, where it is not possible to use the logical URI.",
      "isSummary": true
    }, {
      "path": "Questionnaire.version",
      "definition": "The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.",
      "short": "Business version of the questionnaire",
      "mapping": [ {
        "map": "Definition.version",
        "identity": "workflow"
      }, {
        "map": "FiveWs.version",
        "identity": "w5"
      }, {
        "map": "N/A (to add?)",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Questionnaire.version",
      "comment": "There may be different questionnaire instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the questionnaire with the format [url]|[version].",
      "isSummary": true
    }, {
      "path": "Questionnaire.name",
      "requirements": "Support human navigation and code generation.",
      "definition": "A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
      "short": "Name for this questionnaire (computer friendly)",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Questionnaire.name",
      "condition": [ "inv-0" ],
      "comment": "The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly.",
      "isSummary": true
    }, {
      "path": "Questionnaire.title",
      "definition": "A short, descriptive, user-friendly title for the questionnaire.",
      "short": "Name for this questionnaire (human friendly)",
      "mapping": [ {
        "map": "Definition.title",
        "identity": "workflow"
      }, {
        "map": ".title",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Questionnaire.title",
      "comment": "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.",
      "isSummary": true
    }, {
      "id": "Questionnaire.derivedFrom",
      "path": "Questionnaire.derivedFrom",
      "type": [ {
        "code": "canonical",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Questionnaire" ]
      } ],
      "short": "Instantiates protocol or definition",
      "mapping": [ {
        "map": "Definition.derivedFrom",
        "identity": "workflow"
      }, {
        "map": ".outboundRelationship[typeCode=DRIV].target[classCode=OBS, moodCode=DEFN]",
        "identity": "rim"
      } ],
      "definition": "The URL of a Questionnaire that this Questionnaire is based on.",
      "requirements": "Allows a Questionnaire to be created based on another Questionnaire."
    }, {
      "path": "Questionnaire.status",
      "min": 1,
      "definition": "The status of this questionnaire. Enables tracking the life-cycle of the content.",
      "isModifier": true,
      "short": "draft | active | retired | unknown",
      "mapping": [ {
        "map": "Definition.status",
        "identity": "workflow"
      }, {
        "map": "FiveWs.status",
        "identity": "w5"
      }, {
        "map": ".status",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/publication-status|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "PublicationStatus"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "The lifecycle status of an artifact."
      },
      "max": "1",
      "id": "Questionnaire.status",
      "comment": "Allows filtering of questionnaires that are appropriate for use versus not.",
      "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not use a retired {{title}} without due consideration",
      "isSummary": true
    }, {
      "path": "Questionnaire.experimental",
      "requirements": "Enables experimental content to be developed following the same lifecycle that would be used for a production-level questionnaire.",
      "definition": "A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
      "short": "For testing purposes, not real usage",
      "mapping": [ {
        "map": "Definition.experimental",
        "identity": "workflow"
      }, {
        "map": "FiveWs.class",
        "identity": "w5"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "Questionnaire.experimental",
      "comment": "Allows filtering of questionnaires that are appropriate for use versus not.",
      "isSummary": true
    }, {
      "path": "Questionnaire.subjectType",
      "definition": "The types of subjects that can be the subject of responses created for the questionnaire.",
      "short": "Resource that can be subject of QuestionnaireResponse",
      "mapping": [ {
        "map": "Definition.subject[x]",
        "identity": "workflow"
      }, {
        "map": ".outboundRelationship[typeCode=META].target[classCode=OBS, moodCode=DEFN, isCriterion=true].participation.role.classCode",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/resource-types|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ResourceType"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "One of the resource types defined as part of this version of FHIR."
      },
      "id": "Questionnaire.subjectType",
      "comment": "If none are specified, then the subject is unlimited.",
      "isSummary": true
    }, {
      "path": "Questionnaire.date",
      "definition": "The date  (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.",
      "short": "Date last changed",
      "mapping": [ {
        "map": "Definition.date",
        "identity": "workflow"
      }, {
        "map": "FiveWs.recorded",
        "identity": "w5"
      }, {
        "map": ".participation[typeCode=AUT].time",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "alias": [ "Revision Date" ],
      "max": "1",
      "id": "Questionnaire.date",
      "comment": "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the questionnaire. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.",
      "isSummary": true
    }, {
      "path": "Questionnaire.publisher",
      "requirements": "Helps establish the \"authority/credibility\" of the questionnaire.  May also allow for contact.",
      "definition": "The name of the organization or individual that published the questionnaire.",
      "short": "Name of the publisher (organization or individual)",
      "mapping": [ {
        "map": "Definition.publisher",
        "identity": "workflow"
      }, {
        "map": "FiveWs.witness",
        "identity": "w5"
      }, {
        "map": ".participation[typeCode=AUT].role",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Questionnaire.publisher",
      "comment": "Usually an organization but may be an individual. The publisher (or steward) of the questionnaire is the organization or individual primarily responsible for the maintenance and upkeep of the questionnaire. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the questionnaire. This item SHOULD be populated unless the information is available from context.",
      "isSummary": true
    }, {
      "id": "Questionnaire.contact",
      "path": "Questionnaire.contact",
      "type": [ {
        "code": "ContactDetail"
      } ],
      "short": "Contact details for the publisher",
      "comment": "May be a web site, an email address, a telephone number, etc.",
      "mapping": [ {
        "map": "Definition.contact",
        "identity": "workflow"
      }, {
        "map": ".participation[typeCode=CALLBCK].role",
        "identity": "rim"
      } ],
      "isSummary": true,
      "definition": "Contact details to assist a user in finding and communicating with the publisher."
    }, {
      "id": "Questionnaire.description",
      "max": "1",
      "path": "Questionnaire.description",
      "type": [ {
        "code": "markdown"
      } ],
      "short": "Natural language description of the questionnaire",
      "comment": "This description can be used to capture details such as why the questionnaire was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the questionnaire as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the questionnaire is presumed to be the predominant language in the place the questionnaire was created).",
      "mapping": [ {
        "map": "Definition.description",
        "identity": "workflow"
      }, {
        "map": ".text",
        "identity": "rim"
      } ],
      "definition": "A free text natural language description of the questionnaire from a consumer's perspective."
    }, {
      "path": "Questionnaire.useContext",
      "requirements": "Assist in searching for appropriate content.",
      "definition": "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate questionnaire instances.",
      "short": "The context that the content is intended to support",
      "mapping": [ {
        "map": "Definition.useContext",
        "identity": "workflow"
      }, {
        "map": "N/A (to add?)",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "UsageContext"
      } ],
      "id": "Questionnaire.useContext",
      "comment": "When multiple useContexts are specified, there is no expectation that all or any of the contexts apply.",
      "isSummary": true
    }, {
      "path": "Questionnaire.jurisdiction",
      "definition": "A legal or geographic region in which the questionnaire is intended to be used.",
      "short": "Intended jurisdiction for questionnaire (if applicable)",
      "mapping": [ {
        "map": "Definition.jurisdiction",
        "identity": "workflow"
      }, {
        "map": "N/A (to add?)",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/jurisdiction",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Jurisdiction"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "Countries and regions within which this artifact is targeted for use."
      },
      "id": "Questionnaire.jurisdiction",
      "comment": "It may be possible for the questionnaire to be used in jurisdictions other than those for which it was originally designed or intended.",
      "isSummary": true
    }, {
      "id": "Questionnaire.purpose",
      "max": "1",
      "path": "Questionnaire.purpose",
      "type": [ {
        "code": "markdown"
      } ],
      "short": "Why this questionnaire is defined",
      "comment": "This element does not describe the usage of the questionnaire. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this questionnaire.",
      "mapping": [ {
        "map": "Definition.purpose",
        "identity": "workflow"
      }, {
        "map": "FiveWs.why[x]",
        "identity": "w5"
      }, {
        "map": ".reasonCode.text",
        "identity": "rim"
      }, {
        "map": "no-gen-base",
        "identity": "objimpl"
      } ],
      "definition": "Explanation of why this questionnaire is needed and why it has been designed as it has."
    }, {
      "path": "Questionnaire.copyright",
      "requirements": "Consumers must be able to determine any legal restrictions on the use of the questionnaire and/or its content.",
      "definition": "A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.",
      "short": "Use and/or publishing restrictions",
      "mapping": [ {
        "map": "Definition.copyright",
        "identity": "workflow"
      }, {
        "map": "N/A (to add?)",
        "identity": "rim"
      }, {
        "map": "no-gen-base",
        "identity": "objimpl"
      } ],
      "type": [ {
        "code": "markdown"
      } ],
      "alias": [ "License", "Restrictions" ],
      "max": "1",
      "id": "Questionnaire.copyright"
    }, {
      "id": "Questionnaire.approvalDate",
      "max": "1",
      "path": "Questionnaire.approvalDate",
      "type": [ {
        "code": "date"
      } ],
      "short": "When the questionnaire was approved by publisher",
      "comment": "The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.",
      "mapping": [ {
        "map": "Definition.approvalDate",
        "identity": "workflow"
      }, {
        "map": ".outboundRelationship[typeCode=\"SUBJ\"].act[classCode=CACT;moodCode=EVN;code=\"approval\"].effectiveTime",
        "identity": "rim"
      }, {
        "map": "no-gen-base",
        "identity": "objimpl"
      } ],
      "definition": "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage."
    }, {
      "path": "Questionnaire.lastReviewDate",
      "requirements": "Gives a sense of how \"current\" the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.",
      "definition": "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.",
      "short": "When the questionnaire was last reviewed",
      "mapping": [ {
        "map": "Definition.lastReviewDate",
        "identity": "workflow"
      }, {
        "map": ".outboundRelationship[typeCode=\"SUBJ\"; subsetCode=\"RECENT\"].act[classCode=CACT;moodCode=EVN;code=\"review\"].effectiveTime",
        "identity": "rim"
      }, {
        "map": "no-gen-base",
        "identity": "objimpl"
      } ],
      "type": [ {
        "code": "date"
      } ],
      "max": "1",
      "id": "Questionnaire.lastReviewDate",
      "comment": "If specified, this date follows the original approval date."
    }, {
      "path": "Questionnaire.effectivePeriod",
      "requirements": "Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the questionnaire are or are expected to be used instead.",
      "definition": "The period during which the questionnaire content was or is planned to be in active use.",
      "short": "When the questionnaire is expected to be used",
      "mapping": [ {
        "map": "Definition.effectivePeriod",
        "identity": "workflow"
      }, {
        "map": "N/A (to add?)",
        "identity": "rim"
      }, {
        "map": "no-gen-base",
        "identity": "objimpl"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "1",
      "id": "Questionnaire.effectivePeriod",
      "comment": "The effective period for a questionnaire  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015.",
      "isSummary": true
    }, {
      "path": "Questionnaire.code",
      "requirements": "Allows linking of the complete Questionnaire resources to formal terminologies.  It's common for \"panels\" of questions to be identified by a code.",
      "definition": "An identifier for this question or group of questions in a particular terminology such as LOINC.",
      "short": "Concept that represents the overall questionnaire",
      "mapping": [ {
        "map": ".code",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/questionnaire-questions",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "QuestionnaireConcept"
        } ],
        "description": "Codes for questionnaires, groups and individual questions."
      },
      "id": "Questionnaire.code",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "que-9",
        "human": "Read-only can't be specified for \"display\" items",
        "xpath": "not(f:type/@value=('group', 'display') and f:*[starts-with(local-name(.), 'initial')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "type!='display' or readOnly.empty()"
      }, {
        "key": "que-8",
        "human": "Initial values can't be specified for groups or display items",
        "xpath": "not(f:type/@value=('group', 'display') and f:*[starts-with(local-name(.), 'initial')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "(type!='group' and type!='display') or initial.empty()"
      }, {
        "key": "que-6",
        "human": "Required and repeat aren't permitted for display items",
        "xpath": "not(f:type/@value='display' and (f:required or f:repeats))",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "type!='display' or (required.empty() and repeats.empty())"
      }, {
        "key": "que-5",
        "human": "Only 'choice' and 'open-choice' items can have answerValueSet",
        "xpath": "f:type/@value=('choice','open-choice','decimal','integer','date','dateTime','time','string','quantity',') or not(f:answerOption or f:answerValueSet)",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "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())"
      }, {
        "key": "que-4",
        "human": "A question cannot have both answerOption and answerValueSet",
        "xpath": "not(f:answerValueSet and f:answerOption)",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "answerOption.empty() or answerValueSet.empty()"
      }, {
        "key": "que-3",
        "human": "Display items cannot have a \"code\" asserted",
        "xpath": "not(f:type/@value='display' and f:code)",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "type!='display' or code.empty()"
      }, {
        "key": "que-10",
        "human": "Maximum length can only be declared for simple question types",
        "xpath": "f:type/@value=('boolean', 'decimal', 'integer', 'open-choice', 'string', 'text', 'url') or not(f:maxLength)",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "(type in ('boolean' | 'decimal' | 'integer' | 'string' | 'text' | 'url' | 'open-choice')) or maxLength.empty()"
      }, {
        "key": "que-1",
        "human": "Group items must have nested items, display items cannot have nested items",
        "xpath": "not((f:type/@value='group' and not(f:item)) or (f:type/@value='display' and f:item))",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "(type='group' implies item.empty().not()) and (type.trace('type')='display' implies item.trace('item').empty())"
      }, {
        "key": "que-13",
        "human": "Can only have multiple initial values for repeating items",
        "xpath": "f:repeats/@value='true' or count(f:initial)<=1",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "repeats=true or initial.count() <= 1"
      }, {
        "key": "que-11",
        "human": "If one or more answerOption is present, initial[x] must be missing",
        "xpath": "not(f:answerOption) or not(count(f:*[starts-with(local-name(.), 'initial')]))",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "answerOption.empty() or initial.empty()"
      }, {
        "key": "que-12",
        "human": "If there are more than one enableWhen, enableBehavior must be specified",
        "xpath": "not(f:answerOption) or not(count(f:*[starts-with(local-name(.), 'initial')]))",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "enableWhen.count() > 2 implies enableBehavior.exists()"
      } ],
      "path": "Questionnaire.item",
      "definition": "A particular question, question grouping or display text that is part of the questionnaire.",
      "short": "Questions and sections within the Questionnaire",
      "mapping": [ {
        "map": ".outboundRelationship[typeCode=COMP].target[classCode=OBS, moodCode=DEF]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "id": "Questionnaire.item",
      "condition": [ "que-3" ],
      "comment": "The content of the questionnaire is constructed from an ordered, hierarchical collection of items."
    }, {
      "path": "Questionnaire.item.linkId",
      "requirements": "[QuestionnaireResponse](questionnaireresponse.html#) does not require omitted items to be included and may have some items that repeat, so linkage based on position alone is not sufficient.",
      "min": 1,
      "definition": "An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.",
      "short": "Unique id for item in questionnaire",
      "mapping": [ {
        "map": ".id",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Questionnaire.item.linkId",
      "comment": "This ''can'' be a meaningful identifier (e.g. a LOINC code) but is not intended to have any meaning.  GUIDs or sequential numbers are appropriate here."
    }, {
      "path": "Questionnaire.item.definition",
      "requirements": "A common pattern is to define a set of data elements and then build multiple questionnaires for different circumstances to gather the data. This element provides traceability to the common definition and allows the content for the question to come from the underlying definition.",
      "definition": "This element is a URI that refers to an [ElementDefinition](elementdefinition.html) 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:\n\n* code (ElementDefinition.code) \n* type (ElementDefinition.type) \n* required (ElementDefinition.min) \n* repeats (ElementDefinition.max) \n* maxLength (ElementDefinition.maxLength) \n* answerValueSet (ElementDefinition.binding)\n* options (ElementDefinition.binding).",
      "short": "ElementDefinition - details for the item",
      "mapping": [ {
        "map": ".outboundRelationship[typeCode=INST].target[classCode=OBS, moodCode=DEF]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Questionnaire.item.definition",
      "comment": "The uri refers to an ElementDefinition in a [StructureDefinition](structuredefinition.html#) and always starts with the [canonical URL](references.html#canonical) for the target resource. When referring to a StructureDefinition, a fragment identifier is used to specify the element definition by its id [Element.id](element-definitions.html#Element.id). E.g. http://hl7.org/fhir/StructureDefinition/Observation#Observation.value[x]. In the absence of a fragment identifier, the first/root element definition in the target is the matching element definition."
    }, {
      "path": "Questionnaire.item.code",
      "requirements": "Allows linking of groups of questions to formal terminologies.",
      "definition": "A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).",
      "short": "Corresponding concept for this item in a terminology",
      "mapping": [ {
        "map": ".code",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/questionnaire-questions",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "QuestionnaireConcept"
        } ],
        "description": "Codes for questionnaires, groups and individual questions."
      },
      "id": "Questionnaire.item.code",
      "condition": [ "que-3" ],
      "comment": "The value may come from the ElementDefinition referred to by .definition."
    }, {
      "path": "Questionnaire.item.prefix",
      "requirements": "Separating the label from the question text allows improved rendering.  Also, instructions will often refer to specific prefixes, so there's a need for the questionnaire design to have control over what labels are used.",
      "definition": "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.",
      "short": "E.g. \"1(a)\", \"2.5.3\"",
      "mapping": [ {
        "map": "Not supported",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "alias": [ "label" ],
      "max": "1",
      "id": "Questionnaire.item.prefix",
      "comment": "These are generally unique within a questionnaire, though this is not guaranteed. Some questionnaires may have multiple questions with the same label with logic to control which gets exposed.  Typically, these won't be used for \"display\" items, though such use is not prohibited.  Systems SHOULD NOT generate their own prefixes if prefixes are defined for any items within a Questionnaire."
    }, {
      "id": "Questionnaire.item.text",
      "max": "1",
      "path": "Questionnaire.item.text",
      "type": [ {
        "code": "string"
      } ],
      "short": "Primary text for the item",
      "comment": "When using this element to represent the name of a section, use group type item and also make sure to limit the text element to a short string suitable for display as a section heading.  Group item instructions should be included as a display type item within the group.",
      "mapping": [ {
        "map": ".text",
        "identity": "rim"
      } ],
      "definition": "The name of a section, the text of a question or text content for a display item."
    }, {
      "path": "Questionnaire.item.type",
      "requirements": "Defines the format in which the user is to be prompted for the answer.",
      "min": 1,
      "definition": "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.).",
      "short": "group | display | boolean | decimal | integer | date | dateTime +",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/item-type|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "QuestionnaireItemType"
        } ],
        "description": "Distinguishes groups from questions and display text and indicates data type for questions."
      },
      "max": "1",
      "id": "Questionnaire.item.type",
      "comment": "Additional constraints on the type of answer can be conveyed by extensions. The value may come from the ElementDefinition referred to by .definition."
    }, {
      "constraint": [ {
        "key": "que-7",
        "human": "If the operator is 'exists', the value must be a boolean",
        "xpath": "f:operator/@value != 'exists' or exists(f:answerBoolean)",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "operator = 'exists' implies (answer is Boolean)"
      } ],
      "path": "Questionnaire.item.enableWhen",
      "requirements": "Allows questionnaires to adapt based on answers to other questions. E.g. If physical gender is specified as a male, no need to capture pregnancy history.  Also allows conditional display of instructions or groups of questions.",
      "definition": "A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.",
      "isModifier": true,
      "short": "Only allow data when",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "id": "Questionnaire.item.enableWhen",
      "comment": "If multiple repetitions of this extension are present, the item should be enabled when the condition for *any* of the repetitions is true.  I.e. treat \"enableWhen\"s as being joined by an \"or\" clause.  This element is a modifier because if enableWhen is present for an item, \"required\" is ignored unless one of the enableWhen conditions is met. When an item is disabled, all of its descendants are disabled, regardless of what their own enableWhen logic might evaluate to.",
      "isModifierReason": "If enableWhen is present and the condition evaluates to false, then the Questionnaire behaves as though the elements weren't actually present"
    }, {
      "path": "Questionnaire.item.enableWhen.question",
      "min": 1,
      "definition": "The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.",
      "short": "Question that determines whether item is enabled",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Questionnaire.item.enableWhen.question",
      "comment": "If multiple question occurrences are present for the same question (same linkId), then this refers to the nearest question occurrence reachable by tracing first the \"ancestor\" axis and then the \"preceding\" axis and then the \"following\" axis."
    }, {
      "path": "Questionnaire.item.enableWhen.operator",
      "min": 1,
      "definition": "Specifies the criteria by which the question is enabled.",
      "short": "exists | = | != | > | < | >= | <=",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/questionnaire-enable-operator|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "QuestionnaireItemOperator"
        } ],
        "description": "The criteria by which a question is enabled."
      },
      "max": "1",
      "id": "Questionnaire.item.enableWhen.operator"
    }, {
      "path": "Questionnaire.item.enableWhen.answer[x]",
      "min": 1,
      "definition": "A value that the referenced question is tested using the specified operator in order for the item to be enabled.",
      "short": "Value for question comparison based on operator",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "boolean"
      }, {
        "code": "decimal"
      }, {
        "code": "integer"
      }, {
        "code": "date"
      }, {
        "code": "dateTime"
      }, {
        "code": "time"
      }, {
        "code": "string"
      }, {
        "code": "Coding"
      }, {
        "code": "Quantity"
      }, {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/questionnaire-answers",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "QuestionnaireQuestionOption3"
        } ],
        "description": "Allowed values to answer questions."
      },
      "max": "1",
      "id": "Questionnaire.item.enableWhen.answer[x]",
      "condition": [ "que-7" ]
    }, {
      "path": "Questionnaire.item.enableBehavior",
      "definition": "Controls how multiple enableWhen values are interpreted -  whether all or any must be true.",
      "short": "all | any",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/questionnaire-enable-behavior|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "EnableWhenBehavior"
        } ],
        "description": "Controls how multiple enableWhen values are interpreted -  whether all or any must be true."
      },
      "max": "1",
      "id": "Questionnaire.item.enableBehavior",
      "condition": [ "que-12" ],
      "comment": "This element must be specified if more than one enableWhen value is provided."
    }, {
      "path": "Questionnaire.item.required",
      "definition": "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.",
      "short": "Whether the item must be included in data results",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "meaningWhenMissing": "Items are generally assumed not to be required unless explicitly specified. Systems SHOULD always populate this value",
      "max": "1",
      "id": "Questionnaire.item.required",
      "condition": [ "que-6" ],
      "comment": "Questionnaire.item.required only has meaning for elements that are conditionally enabled with enableWhen if the condition evaluates to true.  If an item that contains other items is marked as required, that does not automatically make the contained elements required (though required groups must contain at least one child element). The value may come from the ElementDefinition referred to by .definition."
    }, {
      "path": "Questionnaire.item.repeats",
      "requirements": "Items may be used to create set of (related) questions that can be repeated to give multiple answers to such a set.",
      "definition": "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.",
      "short": "Whether the item may repeat",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "meaningWhenMissing": "Items are generally assumed not to repeat unless explicitly specified. Systems SHOULD always populate this value",
      "max": "1",
      "id": "Questionnaire.item.repeats",
      "condition": [ "que-6" ],
      "comment": "If a question is marked as repeats=true, then multiple answers can be provided for the question in the corresponding QuestionnaireResponse.  When rendering the questionnaire, it is up to the rendering software whether to render the question text for each answer repetition (i.e. \"repeat the question\") or to simply allow entry/selection of multiple answers for the question (repeat the answers).  Which is most appropriate visually may depend on the type of answer as well as whether there are nested items.\n\nThe resulting QuestionnaireResponse will be populated the same way regardless of rendering - one 'question' item with multiple answer values.\n\n The value may come from the ElementDefinition referred to by .definition."
    }, {
      "path": "Questionnaire.item.readOnly",
      "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.",
      "definition": "An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.",
      "short": "Don't allow human editing",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "Questionnaire.item.readOnly",
      "condition": [ "que-9" ],
      "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."
    }, {
      "path": "Questionnaire.item.maxLength",
      "definition": "The maximum number of characters that are permitted in the answer to be considered a \"valid\" QuestionnaireResponse.",
      "short": "No more than this many characters",
      "mapping": [ {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Questionnaire.item.maxLength",
      "condition": [ "que-10" ],
      "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."
    }, {
      "path": "Questionnaire.item.answerValueSet",
      "definition": "A reference to a value set containing a list of codes representing permitted answers for a \"choice\" or \"open-choice\" question.",
      "short": "Valueset containing permitted answers",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "canonical",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/ValueSet" ]
      } ],
      "max": "1",
      "id": "Questionnaire.item.answerValueSet",
      "condition": [ "que-4", "que-5" ],
      "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."
    }, {
      "id": "Questionnaire.item.answerOption",
      "path": "Questionnaire.item.answerOption",
      "type": [ {
        "code": "BackboneElement"
      } ],
      "short": "Permitted answer",
      "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.",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "condition": [ "que-4", "que-5" ],
      "definition": "One of the permitted answers for a \"choice\" or \"open-choice\" question."
    }, {
      "path": "Questionnaire.item.answerOption.value[x]",
      "min": 1,
      "definition": "A potential answer that's allowed as the answer to this question.",
      "short": "Answer value",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      }, {
        "code": "date"
      }, {
        "code": "time"
      }, {
        "code": "string"
      }, {
        "code": "Coding"
      }, {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/questionnaire-answers",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "QuestionnaireQuestionOption"
        } ],
        "description": "Allowed values to answer questions."
      },
      "max": "1",
      "id": "Questionnaire.item.answerOption.value[x]",
      "comment": "The data type of the value must agree with the item.type."
    }, {
      "path": "Questionnaire.item.answerOption.initialSelected",
      "definition": "Indicates whether the answer value is selected when the list of possible answers is initially shown.",
      "short": "Whether option is selected by default",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "meaningWhenMissing": "Only selected items explicitly marked to be selected",
      "max": "1",
      "id": "Questionnaire.item.answerOption.initialSelected",
      "comment": "Use this instead of initial[v] if answerValueSet is present."
    }, {
      "path": "Questionnaire.item.initial",
      "requirements": "In some workflows, having defaults saves time.",
      "definition": "One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.",
      "short": "Initial value(s) when item is first rendered",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "id": "Questionnaire.item.initial",
      "condition": [ "que-8", "que-13" ],
      "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."
    }, {
      "path": "Questionnaire.item.initial.value[x]",
      "min": 1,
      "definition": "The actual value to for an initial answer.",
      "short": "Actual value for initializing the question",
      "mapping": [ {
        "map": "N/A - MIF rather than RIM level",
        "identity": "rim"
      } ],
      "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": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/questionnaire-answers",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "QuestionnaireQuestionOption2"
        } ],
        "description": "Allowed values to answer questions."
      },
      "max": "1",
      "id": "Questionnaire.item.initial.value[x]",
      "comment": "The type of the initial value must be consistent with the type of the item."
    }, {
      "path": "Questionnaire.item.item",
      "requirements": "Reports can consist of complex nested groups.",
      "min": 0,
      "definition": "Text, questions and other groups to be nested beneath a question or group.",
      "short": "Nested questionnaire items",
      "mapping": [ {
        "map": ".outboundRelationship[typeCode=COMP].target",
        "identity": "rim"
      } ],
      "contentReference": "#Questionnaire.item",
      "max": "*",
      "id": "Questionnaire.item.item",
      "condition": [ "que-1" ],
      "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."
    } ]
  },
  "contact": [ {
    "telecom": [ {
      "value": "http://hl7.org/fhir",
      "system": "url"
    } ]
  }, {
    "telecom": [ {
      "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource"
}