<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 * #%L
 * org.hl7.fhir.r5
 * %%
 * Copyright (C) 2014 - 2019 Health Level 7
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

/*
  Copyright (c) 2011+, HL7, Inc.
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without modification, 
  are permitted provided that the following conditions are met:
  
   * Redistributions of source code must retain the above copyright notice, this 
     list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice, 
     this list of conditions and the following disclaimer in the documentation 
     and/or other materials provided with the distribution.
   * Neither the name of HL7 nor the names of its contributors may be used to 
     endorse or promote products derived from this software without specific 
     prior written permission.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
  POSSIBILITY OF SUCH DAMAGE.
  

  Generated on Mon, Mar 9, 2026 22:30+0000 for FHIR v6.0.0-ballot4 

  Note: the schemas &amp; schematrons do not contain all of the rules about what makes resources
  valid. Implementers will still need to be familiar with the content of the specification and with
  any profiles that apply to the resources in order to make a conformant implementation.

-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://hl7.org/fhir" elementFormDefault="qualified" version="1.0">
  <xs:include schemaLocation="fhir-base.xsd"/>
  <xs:element name="Questionnaire" type="Questionnaire">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Questionnaire">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 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.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">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.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">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.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">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.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The URL of a Questionnaire that this Questionnaire is based on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of this questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectType" minOccurs="0" maxOccurs="unbounded" type="ResourceType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The types of subjects that can be the subject of responses created for the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the questionnaire was last significantly changed. 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.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the questionnaire from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 questionnaires.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this questionnaire is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the questionnaire and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the questionnaire content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier for this collection of questions in a particular terminology such as LOINC.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="Questionnaire.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A particular question, question grouping or display text that is part of the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Questionnaire.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element is a URI that refers to an [ElementDefinition](elementdefinition.html) or to an [ObservationDefinition](observationdefinition.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](questionnaire.html#definition), below.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prefix" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">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.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of a section, the text of a question or text content for a display item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="QuestionnaireItemTypeUsable">
            <xs:annotation>
              <xs:documentation xml:lang="en">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, Coding, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enableWhen" type="Questionnaire.EnableWhen" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enableBehavior" minOccurs="0" maxOccurs="1" type="EnableWhenBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Controls how multiple enableWhen values are interpreted -  whether all or any must be true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disabledDisplay" minOccurs="0" maxOccurs="1" type="QuestionnaireItemDisabledDisplay">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if and how items that are disabled (because enableWhen evaluates to 'false') should be displayed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="required" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication, if true, that the item must be present in a &quot;completed&quot; QuestionnaireResponse.  If false, the item may be skipped when answering the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="repeats" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication, if true, that a QuestionnaireResponse for this item may include multiple answers associated with a single instance of this item (for question-type items) or multiple repetitions of the item (for group-type items).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="readOnly" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxLength" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum number of characters that are permitted in the answer to be considered a &quot;valid&quot; QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answerConstraint" minOccurs="0" maxOccurs="1" type="QuestionnaireAnswerConstraint">
            <xs:annotation>
              <xs:documentation xml:lang="en">For items that have a defined set of allowed answers (via answerOption or answerValueSet), indicates whether values *other* than those specified can be selected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answerValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a value set containing a list of values representing permitted answers for a question.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answerOption" type="Questionnaire.AnswerOption" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">One of the permitted answers for the question.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="initial" type="Questionnaire.Initial" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="Questionnaire.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text, questions and other groups to be nested beneath a question or group.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Questionnaire.EnableWhen">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="question" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operator" minOccurs="1" maxOccurs="1" type="QuestionnaireItemOperator">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the criteria by which the question is enabled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.</xs:documentation>
            </xs:annotation>
            <xs:element name="answerBoolean" type="boolean"/>
            <xs:element name="answerDecimal" type="decimal"/>
            <xs:element name="answerInteger" type="integer"/>
            <xs:element name="answerDate" type="date"/>
            <xs:element name="answerDateTime" type="dateTime"/>
            <xs:element name="answerTime" type="time"/>
            <xs:element name="answerString" type="string"/>
            <xs:element name="answerCoding" type="Coding"/>
            <xs:element name="answerQuantity" type="Quantity"/>
            <xs:element name="answerReference" type="Reference"/>
            <xs:element name="answerUri" type="uri"/>
            <xs:element name="answerAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Questionnaire.AnswerOption">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A potential answer that's allowed as the answer to this question.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
          <xs:element name="initialSelected" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the answer value is selected when the list of possible answers is initially shown.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Questionnaire.Initial">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual value to for an initial answer.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EnableWhenBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="all">
        <xs:annotation>
          <xs:documentation xml:lang="en">All</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="any">
        <xs:annotation>
          <xs:documentation xml:lang="en">Any</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EnableWhenBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EnableWhenBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireItemOperatorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="exists">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exists</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="!=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&gt;">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greater Than</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&lt;">
        <xs:annotation>
          <xs:documentation xml:lang="en">Less Than</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&gt;=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greater or Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&lt;=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Less or Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireItemOperator">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireItemOperatorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireAnswerConstraintEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="optionsOnly">
        <xs:annotation>
          <xs:documentation xml:lang="en">Options only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="optionsOrType">
        <xs:annotation>
          <xs:documentation xml:lang="en">Options or 'type'</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="optionsOrString">
        <xs:annotation>
          <xs:documentation xml:lang="en">Options or string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireAnswerConstraint">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireAnswerConstraintEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireItemDisabledDisplayEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="hidden">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hidden</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="protected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Protected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireItemDisabledDisplay">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireItemDisabledDisplayEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireItemTypeUsableEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="display">
        <xs:annotation>
          <xs:documentation xml:lang="en">Display</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">Boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Decimal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">Integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="date">
        <xs:annotation>
          <xs:documentation xml:lang="en">Date</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">Date Time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="time">
        <xs:annotation>
          <xs:documentation xml:lang="en">Time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">String</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="text">
        <xs:annotation>
          <xs:documentation xml:lang="en">Text</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="url">
        <xs:annotation>
          <xs:documentation xml:lang="en">Url</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="attachment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Attachment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reference">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireItemTypeUsable">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireItemTypeUsableEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
