<?xml version="1.0" encoding="UTF-8"?>
<!-- 
  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 Thu, Dec 18, 2014 17:00+0000 for FHIR v0.4.0 
-->
<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="0.4.0">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
  <xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="fhir-xhtml.xsd"/>
  <xs:include schemaLocation="fhir-all.xsd"/>

  <xs:simpleType name="integer-primitive">
    <xs:restriction base="xs:int"/>
  </xs:simpleType>
  <xs:complexType name="integer">
    <xs:annotation>
      <xs:documentation>A whole number</xs:documentation>
      <xs:documentation>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="integer-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="dateTime-primitive">
    <xs:restriction>
      <xs:simpleType>
        <xs:union memberTypes="xs:gYear xs:gYearMonth xs:date xs:dateTime"/>
      </xs:simpleType>
      <xs:pattern value="-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="dateTime">
    <xs:annotation>
      <xs:documentation>A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds may be provided but may also be ignored.  Dates SHALL be valid dates.</xs:documentation>
      <xs:documentation>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="dateTime-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="code-primitive">
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="code">
    <xs:annotation>
      <xs:documentation>A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents</xs:documentation>
      <xs:documentation>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="code-primitive"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="date-primitive">
    <xs:restriction>
      <xs:simpleType>
        <xs:union memberTypes="xs:gYear xs:gYearMonth xs:date"/>
      </xs:simpleType>
      <xs:pattern value="-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="date">
    <xs:annotation>
      <xs:documentation>A date, or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.</xs:documentation>
      <xs:documentation>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="date-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="decimal-primitive">
    <xs:restriction base="xs:decimal"/>
  </xs:simpleType>
  <xs:complexType name="decimal">
    <xs:annotation>
      <xs:documentation>A rational number with implicit precision</xs:documentation>
      <xs:documentation>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="decimal-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="uri-primitive">
    <xs:restriction base="xs:anyURI"/>
  </xs:simpleType>
  <xs:complexType name="uri">
    <xs:annotation>
      <xs:documentation>String of characters used to identify a name or a resource</xs:documentation>
      <xs:documentation>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="uri-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="id-primitive">
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Za-z0-9\-\.]{1,64}"/>
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="id">
    <xs:annotation>
      <xs:documentation>Any combination of lowercase letters, numerals, &quot;-&quot; and &quot;.&quot;, with a length limit of 36 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Systems SHALL send ids as lower-case but SHOULD interpret them case-insensitively.</xs:documentation>
      <xs:documentation>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="id-primitive"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="base64Binary-primitive">
    <xs:restriction base="xs:base64Binary"/>
  </xs:simpleType>
  <xs:complexType name="base64Binary">
    <xs:annotation>
      <xs:documentation>A stream of bytes</xs:documentation>
      <xs:documentation>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="base64Binary-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="time-primitive">
    <xs:restriction base="xs:time">
      <xs:pattern value="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="time">
    <xs:annotation>
      <xs:documentation>A time during the day, with no date specified</xs:documentation>
      <xs:documentation>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="time-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="oid-primitive">
    <xs:restriction base="xs:anyURI">
      <xs:pattern value="urn:oid:(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*"/>
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="oid">
    <xs:annotation>
      <xs:documentation>An oid represented as a URI</xs:documentation>
      <xs:documentation>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="oid-primitive"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="string-primitive">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="string">
    <xs:annotation>
      <xs:documentation>A sequence of Unicode characters</xs:documentation>
      <xs:documentation>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="string-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="boolean-primitive">
    <xs:restriction base="xs:boolean"/>
  </xs:simpleType>
  <xs:complexType name="boolean">
    <xs:annotation>
      <xs:documentation>Value of &quot;true&quot; or &quot;false&quot;</xs:documentation>
      <xs:documentation>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="boolean-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="uuid-primitive">
    <xs:restriction base="xs:anyURI">
      <xs:pattern value="urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"/>
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="uuid">
    <xs:annotation>
      <xs:documentation>A UUID, represented as a URI</xs:documentation>
      <xs:documentation>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="uuid-primitive"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="instant-primitive">
    <xs:restriction base="xs:dateTime"/>
  </xs:simpleType>
  <xs:complexType name="instant">
    <xs:annotation>
      <xs:documentation>An instant in time - known at least to the second</xs:documentation>
      <xs:documentation>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="instant-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ResourceContainer">
    <xs:choice>
      <xs:element ref="Alert"/>
      <xs:element ref="AllergyIntolerance"/>
      <xs:element ref="Appointment"/>
      <xs:element ref="AppointmentResponse"/>
      <xs:element ref="Basic"/>
      <xs:element ref="Binary"/>
      <xs:element ref="Bundle"/>
      <xs:element ref="CarePlan"/>
      <xs:element ref="CarePlan2"/>
      <xs:element ref="ClaimResponse"/>
      <xs:element ref="ClinicalAssessment"/>
      <xs:element ref="Communication"/>
      <xs:element ref="CommunicationRequest"/>
      <xs:element ref="Composition"/>
      <xs:element ref="ConceptMap"/>
      <xs:element ref="Condition"/>
      <xs:element ref="Conformance"/>
      <xs:element ref="Contract"/>
      <xs:element ref="Contraindication"/>
      <xs:element ref="Coverage"/>
      <xs:element ref="DataElement"/>
      <xs:element ref="Device"/>
      <xs:element ref="DeviceComponent"/>
      <xs:element ref="DeviceMetric"/>
      <xs:element ref="DeviceUseRequest"/>
      <xs:element ref="DeviceUseStatement"/>
      <xs:element ref="DiagnosticOrder"/>
      <xs:element ref="DiagnosticReport"/>
      <xs:element ref="DocumentManifest"/>
      <xs:element ref="DocumentReference"/>
      <xs:element ref="EligibilityRequest"/>
      <xs:element ref="EligibilityResponse"/>
      <xs:element ref="Encounter"/>
      <xs:element ref="EnrollmentRequest"/>
      <xs:element ref="EnrollmentResponse"/>
      <xs:element ref="EpisodeOfCare"/>
      <xs:element ref="ExplanationOfBenefit"/>
      <xs:element ref="ExtensionDefinition"/>
      <xs:element ref="FamilyHistory"/>
      <xs:element ref="Goal"/>
      <xs:element ref="Group"/>
      <xs:element ref="HealthcareService"/>
      <xs:element ref="ImagingObjectSelection"/>
      <xs:element ref="ImagingStudy"/>
      <xs:element ref="Immunization"/>
      <xs:element ref="ImmunizationRecommendation"/>
      <xs:element ref="InstitutionalClaim"/>
      <xs:element ref="List"/>
      <xs:element ref="Location"/>
      <xs:element ref="Media"/>
      <xs:element ref="Medication"/>
      <xs:element ref="MedicationAdministration"/>
      <xs:element ref="MedicationDispense"/>
      <xs:element ref="MedicationPrescription"/>
      <xs:element ref="MedicationStatement"/>
      <xs:element ref="MessageHeader"/>
      <xs:element ref="NamingSystem"/>
      <xs:element ref="NutritionOrder"/>
      <xs:element ref="Observation"/>
      <xs:element ref="OperationDefinition"/>
      <xs:element ref="OperationOutcome"/>
      <xs:element ref="OralHealthClaim"/>
      <xs:element ref="Order"/>
      <xs:element ref="OrderResponse"/>
      <xs:element ref="Organization"/>
      <xs:element ref="Other"/>
      <xs:element ref="Patient"/>
      <xs:element ref="PaymentNotice"/>
      <xs:element ref="PaymentReconciliation"/>
      <xs:element ref="PendedRequest"/>
      <xs:element ref="Person"/>
      <xs:element ref="PharmacyClaim"/>
      <xs:element ref="Practitioner"/>
      <xs:element ref="Procedure"/>
      <xs:element ref="ProcedureRequest"/>
      <xs:element ref="ProfessionalClaim"/>
      <xs:element ref="Profile"/>
      <xs:element ref="Provenance"/>
      <xs:element ref="Questionnaire"/>
      <xs:element ref="QuestionnaireAnswers"/>
      <xs:element ref="Readjudicate"/>
      <xs:element ref="ReferralRequest"/>
      <xs:element ref="RelatedPerson"/>
      <xs:element ref="Reversal"/>
      <xs:element ref="RiskAssessment"/>
      <xs:element ref="Schedule"/>
      <xs:element ref="SearchParameter"/>
      <xs:element ref="SecurityEvent"/>
      <xs:element ref="Slot"/>
      <xs:element ref="Specimen"/>
      <xs:element ref="StatusRequest"/>
      <xs:element ref="StatusResponse"/>
      <xs:element ref="Subscription"/>
      <xs:element ref="Substance"/>
      <xs:element ref="Supply"/>
      <xs:element ref="SupportingDocumentation"/>
      <xs:element ref="ValueSet"/>
      <xs:element ref="VisionClaim"/>
      <xs:element ref="VisionPrescription"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="Extension">
    <xs:annotation>
      <xs:documentation>Optional Extensions Element - found in all resources.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation>Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).</xs:documentation>
           </xs:annotation>
           <xs:element name="valueBoolean" type="boolean"/>
           <xs:element name="valueInteger" type="integer"/>
           <xs:element name="valueDecimal" type="decimal"/>
           <xs:element name="valueBase64Binary" type="base64Binary"/>
           <xs:element name="valueInstant" type="instant"/>
           <xs:element name="valueString" type="string"/>
           <xs:element name="valueUri" type="uri"/>
           <xs:element name="valueDate" type="date"/>
           <xs:element name="valueDateTime" type="dateTime"/>
           <xs:element name="valueTime" type="time"/>
           <xs:element name="valueCode" type="code"/>
           <xs:element name="valueAttachment" type="Attachment"/>
           <xs:element name="valueIdentifier" type="Identifier"/>
           <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
           <xs:element name="valueCoding" type="Coding"/>
           <xs:element name="valueQuantity" type="Quantity"/>
           <xs:element name="valueRange" type="Range"/>
           <xs:element name="valuePeriod" type="Period"/>
           <xs:element name="valueRatio" type="Ratio"/>
           <xs:element name="valueReference" type="Reference"/>
           <xs:element name="valueSampledData" type="SampledData"/>
           <xs:element name="valueHumanName" type="HumanName"/>
           <xs:element name="valueAddress" type="Address"/>
           <xs:element name="valueContactPoint" type="ContactPoint"/>
           <xs:element name="valueTiming" type="Timing"/>
          </xs:choice>
        </xs:sequence>
        <xs:attribute name="url" type="uri-primitive" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BackboneElement">
    <xs:annotation>
      <xs:documentation>Base definition for all elements that are defined inside a resource - but not those in a data type.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="modifierExtension" type="Extension" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Element">
    <xs:annotation>
      <xs:documentation>Base definition for all elements in a resource.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
        <xs:sequence>
          <xs:element name="extension" type="Extension" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="id" type="id-primitive" use="optional"/>
  </xs:complexType>
  <xs:complexType name="Narrative">
    <xs:annotation>
      <xs:documentation>A human-readable formatted text, including images.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="status" type="NarrativeStatus" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element ref="xhtml:div" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The actual narrative content, a stripped down version of XHTML.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NarrativeStatus-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="generated">
        <xs:annotation>
          <xs:documentation>The contents of the narrative are entirely generated from the structured data in the resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="extensions">
        <xs:annotation>
          <xs:documentation>The contents of the narrative are entirely generated from the structured data in the resource and some of the content is generated from extensions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="additional">
        <xs:annotation>
          <xs:documentation>The contents of the narrative contain additional information not found in the structured data.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="empty">
        <xs:annotation>
          <xs:documentation>the contents of the narrative are some equivalent of &quot;No human-readable text provided for this resource&quot;.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NarrativeStatus">
    <xs:annotation>
      <xs:documentation>The status of a resource narrative</xs:documentation>
      <xs:documentation>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="NarrativeStatus-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Period">
    <xs:annotation>
      <xs:documentation>A time period defined by a start and end date and optionally time.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="start" type="dateTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The start of the period. The boundary is inclusive.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="end" type="dateTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The end of the period. If the end of the period is missing, it means that the period is ongoing.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Coding">
    <xs:annotation>
      <xs:documentation>A reference to a code defined by a terminology system.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The identification of the code system that defines the meaning of the symbol in the code.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="version" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="display" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A representation of the meaning of the code in the system, following the rules of the system.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="primary" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" type="Reference" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The set of possible coded values this coding was chosen from or constrained by.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Range">
    <xs:annotation>
      <xs:documentation>A set of ordered Quantities defined by a low and high limit.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="low" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The low limit. The boundary is inclusive.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="high" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The high limit. The boundary is inclusive.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Quantity">
    <xs:annotation>
      <xs:documentation>A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="value" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comparator" type="QuantityComparator" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="units" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A human-readable form of the units.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The identification of the system that provides the coded form of the unit.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A computer processable form of the units in some unit representation system.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuantityComparator-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="&lt;">
        <xs:annotation>
          <xs:documentation>The actual value is less than the given value.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&lt;=">
        <xs:annotation>
          <xs:documentation>The actual value is less than or equal to the given value.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&gt;=">
        <xs:annotation>
          <xs:documentation>The actual value is greater than or equal to the given value.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&gt;">
        <xs:annotation>
          <xs:documentation>The actual value is greater than the given value.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuantityComparator">
    <xs:annotation>
      <xs:documentation>How the Quantity should be understood and represented</xs:documentation>
      <xs:documentation>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="QuantityComparator-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Attachment">
    <xs:annotation>
      <xs:documentation>For referring to data content defined in other formats.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="contentType" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="language" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The human language of the content. The value can be any valid value according to BCP 47.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="data" type="base64Binary" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The actual data of the attachment - a sequence of bytes. In XML, represented using base64.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="url" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>An alternative location where the data can be accessed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="size" type="integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The number of bytes of data that make up this attachment.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="hash" type="base64Binary" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The calculated hash of the data using SHA-1. Represented using base64.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="title" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A label or set of text to display in place of the data.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Ratio">
    <xs:annotation>
      <xs:documentation>A relationship of two Quantity values - expressed as a numerator and a denominator.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="numerator" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The value of the numerator.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="denominator" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The value of the denominator.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SampledData">
    <xs:annotation>
      <xs:documentation>A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="origin" type="Quantity" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="decimal" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The length of time between sampling times, measured in milliseconds.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="factor" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A correction factor that is applied to the sampled data points before they are added to the origin.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="lowerLimit" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The lower limit of detection of the measured points. This is needed if any of the data points have the value &quot;L&quot; (lower than detection limit).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="upperLimit" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The upper limit of detection of the measured points. This is needed if any of the data points have the value &quot;U&quot; (higher than detection limit).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="dimensions" type="integer" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="data" type="SampledDataDataType" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A series of data points which are decimal values separated by a single space (character u20). The special values &quot;E&quot; (error), &quot;L&quot; (below detection limit) and &quot;U&quot; (above detection limit) can also be used in place of a decimal value.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SampledDataDataType-primitive">
     <xs:restriction base="xs:string">
      <xs:pattern value="((-{0,1}\d*\.{0,1}\d+)|[EUL])( ((-{0,1}\d*\.{0,1}\d+)|[EUL]))*"/>
    </xs:restriction>
  </xs:simpleType>
    <xs:complexType name="SampledDataDataType">
      <xs:complexContent>
        <xs:extension base="Element">
          <xs:attribute name="value" type="SampledDataDataType-primitive" use="optional"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>

  <xs:complexType name="Reference">
    <xs:annotation>
      <xs:documentation>A reference from one resource to another.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="reference" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="display" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Plain text narrative that identifies the resource in addition to the resource reference.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CodeableConcept">
    <xs:annotation>
      <xs:documentation>A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="coding" type="Coding" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>A reference to a code defined by a terminology system.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="text" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Identifier">
    <xs:annotation>
      <xs:documentation>A technical identifier - identifies some entity uniquely and unambiguously.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="use" type="IdentifierUse" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The purpose of this identifier.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="label" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A text string for the identifier that can be displayed to a human so they can recognize the identifier.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Establishes the namespace in which set of possible id values is unique.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="value" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The portion of the identifier typically displayed to the user and which is unique within the context of the system.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Time period during which identifier is/was valid for use.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="assigner" type="Reference" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Organization that issued/manages the identifier.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="IdentifierUse-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="usual">
        <xs:annotation>
          <xs:documentation>the identifier recommended for display and use in real-world interactions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="official">
        <xs:annotation>
          <xs:documentation>the identifier considered to be most trusted for the identification of this item.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>A temporary identifier.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="secondary">
        <xs:annotation>
          <xs:documentation>An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="IdentifierUse">
    <xs:annotation>
      <xs:documentation>Identifies the purpose for this identifier, if known</xs:documentation>
      <xs:documentation>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="IdentifierUse-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Age">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
          <xs:element name="value" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comparator" type="QuantityComparator" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="units" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A human-readable form of the units.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The identification of the system that provides the coded form of the unit.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A computer processable form of the units in some unit representation system.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="id" type="id-primitive"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Count">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
          <xs:element name="value" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comparator" type="QuantityComparator" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="units" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A human-readable form of the units.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The identification of the system that provides the coded form of the unit.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A computer processable form of the units in some unit representation system.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="id" type="id-primitive"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Money">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
          <xs:element name="value" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comparator" type="QuantityComparator" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="units" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A human-readable form of the units.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The identification of the system that provides the coded form of the unit.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A computer processable form of the units in some unit representation system.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="id" type="id-primitive"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Distance">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
          <xs:element name="value" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comparator" type="QuantityComparator" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="units" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A human-readable form of the units.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The identification of the system that provides the coded form of the unit.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A computer processable form of the units in some unit representation system.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="id" type="id-primitive"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Duration">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
          <xs:element name="value" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comparator" type="QuantityComparator" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="units" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A human-readable form of the units.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The identification of the system that provides the coded form of the unit.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A computer processable form of the units in some unit representation system.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="id" type="id-primitive"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition">
    <xs:annotation>
      <xs:documentation>Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="path" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The path identifies the element and is expressed as a &quot;.&quot;-separated list of ancestor elements, beginning with the name of the resource or extension.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="representation" type="PropertyRepresentation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Codes that define how this element is represented in instances, when the deviation varies from the normal case.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="name" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="slicing" type="ElementDefinition.Slicing" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="short" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A concise definition that  is shown in the generated XML format that summarizes profiles (used throughout the specification).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="formal" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comments" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="requirements" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Explains why this element is needed and why it's been constrained as it has.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="synonym" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Identifies additional names by which this element might also be known.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="min" type="integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The minimum number of times this element SHALL appear in the instance.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="max" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The maximum number of times this element is permitted to appear in the instance.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="type" type="ElementDefinition.Type" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>The data type or resource that the value of this element is permitted to be.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="nameReference" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation>The value that should be used if there is no value stated in the instance.</xs:documentation>
           </xs:annotation>
           <xs:element name="defaultValueBoolean" type="boolean"/>
           <xs:element name="defaultValueInteger" type="integer"/>
           <xs:element name="defaultValueDecimal" type="decimal"/>
           <xs:element name="defaultValueBase64Binary" type="base64Binary"/>
           <xs:element name="defaultValueInstant" type="instant"/>
           <xs:element name="defaultValueString" type="string"/>
           <xs:element name="defaultValueUri" type="uri"/>
           <xs:element name="defaultValueDate" type="date"/>
           <xs:element name="defaultValueDateTime" type="dateTime"/>
           <xs:element name="defaultValueTime" type="time"/>
           <xs:element name="defaultValueCode" type="code"/>
           <xs:element name="defaultValueAttachment" type="Attachment"/>
           <xs:element name="defaultValueIdentifier" type="Identifier"/>
           <xs:element name="defaultValueCodeableConcept" type="CodeableConcept"/>
           <xs:element name="defaultValueCoding" type="Coding"/>
           <xs:element name="defaultValueQuantity" type="Quantity"/>
           <xs:element name="defaultValueRange" type="Range"/>
           <xs:element name="defaultValuePeriod" type="Period"/>
           <xs:element name="defaultValueRatio" type="Ratio"/>
           <xs:element name="defaultValueReference" type="Reference"/>
           <xs:element name="defaultValueSampledData" type="SampledData"/>
           <xs:element name="defaultValueHumanName" type="HumanName"/>
           <xs:element name="defaultValueAddress" type="Address"/>
           <xs:element name="defaultValueContactPoint" type="ContactPoint"/>
           <xs:element name="defaultValueTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="meaningWhenMissing" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The Implicit meaning that is to be understood when this element is missing.</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation>Specifies a value that SHALL be exactly the value  for this element in the instance. For purposes of comparison, non-signficant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.</xs:documentation>
           </xs:annotation>
           <xs:element name="fixedBoolean" type="boolean"/>
           <xs:element name="fixedInteger" type="integer"/>
           <xs:element name="fixedDecimal" type="decimal"/>
           <xs:element name="fixedBase64Binary" type="base64Binary"/>
           <xs:element name="fixedInstant" type="instant"/>
           <xs:element name="fixedString" type="string"/>
           <xs:element name="fixedUri" type="uri"/>
           <xs:element name="fixedDate" type="date"/>
           <xs:element name="fixedDateTime" type="dateTime"/>
           <xs:element name="fixedTime" type="time"/>
           <xs:element name="fixedCode" type="code"/>
           <xs:element name="fixedAttachment" type="Attachment"/>
           <xs:element name="fixedIdentifier" type="Identifier"/>
           <xs:element name="fixedCodeableConcept" type="CodeableConcept"/>
           <xs:element name="fixedCoding" type="Coding"/>
           <xs:element name="fixedQuantity" type="Quantity"/>
           <xs:element name="fixedRange" type="Range"/>
           <xs:element name="fixedPeriod" type="Period"/>
           <xs:element name="fixedRatio" type="Ratio"/>
           <xs:element name="fixedReference" type="Reference"/>
           <xs:element name="fixedSampledData" type="SampledData"/>
           <xs:element name="fixedHumanName" type="HumanName"/>
           <xs:element name="fixedAddress" type="Address"/>
           <xs:element name="fixedContactPoint" type="ContactPoint"/>
           <xs:element name="fixedTiming" type="Timing"/>
          </xs:choice>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation>Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  The values of elements present in the pattern must match exactly (case-senstive, accent-sensitive, etc.).</xs:documentation>
           </xs:annotation>
           <xs:element name="patternBoolean" type="boolean"/>
           <xs:element name="patternInteger" type="integer"/>
           <xs:element name="patternDecimal" type="decimal"/>
           <xs:element name="patternBase64Binary" type="base64Binary"/>
           <xs:element name="patternInstant" type="instant"/>
           <xs:element name="patternString" type="string"/>
           <xs:element name="patternUri" type="uri"/>
           <xs:element name="patternDate" type="date"/>
           <xs:element name="patternDateTime" type="dateTime"/>
           <xs:element name="patternTime" type="time"/>
           <xs:element name="patternCode" type="code"/>
           <xs:element name="patternAttachment" type="Attachment"/>
           <xs:element name="patternIdentifier" type="Identifier"/>
           <xs:element name="patternCodeableConcept" type="CodeableConcept"/>
           <xs:element name="patternCoding" type="Coding"/>
           <xs:element name="patternQuantity" type="Quantity"/>
           <xs:element name="patternRange" type="Range"/>
           <xs:element name="patternPeriod" type="Period"/>
           <xs:element name="patternRatio" type="Ratio"/>
           <xs:element name="patternReference" type="Reference"/>
           <xs:element name="patternSampledData" type="SampledData"/>
           <xs:element name="patternHumanName" type="HumanName"/>
           <xs:element name="patternAddress" type="Address"/>
           <xs:element name="patternContactPoint" type="ContactPoint"/>
           <xs:element name="patternTiming" type="Timing"/>
          </xs:choice>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation>An example value for this element.</xs:documentation>
           </xs:annotation>
           <xs:element name="exampleBoolean" type="boolean"/>
           <xs:element name="exampleInteger" type="integer"/>
           <xs:element name="exampleDecimal" type="decimal"/>
           <xs:element name="exampleBase64Binary" type="base64Binary"/>
           <xs:element name="exampleInstant" type="instant"/>
           <xs:element name="exampleString" type="string"/>
           <xs:element name="exampleUri" type="uri"/>
           <xs:element name="exampleDate" type="date"/>
           <xs:element name="exampleDateTime" type="dateTime"/>
           <xs:element name="exampleTime" type="time"/>
           <xs:element name="exampleCode" type="code"/>
           <xs:element name="exampleAttachment" type="Attachment"/>
           <xs:element name="exampleIdentifier" type="Identifier"/>
           <xs:element name="exampleCodeableConcept" type="CodeableConcept"/>
           <xs:element name="exampleCoding" type="Coding"/>
           <xs:element name="exampleQuantity" type="Quantity"/>
           <xs:element name="exampleRange" type="Range"/>
           <xs:element name="examplePeriod" type="Period"/>
           <xs:element name="exampleRatio" type="Ratio"/>
           <xs:element name="exampleReference" type="Reference"/>
           <xs:element name="exampleSampledData" type="SampledData"/>
           <xs:element name="exampleHumanName" type="HumanName"/>
           <xs:element name="exampleAddress" type="Address"/>
           <xs:element name="exampleContactPoint" type="ContactPoint"/>
           <xs:element name="exampleTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="maxLength" type="integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="condition" type="id" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>A reference to an invariant that may make additional statements about the cardinality or value in the instance.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="constraint" type="ElementDefinition.Constraint" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="mustSupport" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element.  If false, the element may be ignored and not supported.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="isModifier" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="isSummary" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Whether the element should be included if a client requests a search with the parameter _summary=true.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="binding" type="ElementDefinition.Binding" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Binds to a value set if this element is coded (code, Coding, CodeableConcept).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="mapping" type="ElementDefinition.Mapping" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Identifies a concept from an external specification that roughly corresponds to this element.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Mapping">
    <xs:annotation>
      <xs:documentation>Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="identity" type="id" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>An internal reference to the definition of a mapping.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="map" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Expresses what part of the target specification corresponds to this element.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Slicing">
    <xs:annotation>
      <xs:documentation>Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="discriminator" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="description" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A humane readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="ordered" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>If the matching elements have to occur in the same order as defined in the profile.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="rules" type="SlicingRules" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Binding">
    <xs:annotation>
      <xs:documentation>Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="name" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A descriptive name for this - can be useful for generating implementation artifacts.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="isExtensible" type="boolean" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>If true, then conformant systems may use additional codes or (where the data type permits) text alone to convey concepts not covered by the set of codes identified in the binding.  If false, then conformant systems are constrained to the provided codes alone.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="conformance" type="BindingConformance" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Indicates the degree of conformance expectations associated with this binding.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="description" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Describes the intended use of this particular set of codes.</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation>Points to the value set or external definition that identifies the set of codes to be used.</xs:documentation>
           </xs:annotation>
           <xs:element name="referenceBoolean" type="boolean"/>
           <xs:element name="referenceInteger" type="integer"/>
           <xs:element name="referenceDecimal" type="decimal"/>
           <xs:element name="referenceBase64Binary" type="base64Binary"/>
           <xs:element name="referenceInstant" type="instant"/>
           <xs:element name="referenceString" type="string"/>
           <xs:element name="referenceUri" type="uri"/>
           <xs:element name="referenceDate" type="date"/>
           <xs:element name="referenceDateTime" type="dateTime"/>
           <xs:element name="referenceTime" type="time"/>
           <xs:element name="referenceCode" type="code"/>
           <xs:element name="referenceAttachment" type="Attachment"/>
           <xs:element name="referenceIdentifier" type="Identifier"/>
           <xs:element name="referenceCodeableConcept" type="CodeableConcept"/>
           <xs:element name="referenceCoding" type="Coding"/>
           <xs:element name="referenceQuantity" type="Quantity"/>
           <xs:element name="referenceRange" type="Range"/>
           <xs:element name="referencePeriod" type="Period"/>
           <xs:element name="referenceRatio" type="Ratio"/>
           <xs:element name="referenceReference" type="Reference"/>
           <xs:element name="referenceSampledData" type="SampledData"/>
           <xs:element name="referenceHumanName" type="HumanName"/>
           <xs:element name="referenceAddress" type="Address"/>
           <xs:element name="referenceContactPoint" type="ContactPoint"/>
           <xs:element name="referenceTiming" type="Timing"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Type">
    <xs:annotation>
      <xs:documentation>Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="code" type="code" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Name of Data type or Resource that is a(or the) type used for this element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="profile" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="aggregation" type="AggregationMode" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Constraint">
    <xs:annotation>
      <xs:documentation>Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="key" type="id" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="name" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Used to label the constraint in OCL or in short displays incapable of displaying the full human description.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="severity" type="ConstraintSeverity" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Identifies the impact constraint violation has on the conformance of the instance.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="human" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Text that can be used to describe the constraint in messages identifying that the constraint has been violated.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="xpath" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>An XPath expression of constraint that can be executed to see if this constraint is met.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="PropertyRepresentation-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="xmlAttr">
        <xs:annotation>
          <xs:documentation>In XML, this property is represented as an attribute not an element.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="PropertyRepresentation">
    <xs:annotation>
      <xs:documentation>How a property is represented on the wire</xs:documentation>
      <xs:documentation>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="PropertyRepresentation-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SlicingRules-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="closed">
        <xs:annotation>
          <xs:documentation>No additional content is allowed other than that described by the slices in this profile.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="open">
        <xs:annotation>
          <xs:documentation>Additional content is allowed anywhere in the list.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="openAtEnd">
        <xs:annotation>
          <xs:documentation>Additional content is allowed, but only at the end of the list.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SlicingRules">
    <xs:annotation>
      <xs:documentation>How slices are interpreted when evaluating an instance</xs:documentation>
      <xs:documentation>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="SlicingRules-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="BindingConformance-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="required">
        <xs:annotation>
          <xs:documentation>Only codes in the specified set are allowed.  If the binding is extensible, other codes may be used for concepts not covered by the bound set of codes.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preferred">
        <xs:annotation>
          <xs:documentation>For greater interoperability, implementers are strongly encouraged to use the bound set of codes, however alternate codes may be used in derived profiles and implementations if necessary without being considered non-conformant.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="example">
        <xs:annotation>
          <xs:documentation>The codes in the set are an example to illustrate the meaning of the field. There is no particular preference for its use nor any assertion that the provided values are sufficient to meet implementation needs.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="BindingConformance">
    <xs:annotation>
      <xs:documentation>Binding conformance for applications</xs:documentation>
      <xs:documentation>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="BindingConformance-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AggregationMode-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="contained">
        <xs:annotation>
          <xs:documentation>The reference is a local reference to a contained resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="referenced">
        <xs:annotation>
          <xs:documentation>The reference to a resource that has to be resolved externally to the resource that includes the reference.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="bundled">
        <xs:annotation>
          <xs:documentation>The resource the reference points to will be found in the same bundle as the resource that includes the reference.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AggregationMode">
    <xs:annotation>
      <xs:documentation>How resource references can be aggregated</xs:documentation>
      <xs:documentation>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="AggregationMode-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConstraintSeverity-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation>If the constraint is violated, the resource is not conformant.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="warning">
        <xs:annotation>
          <xs:documentation>If the constraint is violated, the resource is conformant, but it is not necessarily following best practice.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConstraintSeverity">
    <xs:annotation>
      <xs:documentation>SHALL applications comply with this constraint?</xs:documentation>
      <xs:documentation>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="ConstraintSeverity-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Timing">
    <xs:annotation>
      <xs:documentation>Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="event" type="Period" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Identifies specific time periods when the event should occur.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="repeat" type="Timing.Repeat" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Identifies a repeating pattern to the intended time periods.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Timing.Repeat">
    <xs:annotation>
      <xs:documentation>Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="frequency" type="integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Indicates how often the event should occur.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="when" type="EventTiming" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Identifies the occurrence of daily life that determines timing.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="duration" type="decimal" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>How long each repetition should last.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="units" type="UnitsOfTime" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The units of time for the duration.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="count" type="integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A total count of the desired number of repetitions.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="end" type="dateTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>When to stop repeating the timing schedule.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EventTiming-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="HS">
        <xs:annotation>
          <xs:documentation>event occurs [duration] before the hour of sleep (or trying to).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WAKE">
        <xs:annotation>
          <xs:documentation>event occurs [duration] after waking.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AC">
        <xs:annotation>
          <xs:documentation>event occurs [duration] before a meal (from the Latin ante cibus).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACM">
        <xs:annotation>
          <xs:documentation>event occurs [duration] before breakfast (from the Latin ante cibus matutinus).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACD">
        <xs:annotation>
          <xs:documentation>event occurs [duration] before lunch (from the Latin ante cibus diurnus).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACV">
        <xs:annotation>
          <xs:documentation>event occurs [duration] before dinner (from the Latin ante cibus vespertinus).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PC">
        <xs:annotation>
          <xs:documentation>event occurs [duration] after a meal (from the Latin post cibus).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCM">
        <xs:annotation>
          <xs:documentation>event occurs [duration] after breakfast (from the Latin post cibus matutinus).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCD">
        <xs:annotation>
          <xs:documentation>event occurs [duration] after lunch (from the Latin post cibus diurnus).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCV">
        <xs:annotation>
          <xs:documentation>event occurs [duration] after dinner (from the Latin post cibus vespertinus).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EventTiming">
    <xs:annotation>
      <xs:documentation>Real world event that the schedule relates to</xs:documentation>
      <xs:documentation>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="EventTiming-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="UnitsOfTime-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="s">
        <xs:annotation>
          <xs:documentation>second.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="min">
        <xs:annotation>
          <xs:documentation>minute.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="h">
        <xs:annotation>
          <xs:documentation>hour.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="d">
        <xs:annotation>
          <xs:documentation>day.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="wk">
        <xs:annotation>
          <xs:documentation>week.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mo">
        <xs:annotation>
          <xs:documentation>month.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="a">
        <xs:annotation>
          <xs:documentation>year.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="UnitsOfTime">
    <xs:annotation>
      <xs:documentation>A unit of time (units from UCUM)</xs:documentation>
      <xs:documentation>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="UnitsOfTime-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Address">
    <xs:annotation>
      <xs:documentation>There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="use" type="AddressUse" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The purpose of this address.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="text" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A full text representation of the address.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="line" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>This component contains the house number, apartment number, street name, street direction, 
P.O. Box number, delivery hints, and similar address information.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="city" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The name of the city, town, village or other community or delivery center.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="state" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="postalCode" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A postal code designating a region defined by the postal service.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="country" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Country - a nation as commonly understood or generally accepted.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Time period when address was/is in use.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AddressUse-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="home">
        <xs:annotation>
          <xs:documentation>A communication address at a home.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="work">
        <xs:annotation>
          <xs:documentation>An office address. First choice for business related contacts during business hours.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>A temporary address. The period can provide more detailed information.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation>This address is no longer in use (or was never correct, but retained for records).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AddressUse">
    <xs:annotation>
      <xs:documentation>The use of an address</xs:documentation>
      <xs:documentation>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="AddressUse-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="HumanName">
    <xs:annotation>
      <xs:documentation>A human's name with the ability to identify parts and usage.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="use" type="NameUse" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Identifies the purpose for this name.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="text" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A full text representation of the name.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="family" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="given" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Given name.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="prefix" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="suffix" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Indicates the period of time when this name was valid for the named person.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NameUse-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="usual">
        <xs:annotation>
          <xs:documentation>Known as/conventional/the one you normally use.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="official">
        <xs:annotation>
          <xs:documentation>The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called &quot;legal name&quot;.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>A temporary name. Name.period can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="nickname">
        <xs:annotation>
          <xs:documentation>A name that is used to address the person in an informal manner, but is not part of their formal or usual name.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="anonymous">
        <xs:annotation>
          <xs:documentation>Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation>This name is no longer in use (or was never correct, but retained for records).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="maiden">
        <xs:annotation>
          <xs:documentation>A name used prior to marriage. Marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store &quot;maiden&quot; names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NameUse">
    <xs:annotation>
      <xs:documentation>The use of a human name</xs:documentation>
      <xs:documentation>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="NameUse-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ContactPoint">
    <xs:annotation>
      <xs:documentation>Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="system" type="ContactPointSystem" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Telecommunications form for contact point - what communications system is required to make use of the contact.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="value" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="use" type="ContactPointUse" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Identifies the purpose for the contact point.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Time period when the contact point was/is in use.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ContactPointSystem-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="phone">
        <xs:annotation>
          <xs:documentation>The value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="fax">
        <xs:annotation>
          <xs:documentation>The value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="email">
        <xs:annotation>
          <xs:documentation>The value is an email address.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="url">
        <xs:annotation>
          <xs:documentation>The value is a url. This is intended for various personal contacts including blogs, Twitter, Facebook, etc. Do not use for email addresses.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ContactPointSystem">
    <xs:annotation>
      <xs:documentation>Telecommunications form for contact point</xs:documentation>
      <xs:documentation>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="ContactPointSystem-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ContactPointUse-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="home">
        <xs:annotation>
          <xs:documentation>A communication contact point at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="work">
        <xs:annotation>
          <xs:documentation>An office contact point. First choice for business related contacts during business hours.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>A temporary contact point. The period can provide more detailed information.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation>This contact point is no longer in use (or was never correct, but retained for records).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mobile">
        <xs:annotation>
          <xs:documentation>A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ContactPointUse">
    <xs:annotation>
      <xs:documentation>Use of contact point</xs:documentation>
      <xs:documentation>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="ContactPointUse-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Parameters">
    <xs:annotation>
      <xs:documentation>This special resource type is used to represent [operation](operations.html] request and response. It has no other use, and there is no RESTful end=point associated with it.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Resource">
        <xs:sequence>
          <xs:element name="parameter" type="Parameters.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>A parameter passed to or received from the operation.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Parameters.Parameter">
    <xs:annotation>
      <xs:documentation>This special resource type is used to represent [operation](operations.html] request and response. It has no other use, and there is no RESTful end=point associated with it.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="name" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The name of the parameter (reference to the operation definition).</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation>If the parameter is a data type.</xs:documentation>
           </xs:annotation>
           <xs:element name="valueBoolean" type="boolean"/>
           <xs:element name="valueInteger" type="integer"/>
           <xs:element name="valueDecimal" type="decimal"/>
           <xs:element name="valueBase64Binary" type="base64Binary"/>
           <xs:element name="valueInstant" type="instant"/>
           <xs:element name="valueString" type="string"/>
           <xs:element name="valueUri" type="uri"/>
           <xs:element name="valueDate" type="date"/>
           <xs:element name="valueDateTime" type="dateTime"/>
           <xs:element name="valueTime" type="time"/>
           <xs:element name="valueCode" type="code"/>
           <xs:element name="valueAttachment" type="Attachment"/>
           <xs:element name="valueIdentifier" type="Identifier"/>
           <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
           <xs:element name="valueCoding" type="Coding"/>
           <xs:element name="valueQuantity" type="Quantity"/>
           <xs:element name="valueRange" type="Range"/>
           <xs:element name="valuePeriod" type="Period"/>
           <xs:element name="valueRatio" type="Ratio"/>
           <xs:element name="valueReference" type="Reference"/>
           <xs:element name="valueSampledData" type="SampledData"/>
           <xs:element name="valueHumanName" type="HumanName"/>
           <xs:element name="valueAddress" type="Address"/>
           <xs:element name="valueContactPoint" type="ContactPoint"/>
           <xs:element name="valueTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="resource" type="ResourceContainer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>If the parameter is a whole resource.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="part" type="Parameters.Part" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>A named part of a parameter. In many implementation context, a set of named parts is known as a &quot;Tuple&quot;.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Parameters.Part">
    <xs:annotation>
      <xs:documentation>This special resource type is used to represent [operation](operations.html] request and response. It has no other use, and there is no RESTful end=point associated with it.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="name" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The name of the parameter (reference to the operation definition).</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="1" maxOccurs="1">
           <xs:annotation>
             <xs:documentation>The value of the parameter.</xs:documentation>
           </xs:annotation>
           <xs:element name="valueBoolean" type="boolean"/>
           <xs:element name="valueInteger" type="integer"/>
           <xs:element name="valueDecimal" type="decimal"/>
           <xs:element name="valueBase64Binary" type="base64Binary"/>
           <xs:element name="valueInstant" type="instant"/>
           <xs:element name="valueString" type="string"/>
           <xs:element name="valueUri" type="uri"/>
           <xs:element name="valueDate" type="date"/>
           <xs:element name="valueDateTime" type="dateTime"/>
           <xs:element name="valueTime" type="time"/>
           <xs:element name="valueCode" type="code"/>
           <xs:element name="valueAttachment" type="Attachment"/>
           <xs:element name="valueIdentifier" type="Identifier"/>
           <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
           <xs:element name="valueCoding" type="Coding"/>
           <xs:element name="valueQuantity" type="Quantity"/>
           <xs:element name="valueRange" type="Range"/>
           <xs:element name="valuePeriod" type="Period"/>
           <xs:element name="valueRatio" type="Ratio"/>
           <xs:element name="valueReference" type="Reference"/>
           <xs:element name="valueSampledData" type="SampledData"/>
           <xs:element name="valueHumanName" type="HumanName"/>
           <xs:element name="valueAddress" type="Address"/>
           <xs:element name="valueContactPoint" type="ContactPoint"/>
           <xs:element name="valueTiming" type="Timing"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Parameters" type="Parameters">
    <xs:annotation>
      <xs:documentation>This special resource type is used to represent [operation](operations.html] request and response. It has no other use, and there is no RESTful end=point associated with it.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Resource">
    <xs:annotation>
      <xs:documentation>Base Resource for everything.</xs:documentation>
    </xs:annotation>
        <xs:sequence>
          <xs:element name="id" type="id" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The logical id of the resource, as used in the url for the resoure. Once assigned, this value never changes.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="meta" type="Resource.Meta" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="implicitRules" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="language" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The base language in which the resource is written.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Resource.Meta">
    <xs:annotation>
      <xs:documentation>Base Resource for everything.</xs:documentation>
      <xs:documentation>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:sequence>
          <xs:element name="versionId" type="id" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The version specific identifier, as it appears in the version portion of the url. This values changes when the resource is created, updated, or deleted.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="lastUpdated" type="instant" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>When the resource last changed - e.g. when the version changed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="profile" type="uri" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>A list of profiles that this resource claims to conform to. The URL is a reference to Profile.url.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="security" type="Coding" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="tag" type="Coding" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>Tags applied to this resource. Tags are intended to to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DomainResource">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Resource">
        <xs:sequence>
          <xs:element name="text" type="Narrative" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="contained" type="ResourceContainer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="extension" type="Extension" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="modifierExtension" type="Extension" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireStatus-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation>This Questionnaire is not ready for official use.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="published">
        <xs:annotation>
          <xs:documentation>This Questionnaire is ready for use.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="retired">
        <xs:annotation>
          <xs:documentation>This Questionnaire should no longer be used to gather data.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireStatus">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="QuestionnaireStatus-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FilterOperator-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="=">
        <xs:annotation>
          <xs:documentation>The specified property of the code equals the provided value.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="is-a">
        <xs:annotation>
          <xs:documentation>The specified property of the code has an is-a relationship with the provided value.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="is-not-a">
        <xs:annotation>
          <xs:documentation>The specified property of the code does not have an is-a relationship with the provided value.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="regex">
        <xs:annotation>
          <xs:documentation>The specified property of the code  matches the regex specified in the provided value.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in">
        <xs:annotation>
          <xs:documentation>The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not in">
        <xs:annotation>
          <xs:documentation>The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FilterOperator">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="FilterOperator-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DataAbsentReason-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation>The value is not known</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="asked">
        <xs:annotation>
          <xs:documentation>The source human does not know the value</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>There is reason to expect (from the workflow) that the value may become known</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="notasked">
        <xs:annotation>
          <xs:documentation>The workflow didn't lead to this value being known</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="masked">
        <xs:annotation>
          <xs:documentation>The information is not available due to security, privacy or related reasons</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unsupported">
        <xs:annotation>
          <xs:documentation>The source system wasn't capable of supporting this element</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="astext">
        <xs:annotation>
          <xs:documentation>The content of the data is represented in the resource narrative</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation>Some system or workflow process error means that the information is not available</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DataAbsentReason">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="DataAbsentReason-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DocumentReferenceStatus-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="current">
        <xs:annotation>
          <xs:documentation>This is the current reference for this document.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="superceded">
        <xs:annotation>
          <xs:documentation>This reference has been superseded by another reference.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered in error">
        <xs:annotation>
          <xs:documentation>This reference was created in error.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DocumentReferenceStatus">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="DocumentReferenceStatus-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="RemittanceOutcome-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation>The processing completed without errors.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation>The processing identified with errors.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RemittanceOutcome">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="RemittanceOutcome-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AdministrativeGender-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="male">
        <xs:annotation>
          <xs:documentation>Male</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="female">
        <xs:annotation>
          <xs:documentation>Female</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation>Other</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation>Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AdministrativeGender">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="AdministrativeGender-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SpecialValues-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="true">
        <xs:annotation>
          <xs:documentation>Boolean true</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="false">
        <xs:annotation>
          <xs:documentation>Boolean false</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="trace">
        <xs:annotation>
          <xs:documentation>The content is greater than zero, but too small to be quantified</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="sufficient">
        <xs:annotation>
          <xs:documentation>The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="withdrawn">
        <xs:annotation>
          <xs:documentation>The value is no longer available</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="nil known">
        <xs:annotation>
          <xs:documentation>The are no known applicable values in this context</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SpecialValues">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="SpecialValues-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NoteType-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="display">
        <xs:annotation>
          <xs:documentation>Display the note.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="print">
        <xs:annotation>
          <xs:documentation>Print the note on the form.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="printoper">
        <xs:annotation>
          <xs:documentation>Print the note for the operator.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NoteType">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="NoteType-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SearchParamType-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="number">
        <xs:annotation>
          <xs:documentation>Search parameter SHALL be a number (a whole number, or a decimal).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="date">
        <xs:annotation>
          <xs:documentation>Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation>Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="token">
        <xs:annotation>
          <xs:documentation>Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a &quot;|&quot;, depending on the modifier used.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reference">
        <xs:annotation>
          <xs:documentation>A reference to another resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="composite">
        <xs:annotation>
          <xs:documentation>A composite search parameter that combines a search on two values together.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="quantity">
        <xs:annotation>
          <xs:documentation>A search parameter that searches on a quantity.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SearchParamType">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="SearchParamType-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FHIRDefinedType-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Address">
        <xs:annotation>
          <xs:documentation>There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Age">
        <xs:annotation>
          <xs:documentation>A duration (length of time) with a UCUM code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Attachment">
        <xs:annotation>
          <xs:documentation>For referring to data content defined in other formats.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BackboneElement">
        <xs:annotation>
          <xs:documentation>Base definition for all elements that are defined inside a resource - but not those in a data type.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeableConcept">
        <xs:annotation>
          <xs:documentation>A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation>A reference to a code defined by a terminology system.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ContactPoint">
        <xs:annotation>
          <xs:documentation>Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Count">
        <xs:annotation>
          <xs:documentation>A count of a discrete element (no unit)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Distance">
        <xs:annotation>
          <xs:documentation>A measure of distance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Duration">
        <xs:annotation>
          <xs:documentation>A length of time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Element">
        <xs:annotation>
          <xs:documentation>Base definition for all elements in a resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ElementDefinition">
        <xs:annotation>
          <xs:documentation>Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Extension">
        <xs:annotation>
          <xs:documentation>Optional Extensions Element - found in all resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HumanName">
        <xs:annotation>
          <xs:documentation>A human's name with the ability to identify parts and usage.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Identifier">
        <xs:annotation>
          <xs:documentation>A technical identifier - identifies some entity uniquely and unambiguously.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Money">
        <xs:annotation>
          <xs:documentation>An amount of money. With regard to precision, see [[X]]</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Narrative">
        <xs:annotation>
          <xs:documentation>A human-readable formatted text, including images.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Period">
        <xs:annotation>
          <xs:documentation>A time period defined by a start and end date and optionally time.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Quantity">
        <xs:annotation>
          <xs:documentation>A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Range">
        <xs:annotation>
          <xs:documentation>A set of ordered Quantities defined by a low and high limit.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ratio">
        <xs:annotation>
          <xs:documentation>A relationship of two Quantity values - expressed as a numerator and a denominator.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Reference">
        <xs:annotation>
          <xs:documentation>A reference from one resource to another.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SampledData">
        <xs:annotation>
          <xs:documentation>A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Timing">
        <xs:annotation>
          <xs:documentation>Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="base64Binary">
        <xs:annotation>
          <xs:documentation>A stream of bytes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation>Value of &quot;true&quot; or &quot;false&quot;</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation>A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="date">
        <xs:annotation>
          <xs:documentation>A date, or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation>A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds may be provided but may also be ignored.  Dates SHALL be valid dates.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation>A rational number with implicit precision</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="id">
        <xs:annotation>
          <xs:documentation>Any combination of lowercase letters, numerals, &quot;-&quot; and &quot;.&quot;, with a length limit of 36 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Systems SHALL send ids as lower-case but SHOULD interpret them case-insensitively.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="instant">
        <xs:annotation>
          <xs:documentation>An instant in time - known at least to the second</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation>A whole number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="oid">
        <xs:annotation>
          <xs:documentation>An oid represented as a URI</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation>A sequence of Unicode characters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="time">
        <xs:annotation>
          <xs:documentation>A time during the day, with no date specified</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uri">
        <xs:annotation>
          <xs:documentation>String of characters used to identify a name or a resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uuid">
        <xs:annotation>
          <xs:documentation>A UUID, represented as a URI</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Alert">
        <xs:annotation>
          <xs:documentation>Prospective warnings of potential issues when providing care to the patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AllergyIntolerance">
        <xs:annotation>
          <xs:documentation>Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation>A scheduled healthcare event for a patient and/or practitioner(s) where a service may take place at a specific date/time.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AppointmentResponse">
        <xs:annotation>
          <xs:documentation>A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Basic">
        <xs:annotation>
          <xs:documentation>Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Binary">
        <xs:annotation>
          <xs:documentation>A binary resource can contain any content, whether text, image, pdf, zip archive, etc.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bundle">
        <xs:annotation>
          <xs:documentation>A container for a group of resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation>Describes the intention of how one or more practitioners intend to deliver care for a particular patient for a period of time, possibly limited to care for a specific condition or set of conditions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan2">
        <xs:annotation>
          <xs:documentation>Describes the intention of how one or more practitioners intend to deliver care for a particular patient for a period of time, possibly limited to care for a specific condition or set of conditions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation>This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalAssessment">
        <xs:annotation>
          <xs:documentation>A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation>An occurrence of information being transmitted. E.g., an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation>A request to convey information. E.g., the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation>A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ConceptMap">
        <xs:annotation>
          <xs:documentation>A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condition">
        <xs:annotation>
          <xs:documentation>Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a Diagnosis during an Encounter; populating a problem List or a Summary Statement, such as a Discharge Summary.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Conformance">
        <xs:annotation>
          <xs:documentation>A conformance statement is a set of requirements for a desired implementation or a description of how a target application fulfills those requirements in a particular implementation.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation>A formal agreement between parties regarding the conduct of business, exchange of information or other matters.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contraindication">
        <xs:annotation>
          <xs:documentation>Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient.  E.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation>Financial instrument which may be used to pay for or reimburse for health care products and services.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DataElement">
        <xs:annotation>
          <xs:documentation>The formal description of a single piece of information that can be gathered and reported.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation>This resource identifies an instance of a manufactured thing that is used in the provision of healthcare without being substantially changed through that activity. The device may be a machine, an insert, a computer, an application, etc. This includes durable (reusable) medical equipment as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceComponent">
        <xs:annotation>
          <xs:documentation>Describes the characteristics, operational status and capabilities of a medical-related component of a medical device.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceMetric">
        <xs:annotation>
          <xs:documentation>Describes a measurement, calculation or setting capability of a medical device.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceUseRequest">
        <xs:annotation>
          <xs:documentation>Represents a request for the use of a device.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceUseStatement">
        <xs:annotation>
          <xs:documentation>A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticOrder">
        <xs:annotation>
          <xs:documentation>A request for a diagnostic investigation service to be performed.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation>The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretation, and formatted representation of diagnostic reports.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentManifest">
        <xs:annotation>
          <xs:documentation>A manifest that defines a set of documents.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation>A reference to a document.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EligibilityRequest">
        <xs:annotation>
          <xs:documentation>This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EligibilityResponse">
        <xs:annotation>
          <xs:documentation>This resource provides eligibility and plan details from the processing of an Eligibility resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation>An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation>This resource provides the insurance Enrollment details to the insurer regarding a specified coverage.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation>This resource provides Enrollment and plan details from the processing of an Enrollment resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation>An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation>This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExtensionDefinition">
        <xs:annotation>
          <xs:documentation>Defines an extension that can be used in resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyHistory">
        <xs:annotation>
          <xs:documentation>Significant health events and conditions for people related to the subject relevant in the context of care for the subject.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Goal">
        <xs:annotation>
          <xs:documentation>Describes the intended objective(s) of the care.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation>Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized.  I.e. A collection of entities that isn't an Organization.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation>The details of a Healthcare Service available at a location.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingObjectSelection">
        <xs:annotation>
          <xs:documentation>A set of DICOM SOP Instances of a patient, selected for some application purpose, e.g., quality assurance, teaching, conference, consulting, etc.  Objects selected can be from different studies, but must be of the same patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation>Representation of the content produced in a DICOM imaging study. A study comprises a set of Series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A Series is of only one modality (e.g., X-ray, CT, MR, ultrasound), but a Study may have multiple Series of different modalities.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation>Immunization event information.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImmunizationRecommendation">
        <xs:annotation>
          <xs:documentation>A patient's point-of-time immunization status and recommendation with optional supporting justification.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InstitutionalClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="List">
        <xs:annotation>
          <xs:documentation>A set of information summarized from a list of other resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation>Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Media">
        <xs:annotation>
          <xs:documentation>A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Medication">
        <xs:annotation>
          <xs:documentation>Primarily used for identification and definition of Medication, but also covers ingredients and packaging.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation>Describes the event of a patient being given a dose of a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.

Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation>Dispensing a medication to a named patient.  This includes a description of the supply provided and the instructions for administering the medication.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationPrescription">
        <xs:annotation>
          <xs:documentation>An order for both supply of the medication and the instructions for administration of the medicine to a patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation>A record of medication being taken by a patient, or that the medication has been given to a patient where the record is the result of a report from the patient or another clinician.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation>The header for a message exchange that is either requesting or responding to an action.  The Reference(s) that are the subject of the action as well as other Information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NamingSystem">
        <xs:annotation>
          <xs:documentation>A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a &quot;System&quot; used within the Identifier and Coding data types.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation>Measurements and simple assertions made about a patient, device or other subject.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation>A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationOutcome">
        <xs:annotation>
          <xs:documentation>A collection of error, warning or information messages that result from a system action.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OralHealthClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order">
        <xs:annotation>
          <xs:documentation>A request to perform an action.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrderResponse">
        <xs:annotation>
          <xs:documentation>A response to an order.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation>A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Other">
        <xs:annotation>
          <xs:documentation>Other is a conformant for handling resource concepts not yet defined for FHIR or outside HL7's scope of interest.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation>Demographics and other administrative information about a person or animal receiving care or other health-related services.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation>This resource provides the status of the payment for goods and services rendered, and the request and response resource references.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation>This resource provides payment details and claim references supporting a bulk payment.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PendedRequest">
        <xs:annotation>
          <xs:documentation>This resource provides the request and response details for the resource for which the status is to be checked.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation>Demographics and administrative information about a person independent of a specific health-related context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PharmacyClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation>A person who is directly or indirectly involved in the provisioning of healthcare.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation>An action that is performed on a patient. This can be a physical 'thing' like an operation, or less invasive like counseling or hypnotherapy.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProcedureRequest">
        <xs:annotation>
          <xs:documentation>A request for a procedure to be performed. May be a proposal or an order.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProfessionalClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Profile">
        <xs:annotation>
          <xs:documentation>A Resource Profile - a statement of use of one or more FHIR Resources.  It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation>Provenance information that describes the activity that led to the creation of a set of resources. This information can be used to help determine their reliability or trace where the information in them came from. The focus of the provenance resource is record keeping, audit and traceability, and not explicit statements of clinical significance.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation>A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireAnswers">
        <xs:annotation>
          <xs:documentation>A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Readjudicate">
        <xs:annotation>
          <xs:documentation>This resource provides the request and line items details for the claim which is to be re-adjudicated.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ReferralRequest">
        <xs:annotation>
          <xs:documentation>Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organisation.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation>Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Reversal">
        <xs:annotation>
          <xs:documentation>This resource provides the request and response details for the request for which all actions are to be reversed or terminated.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation>An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Schedule">
        <xs:annotation>
          <xs:documentation>A container for slot(s) of time that may be available for booking appointments.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SearchParameter">
        <xs:annotation>
          <xs:documentation>A Search Parameter that defines a named search item that can be used to search/filter on a resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SecurityEvent">
        <xs:annotation>
          <xs:documentation>A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Slot">
        <xs:annotation>
          <xs:documentation>A slot of time on a schedule that may be available for booking appointments.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation>Sample for analysis.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StatusRequest">
        <xs:annotation>
          <xs:documentation>This resource provides the request and response details for the resource for which the processing status is to be checked.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StatusResponse">
        <xs:annotation>
          <xs:documentation>This resource provides processing status, errors and notes from the processing of a resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Subscription">
        <xs:annotation>
          <xs:documentation>Todo.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substance">
        <xs:annotation>
          <xs:documentation>A homogeneous material with a definite composition.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Supply">
        <xs:annotation>
          <xs:documentation>A supply - a  request for something, and provision of what is supplied.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SupportingDocumentation">
        <xs:annotation>
          <xs:documentation>This resource provides the supporting information for a process, for example clinical or financial  information related to a claim or pre-authorization.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ValueSet">
        <xs:annotation>
          <xs:documentation>A value set specifies a set of codes drawn from one or more code systems.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation>An authorization for the supply of glasses and/or contact lenses to a patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FHIRDefinedType">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="FHIRDefinedType-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EncounterClass-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="inpatient">
        <xs:annotation>
          <xs:documentation>An encounter during which the patient is hospitalized and stays overnight.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="outpatient">
        <xs:annotation>
          <xs:documentation>An encounter during which the patient is not hospitalized overnight.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ambulatory">
        <xs:annotation>
          <xs:documentation>An encounter where the patient visits the practitioner in his/her office, e.g. a G.P. visit.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="emergency">
        <xs:annotation>
          <xs:documentation>An encounter where the patient needs urgent care.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="home">
        <xs:annotation>
          <xs:documentation>An encounter where the practitioner visits the patient at his/her home.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="field">
        <xs:annotation>
          <xs:documentation>An encounter taking place outside the regular environment for giving care.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="daytime">
        <xs:annotation>
          <xs:documentation>An encounter where the patient needs more prolonged treatment or investigations than outpatients, but who do not need to stay in the hospital overnight.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="virtual">
        <xs:annotation>
          <xs:documentation>An encounter that takes place where the patient and practitioner do not physically meet but use electronic means for contact.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation>Any other encounter type that is not described by one of the other values. Where this is used it is expected that an implementer will include an extension value to define what the actual other type is.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EncounterClass">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="EncounterClass-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DataType-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Address">
        <xs:annotation>
          <xs:documentation>There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Age">
        <xs:annotation>
          <xs:documentation>A duration (length of time) with a UCUM code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Attachment">
        <xs:annotation>
          <xs:documentation>For referring to data content defined in other formats.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BackboneElement">
        <xs:annotation>
          <xs:documentation>Base definition for all elements that are defined inside a resource - but not those in a data type.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeableConcept">
        <xs:annotation>
          <xs:documentation>A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation>A reference to a code defined by a terminology system.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ContactPoint">
        <xs:annotation>
          <xs:documentation>Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Count">
        <xs:annotation>
          <xs:documentation>A count of a discrete element (no unit)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Distance">
        <xs:annotation>
          <xs:documentation>A measure of distance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Duration">
        <xs:annotation>
          <xs:documentation>A length of time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Element">
        <xs:annotation>
          <xs:documentation>Base definition for all elements in a resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ElementDefinition">
        <xs:annotation>
          <xs:documentation>Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Extension">
        <xs:annotation>
          <xs:documentation>Optional Extensions Element - found in all resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HumanName">
        <xs:annotation>
          <xs:documentation>A human's name with the ability to identify parts and usage.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Identifier">
        <xs:annotation>
          <xs:documentation>A technical identifier - identifies some entity uniquely and unambiguously.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Money">
        <xs:annotation>
          <xs:documentation>An amount of money. With regard to precision, see [[X]]</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Narrative">
        <xs:annotation>
          <xs:documentation>A human-readable formatted text, including images.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Period">
        <xs:annotation>
          <xs:documentation>A time period defined by a start and end date and optionally time.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Quantity">
        <xs:annotation>
          <xs:documentation>A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Range">
        <xs:annotation>
          <xs:documentation>A set of ordered Quantities defined by a low and high limit.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ratio">
        <xs:annotation>
          <xs:documentation>A relationship of two Quantity values - expressed as a numerator and a denominator.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Reference">
        <xs:annotation>
          <xs:documentation>A reference from one resource to another.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SampledData">
        <xs:annotation>
          <xs:documentation>A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Timing">
        <xs:annotation>
          <xs:documentation>Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="base64Binary">
        <xs:annotation>
          <xs:documentation>A stream of bytes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation>Value of &quot;true&quot; or &quot;false&quot;</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation>A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="date">
        <xs:annotation>
          <xs:documentation>A date, or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation>A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds may be provided but may also be ignored.  Dates SHALL be valid dates.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation>A rational number with implicit precision</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="id">
        <xs:annotation>
          <xs:documentation>Any combination of lowercase letters, numerals, &quot;-&quot; and &quot;.&quot;, with a length limit of 36 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Systems SHALL send ids as lower-case but SHOULD interpret them case-insensitively.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="instant">
        <xs:annotation>
          <xs:documentation>An instant in time - known at least to the second</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation>A whole number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="oid">
        <xs:annotation>
          <xs:documentation>An oid represented as a URI</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation>A sequence of Unicode characters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="time">
        <xs:annotation>
          <xs:documentation>A time during the day, with no date specified</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uri">
        <xs:annotation>
          <xs:documentation>String of characters used to identify a name or a resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uuid">
        <xs:annotation>
          <xs:documentation>A UUID, represented as a URI</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DataType">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="DataType-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ResourceProfileStatus-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation>This profile is still under development.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation>This profile is ready for normal use.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="retired">
        <xs:annotation>
          <xs:documentation>This profile has been deprecated, withdrawn or superseded and should no longer be used.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ResourceProfileStatus">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="ResourceProfileStatus-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EncounterState-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="planned">
        <xs:annotation>
          <xs:documentation>The Encounter has not yet started.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="arrived">
        <xs:annotation>
          <xs:documentation>The Patient is present for the encounter, however is not currently meeting with a practitioner.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in progress">
        <xs:annotation>
          <xs:documentation>The Encounter has begun and the patient is present / the practitioner and the patient are meeting.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="onleave">
        <xs:annotation>
          <xs:documentation>The Encounter has begun, but the patient is temporarily on leave.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="finished">
        <xs:annotation>
          <xs:documentation>The Encounter has ended.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation>The Encounter has ended before it has begun.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EncounterState">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="EncounterState-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CompositionAttestationMode-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="personal">
        <xs:annotation>
          <xs:documentation>The person authenticated the content in their personal capacity.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="professional">
        <xs:annotation>
          <xs:documentation>The person authenticated the content in their professional capacity.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="legal">
        <xs:annotation>
          <xs:documentation>The person authenticated the content and accepted legal responsibility for its content.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="official">
        <xs:annotation>
          <xs:documentation>The organization authenticated the content as consistent with their policies and procedures.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CompositionAttestationMode">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="CompositionAttestationMode-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="Use-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation>The treatment is complete and this represents a Claim for the services.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="proposed">
        <xs:annotation>
          <xs:documentation>The treatment is proposed and this represents a Pre-authorization for the services.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="exploratory">
        <xs:annotation>
          <xs:documentation>The treatment is proposed and this represents a Pre-determination for the services.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation>A locally defined or otherwise resolved status.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Use">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="Use-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ResourceType-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Alert">
        <xs:annotation>
          <xs:documentation>Prospective warnings of potential issues when providing care to the patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AllergyIntolerance">
        <xs:annotation>
          <xs:documentation>Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation>A scheduled healthcare event for a patient and/or practitioner(s) where a service may take place at a specific date/time.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AppointmentResponse">
        <xs:annotation>
          <xs:documentation>A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Basic">
        <xs:annotation>
          <xs:documentation>Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Binary">
        <xs:annotation>
          <xs:documentation>A binary resource can contain any content, whether text, image, pdf, zip archive, etc.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bundle">
        <xs:annotation>
          <xs:documentation>A container for a group of resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation>Describes the intention of how one or more practitioners intend to deliver care for a particular patient for a period of time, possibly limited to care for a specific condition or set of conditions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan2">
        <xs:annotation>
          <xs:documentation>Describes the intention of how one or more practitioners intend to deliver care for a particular patient for a period of time, possibly limited to care for a specific condition or set of conditions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation>This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalAssessment">
        <xs:annotation>
          <xs:documentation>A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation>An occurrence of information being transmitted. E.g., an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation>A request to convey information. E.g., the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation>A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ConceptMap">
        <xs:annotation>
          <xs:documentation>A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condition">
        <xs:annotation>
          <xs:documentation>Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a Diagnosis during an Encounter; populating a problem List or a Summary Statement, such as a Discharge Summary.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Conformance">
        <xs:annotation>
          <xs:documentation>A conformance statement is a set of requirements for a desired implementation or a description of how a target application fulfills those requirements in a particular implementation.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation>A formal agreement between parties regarding the conduct of business, exchange of information or other matters.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contraindication">
        <xs:annotation>
          <xs:documentation>Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient.  E.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation>Financial instrument which may be used to pay for or reimburse for health care products and services.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DataElement">
        <xs:annotation>
          <xs:documentation>The formal description of a single piece of information that can be gathered and reported.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation>This resource identifies an instance of a manufactured thing that is used in the provision of healthcare without being substantially changed through that activity. The device may be a machine, an insert, a computer, an application, etc. This includes durable (reusable) medical equipment as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceComponent">
        <xs:annotation>
          <xs:documentation>Describes the characteristics, operational status and capabilities of a medical-related component of a medical device.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceMetric">
        <xs:annotation>
          <xs:documentation>Describes a measurement, calculation or setting capability of a medical device.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceUseRequest">
        <xs:annotation>
          <xs:documentation>Represents a request for the use of a device.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceUseStatement">
        <xs:annotation>
          <xs:documentation>A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticOrder">
        <xs:annotation>
          <xs:documentation>A request for a diagnostic investigation service to be performed.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation>The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretation, and formatted representation of diagnostic reports.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentManifest">
        <xs:annotation>
          <xs:documentation>A manifest that defines a set of documents.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation>A reference to a document.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EligibilityRequest">
        <xs:annotation>
          <xs:documentation>This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EligibilityResponse">
        <xs:annotation>
          <xs:documentation>This resource provides eligibility and plan details from the processing of an Eligibility resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation>An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation>This resource provides the insurance Enrollment details to the insurer regarding a specified coverage.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation>This resource provides Enrollment and plan details from the processing of an Enrollment resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation>An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation>This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExtensionDefinition">
        <xs:annotation>
          <xs:documentation>Defines an extension that can be used in resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyHistory">
        <xs:annotation>
          <xs:documentation>Significant health events and conditions for people related to the subject relevant in the context of care for the subject.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Goal">
        <xs:annotation>
          <xs:documentation>Describes the intended objective(s) of the care.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation>Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized.  I.e. A collection of entities that isn't an Organization.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation>The details of a Healthcare Service available at a location.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingObjectSelection">
        <xs:annotation>
          <xs:documentation>A set of DICOM SOP Instances of a patient, selected for some application purpose, e.g., quality assurance, teaching, conference, consulting, etc.  Objects selected can be from different studies, but must be of the same patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation>Representation of the content produced in a DICOM imaging study. A study comprises a set of Series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A Series is of only one modality (e.g., X-ray, CT, MR, ultrasound), but a Study may have multiple Series of different modalities.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation>Immunization event information.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImmunizationRecommendation">
        <xs:annotation>
          <xs:documentation>A patient's point-of-time immunization status and recommendation with optional supporting justification.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InstitutionalClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="List">
        <xs:annotation>
          <xs:documentation>A set of information summarized from a list of other resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation>Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Media">
        <xs:annotation>
          <xs:documentation>A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Medication">
        <xs:annotation>
          <xs:documentation>Primarily used for identification and definition of Medication, but also covers ingredients and packaging.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation>Describes the event of a patient being given a dose of a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.

Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation>Dispensing a medication to a named patient.  This includes a description of the supply provided and the instructions for administering the medication.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationPrescription">
        <xs:annotation>
          <xs:documentation>An order for both supply of the medication and the instructions for administration of the medicine to a patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation>A record of medication being taken by a patient, or that the medication has been given to a patient where the record is the result of a report from the patient or another clinician.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation>The header for a message exchange that is either requesting or responding to an action.  The Reference(s) that are the subject of the action as well as other Information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NamingSystem">
        <xs:annotation>
          <xs:documentation>A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a &quot;System&quot; used within the Identifier and Coding data types.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation>Measurements and simple assertions made about a patient, device or other subject.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation>A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationOutcome">
        <xs:annotation>
          <xs:documentation>A collection of error, warning or information messages that result from a system action.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OralHealthClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order">
        <xs:annotation>
          <xs:documentation>A request to perform an action.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrderResponse">
        <xs:annotation>
          <xs:documentation>A response to an order.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation>A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Other">
        <xs:annotation>
          <xs:documentation>Other is a conformant for handling resource concepts not yet defined for FHIR or outside HL7's scope of interest.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation>Demographics and other administrative information about a person or animal receiving care or other health-related services.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation>This resource provides the status of the payment for goods and services rendered, and the request and response resource references.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation>This resource provides payment details and claim references supporting a bulk payment.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PendedRequest">
        <xs:annotation>
          <xs:documentation>This resource provides the request and response details for the resource for which the status is to be checked.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation>Demographics and administrative information about a person independent of a specific health-related context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PharmacyClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation>A person who is directly or indirectly involved in the provisioning of healthcare.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation>An action that is performed on a patient. This can be a physical 'thing' like an operation, or less invasive like counseling or hypnotherapy.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProcedureRequest">
        <xs:annotation>
          <xs:documentation>A request for a procedure to be performed. May be a proposal or an order.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProfessionalClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Profile">
        <xs:annotation>
          <xs:documentation>A Resource Profile - a statement of use of one or more FHIR Resources.  It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation>Provenance information that describes the activity that led to the creation of a set of resources. This information can be used to help determine their reliability or trace where the information in them came from. The focus of the provenance resource is record keeping, audit and traceability, and not explicit statements of clinical significance.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation>A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireAnswers">
        <xs:annotation>
          <xs:documentation>A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Readjudicate">
        <xs:annotation>
          <xs:documentation>This resource provides the request and line items details for the claim which is to be re-adjudicated.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ReferralRequest">
        <xs:annotation>
          <xs:documentation>Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organisation.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation>Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Reversal">
        <xs:annotation>
          <xs:documentation>This resource provides the request and response details for the request for which all actions are to be reversed or terminated.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation>An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Schedule">
        <xs:annotation>
          <xs:documentation>A container for slot(s) of time that may be available for booking appointments.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SearchParameter">
        <xs:annotation>
          <xs:documentation>A Search Parameter that defines a named search item that can be used to search/filter on a resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SecurityEvent">
        <xs:annotation>
          <xs:documentation>A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Slot">
        <xs:annotation>
          <xs:documentation>A slot of time on a schedule that may be available for booking appointments.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation>Sample for analysis.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StatusRequest">
        <xs:annotation>
          <xs:documentation>This resource provides the request and response details for the resource for which the processing status is to be checked.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StatusResponse">
        <xs:annotation>
          <xs:documentation>This resource provides processing status, errors and notes from the processing of a resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Subscription">
        <xs:annotation>
          <xs:documentation>Todo.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substance">
        <xs:annotation>
          <xs:documentation>A homogeneous material with a definite composition.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Supply">
        <xs:annotation>
          <xs:documentation>A supply - a  request for something, and provision of what is supplied.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SupportingDocumentation">
        <xs:annotation>
          <xs:documentation>This resource provides the supporting information for a process, for example clinical or financial  information related to a claim or pre-authorization.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ValueSet">
        <xs:annotation>
          <xs:documentation>A value set specifies a set of codes drawn from one or more code systems.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionClaim">
        <xs:annotation>
          <xs:documentation>A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation>An authorization for the supply of glasses and/or contact lenses to a patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ResourceType">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="ResourceType-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CompositionStatus-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="preliminary">
        <xs:annotation>
          <xs:documentation>This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="final">
        <xs:annotation>
          <xs:documentation>The composition or document is complete and verified by an appropriate person, and no further work is planned.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appended">
        <xs:annotation>
          <xs:documentation>The composition or document has been modified subsequent to being released as &quot;final&quot;, and is complete and verified by an authorized person. The modifications added new information to the composition or document, but did not revise existing content.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="amended">
        <xs:annotation>
          <xs:documentation>The composition or document has been modified subsequent to being released as &quot;final&quot;, and is complete and verified by an authorized person.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered in error">
        <xs:annotation>
          <xs:documentation>The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CompositionStatus">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="CompositionStatus-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MessageEvent-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="MedicationAdministration-Complete">
        <xs:annotation>
          <xs:documentation>Change the status of a Medication Administration to show that it is complete.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration-Nullification">
        <xs:annotation>
          <xs:documentation>Someone wishes to record that the record of administration of a medication is in error and should be ignored.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration-Recording">
        <xs:annotation>
          <xs:documentation>Indicates that a medication has been recorded against the patient's record.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration-Update">
        <xs:annotation>
          <xs:documentation>Update a Medication Administration record.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="admin-notify">
        <xs:annotation>
          <xs:documentation>Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="conceptmap-translate">
        <xs:annotation>
          <xs:documentation>Translate a code from one value set to another, based on the existing value set and concept maps resources, and/or other additional knowledge available to the server. The coded value is carried as an extension in the message header.  The outcome is an operationOutcome with hints, warnings, or errors, or the translated code in an extension.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="diagnosticreport-provide">
        <xs:annotation>
          <xs:documentation>Provide a diagnostic report, or update a previously provided diagnostic report.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="observation-provide">
        <xs:annotation>
          <xs:documentation>Provide a simple observation or update a previously provided simple observation.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="patient-link">
        <xs:annotation>
          <xs:documentation>Notification that two patient records actually identify the same patient.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="patient-unlink">
        <xs:annotation>
          <xs:documentation>Notification that previous advice that two patient records concern the same patient is now considered incorrect.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="valueset-expand">
        <xs:annotation>
          <xs:documentation>The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="valueset-validate">
        <xs:annotation>
          <xs:documentation>Validate that a coded value is in the set of codes allowed by a value set. The coded value is carried as an extension in the message header. The outcome is an OperationOutcome with hints, warnings, or errors.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MessageEvent">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="MessageEvent-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MaritalStatus-list">
    <xs:restriction base="xs:string">
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MaritalStatus">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="MaritalStatus-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ValueSetStatus-list">
    <xs:restriction base="xs:string">
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation>This valueset is still under development.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation>This valueset is ready for normal use.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="retired">
        <xs:annotation>
          <xs:documentation>This valueset has been withdrawn or superceded and should no longer be used.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ValueSetStatus">
    <xs:annotation>
      <xs:documentation></xs:documentation>
      <xs:documentation>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="ValueSetStatus-list" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
</xs:schema>
