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

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

  Generated on Mon, Mar 30, 2026 16:23+0000 for FHIR v6.0.0-ballot4 
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xml="http://www.w3.org/XML/1998/namespace" targetNamespace="http://hl7.org/fhir" elementFormDefault="qualified" version="6.0.0-ballot4">
  <!-- Note: When using this schema with some tools, it may also be necessary to declare xmlns:xml="http://www.w3.org/XML/1998/namespace", however this causes performance issues with other tools and thus is not in the base schemas. -->
  <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:simpleType name="FHIRTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Base">
        <xs:annotation>
          <xs:documentation xml:lang="en">Base</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Element">
        <xs:annotation>
          <xs:documentation xml:lang="en">Element</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BackboneElement">
        <xs:annotation>
          <xs:documentation xml:lang="en">BackboneElement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DataType">
        <xs:annotation>
          <xs:documentation xml:lang="en">DataType</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Address">
        <xs:annotation>
          <xs:documentation xml:lang="en">Address</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Annotation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Annotation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Attachment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Attachment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Availability">
        <xs:annotation>
          <xs:documentation xml:lang="en">Availability</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BackboneType">
        <xs:annotation>
          <xs:documentation xml:lang="en">BackboneType</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Dosage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dosage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DosageCondition">
        <xs:annotation>
          <xs:documentation xml:lang="en">DosageCondition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DosageDetails">
        <xs:annotation>
          <xs:documentation xml:lang="en">DosageDetails</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DosageSafety">
        <xs:annotation>
          <xs:documentation xml:lang="en">DosageSafety</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ElementDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ElementDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MarketingStatus">
        <xs:annotation>
          <xs:documentation xml:lang="en">MarketingStatus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProductShelfLife">
        <xs:annotation>
          <xs:documentation xml:lang="en">ProductShelfLife</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelativeTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelativeTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Timing">
        <xs:annotation>
          <xs:documentation xml:lang="en">Timing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeableConcept">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeableConcept</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeableReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeableReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ContactDetail">
        <xs:annotation>
          <xs:documentation xml:lang="en">ContactDetail</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ContactPoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">ContactPoint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DataRequirement">
        <xs:annotation>
          <xs:documentation xml:lang="en">DataRequirement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Expression">
        <xs:annotation>
          <xs:documentation xml:lang="en">Expression</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExtendedContactDetail">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExtendedContactDetail</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Extension">
        <xs:annotation>
          <xs:documentation xml:lang="en">Extension</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HumanName">
        <xs:annotation>
          <xs:documentation xml:lang="en">HumanName</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Identifier">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifier</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Meta">
        <xs:annotation>
          <xs:documentation xml:lang="en">Meta</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MonetaryComponent">
        <xs:annotation>
          <xs:documentation xml:lang="en">MonetaryComponent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Money">
        <xs:annotation>
          <xs:documentation xml:lang="en">Money</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Narrative">
        <xs:annotation>
          <xs:documentation xml:lang="en">Narrative</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ParameterDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ParameterDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Period">
        <xs:annotation>
          <xs:documentation xml:lang="en">Period</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PrimitiveType">
        <xs:annotation>
          <xs:documentation xml:lang="en">PrimitiveType</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="base64Binary">
        <xs:annotation>
          <xs:documentation xml:lang="en">base64Binary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="date">
        <xs:annotation>
          <xs:documentation xml:lang="en">date</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">dateTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation xml:lang="en">decimal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="instant">
        <xs:annotation>
          <xs:documentation xml:lang="en">instant</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="positiveInt">
        <xs:annotation>
          <xs:documentation xml:lang="en">positiveInt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unsignedInt">
        <xs:annotation>
          <xs:documentation xml:lang="en">unsignedInt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer64">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer64</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation xml:lang="en">code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="id">
        <xs:annotation>
          <xs:documentation xml:lang="en">id</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="markdown">
        <xs:annotation>
          <xs:documentation xml:lang="en">markdown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="time">
        <xs:annotation>
          <xs:documentation xml:lang="en">time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uri">
        <xs:annotation>
          <xs:documentation xml:lang="en">uri</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="canonical">
        <xs:annotation>
          <xs:documentation xml:lang="en">canonical</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="oid">
        <xs:annotation>
          <xs:documentation xml:lang="en">oid</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="url">
        <xs:annotation>
          <xs:documentation xml:lang="en">url</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uuid">
        <xs:annotation>
          <xs:documentation xml:lang="en">uuid</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Age">
        <xs:annotation>
          <xs:documentation xml:lang="en">Age</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Count">
        <xs:annotation>
          <xs:documentation xml:lang="en">Count</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Distance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Distance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Duration">
        <xs:annotation>
          <xs:documentation xml:lang="en">Duration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Range">
        <xs:annotation>
          <xs:documentation xml:lang="en">Range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ratio">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ratio</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RatioRange">
        <xs:annotation>
          <xs:documentation xml:lang="en">RatioRange</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Reference">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedArtifact">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedArtifact</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SampledData">
        <xs:annotation>
          <xs:documentation xml:lang="en">SampledData</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Signature">
        <xs:annotation>
          <xs:documentation xml:lang="en">Signature</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TriggerDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">TriggerDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UsageContext">
        <xs:annotation>
          <xs:documentation xml:lang="en">UsageContext</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VirtualServiceDetail">
        <xs:annotation>
          <xs:documentation xml:lang="en">VirtualServiceDetail</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="xhtml">
        <xs:annotation>
          <xs:documentation xml:lang="en">xhtml</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Resource">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Binary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Binary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bundle">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bundle</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DomainResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">DomainResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Account">
        <xs:annotation>
          <xs:documentation xml:lang="en">Account</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActivityDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActivityDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActorDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActorDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdministrableProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdministrableProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdverseEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdverseEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AllergyIntolerance">
        <xs:annotation>
          <xs:documentation xml:lang="en">AllergyIntolerance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appointment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AppointmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">AppointmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ArtifactAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">ArtifactAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AuditEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AuditEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Basic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Basic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BiologicallyDerivedProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">BiologicallyDerivedProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BodyStructure">
        <xs:annotation>
          <xs:documentation xml:lang="en">BodyStructure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CanonicalResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">CanonicalResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CapabilityStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">CapabilityStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">CarePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CareTeam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Claim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Claim</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClaimResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalUseDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClinicalUseDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Communication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CommunicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CompartmentDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">CompartmentDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ConceptMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">ConceptMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contract</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DetectedIssue">
        <xs:annotation>
          <xs:documentation xml:lang="en">DetectedIssue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAlert">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAlert</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAssociation">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAssociation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceMetric">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceMetric</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encounter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Endpoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">Endpoint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation xml:lang="en">EpisodeOfCare</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EventDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">EventDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Evidence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Evidence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EvidenceVariable">
        <xs:annotation>
          <xs:documentation xml:lang="en">EvidenceVariable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExampleScenario">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExampleScenario</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExplanationOfBenefit</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyMemberHistory">
        <xs:annotation>
          <xs:documentation xml:lang="en">FamilyMemberHistory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Flag">
        <xs:annotation>
          <xs:documentation xml:lang="en">Flag</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Goal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Goal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GuidanceResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">GuidanceResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Immunization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImplementationGuide">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImplementationGuide</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ingredient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ingredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsurancePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsurancePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsuranceProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsuranceProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Invoice">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Library">
        <xs:annotation>
          <xs:documentation xml:lang="en">Library</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="List">
        <xs:annotation>
          <xs:documentation xml:lang="en">List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ManufacturedItemDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ManufacturedItemDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Measure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Measure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MeasureReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">MeasureReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Medication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationAdministration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationDispense</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageHeader</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MetadataResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">MetadataResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NamingSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">NamingSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionIntake">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionIntake</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Observation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ObservationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ObservationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationOutcome">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationOutcome</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrganizationAffiliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">OrganizationAffiliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PackagedProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PackagedProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentNotice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentReconciliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation xml:lang="en">Person</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PlanDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PlanDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PractitionerRole">
        <xs:annotation>
          <xs:documentation xml:lang="en">PractitionerRole</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Procedure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Provenance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation xml:lang="en">Questionnaire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">QuestionnaireResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RegulatedAuthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">RegulatedAuthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestOrchestration">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestOrchestration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchSubject">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchSubject</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Schedule">
        <xs:annotation>
          <xs:documentation xml:lang="en">Schedule</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SearchParameter">
        <xs:annotation>
          <xs:documentation xml:lang="en">SearchParameter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Slot">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slot</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specimen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SpecimenDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SpecimenDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Subscription">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subscription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionStatus">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionStatus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionTopic">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionTopic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Substance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubstanceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Task">
        <xs:annotation>
          <xs:documentation xml:lang="en">Task</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TerminologyCapabilities">
        <xs:annotation>
          <xs:documentation xml:lang="en">TerminologyCapabilities</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ValueSet">
        <xs:annotation>
          <xs:documentation xml:lang="en">ValueSet</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation xml:lang="en">VisionPrescription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Parameters">
        <xs:annotation>
          <xs:documentation xml:lang="en">Parameters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FHIRTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="FHIRTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FHIRPathTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="http://hl7.org/fhirpath/System.String">
        <xs:annotation>
          <xs:documentation xml:lang="en">String</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="http://hl7.org/fhirpath/System.Boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">Boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="http://hl7.org/fhirpath/System.Date">
        <xs:annotation>
          <xs:documentation xml:lang="en">Date</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="http://hl7.org/fhirpath/System.DateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">DateTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="http://hl7.org/fhirpath/System.Decimal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Decimal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="http://hl7.org/fhirpath/System.Integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">Integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="http://hl7.org/fhirpath/System.Long">
        <xs:annotation>
          <xs:documentation xml:lang="en">Long</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="http://hl7.org/fhirpath/System.Time">
        <xs:annotation>
          <xs:documentation xml:lang="en">Time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FHIRPathTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="FHIRPathTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ResourceTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Account">
        <xs:annotation>
          <xs:documentation xml:lang="en">Account</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActivityDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActivityDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActorDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActorDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdministrableProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdministrableProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdverseEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdverseEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AllergyIntolerance">
        <xs:annotation>
          <xs:documentation xml:lang="en">AllergyIntolerance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appointment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AppointmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">AppointmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ArtifactAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">ArtifactAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AuditEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AuditEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Basic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Basic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Binary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Binary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BiologicallyDerivedProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">BiologicallyDerivedProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BodyStructure">
        <xs:annotation>
          <xs:documentation xml:lang="en">BodyStructure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bundle">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bundle</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CapabilityStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">CapabilityStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">CarePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CareTeam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Claim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Claim</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClaimResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalUseDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClinicalUseDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Communication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CommunicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CompartmentDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">CompartmentDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ConceptMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">ConceptMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contract</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DetectedIssue">
        <xs:annotation>
          <xs:documentation xml:lang="en">DetectedIssue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAlert">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAlert</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAssociation">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAssociation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceMetric">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceMetric</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encounter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Endpoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">Endpoint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation xml:lang="en">EpisodeOfCare</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EventDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">EventDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Evidence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Evidence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EvidenceVariable">
        <xs:annotation>
          <xs:documentation xml:lang="en">EvidenceVariable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExampleScenario">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExampleScenario</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExplanationOfBenefit</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyMemberHistory">
        <xs:annotation>
          <xs:documentation xml:lang="en">FamilyMemberHistory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Flag">
        <xs:annotation>
          <xs:documentation xml:lang="en">Flag</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Goal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Goal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GuidanceResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">GuidanceResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Immunization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImplementationGuide">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImplementationGuide</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ingredient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ingredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsurancePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsurancePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsuranceProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsuranceProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Invoice">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Library">
        <xs:annotation>
          <xs:documentation xml:lang="en">Library</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="List">
        <xs:annotation>
          <xs:documentation xml:lang="en">List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ManufacturedItemDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ManufacturedItemDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Measure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Measure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MeasureReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">MeasureReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Medication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationAdministration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationDispense</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageHeader</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NamingSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">NamingSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionIntake">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionIntake</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Observation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ObservationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ObservationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationOutcome">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationOutcome</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrganizationAffiliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">OrganizationAffiliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PackagedProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PackagedProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Parameters">
        <xs:annotation>
          <xs:documentation xml:lang="en">Parameters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentNotice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentReconciliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation xml:lang="en">Person</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PlanDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PlanDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PractitionerRole">
        <xs:annotation>
          <xs:documentation xml:lang="en">PractitionerRole</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Procedure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Provenance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation xml:lang="en">Questionnaire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">QuestionnaireResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RegulatedAuthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">RegulatedAuthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestOrchestration">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestOrchestration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchSubject">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchSubject</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Schedule">
        <xs:annotation>
          <xs:documentation xml:lang="en">Schedule</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SearchParameter">
        <xs:annotation>
          <xs:documentation xml:lang="en">SearchParameter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Slot">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slot</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specimen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SpecimenDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SpecimenDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Subscription">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subscription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionStatus">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionStatus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionTopic">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionTopic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Substance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubstanceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Task">
        <xs:annotation>
          <xs:documentation xml:lang="en">Task</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TerminologyCapabilities">
        <xs:annotation>
          <xs:documentation xml:lang="en">TerminologyCapabilities</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ValueSet">
        <xs:annotation>
          <xs:documentation xml:lang="en">ValueSet</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation xml:lang="en">VisionPrescription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ResourceType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="ResourceTypeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="RequestResourceTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appointment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">CarePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Claim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Claim</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CommunicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestOrchestration">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestOrchestration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Task">
        <xs:annotation>
          <xs:documentation xml:lang="en">Task</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation xml:lang="en">VisionPrescription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RequestResourceTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="RequestResourceTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EventResourceTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="AdverseEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdverseEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AuditEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AuditEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClaimResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Communication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contract</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DetectedIssue">
        <xs:annotation>
          <xs:documentation xml:lang="en">DetectedIssue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAlert">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAlert</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encounter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation xml:lang="en">EpisodeOfCare</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExplanationOfBenefit</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyMemberHistory">
        <xs:annotation>
          <xs:documentation xml:lang="en">FamilyMemberHistory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GuidanceResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">GuidanceResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Immunization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Invoice">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationAdministration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationDispense</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageHeader</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionIntake">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionIntake</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Observation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentNotice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentReconciliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Procedure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Provenance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">QuestionnaireResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EventResourceTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="EventResourceTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DefinitionResourceTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="ActivityDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActivityDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalUseDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClinicalUseDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EventDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">EventDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Measure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Measure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ObservationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ObservationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PlanDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PlanDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation xml:lang="en">Questionnaire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionTopic">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionTopic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DefinitionResourceTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="DefinitionResourceTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ParticipantResourceTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="CareTeam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PractitionerRole">
        <xs:annotation>
          <xs:documentation xml:lang="en">PractitionerRole</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ParticipantResourceTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="ParticipantResourceTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EvidenceVariableEventEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="study-start">
        <xs:annotation>
          <xs:documentation xml:lang="en">Study Start</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="treatment-start">
        <xs:annotation>
          <xs:documentation xml:lang="en">Start of Treatment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="condition-detection">
        <xs:annotation>
          <xs:documentation xml:lang="en">Detection of Condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="condition-treatment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Treatment of Condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="hospital-admission">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hospital Admission</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="hospital-discharge">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hospital Discharge</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="operative-procedure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Operative Procedure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EvidenceVariableEvent">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="EvidenceVariableEventEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConcreteFHIRTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Account">
        <xs:annotation>
          <xs:documentation xml:lang="en">Account</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActivityDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActivityDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActorDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActorDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Address">
        <xs:annotation>
          <xs:documentation xml:lang="en">Address</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdministrableProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdministrableProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdverseEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdverseEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Age">
        <xs:annotation>
          <xs:documentation xml:lang="en">Age</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AllergyIntolerance">
        <xs:annotation>
          <xs:documentation xml:lang="en">AllergyIntolerance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Annotation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Annotation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appointment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AppointmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">AppointmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ArtifactAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">ArtifactAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Attachment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Attachment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AuditEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AuditEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Availability">
        <xs:annotation>
          <xs:documentation xml:lang="en">Availability</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="base64Binary">
        <xs:annotation>
          <xs:documentation xml:lang="en">base64Binary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Basic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Basic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Binary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Binary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BiologicallyDerivedProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">BiologicallyDerivedProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BodyStructure">
        <xs:annotation>
          <xs:documentation xml:lang="en">BodyStructure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bundle">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bundle</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="canonical">
        <xs:annotation>
          <xs:documentation xml:lang="en">canonical</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CapabilityStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">CapabilityStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">CarePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CareTeam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Claim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Claim</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClaimResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalUseDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClinicalUseDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation xml:lang="en">code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeableConcept">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeableConcept</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeableReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeableReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Communication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CommunicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CompartmentDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">CompartmentDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ConceptMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">ConceptMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ContactDetail">
        <xs:annotation>
          <xs:documentation xml:lang="en">ContactDetail</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ContactPoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">ContactPoint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contract</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Count">
        <xs:annotation>
          <xs:documentation xml:lang="en">Count</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DataRequirement">
        <xs:annotation>
          <xs:documentation xml:lang="en">DataRequirement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="date">
        <xs:annotation>
          <xs:documentation xml:lang="en">date</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">dateTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation xml:lang="en">decimal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DetectedIssue">
        <xs:annotation>
          <xs:documentation xml:lang="en">DetectedIssue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAlert">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAlert</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAssociation">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAssociation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceMetric">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceMetric</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Distance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Distance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Dosage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dosage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DosageCondition">
        <xs:annotation>
          <xs:documentation xml:lang="en">DosageCondition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DosageDetails">
        <xs:annotation>
          <xs:documentation xml:lang="en">DosageDetails</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DosageSafety">
        <xs:annotation>
          <xs:documentation xml:lang="en">DosageSafety</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Duration">
        <xs:annotation>
          <xs:documentation xml:lang="en">Duration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ElementDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ElementDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encounter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Endpoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">Endpoint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation xml:lang="en">EpisodeOfCare</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EventDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">EventDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Evidence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Evidence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EvidenceVariable">
        <xs:annotation>
          <xs:documentation xml:lang="en">EvidenceVariable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExampleScenario">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExampleScenario</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExplanationOfBenefit</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Expression">
        <xs:annotation>
          <xs:documentation xml:lang="en">Expression</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExtendedContactDetail">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExtendedContactDetail</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Extension">
        <xs:annotation>
          <xs:documentation xml:lang="en">Extension</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyMemberHistory">
        <xs:annotation>
          <xs:documentation xml:lang="en">FamilyMemberHistory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Flag">
        <xs:annotation>
          <xs:documentation xml:lang="en">Flag</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Goal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Goal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GuidanceResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">GuidanceResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HumanName">
        <xs:annotation>
          <xs:documentation xml:lang="en">HumanName</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="id">
        <xs:annotation>
          <xs:documentation xml:lang="en">id</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Identifier">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifier</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Immunization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImplementationGuide">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImplementationGuide</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ingredient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ingredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="instant">
        <xs:annotation>
          <xs:documentation xml:lang="en">instant</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsurancePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsurancePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsuranceProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsuranceProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer64">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer64</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Invoice">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Library">
        <xs:annotation>
          <xs:documentation xml:lang="en">Library</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="List">
        <xs:annotation>
          <xs:documentation xml:lang="en">List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ManufacturedItemDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ManufacturedItemDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="markdown">
        <xs:annotation>
          <xs:documentation xml:lang="en">markdown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MarketingStatus">
        <xs:annotation>
          <xs:documentation xml:lang="en">MarketingStatus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Measure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Measure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MeasureReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">MeasureReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Medication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationAdministration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationDispense</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageHeader</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Meta">
        <xs:annotation>
          <xs:documentation xml:lang="en">Meta</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MonetaryComponent">
        <xs:annotation>
          <xs:documentation xml:lang="en">MonetaryComponent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Money">
        <xs:annotation>
          <xs:documentation xml:lang="en">Money</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NamingSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">NamingSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Narrative">
        <xs:annotation>
          <xs:documentation xml:lang="en">Narrative</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionIntake">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionIntake</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Observation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ObservationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ObservationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="oid">
        <xs:annotation>
          <xs:documentation xml:lang="en">oid</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationOutcome">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationOutcome</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrganizationAffiliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">OrganizationAffiliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PackagedProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PackagedProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ParameterDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ParameterDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Parameters">
        <xs:annotation>
          <xs:documentation xml:lang="en">Parameters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentNotice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentReconciliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Period">
        <xs:annotation>
          <xs:documentation xml:lang="en">Period</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation xml:lang="en">Person</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PlanDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PlanDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="positiveInt">
        <xs:annotation>
          <xs:documentation xml:lang="en">positiveInt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PractitionerRole">
        <xs:annotation>
          <xs:documentation xml:lang="en">PractitionerRole</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Procedure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProductShelfLife">
        <xs:annotation>
          <xs:documentation xml:lang="en">ProductShelfLife</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Provenance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation xml:lang="en">Questionnaire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">QuestionnaireResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Range">
        <xs:annotation>
          <xs:documentation xml:lang="en">Range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ratio">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ratio</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RatioRange">
        <xs:annotation>
          <xs:documentation xml:lang="en">RatioRange</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Reference">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RegulatedAuthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">RegulatedAuthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedArtifact">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedArtifact</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelativeTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelativeTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestOrchestration">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestOrchestration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchSubject">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchSubject</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SampledData">
        <xs:annotation>
          <xs:documentation xml:lang="en">SampledData</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Schedule">
        <xs:annotation>
          <xs:documentation xml:lang="en">Schedule</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SearchParameter">
        <xs:annotation>
          <xs:documentation xml:lang="en">SearchParameter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Signature">
        <xs:annotation>
          <xs:documentation xml:lang="en">Signature</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Slot">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slot</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specimen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SpecimenDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SpecimenDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Subscription">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subscription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionStatus">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionStatus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionTopic">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionTopic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Substance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubstanceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Task">
        <xs:annotation>
          <xs:documentation xml:lang="en">Task</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TerminologyCapabilities">
        <xs:annotation>
          <xs:documentation xml:lang="en">TerminologyCapabilities</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="time">
        <xs:annotation>
          <xs:documentation xml:lang="en">time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Timing">
        <xs:annotation>
          <xs:documentation xml:lang="en">Timing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TriggerDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">TriggerDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unsignedInt">
        <xs:annotation>
          <xs:documentation xml:lang="en">unsignedInt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uri">
        <xs:annotation>
          <xs:documentation xml:lang="en">uri</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="url">
        <xs:annotation>
          <xs:documentation xml:lang="en">url</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UsageContext">
        <xs:annotation>
          <xs:documentation xml:lang="en">UsageContext</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uuid">
        <xs:annotation>
          <xs:documentation xml:lang="en">uuid</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ValueSet">
        <xs:annotation>
          <xs:documentation xml:lang="en">ValueSet</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VirtualServiceDetail">
        <xs:annotation>
          <xs:documentation xml:lang="en">VirtualServiceDetail</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation xml:lang="en">VisionPrescription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="xhtml">
        <xs:annotation>
          <xs:documentation xml:lang="en">xhtml</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConcreteFHIRTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="ConcreteFHIRTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AllResourceTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Account">
        <xs:annotation>
          <xs:documentation xml:lang="en">Account</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActivityDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActivityDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActorDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActorDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdministrableProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdministrableProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdverseEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdverseEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AllergyIntolerance">
        <xs:annotation>
          <xs:documentation xml:lang="en">AllergyIntolerance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appointment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AppointmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">AppointmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ArtifactAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">ArtifactAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AuditEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AuditEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Basic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Basic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Binary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Binary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BiologicallyDerivedProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">BiologicallyDerivedProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BodyStructure">
        <xs:annotation>
          <xs:documentation xml:lang="en">BodyStructure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bundle">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bundle</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CanonicalResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">CanonicalResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CapabilityStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">CapabilityStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">CarePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CareTeam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Claim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Claim</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClaimResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalUseDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClinicalUseDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Communication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CommunicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CompartmentDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">CompartmentDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ConceptMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">ConceptMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contract</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DetectedIssue">
        <xs:annotation>
          <xs:documentation xml:lang="en">DetectedIssue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAlert">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAlert</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAssociation">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAssociation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceMetric">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceMetric</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DomainResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">DomainResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encounter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Endpoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">Endpoint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation xml:lang="en">EpisodeOfCare</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EventDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">EventDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Evidence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Evidence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EvidenceVariable">
        <xs:annotation>
          <xs:documentation xml:lang="en">EvidenceVariable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExampleScenario">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExampleScenario</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExplanationOfBenefit</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyMemberHistory">
        <xs:annotation>
          <xs:documentation xml:lang="en">FamilyMemberHistory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Flag">
        <xs:annotation>
          <xs:documentation xml:lang="en">Flag</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Goal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Goal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GuidanceResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">GuidanceResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Immunization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImplementationGuide">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImplementationGuide</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ingredient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ingredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsurancePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsurancePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsuranceProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsuranceProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Invoice">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Library">
        <xs:annotation>
          <xs:documentation xml:lang="en">Library</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="List">
        <xs:annotation>
          <xs:documentation xml:lang="en">List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ManufacturedItemDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ManufacturedItemDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Measure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Measure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MeasureReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">MeasureReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Medication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationAdministration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationDispense</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageHeader</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MetadataResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">MetadataResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NamingSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">NamingSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionIntake">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionIntake</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Observation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ObservationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ObservationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationOutcome">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationOutcome</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrganizationAffiliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">OrganizationAffiliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PackagedProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PackagedProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Parameters">
        <xs:annotation>
          <xs:documentation xml:lang="en">Parameters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentNotice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentReconciliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation xml:lang="en">Person</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PlanDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PlanDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PractitionerRole">
        <xs:annotation>
          <xs:documentation xml:lang="en">PractitionerRole</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Procedure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Provenance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation xml:lang="en">Questionnaire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">QuestionnaireResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RegulatedAuthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">RegulatedAuthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestOrchestration">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestOrchestration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchSubject">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchSubject</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Resource">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Schedule">
        <xs:annotation>
          <xs:documentation xml:lang="en">Schedule</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SearchParameter">
        <xs:annotation>
          <xs:documentation xml:lang="en">SearchParameter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Slot">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slot</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specimen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SpecimenDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SpecimenDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Subscription">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subscription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionStatus">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionStatus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionTopic">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionTopic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Substance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubstanceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Task">
        <xs:annotation>
          <xs:documentation xml:lang="en">Task</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TerminologyCapabilities">
        <xs:annotation>
          <xs:documentation xml:lang="en">TerminologyCapabilities</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ValueSet">
        <xs:annotation>
          <xs:documentation xml:lang="en">ValueSet</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation xml:lang="en">VisionPrescription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AllResourceTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="AllResourceTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AdministrativeGenderEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="male">
        <xs:annotation>
          <xs:documentation xml:lang="en">Male</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="female">
        <xs:annotation>
          <xs:documentation xml:lang="en">Female</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation xml:lang="en">Other</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AdministrativeGender">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="AdministrativeGenderEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AgeUnitsEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="min">
        <xs:annotation>
          <xs:documentation xml:lang="en">min</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="h">
        <xs:annotation>
          <xs:documentation xml:lang="en">h</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="d">
        <xs:annotation>
          <xs:documentation xml:lang="en">d</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="wk">
        <xs:annotation>
          <xs:documentation xml:lang="en">wk</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mo">
        <xs:annotation>
          <xs:documentation xml:lang="en">mo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="a">
        <xs:annotation>
          <xs:documentation xml:lang="en">a</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AgeUnits">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="AgeUnitsEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="BindingStrengthEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Required</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="extensible">
        <xs:annotation>
          <xs:documentation xml:lang="en">Extensible</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preferred">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preferred</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="example">
        <xs:annotation>
          <xs:documentation xml:lang="en">Example</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="descriptive">
        <xs:annotation>
          <xs:documentation xml:lang="en">descriptive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="BindingStrength">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="BindingStrengthEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConceptMapRelationshipEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="related-to">
        <xs:annotation>
          <xs:documentation xml:lang="en">Related To</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="equivalent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Equivalent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="source-is-narrower-than-target">
        <xs:annotation>
          <xs:documentation xml:lang="en">Source Is Narrower Than Target</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="source-is-broader-than-target">
        <xs:annotation>
          <xs:documentation xml:lang="en">Source Is Broader Than Target</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-related-to">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Related To</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConceptMapRelationship">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="ConceptMapRelationshipEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DocumentReferenceStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="current">
        <xs:annotation>
          <xs:documentation xml:lang="en">Current</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="superseded">
        <xs:annotation>
          <xs:documentation xml:lang="en">Superseded</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DocumentReferenceStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="DocumentReferenceStatusEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FHIRVersionEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="0.01">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.01</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.05">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.05</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.06">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.06</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.11">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.11</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.0.80">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.0.80</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.0.81">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.0.81</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.0.82">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.0.82</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.4">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.4.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.5</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0.5.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">0.5.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.0.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.0.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.0.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.0.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.0.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.0.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.4">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.4.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.6">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.6</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.6.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.6.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.8">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.8</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="1.8.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">1.8.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">3.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3.0.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">3.0.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3.0.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">3.0.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3.0.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">3.0.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3.3">
        <xs:annotation>
          <xs:documentation xml:lang="en">3.3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3.3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">3.3.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">3.5</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3.5.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">3.5.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.0.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.0.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.0.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.0.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.3">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.3.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.3.0-cibuild">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.3.0-cibuild</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.3.0-snapshot1">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.3.0-snapshot1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.4">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.4.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.5</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.5.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.5.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.6">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.6</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4.6.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">4.6.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">5.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5.0.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">5.0.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5.0.0-cibuild">
        <xs:annotation>
          <xs:documentation xml:lang="en">5.0.0-cibuild</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5.0.0-snapshot1">
        <xs:annotation>
          <xs:documentation xml:lang="en">5.0.0-snapshot1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5.0.0-snapshot2">
        <xs:annotation>
          <xs:documentation xml:lang="en">5.0.0-snapshot2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5.0.0-ballot">
        <xs:annotation>
          <xs:documentation xml:lang="en">5.0.0-ballot</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5.0.0-snapshot3">
        <xs:annotation>
          <xs:documentation xml:lang="en">5.0.0-snapshot3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5.0.0-draft-final">
        <xs:annotation>
          <xs:documentation xml:lang="en">5.0.0-draft-final</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="6.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">6.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="6.0.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">6.0.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="6.0.0-ballot1">
        <xs:annotation>
          <xs:documentation xml:lang="en">6.0.0-ballot1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="6.0.0-ballot2">
        <xs:annotation>
          <xs:documentation xml:lang="en">6.0.0-ballot2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="6.0.0-ballot3">
        <xs:annotation>
          <xs:documentation xml:lang="en">6.0.0-ballot3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="6.0.0-ballot4">
        <xs:annotation>
          <xs:documentation xml:lang="en">6.0.0-ballot4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FHIRVersion">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="FHIRVersionEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="PatchMimeTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="application/fhir+xml">
        <xs:annotation>
          <xs:documentation xml:lang="en">application/fhir+xml</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="application/fhir+json">
        <xs:annotation>
          <xs:documentation xml:lang="en">application/fhir+json</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="application/fhir+turtle">
        <xs:annotation>
          <xs:documentation xml:lang="en">application/fhir+turtle</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="application/json-patch+json">
        <xs:annotation>
          <xs:documentation xml:lang="en">application/json-patch+json</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="application/xml-patch+xml">
        <xs:annotation>
          <xs:documentation xml:lang="en">application/xml-patch+xml</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="PatchMimeTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="PatchMimeTypesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NoteTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="display">
        <xs:annotation>
          <xs:documentation xml:lang="en">Display</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="print">
        <xs:annotation>
          <xs:documentation xml:lang="en">Print (Form)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="printoper">
        <xs:annotation>
          <xs:documentation xml:lang="en">Print (Operator)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NoteType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="NoteTypeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="PublicationStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">Draft</xs:documentation>
          <xs:documentation xml:lang="ru">черновик</xs:documentation>
          <xs:documentation xml:lang="nl">ontwerp</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
          <xs:documentation xml:lang="ru">активный</xs:documentation>
          <xs:documentation xml:lang="nl">actief</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="retired">
        <xs:annotation>
          <xs:documentation xml:lang="en">Retired</xs:documentation>
          <xs:documentation xml:lang="ru">удалён</xs:documentation>
          <xs:documentation xml:lang="nl">verouderd</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="PublicationStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="PublicationStatusEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="RemittanceOutcomeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Complete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RemittanceOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="RemittanceOutcomeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SearchParamTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="number">
        <xs:annotation>
          <xs:documentation xml:lang="en">Number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="date">
        <xs:annotation>
          <xs:documentation xml:lang="en">Date/DateTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">String</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="token">
        <xs:annotation>
          <xs:documentation xml:lang="en">Token</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reference">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="composite">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composite</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uri">
        <xs:annotation>
          <xs:documentation xml:lang="en">URI</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="special">
        <xs:annotation>
          <xs:documentation xml:lang="en">Special</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="resource">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SearchParamType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="SearchParamTypeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="JurisdictionValueSetEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="AD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Andorra</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AE">
        <xs:annotation>
          <xs:documentation xml:lang="en">United Arab Emirates</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Afghanistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Antigua and Barbuda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Anguilla</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Albania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Armenia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Angola</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Antarctica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Argentina</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AS">
        <xs:annotation>
          <xs:documentation xml:lang="en">American Samoa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Austria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Australia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Aruba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Åland Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Azerbaijan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bosnia and Herzegovina</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Barbados</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bangladesh</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belgium</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Burkina Faso</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bulgaria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bahrain</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Burundi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BJ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Benin</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Barthélemy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bermuda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Brunei Darussalam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bolivia, Plurinational State of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bonaire, Sint Eustatius and Saba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Brazil</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bahamas</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bhutan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bouvet Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Botswana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belarus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belize</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Canada</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cocos (Keeling) Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Congo, the Democratic Republic of the</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Central African Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Congo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Switzerland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Côte d'Ivoire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cook Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chile</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cameroon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CN">
        <xs:annotation>
          <xs:documentation xml:lang="en">China</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Colombia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Costa Rica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cuba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cabo Verde</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Curaçao</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Christmas Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cyprus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Czechia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Germany</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DJ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Djibouti</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Denmark</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dominica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dominican Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Algeria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ecuador</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Estonia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Egypt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Western Sahara</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ER">
        <xs:annotation>
          <xs:documentation xml:lang="en">Eritrea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ES">
        <xs:annotation>
          <xs:documentation xml:lang="en">Spain</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ET">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ethiopia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Finland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FJ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fiji</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Falkland Islands (Malvinas)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Micronesia, Federated States of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Faroe Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FR">
        <xs:annotation>
          <xs:documentation xml:lang="en">France</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gabon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GB">
        <xs:annotation>
          <xs:documentation xml:lang="en">United Kingdom of Great Britain and Northern Ireland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Grenada</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Georgia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GF">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Guiana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guernsey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ghana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gibraltar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greenland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gambia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guadeloupe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Equatorial Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greece</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GS">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Georgia and the South Sandwich Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guatemala</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guinea-Bissau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guyana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hong Kong</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Heard Island and McDonald Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Honduras</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Croatia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Haiti</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hungary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ID">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indonesia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ireland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Israel</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Isle of Man</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IN">
        <xs:annotation>
          <xs:documentation xml:lang="en">India</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IO">
        <xs:annotation>
          <xs:documentation xml:lang="en">British Indian Ocean Territory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iraq</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iran, Islamic Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iceland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Italy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jersey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jamaica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jordan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Japan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kenya</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kyrgyzstan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cambodia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kiribati</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Comoros</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Kitts and Nevis</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Korea, Democratic People's Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Korea, Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kuwait</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cayman Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kazakhstan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lao People's Democratic Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lebanon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Lucia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Liechtenstein</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sri Lanka</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Liberia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lesotho</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lithuania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Luxembourg</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Latvia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Libya</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Morocco</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Monaco</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Moldova, Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ME">
        <xs:annotation>
          <xs:documentation xml:lang="en">Montenegro</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Martin (French part)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Madagascar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Marshall Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Macedonia, the former Yugoslav Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ML">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mali</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Myanmar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mongolia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Macao</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Northern Mariana Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Martinique</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mauritania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Montserrat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malta</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mauritius</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Maldives</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malawi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mexico</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malaysia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mozambique</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Namibia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NC">
        <xs:annotation>
          <xs:documentation xml:lang="en">New Caledonia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Niger</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Norfolk Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nigeria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nicaragua</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Netherlands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Norway</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nepal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nauru</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Niue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">New Zealand</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Oman</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Panama</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Peru</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PF">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Polynesia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Papua New Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Philippines</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pakistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Poland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Pierre and Miquelon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pitcairn</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Puerto Rico</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Palestine, State of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Portugal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Palau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Paraguay</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Qatar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Réunion</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Romania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Serbia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Russian Federation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Rwanda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saudi Arabia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Solomon Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Seychelles</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sudan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sweden</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Singapore</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Helena, Ascension and Tristan da Cunha</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slovenia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SJ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Svalbard and Jan Mayen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slovakia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sierra Leone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SM">
        <xs:annotation>
          <xs:documentation xml:lang="en">San Marino</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Senegal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Somalia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Suriname</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SS">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Sudan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ST">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sao Tome and Principe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SV">
        <xs:annotation>
          <xs:documentation xml:lang="en">El Salvador</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sint Maarten (Dutch part)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Syrian Arab Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Swaziland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turks and Caicos Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chad</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TF">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Southern Territories</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Togo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Thailand</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TJ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tajikistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tokelau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Timor-Leste</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turkmenistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tunisia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tonga</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turkey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Trinidad and Tobago</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tuvalu</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Taiwan, Province of China</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tanzania, United Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ukraine</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uganda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UM">
        <xs:annotation>
          <xs:documentation xml:lang="en">United States Minor Outlying Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="US">
        <xs:annotation>
          <xs:documentation xml:lang="en">United States of America</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uruguay</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uzbekistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Holy See</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Vincent and the Grenadines</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Venezuela, Bolivarian Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Virgin Islands, British</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Virgin Islands, U.S.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Viet Nam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Vanuatu</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Wallis and Futuna</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Samoa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="YE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Yemen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="YT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mayotte</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZA">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Africa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zambia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zimbabwe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AA">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QM">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QN">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QO">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QP">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QR">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QS">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QT">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QU">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QV">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QW">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QX">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QY">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XA">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XB">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XC">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XD">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XE">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XF">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XG">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XH">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XI">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XJ">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kosovo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XL">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XM">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XN">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XO">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XP">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XR">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XS">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XT">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XU">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XV">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XW">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XY">
        <xs:annotation>
          <xs:documentation xml:lang="en">User-assigned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">International Waters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown or Invalid Territory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ABW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Aruba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Afghanistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AGO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Angola</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AIA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Anguilla</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ALA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Åland Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ALB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Albania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AND">
        <xs:annotation>
          <xs:documentation xml:lang="en">Andorra</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ARE">
        <xs:annotation>
          <xs:documentation xml:lang="en">United Arab Emirates</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ARG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Argentina</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ARM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Armenia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ASM">
        <xs:annotation>
          <xs:documentation xml:lang="en">American Samoa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ATA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Antarctica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ATF">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Southern Territories</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ATG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Antigua and Barbuda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AUS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Australia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AUT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Austria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AZE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Azerbaijan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BDI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Burundi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BEL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belgium</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BEN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Benin</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BES">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bonaire, Sint Eustatius and Saba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BFA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Burkina Faso</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BGD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bangladesh</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BGR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bulgaria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BHR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bahrain</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BHS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bahamas</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BIH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bosnia and Herzegovina</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BLM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Barthélemy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BLR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belarus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BLZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belize</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BMU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bermuda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BOL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bolivia, Plurinational State of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BRA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Brazil</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BRB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Barbados</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BRN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Brunei Darussalam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BTN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bhutan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BVT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bouvet Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BWA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Botswana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CAF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Central African Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CAN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Canada</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CCK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cocos (Keeling) Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CHE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Switzerland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CHL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chile</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CHN">
        <xs:annotation>
          <xs:documentation xml:lang="en">China</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CIV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Côte d'Ivoire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CMR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cameroon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="COD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Congo, the Democratic Republic of the</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="COG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Congo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="COK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cook Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="COL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Colombia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="COM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Comoros</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CPV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cabo Verde</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CRI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Costa Rica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CUB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cuba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CUW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Curaçao</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CXR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Christmas Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CYM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cayman Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CYP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cyprus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CZE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Czechia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DEU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Germany</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DJI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Djibouti</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DMA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dominica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DNK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Denmark</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DOM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dominican Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Algeria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ECU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ecuador</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EGY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Egypt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ERI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Eritrea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ESH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Western Sahara</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ESP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Spain</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EST">
        <xs:annotation>
          <xs:documentation xml:lang="en">Estonia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ETH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ethiopia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FIN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Finland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FJI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fiji</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FLK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Falkland Islands (Malvinas)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FRA">
        <xs:annotation>
          <xs:documentation xml:lang="en">France</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FRO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Faroe Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FSM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Micronesia, Federated States of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GAB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gabon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GBR">
        <xs:annotation>
          <xs:documentation xml:lang="en">United Kingdom</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GEO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Georgia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GGY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guernsey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GHA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ghana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GIB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gibraltar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GIN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GLP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guadeloupe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GMB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gambia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GNB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guinea-Bissau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GNQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Equatorial Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GRC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greece</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GRD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Grenada</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GRL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greenland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GTM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guatemala</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GUF">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Guiana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GUM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GUY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guyana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HKG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hong Kong</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HMD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Heard Island and McDonald Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HND">
        <xs:annotation>
          <xs:documentation xml:lang="en">Honduras</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HRV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Croatia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HTI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Haiti</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HUN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hungary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IDN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indonesia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IMN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Isle of Man</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IND">
        <xs:annotation>
          <xs:documentation xml:lang="en">India</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IOT">
        <xs:annotation>
          <xs:documentation xml:lang="en">British Indian Ocean Territory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IRL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ireland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IRN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iran, Islamic Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IRQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iraq</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ISL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iceland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ISR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Israel</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ITA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Italy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JAM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jamaica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JEY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jersey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JOR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jordan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JPN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Japan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KAZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kazakhstan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KEN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kenya</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KGZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kyrgyzstan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KHM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cambodia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KIR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kiribati</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KNA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Kitts and Nevis</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KOR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Korea, Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KWT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kuwait</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LAO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lao People's Democratic Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LBN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lebanon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LBR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Liberia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LBY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Libya</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LCA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Lucia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LIE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Liechtenstein</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LKA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sri Lanka</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LSO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lesotho</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LTU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lithuania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LUX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Luxembourg</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LVA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Latvia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MAC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Macao</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MAF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Martin (French part)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MAR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Morocco</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MCO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Monaco</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MDA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Moldova, Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MDG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Madagascar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MDV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Maldives</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MEX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mexico</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MHL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Marshall Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MKD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Macedonia, the former Yugoslav Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MLI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mali</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MLT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malta</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MMR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Myanmar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MNE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Montenegro</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MNG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mongolia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MNP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Northern Mariana Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MOZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mozambique</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MRT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mauritania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MSR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Montserrat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MTQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Martinique</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MUS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mauritius</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MWI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malawi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MYS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malaysia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MYT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mayotte</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NAM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Namibia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NCL">
        <xs:annotation>
          <xs:documentation xml:lang="en">New Caledonia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NER">
        <xs:annotation>
          <xs:documentation xml:lang="en">Niger</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NFK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Norfolk Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NGA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nigeria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NIC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nicaragua</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NIU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Niue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NLD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Netherlands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NOR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Norway</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NPL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nepal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NRU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nauru</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NZL">
        <xs:annotation>
          <xs:documentation xml:lang="en">New Zealand</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OMN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Oman</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PAK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pakistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PAN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Panama</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pitcairn</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PER">
        <xs:annotation>
          <xs:documentation xml:lang="en">Peru</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PHL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Philippines</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PLW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Palau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PNG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Papua New Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="POL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Poland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Puerto Rico</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Korea, Democratic People's Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Portugal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Paraguay</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PSE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Palestine, State of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PYF">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Polynesia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QAT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Qatar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="REU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Réunion</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ROU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Romania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RUS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Russian Federation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RWA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Rwanda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SAU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saudi Arabia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SDN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sudan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SEN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Senegal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SGP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Singapore</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SGS">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Georgia and the South Sandwich Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SHN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Helena, Ascension and Tristan da Cunha</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SJM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Svalbard and Jan Mayen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SLB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Solomon Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SLE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sierra Leone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SLV">
        <xs:annotation>
          <xs:documentation xml:lang="en">El Salvador</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SMR">
        <xs:annotation>
          <xs:documentation xml:lang="en">San Marino</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SOM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Somalia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SPM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Pierre and Miquelon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SRB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Serbia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SSD">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Sudan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="STP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sao Tome and Principe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SUR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Suriname</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SVK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slovakia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SVN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slovenia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SWE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sweden</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SWZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Swaziland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SXM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sint Maarten (Dutch part)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SYC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Seychelles</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SYR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Syrian Arab Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TCA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turks and Caicos Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TCD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chad</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TGO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Togo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="THA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Thailand</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TJK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tajikistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TKL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tokelau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TKM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turkmenistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TLS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Timor-Leste</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TON">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tonga</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TTO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Trinidad and Tobago</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TUN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tunisia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TUR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turkey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TUV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tuvalu</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TWN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Taiwan, Province of China</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TZA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tanzania, United Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UGA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uganda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UKR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ukraine</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UMI">
        <xs:annotation>
          <xs:documentation xml:lang="en">United States Minor Outlying Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="URY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uruguay</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="USA">
        <xs:annotation>
          <xs:documentation xml:lang="en">United States of America</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UZB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uzbekistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VAT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Holy See</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VCT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Vincent and the Grenadines</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VEN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Venezuela, Bolivarian Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VGB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Virgin Islands, British</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VIR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Virgin Islands, U.S.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VNM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Viet Nam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VUT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Vanuatu</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WLF">
        <xs:annotation>
          <xs:documentation xml:lang="en">Wallis and Futuna</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WSM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Samoa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="YEM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Yemen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZAF">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Africa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZMB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zambia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZWE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zimbabwe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="004">
        <xs:annotation>
          <xs:documentation xml:lang="en">Afghanistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="008">
        <xs:annotation>
          <xs:documentation xml:lang="en">Albania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="010">
        <xs:annotation>
          <xs:documentation xml:lang="en">Antarctica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="012">
        <xs:annotation>
          <xs:documentation xml:lang="en">Algeria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="016">
        <xs:annotation>
          <xs:documentation xml:lang="en">American Samoa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="020">
        <xs:annotation>
          <xs:documentation xml:lang="en">Andorra</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="024">
        <xs:annotation>
          <xs:documentation xml:lang="en">Angola</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="028">
        <xs:annotation>
          <xs:documentation xml:lang="en">Antigua and Barbuda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="031">
        <xs:annotation>
          <xs:documentation xml:lang="en">Azerbaijan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="032">
        <xs:annotation>
          <xs:documentation xml:lang="en">Argentina</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="036">
        <xs:annotation>
          <xs:documentation xml:lang="en">Australia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="040">
        <xs:annotation>
          <xs:documentation xml:lang="en">Austria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="044">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bahamas</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="048">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bahrain</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="050">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bangladesh</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="051">
        <xs:annotation>
          <xs:documentation xml:lang="en">Armenia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="052">
        <xs:annotation>
          <xs:documentation xml:lang="en">Barbados</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="056">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belgium</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="060">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bermuda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="064">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bhutan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="068">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bolivia, Plurinational State of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="070">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bosnia and Herzegovina</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="072">
        <xs:annotation>
          <xs:documentation xml:lang="en">Botswana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="074">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bouvet Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="076">
        <xs:annotation>
          <xs:documentation xml:lang="en">Brazil</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="084">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belize</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="086">
        <xs:annotation>
          <xs:documentation xml:lang="en">British Indian Ocean Territory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="090">
        <xs:annotation>
          <xs:documentation xml:lang="en">Solomon Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="092">
        <xs:annotation>
          <xs:documentation xml:lang="en">Virgin Islands, British</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="096">
        <xs:annotation>
          <xs:documentation xml:lang="en">Brunei Darussalam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="100">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bulgaria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="104">
        <xs:annotation>
          <xs:documentation xml:lang="en">Myanmar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="108">
        <xs:annotation>
          <xs:documentation xml:lang="en">Burundi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="112">
        <xs:annotation>
          <xs:documentation xml:lang="en">Belarus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="116">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cambodia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="120">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cameroon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="124">
        <xs:annotation>
          <xs:documentation xml:lang="en">Canada</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="132">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cabo Verde</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="136">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cayman Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="140">
        <xs:annotation>
          <xs:documentation xml:lang="en">Central African Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="144">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sri Lanka</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="148">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chad</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="152">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chile</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="156">
        <xs:annotation>
          <xs:documentation xml:lang="en">China</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="158">
        <xs:annotation>
          <xs:documentation xml:lang="en">Taiwan, Province of China</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="162">
        <xs:annotation>
          <xs:documentation xml:lang="en">Christmas Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="166">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cocos (Keeling) Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="170">
        <xs:annotation>
          <xs:documentation xml:lang="en">Colombia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="174">
        <xs:annotation>
          <xs:documentation xml:lang="en">Comoros</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="175">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mayotte</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="178">
        <xs:annotation>
          <xs:documentation xml:lang="en">Congo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="180">
        <xs:annotation>
          <xs:documentation xml:lang="en">Congo, the Democratic Republic of the</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="184">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cook Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="188">
        <xs:annotation>
          <xs:documentation xml:lang="en">Costa Rica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="191">
        <xs:annotation>
          <xs:documentation xml:lang="en">Croatia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="192">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cuba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="196">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cyprus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="203">
        <xs:annotation>
          <xs:documentation xml:lang="en">Czechia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="204">
        <xs:annotation>
          <xs:documentation xml:lang="en">Benin</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="208">
        <xs:annotation>
          <xs:documentation xml:lang="en">Denmark</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="212">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dominica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="214">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dominican Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="218">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ecuador</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="222">
        <xs:annotation>
          <xs:documentation xml:lang="en">El Salvador</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="226">
        <xs:annotation>
          <xs:documentation xml:lang="en">Equatorial Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="231">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ethiopia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="232">
        <xs:annotation>
          <xs:documentation xml:lang="en">Eritrea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="233">
        <xs:annotation>
          <xs:documentation xml:lang="en">Estonia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="234">
        <xs:annotation>
          <xs:documentation xml:lang="en">Faroe Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="238">
        <xs:annotation>
          <xs:documentation xml:lang="en">Falkland Islands (Malvinas)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="239">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Georgia and the South Sandwich Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="242">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fiji</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="246">
        <xs:annotation>
          <xs:documentation xml:lang="en">Finland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="248">
        <xs:annotation>
          <xs:documentation xml:lang="en">Åland Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="250">
        <xs:annotation>
          <xs:documentation xml:lang="en">France</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="254">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Guiana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="258">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Polynesia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="260">
        <xs:annotation>
          <xs:documentation xml:lang="en">French Southern Territories</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="262">
        <xs:annotation>
          <xs:documentation xml:lang="en">Djibouti</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="266">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gabon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="268">
        <xs:annotation>
          <xs:documentation xml:lang="en">Georgia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="270">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gambia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="275">
        <xs:annotation>
          <xs:documentation xml:lang="en">Palestine, State of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="276">
        <xs:annotation>
          <xs:documentation xml:lang="en">Germany</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="288">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ghana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="292">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gibraltar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="296">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kiribati</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="300">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greece</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="304">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greenland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="308">
        <xs:annotation>
          <xs:documentation xml:lang="en">Grenada</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="312">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guadeloupe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="316">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="320">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guatemala</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="324">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="328">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guyana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="332">
        <xs:annotation>
          <xs:documentation xml:lang="en">Haiti</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="334">
        <xs:annotation>
          <xs:documentation xml:lang="en">Heard Island and McDonald Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="336">
        <xs:annotation>
          <xs:documentation xml:lang="en">Holy See</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="340">
        <xs:annotation>
          <xs:documentation xml:lang="en">Honduras</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="344">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hong Kong</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="348">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hungary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="352">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iceland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="356">
        <xs:annotation>
          <xs:documentation xml:lang="en">India</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="360">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indonesia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="364">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iran, Islamic Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="368">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iraq</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="372">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ireland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="376">
        <xs:annotation>
          <xs:documentation xml:lang="en">Israel</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="380">
        <xs:annotation>
          <xs:documentation xml:lang="en">Italy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="384">
        <xs:annotation>
          <xs:documentation xml:lang="en">Côte d'Ivoire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="388">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jamaica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="392">
        <xs:annotation>
          <xs:documentation xml:lang="en">Japan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="398">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kazakhstan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="400">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jordan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="404">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kenya</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="408">
        <xs:annotation>
          <xs:documentation xml:lang="en">Korea, Democratic People's Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="410">
        <xs:annotation>
          <xs:documentation xml:lang="en">Korea, Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="414">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kuwait</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="417">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kyrgyzstan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="418">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lao People's Democratic Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="422">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lebanon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="426">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lesotho</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="428">
        <xs:annotation>
          <xs:documentation xml:lang="en">Latvia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="430">
        <xs:annotation>
          <xs:documentation xml:lang="en">Liberia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="434">
        <xs:annotation>
          <xs:documentation xml:lang="en">Libya</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="438">
        <xs:annotation>
          <xs:documentation xml:lang="en">Liechtenstein</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="440">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lithuania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="442">
        <xs:annotation>
          <xs:documentation xml:lang="en">Luxembourg</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="446">
        <xs:annotation>
          <xs:documentation xml:lang="en">Macao</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="450">
        <xs:annotation>
          <xs:documentation xml:lang="en">Madagascar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="454">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malawi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="458">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malaysia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="462">
        <xs:annotation>
          <xs:documentation xml:lang="en">Maldives</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="466">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mali</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="470">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malta</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="474">
        <xs:annotation>
          <xs:documentation xml:lang="en">Martinique</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="478">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mauritania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="480">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mauritius</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="484">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mexico</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="492">
        <xs:annotation>
          <xs:documentation xml:lang="en">Monaco</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="496">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mongolia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="498">
        <xs:annotation>
          <xs:documentation xml:lang="en">Moldova, Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="499">
        <xs:annotation>
          <xs:documentation xml:lang="en">Montenegro</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="500">
        <xs:annotation>
          <xs:documentation xml:lang="en">Montserrat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="504">
        <xs:annotation>
          <xs:documentation xml:lang="en">Morocco</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="508">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mozambique</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="512">
        <xs:annotation>
          <xs:documentation xml:lang="en">Oman</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="516">
        <xs:annotation>
          <xs:documentation xml:lang="en">Namibia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="520">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nauru</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="524">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nepal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="528">
        <xs:annotation>
          <xs:documentation xml:lang="en">Netherlands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="531">
        <xs:annotation>
          <xs:documentation xml:lang="en">Curaçao</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="533">
        <xs:annotation>
          <xs:documentation xml:lang="en">Aruba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="534">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sint Maarten (Dutch part)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="535">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bonaire, Sint Eustatius and Saba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="540">
        <xs:annotation>
          <xs:documentation xml:lang="en">New Caledonia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="548">
        <xs:annotation>
          <xs:documentation xml:lang="en">Vanuatu</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="554">
        <xs:annotation>
          <xs:documentation xml:lang="en">New Zealand</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="558">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nicaragua</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="562">
        <xs:annotation>
          <xs:documentation xml:lang="en">Niger</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="566">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nigeria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="570">
        <xs:annotation>
          <xs:documentation xml:lang="en">Niue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="574">
        <xs:annotation>
          <xs:documentation xml:lang="en">Norfolk Island</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="578">
        <xs:annotation>
          <xs:documentation xml:lang="en">Norway</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="580">
        <xs:annotation>
          <xs:documentation xml:lang="en">Northern Mariana Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="581">
        <xs:annotation>
          <xs:documentation xml:lang="en">United States Minor Outlying Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="583">
        <xs:annotation>
          <xs:documentation xml:lang="en">Micronesia, Federated States of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="584">
        <xs:annotation>
          <xs:documentation xml:lang="en">Marshall Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="585">
        <xs:annotation>
          <xs:documentation xml:lang="en">Palau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="586">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pakistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="591">
        <xs:annotation>
          <xs:documentation xml:lang="en">Panama</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="598">
        <xs:annotation>
          <xs:documentation xml:lang="en">Papua New Guinea</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="600">
        <xs:annotation>
          <xs:documentation xml:lang="en">Paraguay</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="604">
        <xs:annotation>
          <xs:documentation xml:lang="en">Peru</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="608">
        <xs:annotation>
          <xs:documentation xml:lang="en">Philippines</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="612">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pitcairn</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="616">
        <xs:annotation>
          <xs:documentation xml:lang="en">Poland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="620">
        <xs:annotation>
          <xs:documentation xml:lang="en">Portugal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="624">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guinea-Bissau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="626">
        <xs:annotation>
          <xs:documentation xml:lang="en">Timor-Leste</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="630">
        <xs:annotation>
          <xs:documentation xml:lang="en">Puerto Rico</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="634">
        <xs:annotation>
          <xs:documentation xml:lang="en">Qatar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="638">
        <xs:annotation>
          <xs:documentation xml:lang="en">Réunion</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="642">
        <xs:annotation>
          <xs:documentation xml:lang="en">Romania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="643">
        <xs:annotation>
          <xs:documentation xml:lang="en">Russian Federation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="646">
        <xs:annotation>
          <xs:documentation xml:lang="en">Rwanda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="652">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Barthélemy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="654">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Helena, Ascension and Tristan da Cunha</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="659">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Kitts and Nevis</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="660">
        <xs:annotation>
          <xs:documentation xml:lang="en">Anguilla</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="662">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Lucia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="663">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Martin (French part)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="666">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Pierre and Miquelon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="670">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Vincent and the Grenadines</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="674">
        <xs:annotation>
          <xs:documentation xml:lang="en">San Marino</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="678">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sao Tome and Principe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="682">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saudi Arabia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="686">
        <xs:annotation>
          <xs:documentation xml:lang="en">Senegal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="688">
        <xs:annotation>
          <xs:documentation xml:lang="en">Serbia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="690">
        <xs:annotation>
          <xs:documentation xml:lang="en">Seychelles</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="694">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sierra Leone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="702">
        <xs:annotation>
          <xs:documentation xml:lang="en">Singapore</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="703">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slovakia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="704">
        <xs:annotation>
          <xs:documentation xml:lang="en">Viet Nam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="705">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slovenia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="706">
        <xs:annotation>
          <xs:documentation xml:lang="en">Somalia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="710">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Africa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="716">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zimbabwe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="724">
        <xs:annotation>
          <xs:documentation xml:lang="en">Spain</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="728">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Sudan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="729">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sudan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="732">
        <xs:annotation>
          <xs:documentation xml:lang="en">Western Sahara</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="740">
        <xs:annotation>
          <xs:documentation xml:lang="en">Suriname</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="744">
        <xs:annotation>
          <xs:documentation xml:lang="en">Svalbard and Jan Mayen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="748">
        <xs:annotation>
          <xs:documentation xml:lang="en">Swaziland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="752">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sweden</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="756">
        <xs:annotation>
          <xs:documentation xml:lang="en">Switzerland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="760">
        <xs:annotation>
          <xs:documentation xml:lang="en">Syrian Arab Republic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="762">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tajikistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="764">
        <xs:annotation>
          <xs:documentation xml:lang="en">Thailand</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="768">
        <xs:annotation>
          <xs:documentation xml:lang="en">Togo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="772">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tokelau</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="776">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tonga</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="780">
        <xs:annotation>
          <xs:documentation xml:lang="en">Trinidad and Tobago</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="784">
        <xs:annotation>
          <xs:documentation xml:lang="en">United Arab Emirates</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="788">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tunisia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="792">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turkey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="795">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turkmenistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="796">
        <xs:annotation>
          <xs:documentation xml:lang="en">Turks and Caicos Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="798">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tuvalu</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="800">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uganda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="804">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ukraine</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="807">
        <xs:annotation>
          <xs:documentation xml:lang="en">Macedonia, the former Yugoslav Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="818">
        <xs:annotation>
          <xs:documentation xml:lang="en">Egypt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="826">
        <xs:annotation>
          <xs:documentation xml:lang="en">United Kingdom</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="831">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guernsey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="832">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jersey</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="833">
        <xs:annotation>
          <xs:documentation xml:lang="en">Isle of Man</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="834">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tanzania, United Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="840">
        <xs:annotation>
          <xs:documentation xml:lang="en">United States of America</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="850">
        <xs:annotation>
          <xs:documentation xml:lang="en">Virgin Islands, U.S.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="854">
        <xs:annotation>
          <xs:documentation xml:lang="en">Burkina Faso</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="858">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uruguay</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="860">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uzbekistan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="862">
        <xs:annotation>
          <xs:documentation xml:lang="en">Venezuela, Bolivarian Republic of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="876">
        <xs:annotation>
          <xs:documentation xml:lang="en">Wallis and Futuna</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="882">
        <xs:annotation>
          <xs:documentation xml:lang="en">Samoa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="887">
        <xs:annotation>
          <xs:documentation xml:lang="en">Yemen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="894">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zambia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-BAL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Balkh</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-BAM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bāmyān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-BDG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bādghīs</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-BDS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Badakhshān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-BGL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Baghlān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-DAY">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dāykundī</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-FRA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Farāh</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-FYB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fāryāb</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-GHA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ghaznī</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-GHO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ghōr</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-HEL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Helmand</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-HER">
        <xs:annotation>
          <xs:documentation xml:lang="en">Herāt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-JOW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jowzjān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-KAB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kābul</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-KAN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kandahār</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-KAP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kāpīsā</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-KDZ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kunduz</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-KHO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Khōst</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-KNR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kunar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-LAG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Laghmān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-LOG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lōgar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-NAN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nangarhār</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-NIM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nīmrōz</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-NUR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nūristān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-PAN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Panjshayr</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-PAR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Parwān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-PIA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Paktiyā</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-PKA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Paktīkā</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-SAM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Samangān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-SAR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sar-e Pul</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-TAK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Takhār</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-URU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uruzgān</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-WAR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Wardak</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AF-ZAB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zābul</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AX-AX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Åland Islands</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-01">
        <xs:annotation>
          <xs:documentation xml:lang="en">Berat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-02">
        <xs:annotation>
          <xs:documentation xml:lang="en">Durrës</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-03">
        <xs:annotation>
          <xs:documentation xml:lang="en">Elbasan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-04">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fier</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-05">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gjirokastër</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-06">
        <xs:annotation>
          <xs:documentation xml:lang="en">Korçë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-07">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kukës</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-08">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lezhë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-09">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dibër</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-10">
        <xs:annotation>
          <xs:documentation xml:lang="en">Shkodër</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-11">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tiranë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-12">
        <xs:annotation>
          <xs:documentation xml:lang="en">Vlorë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-BR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Berat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-BU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bulqizë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-DI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dibër</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-DL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Delvinë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-DR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Durrës</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-DV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Devoll</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-EL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Elbasan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-ER">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kolonjë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-FR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fier</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-GJ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gjirokastër</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-GR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gramsh</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-HA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Has</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-KA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kavajë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-KB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kurbin</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-KC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kuçovë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-KO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Korçë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-KR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Krujë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-KU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kukës</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-LB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Librazhd</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-LE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lezhë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-LU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lushnjë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-MK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mallakastër</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-MM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malësi e Madhe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-MR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mirditë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-MT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-PG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pogradec</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-PQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Peqin</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-PR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Përmet</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-PU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pukë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-SH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Shkodër</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-SK">
        <xs:annotation>
          <xs:documentation xml:lang="en">Skrapar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-SR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sarandë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-TE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tepelenë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-TP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tropojë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-TR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tiranë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AL-VL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Vlorë</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-01">
        <xs:annotation>
          <xs:documentation xml:lang="en">Adrar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-02">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chlef</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-03">
        <xs:annotation>
          <xs:documentation xml:lang="en">Laghouat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-04">
        <xs:annotation>
          <xs:documentation xml:lang="en">Oum el Bouaghi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-05">
        <xs:annotation>
          <xs:documentation xml:lang="en">Batna</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-06">
        <xs:annotation>
          <xs:documentation xml:lang="en">Béjaïa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-07">
        <xs:annotation>
          <xs:documentation xml:lang="en">Biskra</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-08">
        <xs:annotation>
          <xs:documentation xml:lang="en">Béchar</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-09">
        <xs:annotation>
          <xs:documentation xml:lang="en">Blida</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-10">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bouira</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-11">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tamanrasset</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-12">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tébessa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-13">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tlemcen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-14">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tiaret</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-15">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tizi Ouzou</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-16">
        <xs:annotation>
          <xs:documentation xml:lang="en">Alger</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-17">
        <xs:annotation>
          <xs:documentation xml:lang="en">Djelfa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-18">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jijel</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-19">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sétif</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-20">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saïda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-21">
        <xs:annotation>
          <xs:documentation xml:lang="en">Skikda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-22">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sidi Bel Abbès</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-23">
        <xs:annotation>
          <xs:documentation xml:lang="en">Annaba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-24">
        <xs:annotation>
          <xs:documentation xml:lang="en">Guelma</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-25">
        <xs:annotation>
          <xs:documentation xml:lang="en">Constantine</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-26">
        <xs:annotation>
          <xs:documentation xml:lang="en">Médéa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-27">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mostaganem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-28">
        <xs:annotation>
          <xs:documentation xml:lang="en">Msila</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-29">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mascara</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-30">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ouargla</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-31">
        <xs:annotation>
          <xs:documentation xml:lang="en">Oran</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-32">
        <xs:annotation>
          <xs:documentation xml:lang="en">El Bayadh</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-33">
        <xs:annotation>
          <xs:documentation xml:lang="en">Illizi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-34">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bordj Bou Arréridj</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-35">
        <xs:annotation>
          <xs:documentation xml:lang="en">Boumerdès</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-36">
        <xs:annotation>
          <xs:documentation xml:lang="en">El Tarf</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-37">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tindouf</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-38">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tissemsilt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-39">
        <xs:annotation>
          <xs:documentation xml:lang="en">El Oued</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-40">
        <xs:annotation>
          <xs:documentation xml:lang="en">Khenchela</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-41">
        <xs:annotation>
          <xs:documentation xml:lang="en">Souk Ahras</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-42">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tipaza</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-43">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mila</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-44">
        <xs:annotation>
          <xs:documentation xml:lang="en">Aïn Defla</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-45">
        <xs:annotation>
          <xs:documentation xml:lang="en">Naama</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-46">
        <xs:annotation>
          <xs:documentation xml:lang="en">Aïn Témouchent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-47">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ghardaïa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DZ-48">
        <xs:annotation>
          <xs:documentation xml:lang="en">Relizane</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AS-AS">
        <xs:annotation>
          <xs:documentation xml:lang="en">American Samoa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AD-02">
        <xs:annotation>
          <xs:documentation xml:lang="en">Canillo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AD-03">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encamp</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AD-04">
        <xs:annotation>
          <xs:documentation xml:lang="en">La Massana</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AD-05">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ordino</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AD-06">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sant Julià de Lòria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AD-07">
        <xs:annotation>
          <xs:documentation xml:lang="en">Andorra la Vella</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AD-08">
        <xs:annotation>
          <xs:documentation xml:lang="en">Escaldes-Engordany</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-BGO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bengo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-BGU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Benguela</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-BIE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bié</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-CAB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cabinda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-CCU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kuando Kubango</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-CNN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cunene</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-CNO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kwanza Norte</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-CUS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kwanza Sul</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-HUA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Huambo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-HUI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Huíla</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-LNO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lunda Norte</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-LSU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lunda Sul</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-LUA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Luanda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-MAL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Malange</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-MOX">
        <xs:annotation>
          <xs:documentation xml:lang="en">Moxico</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-NAM">
        <xs:annotation>
          <xs:documentation xml:lang="en">Namibe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-UIG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Uíge</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AO-ZAI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zaire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AI-AI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Anguilla</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AQ-AQ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Antarctica</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG-03">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint George</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG-04">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint John</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG-05">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Mary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG-06">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Paul</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG-07">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Peter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG-08">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saint Philip</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG-10">
        <xs:annotation>
          <xs:documentation xml:lang="en">Barbuda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AG-11">
        <xs:annotation>
          <xs:documentation xml:lang="en">Redonda</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-A">
        <xs:annotation>
          <xs:documentation xml:lang="en">Salta</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-B">
        <xs:annotation>
          <xs:documentation xml:lang="en">Buenos Aires</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-C">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ciudad Autónoma de Buenos Aires</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-D">
        <xs:annotation>
          <xs:documentation xml:lang="en">San Luis</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-E">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entre Ríos</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-F">
        <xs:annotation>
          <xs:documentation xml:lang="en">La Rioja</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-G">
        <xs:annotation>
          <xs:documentation xml:lang="en">Santiago del Estero</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-H">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chaco</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-J">
        <xs:annotation>
          <xs:documentation xml:lang="en">San Juan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-K">
        <xs:annotation>
          <xs:documentation xml:lang="en">Catamarca</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-L">
        <xs:annotation>
          <xs:documentation xml:lang="en">La Pampa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-M">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mendoza</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-N">
        <xs:annotation>
          <xs:documentation xml:lang="en">Misiones</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-P">
        <xs:annotation>
          <xs:documentation xml:lang="en">Formosa</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-Q">
        <xs:annotation>
          <xs:documentation xml:lang="en">Neuquén</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-R">
        <xs:annotation>
          <xs:documentation xml:lang="en">Río Negro</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-S">
        <xs:annotation>
          <xs:documentation xml:lang="en">Santa Fe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-T">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tucumán</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-U">
        <xs:annotation>
          <xs:documentation xml:lang="en">Chubut</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-V">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tierra del Fuego</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-W">
        <xs:annotation>
          <xs:documentation xml:lang="en">Corrientes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-X">
        <xs:annotation>
          <xs:documentation xml:lang="en">Córdoba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-Y">
        <xs:annotation>
          <xs:documentation xml:lang="en">Jujuy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AR-Z">
        <xs:annotation>
          <xs:documentation xml:lang="en">Santa Cruz</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-AG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Aragac̣otn</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-AR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ararat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-AV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Armavir</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-ER">
        <xs:annotation>
          <xs:documentation xml:lang="en">Erevan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-GR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Geġark'unik'</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-KT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kotayk'</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-LO">
        <xs:annotation>
          <xs:documentation xml:lang="en">Loṙi</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-SH">
        <xs:annotation>
          <xs:documentation xml:lang="en">Širak</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-SU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Syunik'</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-TV">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tavuš</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AM-VD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Vayoć Jor</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AW-AW">
        <xs:annotation>
          <xs:documentation xml:lang="en">Aruba</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU-ACT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Australian Capital Territory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU-NSW">
        <xs:annotation>
          <xs:documentation xml:lang="en">New South Wales</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU-NT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Northern Territory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU-QLD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Queensland</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU-SA">
        <xs:annotation>
          <xs:documentation xml:lang="en">South Australia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU-TAS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tasmania</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU-VIC">
        <xs:annotation>
          <xs:documentation xml:lang="en">Victoria</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AU-WA">
        <xs:annotation>
          <xs:documentation xml:lang="en">Western Australia</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="JurisdictionValueSet">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="JurisdictionValueSetEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="IngredientManufacturerRoleEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="allowed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Manufacturer is specifically allowed for this ingredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="possible">
        <xs:annotation>
          <xs:documentation xml:lang="en">Manufacturer is known to make this ingredient in general</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="actual">
        <xs:annotation>
          <xs:documentation xml:lang="en">Manufacturer actually makes this particular ingredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="IngredientManufacturerRole">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="IngredientManufacturerRoleEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SpecimenCombinedEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="grouped">
        <xs:annotation>
          <xs:documentation xml:lang="en">Grouped</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="pooled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pooled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SpecimenCombined">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="SpecimenCombinedEnum" use="optional"/>
       </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]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(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 xml:lang="en">A date or partial date (e.g. just year or year + month). There is no UTC offset. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="date-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]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(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]|60)(\.[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 xml:lang="en">A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a UTC offset SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.</xs:documentation>
      <xs:documentation xml:lang="en">UTC offset is allowed for dates and partial dates</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="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:pattern value="[^\s]+( [^\s]+)*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="code">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 xml:lang="en">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="string-primitive">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="string">
    <xs:annotation>
      <xs:documentation xml:lang="en">A sequence of Unicode characters</xs:documentation>
      <xs:documentation xml:lang="en">Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="string-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="integer64-primitive">
    <xs:restriction base="xs:long">
      <xs:pattern value="[0]|[-+]?[1-9][0-9]*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="integer64">
    <xs:annotation>
      <xs:documentation xml:lang="en">A very large whole number</xs:documentation>
      <xs:documentation xml:lang="en">Typically this is used for record counters (e.g. database keys)</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="integer64-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="integer-primitive">
    <xs:restriction base="xs:int">
      <xs:pattern value="[0]|[-+]?[1-9][0-9]*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="integer">
    <xs:annotation>
      <xs:documentation xml:lang="en">A whole number</xs:documentation>
      <xs:documentation xml:lang="en">32 bit number; for values larger than this, use decimal</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="integer-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-2](\.(0|[1-9][0-9]*))+"/>
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="oid">
    <xs:annotation>
      <xs:documentation xml:lang="en">An OID represented as a URI</xs:documentation>
      <xs:documentation xml:lang="en">RFC 3001. See also ISO/IEC 8824:1990 €</xs:documentation>
      <xs:documentation xml:lang="en">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="canonical-primitive">
    <xs:restriction base="xs:anyURI">
      <xs:pattern value="\S*"/>
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="canonical">
    <xs:annotation>
      <xs:documentation xml:lang="en">A URI that is a reference to a canonical URL on a FHIR resource</xs:documentation>
      <xs:documentation xml:lang="en">see [Canonical References](references.html#canonical)</xs:documentation>
      <xs:documentation xml:lang="en">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="canonical-primitive"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="uri-primitive">
    <xs:restriction base="xs:anyURI">
      <xs:pattern value="\S*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="uri">
    <xs:annotation>
      <xs:documentation xml:lang="en">String of characters used to identify a name or a resource</xs:documentation>
      <xs:documentation xml:lang="en">see http://en.wikipedia.org/wiki/Uniform_resource_identifier</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="uri-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 xml:lang="en">A UUID, represented as a URI</xs:documentation>
      <xs:documentation xml:lang="en">See The Open Group, CDE 1.1 Remote Procedure Call specification, Appendix A.</xs:documentation>
      <xs:documentation xml:lang="en">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="url-primitive">
    <xs:restriction base="xs:anyURI">
      <xs:pattern value="\S*"/>
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="url">
    <xs:annotation>
      <xs:documentation xml:lang="en">A URI that is a literal reference</xs:documentation>
      <xs:documentation xml:lang="en">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="url-primitive"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="instant-primitive">
    <xs:restriction base="xs:dateTime">
      <xs:pattern value="([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]{1,9})?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="instant">
    <xs:annotation>
      <xs:documentation xml:lang="en">An instant in time - known at least to the second</xs:documentation>
      <xs:documentation xml:lang="en">Note: This is intended for where precisely observed times are required, typically system logs etc., and not human-reported times - for them, see date and dateTime (which can be as precise as instant, but is not required to be) below. UTC offset is always required</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="instant-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="boolean-primitive">
    <xs:restriction base="xs:boolean">
      <xs:pattern value="true|false"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="boolean">
    <xs:annotation>
      <xs:documentation xml:lang="en">Value of &quot;true&quot; or &quot;false&quot;</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="boolean-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="base64Binary-primitive">
    <xs:restriction base="xs:base64Binary">
      <xs:pattern value="([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="base64Binary">
    <xs:annotation>
      <xs:documentation xml:lang="en">A stream of bytes</xs:documentation>
      <xs:documentation xml:lang="en">A stream of bytes, base64 encoded</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="base64Binary-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="unsignedInt-primitive">
    <xs:restriction base="xs:nonNegativeInteger">
      <xs:pattern value="[0]|([1-9][0-9]*)"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="unsignedInt">
    <xs:annotation>
      <xs:documentation xml:lang="en">An integer with a value that is not negative (e.g. &gt;= 0)</xs:documentation>
      <xs:documentation xml:lang="en">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="unsignedInt-primitive"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="markdown-primitive">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:pattern value="[\s\S]+"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="markdown">
    <xs:annotation>
      <xs:documentation xml:lang="en">A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine</xs:documentation>
      <xs:documentation xml:lang="en">Systems are not required to have markdown support, so the text should be readable without markdown processing. The markdown syntax is GFM - see https://github.github.com/gfm/</xs:documentation>
      <xs:documentation xml:lang="en">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="markdown-primitive"/>
      </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]|60)(\.[0-9]+)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="time">
    <xs:annotation>
      <xs:documentation xml:lang="en">A time during the day, with no date specified</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="time-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:maxLength value="64"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="id">
    <xs:annotation>
      <xs:documentation xml:lang="en">Any combination of letters, numerals, &quot;-&quot; and &quot;.&quot;, with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.</xs:documentation>
      <xs:documentation xml:lang="en">RFC 4122</xs:documentation>
      <xs:documentation xml:lang="en">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="positiveInt-primitive">
    <xs:restriction base="xs:positiveInteger">
      <xs:pattern value="[1-9][0-9]*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="positiveInt">
    <xs:annotation>
      <xs:documentation xml:lang="en">An integer with a value that is positive (e.g. &gt;0)</xs:documentation>
      <xs:documentation xml:lang="en">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="positiveInt-primitive"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="decimal-primitive">
    <xs:union memberTypes="xs:decimal xs:double"/>
  </xs:simpleType>
  <xs:complexType name="decimal">
    <xs:annotation>
      <xs:documentation xml:lang="en">A rational number with implicit precision</xs:documentation>
      <xs:documentation xml:lang="en">Do not use an IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="decimal-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ResourceContainer">
    <xs:choice>
      <xs:element ref="Account"/>
      <xs:element ref="ActivityDefinition"/>
      <xs:element ref="ActorDefinition"/>
      <xs:element ref="AdministrableProductDefinition"/>
      <xs:element ref="AdverseEvent"/>
      <xs:element ref="AllergyIntolerance"/>
      <xs:element ref="Appointment"/>
      <xs:element ref="AppointmentResponse"/>
      <xs:element ref="ArtifactAssessment"/>
      <xs:element ref="AuditEvent"/>
      <xs:element ref="Basic"/>
      <xs:element ref="Binary"/>
      <xs:element ref="BiologicallyDerivedProduct"/>
      <xs:element ref="BodyStructure"/>
      <xs:element ref="Bundle"/>
      <xs:element ref="CapabilityStatement"/>
      <xs:element ref="CarePlan"/>
      <xs:element ref="CareTeam"/>
      <xs:element ref="Claim"/>
      <xs:element ref="ClaimResponse"/>
      <xs:element ref="ClinicalUseDefinition"/>
      <xs:element ref="CodeSystem"/>
      <xs:element ref="Communication"/>
      <xs:element ref="CommunicationRequest"/>
      <xs:element ref="CompartmentDefinition"/>
      <xs:element ref="Composition"/>
      <xs:element ref="ConceptMap"/>
      <xs:element ref="Condition"/>
      <xs:element ref="Consent"/>
      <xs:element ref="Contract"/>
      <xs:element ref="Coverage"/>
      <xs:element ref="CoverageEligibilityRequest"/>
      <xs:element ref="CoverageEligibilityResponse"/>
      <xs:element ref="DetectedIssue"/>
      <xs:element ref="Device"/>
      <xs:element ref="DeviceAlert"/>
      <xs:element ref="DeviceAssociation"/>
      <xs:element ref="DeviceDefinition"/>
      <xs:element ref="DeviceMetric"/>
      <xs:element ref="DeviceRequest"/>
      <xs:element ref="DiagnosticReport"/>
      <xs:element ref="DocumentReference"/>
      <xs:element ref="Encounter"/>
      <xs:element ref="Endpoint"/>
      <xs:element ref="EnrollmentRequest"/>
      <xs:element ref="EnrollmentResponse"/>
      <xs:element ref="EpisodeOfCare"/>
      <xs:element ref="EventDefinition"/>
      <xs:element ref="Evidence"/>
      <xs:element ref="EvidenceVariable"/>
      <xs:element ref="ExampleScenario"/>
      <xs:element ref="ExplanationOfBenefit"/>
      <xs:element ref="FamilyMemberHistory"/>
      <xs:element ref="Flag"/>
      <xs:element ref="Goal"/>
      <xs:element ref="Group"/>
      <xs:element ref="GuidanceResponse"/>
      <xs:element ref="HealthcareService"/>
      <xs:element ref="ImagingSelection"/>
      <xs:element ref="ImagingStudy"/>
      <xs:element ref="Immunization"/>
      <xs:element ref="ImplementationGuide"/>
      <xs:element ref="Ingredient"/>
      <xs:element ref="InsurancePlan"/>
      <xs:element ref="InsuranceProduct"/>
      <xs:element ref="Invoice"/>
      <xs:element ref="Library"/>
      <xs:element ref="List"/>
      <xs:element ref="Location"/>
      <xs:element ref="ManufacturedItemDefinition"/>
      <xs:element ref="Measure"/>
      <xs:element ref="MeasureReport"/>
      <xs:element ref="Medication"/>
      <xs:element ref="MedicationAdministration"/>
      <xs:element ref="MedicationDispense"/>
      <xs:element ref="MedicationRequest"/>
      <xs:element ref="MedicationStatement"/>
      <xs:element ref="MedicinalProductDefinition"/>
      <xs:element ref="MessageDefinition"/>
      <xs:element ref="MessageHeader"/>
      <xs:element ref="NamingSystem"/>
      <xs:element ref="NutritionIntake"/>
      <xs:element ref="NutritionOrder"/>
      <xs:element ref="NutritionProduct"/>
      <xs:element ref="Observation"/>
      <xs:element ref="ObservationDefinition"/>
      <xs:element ref="OperationDefinition"/>
      <xs:element ref="OperationOutcome"/>
      <xs:element ref="Organization"/>
      <xs:element ref="OrganizationAffiliation"/>
      <xs:element ref="PackagedProductDefinition"/>
      <xs:element ref="Patient"/>
      <xs:element ref="PaymentNotice"/>
      <xs:element ref="PaymentReconciliation"/>
      <xs:element ref="Person"/>
      <xs:element ref="PlanDefinition"/>
      <xs:element ref="Practitioner"/>
      <xs:element ref="PractitionerRole"/>
      <xs:element ref="Procedure"/>
      <xs:element ref="Provenance"/>
      <xs:element ref="Questionnaire"/>
      <xs:element ref="QuestionnaireResponse"/>
      <xs:element ref="RegulatedAuthorization"/>
      <xs:element ref="RelatedPerson"/>
      <xs:element ref="RequestOrchestration"/>
      <xs:element ref="Requirements"/>
      <xs:element ref="ResearchStudy"/>
      <xs:element ref="ResearchSubject"/>
      <xs:element ref="RiskAssessment"/>
      <xs:element ref="Schedule"/>
      <xs:element ref="SearchParameter"/>
      <xs:element ref="ServiceRequest"/>
      <xs:element ref="Slot"/>
      <xs:element ref="Specimen"/>
      <xs:element ref="SpecimenDefinition"/>
      <xs:element ref="StructureDefinition"/>
      <xs:element ref="StructureMap"/>
      <xs:element ref="Subscription"/>
      <xs:element ref="SubscriptionStatus"/>
      <xs:element ref="SubscriptionTopic"/>
      <xs:element ref="Substance"/>
      <xs:element ref="SubstanceDefinition"/>
      <xs:element ref="Task"/>
      <xs:element ref="TerminologyCapabilities"/>
      <xs:element ref="ValueSet"/>
      <xs:element ref="VisionPrescription"/>
      <xs:element ref="Parameters"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="Extension">
    <xs:annotation>
      <xs:documentation xml:lang="en">Optional Extension Element - found in all resources.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation xml:lang="en">Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).</xs:documentation>
           </xs:annotation>
           <xs:element name="valueBase64Binary" type="base64Binary"/>
           <xs:element name="valueBoolean" type="boolean"/>
           <xs:element name="valueCanonical" type="canonical"/>
           <xs:element name="valueCode" type="code"/>
           <xs:element name="valueDate" type="date"/>
           <xs:element name="valueDateTime" type="dateTime"/>
           <xs:element name="valueDecimal" type="decimal"/>
           <xs:element name="valueId" type="id"/>
           <xs:element name="valueInstant" type="instant"/>
           <xs:element name="valueInteger" type="integer"/>
           <xs:element name="valueInteger64" type="integer64"/>
           <xs:element name="valueMarkdown" type="markdown"/>
           <xs:element name="valueOid" type="oid"/>
           <xs:element name="valuePositiveInt" type="positiveInt"/>
           <xs:element name="valueString" type="string"/>
           <xs:element name="valueTime" type="time"/>
           <xs:element name="valueUnsignedInt" type="unsignedInt"/>
           <xs:element name="valueUri" type="uri"/>
           <xs:element name="valueUrl" type="url"/>
           <xs:element name="valueUuid" type="uuid"/>
           <xs:element name="valueAddress" type="Address"/>
           <xs:element name="valueAge" type="Age"/>
           <xs:element name="valueAnnotation" type="Annotation"/>
           <xs:element name="valueAttachment" type="Attachment"/>
           <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
           <xs:element name="valueCodeableReference" type="CodeableReference"/>
           <xs:element name="valueCoding" type="Coding"/>
           <xs:element name="valueContactPoint" type="ContactPoint"/>
           <xs:element name="valueCount" type="Count"/>
           <xs:element name="valueDistance" type="Distance"/>
           <xs:element name="valueDuration" type="Duration"/>
           <xs:element name="valueHumanName" type="HumanName"/>
           <xs:element name="valueIdentifier" type="Identifier"/>
           <xs:element name="valueMoney" type="Money"/>
           <xs:element name="valuePeriod" type="Period"/>
           <xs:element name="valueQuantity" type="Quantity"/>
           <xs:element name="valueRange" type="Range"/>
           <xs:element name="valueRatio" type="Ratio"/>
           <xs:element name="valueRatioRange" type="RatioRange"/>
           <xs:element name="valueReference" type="Reference"/>
           <xs:element name="valueSampledData" type="SampledData"/>
           <xs:element name="valueSignature" type="Signature"/>
           <xs:element name="valueTiming" type="Timing"/>
           <xs:element name="valueContactDetail" type="ContactDetail"/>
           <xs:element name="valueDataRequirement" type="DataRequirement"/>
           <xs:element name="valueExpression" type="Expression"/>
           <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
           <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
           <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
           <xs:element name="valueUsageContext" type="UsageContext"/>
           <xs:element name="valueAvailability" type="Availability"/>
           <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
           <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
           <xs:element name="valueDosage" type="Dosage"/>
           <xs:element name="valueMeta" type="Meta"/>
         </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 xml:lang="en">Base definition for all elements that are defined inside a resource - but not those in a data type.</xs:documentation>
      <xs:documentation xml:lang="en">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 xml:lang="en">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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can 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.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Narrative">
    <xs:annotation>
      <xs:documentation xml:lang="en">A human-readable summary of the resource conveying the essential clinical and business information for the resource.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="status" type="NarrativeStatus" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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="NarrativeStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="generated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Generated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="extensions">
        <xs:annotation>
          <xs:documentation xml:lang="en">Extensions</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="additional">
        <xs:annotation>
          <xs:documentation xml:lang="en">Additional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="empty">
        <xs:annotation>
          <xs:documentation xml:lang="en">Empty</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NarrativeStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en">The status of a resource narrative.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="NarrativeStatusEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Element">
    <xs:annotation>
      <xs:documentation xml:lang="en">Base definition for all elements in a resource.</xs:documentation>
      <xs:documentation xml:lang="en">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="Base">
        <xs:sequence>
          <xs:element name="extension" type="Extension" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can 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="string-primitive" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DataType">
    <xs:annotation>
      <xs:documentation xml:lang="en">The base class for all re-useable types defined as part of the FHIR Specification.</xs:documentation>
      <xs:documentation xml:lang="en">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:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PrimitiveType">
    <xs:annotation>
      <xs:documentation xml:lang="en">The base type for all re-useable types defined that have a simple property.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BackboneType">
    <xs:annotation>
      <xs:documentation xml:lang="en">Base definition for the few data types that are allowed to carry modifier extensions.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="modifierExtension" type="Extension" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can 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.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Base">
    <xs:annotation>
      <xs:documentation xml:lang="en">Base definition for all types defined in FHIR type system.</xs:documentation>
      <xs:documentation xml:lang="en">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:sequence>
  </xs:complexType>
  <xs:complexType name="Meta">
    <xs:annotation>
      <xs:documentation xml:lang="en">The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="versionId" type="id" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version specific identifier, as it appears in the version portion of the URL. This value 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 xml:lang="en">When the resource last changed - e.g. when the version changed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="source" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A uri that identifies the data source of the resource. This provides a minimal amount of [[[Provenance]]] information that can be used to track or differentiate the source of information in the resource. The source may identify another server, document, message, database, etc.  It can also refer to portions of a structure, such as a section, segment, row, etc.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="profile" type="canonical" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of profiles (references to [[[StructureDefinition]]] resources) that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="security" type="Coding" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">Tags applied to this resource. Tags are intended 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="Address">
    <xs:annotation>
      <xs:documentation xml:lang="en">An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
The ISO21090-codedString may be used to provide a coded representation of the contents of strings in an Address.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="use" type="AddressUse" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The purpose of this address.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="type" type="AddressType" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="text" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the entire address as it should be displayed e.g. on a postal label, using a newline delimiter for each line (e.g., \n). This may be provided instead of or as well as the specific parts.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="line" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">The name of the city, town, suburb, village or other community or delivery center.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="district" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the administrative area (county).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="state" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. 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 xml:lang="en">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 xml:lang="en">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 xml:lang="en">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="AddressUseEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="home">
        <xs:annotation>
          <xs:documentation xml:lang="en">Home</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="work">
        <xs:annotation>
          <xs:documentation xml:lang="en">Work</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation xml:lang="en">Temporary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation xml:lang="en">Old / Incorrect</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="billing">
        <xs:annotation>
          <xs:documentation xml:lang="en">Billing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AddressUse">
    <xs:annotation>
      <xs:documentation xml:lang="en">The use of an address.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="AddressUseEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AddressTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="postal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Postal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="physical">
        <xs:annotation>
          <xs:documentation xml:lang="en">Physical</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="both">
        <xs:annotation>
          <xs:documentation xml:lang="en">Postal &amp; Physical</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AddressType">
    <xs:annotation>
      <xs:documentation xml:lang="en">The type of an address (physical / postal).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="AddressTypeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Attachment">
    <xs:annotation>
      <xs:documentation xml:lang="en">For referring to data content defined in other formats.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="contentType" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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 xml:lang="en">The actual data of the attachment - a sequence of bytes, base64 encoded.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="url" type="url" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A location where the data can be accessed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="size" type="integer64" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of bytes of data that make up this attachment (before base64 encoding, if that is done).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="hash" type="base64Binary" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">A label or set of text to display in place of the data.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="creation" type="dateTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date that the attachment was first created.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="height" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Height of the image in pixels (photo/video).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="width" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Width of the image in pixels (photo/video).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="frames" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="duration" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The duration of the recording in seconds - for audio and video.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="pages" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of pages when printed.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Count">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 xml:lang="en">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="Quantity">
        <xs:sequence>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DataRequirement">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="type" type="code" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="profile" type="canonical" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The profile of the required data, specified as the uri of the profile definition.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.</xs:documentation>
            </xs:annotation>
           <xs:element name="subjectCodeableConcept" type="CodeableConcept"  maxOccurs="1"/>
           <xs:element name="subjectReference" type="Reference"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="mustSupport" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. 

The value of mustSupport SHALL be a FHIRPath resolvable on the type of the DataRequirement. The path SHALL consist only of identifiers, constant indexers, and .resolve() (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="codeFilter" type="DataRequirement.CodeFilter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="dateFilter" type="DataRequirement.DateFilter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="valueFilter" type="DataRequirement.ValueFilter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Value filters specify additional constraints on the data for elements other than code-valued or date-valued. Each value filter specifies an additional constraint on the data (i.e. valueFilters are AND'ed, not OR'ed).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="limit" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies a maximum number of results that are required (uses the _count search parameter).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="sort" type="DataRequirement.Sort" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the order of the results to be returned.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DataRequirement.CodeFilter">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="path" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolvable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="searchParam" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A token parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type code, Coding, or CodeableConcept.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" type="canonical" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="Coding" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DataRequirement.ValueFilter">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="path" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The attribute of the filter. The specified path SHALL be a FHIRPath resolvable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of a type that is comparable to the valueFilter.value[x] element for the filter.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="searchParam" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A search parameter defined on the specified type of the DataRequirement, and which searches on elements of a type compatible with the type of the valueFilter.value[x] for the filter.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comparator" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The comparator to be used to determine whether the value is matching.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the filter.</xs:documentation>
            </xs:annotation>
           <xs:element name="valueDateTime" type="dateTime"  maxOccurs="1"/>
           <xs:element name="valuePeriod" type="Period"  maxOccurs="1"/>
           <xs:element name="valueDuration" type="Duration"  maxOccurs="1"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DataRequirement.DateFilter">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="path" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolvable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="searchParam" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A date parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type date, dateTime, Period, Schedule, or Timing.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.</xs:documentation>
            </xs:annotation>
           <xs:element name="valueDateTime" type="dateTime"  maxOccurs="1"/>
           <xs:element name="valuePeriod" type="Period"  maxOccurs="1"/>
           <xs:element name="valueDuration" type="Duration"  maxOccurs="1"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DataRequirement.Sort">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="path" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="direction" type="SortDirection" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The direction of the sort, ascending or descending.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SortDirectionEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="ascending">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ascending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="descending">
        <xs:annotation>
          <xs:documentation xml:lang="en">Descending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SortDirection">
    <xs:annotation>
      <xs:documentation xml:lang="en">The possible sort directions, ascending or descending.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="SortDirectionEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Dosage">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicates how the medication is/was taken or should be taken by the patient.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="condition" type="DosageCondition" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the dosage applies (e.g. as a whole). The Disage applies if any of the conditions are true.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="text" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free text dosage instructions e.g. SIG.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="additionalInstruction" type="CodeableConcept" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supplemental instructions to the patient on how to take the medication  (e.g. &quot;with meals&quot; or&quot;take half to one hour before food&quot;) or warnings for the patient about the medication (e.g. &quot;may cause drowsiness&quot; or &quot;avoid exposure of skin to direct sunlight or sunlamps&quot;).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="patientInstruction" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Instructions in terms that are understood by the patient or consumer.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="timing" type="Timing" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">When medication should be administered.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="asNeeded" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="asNeededFor" type="CodeableConcept" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the Medication is only taken based on a precondition for taking the Medication (CodeableConcept).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="site" type="CodeableReference_BodyStructure" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Body site to administer to.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="route" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">How drug should enter body.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="method" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Technique for administering medication.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="doseAndRate" type="Dosage.DoseAndRate" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Depending on the resource,this is the amount of medication administered, to  be administered or typical amount to be administered.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="safety" type="DosageSafety" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Safety Information about the this dosage instructions.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Dosage.DoseAndRate">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicates how the medication is/was taken or should be taken by the patient.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="type" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of dose or rate specified, for example, ordered or calculated.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Amount of medication per dose.</xs:documentation>
            </xs:annotation>
           <xs:element name="doseRange" type="Range"  maxOccurs="1"/>
           <xs:element name="doseQuantity" type="Quantity"  maxOccurs="1"/>
           <xs:element name="doseExpression" type="Expression"  maxOccurs="1"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Amount of medication per unit of time.</xs:documentation>
            </xs:annotation>
           <xs:element name="rateRatio" type="Ratio"  maxOccurs="1"/>
           <xs:element name="rateRange" type="Range"  maxOccurs="1"/>
           <xs:element name="rateQuantity" type="Quantity"  maxOccurs="1"/>
           <xs:element name="rateExpression" type="Expression"  maxOccurs="1"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RelativeTime">
    <xs:annotation>
      <xs:documentation xml:lang="en">RelativeTime expresses a time or time period as relative to the time of an event defined in data types other than dateTime.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="contextReference" type="Reference" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific event occurrence or resource context used as a base point (reference point) in time.  This establishes the context in which the 'path' is evaluated.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="contextDefinition" type="canonical" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of event used as a base point.  Instances of this definition will establish the context for evaluating the path to determine the base time for the offset.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="contextPath" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Path to the element defining the basis for the relative time. Any valid FHIRPath expression.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="contextCode" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded representation of the event used as a base point (reference point) in time.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">An offset or offset range before (negative values) or after (positive values) the event. Range is limited to time-valued quantities (Durations).</xs:documentation>
            </xs:annotation>
           <xs:element name="offsetDuration" type="Duration"  maxOccurs="1"/>
           <xs:element name="offsetRange" type="Range"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="text" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free-text (human-readable) description.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MonetaryComponent">
    <xs:annotation>
      <xs:documentation xml:lang="en">Financial line items use this datatype to commonly categorize the value, and other factors that may effect how the value should be interpreted.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="type" type="code" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of monetary component, what the value is to be used for and how that should be applied in its context. e.g. A surchange would increase the cost, a deduction would reduce the cost.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A codable breakdown of the type of monetary component. e.g. State Tax, Federal Tax, VIP-Discount.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="factor" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The factor that has been applied to the base price (in another monetary component value) when performing calculations.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="amount" type="Money" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The explicit value amount of the component (based on type/code).</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Money">
    <xs:annotation>
      <xs:documentation xml:lang="en">An amount of economic utility in some recognized currency.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="value" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Numerical value (with implicit precision).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="currency" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">ISO 4217 Currency Code.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="HumanName">
    <xs:annotation>
      <xs:documentation xml:lang="en">A name, normally of a human, that can be used for other living entities (e.g. animals but not organizations) that have been assigned names by a human and may need the use of name parts or the need for usage information.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="use" type="NameUse" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="family" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">Given name.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="prefix" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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 xml:lang="en">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="NameUseEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="usual">
        <xs:annotation>
          <xs:documentation xml:lang="en">Usual</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="official">
        <xs:annotation>
          <xs:documentation xml:lang="en">Official</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation xml:lang="en">Temp</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="nickname">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nickname</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="anonymous">
        <xs:annotation>
          <xs:documentation xml:lang="en">Anonymous</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation xml:lang="en">Old</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="maiden">
        <xs:annotation>
          <xs:documentation xml:lang="en">Name changed for Marriage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NameUse">
    <xs:annotation>
      <xs:documentation xml:lang="en">The use of a human name.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="NameUseEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ContactPoint">
    <xs:annotation>
      <xs:documentation xml:lang="en">Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="system" type="ContactPointSystem" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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 xml:lang="en">Identifies the purpose for the contact point.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="rank" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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="ContactPointSystemEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="phone">
        <xs:annotation>
          <xs:documentation xml:lang="en">Phone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="fax">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fax</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="email">
        <xs:annotation>
          <xs:documentation xml:lang="en">Email</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="pager">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pager</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="url">
        <xs:annotation>
          <xs:documentation xml:lang="en">URL</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="sms">
        <xs:annotation>
          <xs:documentation xml:lang="en">SMS</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation xml:lang="en">Other</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ContactPointSystem">
    <xs:annotation>
      <xs:documentation xml:lang="en">Telecommunications form for contact point.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="ContactPointSystemEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ContactPointUseEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="home">
        <xs:annotation>
          <xs:documentation xml:lang="en">Home</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="work">
        <xs:annotation>
          <xs:documentation xml:lang="en">Work</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation xml:lang="en">Temp</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation xml:lang="en">Old</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mobile">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mobile</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ContactPointUse">
    <xs:annotation>
      <xs:documentation xml:lang="en">Use of contact point.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="ContactPointUseEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MarketingStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en">The marketing status describes the date when an item is actually put on the market or the date as of which it is no longer available.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="country" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The country in which the marketing status applies.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The jurisdiction in which the marketing status applies.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="status" type="CodeableConcept" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">This attribute provides information on the status of the marketing of the item.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="dateRange" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The dates that the item is made available on the market by the owner (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction. Note that “on the market” refers to the release of the item into the distribution chain.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="restoreDate" type="dateTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when the item is due to be placed back on the market by the owner, manufacturer or distributor, after a suspension.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Identifier">
    <xs:annotation>
      <xs:documentation xml:lang="en">An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="use" type="IdentifierUse" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The purpose of this identifier.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="type" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Establishes the namespace for the value - that is, an absolute URL that describes a set values that are unique.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="value" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The portion of the identifier typically relevant 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 xml:lang="en">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 xml:lang="en">Organization that issued/manages the identifier.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="IdentifierUseEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="usual">
        <xs:annotation>
          <xs:documentation xml:lang="en">Usual</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="official">
        <xs:annotation>
          <xs:documentation xml:lang="en">Official</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation xml:lang="en">Temp</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="secondary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Secondary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation xml:lang="en">Old</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="IdentifierUse">
    <xs:annotation>
      <xs:documentation xml:lang="en">Identifies the purpose for this identifier, if known .</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="IdentifierUseEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RatioRange">
    <xs:annotation>
      <xs:documentation xml:lang="en">A range of ratios expressed as a low and high numerator and a denominator.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="lowNumerator" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the low limit numerator.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="highNumerator" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the high limit numerator.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="denominator" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the denominator.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Coding">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference to a code defined by a terminology system.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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 xml:lang="en">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 xml:lang="en">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="userSelected" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DosageSafety">
    <xs:annotation>
      <xs:documentation xml:lang="en">Safety Details about the usage of the medication.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="doseLimit" type="DosageSafety.DoseLimit" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A dose limit for safe use of the medication.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="ifExceeded" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">What to do if the instructions lead to exceeding the dose limits.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DosageSafety.DoseLimit">
    <xs:annotation>
      <xs:documentation xml:lang="en">Safety Details about the usage of the medication.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Quantity that is safe to use.</xs:documentation>
            </xs:annotation>
           <xs:element name="valueInteger" type="integer"  maxOccurs="1"/>
           <xs:element name="valueQuantity" type="Quantity"  maxOccurs="1"/>
           <xs:element name="valueExpression" type="Expression"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="scope" type="code" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">dosage | period | administration | lifetime - The scope of the dose limitation.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="Duration" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period over which the quantity is safe to use (if scope = period).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="text" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional notes about the dose limit.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SampledData">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="origin" type="Quantity" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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="interval" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Amount of intervalUnits between samples, e.g. milliseconds for time-based sampling.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="intervalUnit" type="code" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The measurement unit in which the sample interval is expressed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="factor" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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 xml:lang="en">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="positiveInt" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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="codeMap" type="canonical" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to ConceptMap that defines the codes used in the data.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="offsets" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A series of increasing decimal values separated by a single space (character u20), which represent the offset from the logical start point. Offset values may be negative. The units in which the offsets are expressed are found in intervalUnit.  The absolute point at which the measurements begin SHALL be conveyed outside the scope of this datatype, e.g. Observation.effectiveDateTime for a timing offset.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="data" type="SampledDataDataType" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A series of data points which are decimal values or codes separated by a single space (character u20). The special codes &quot;E&quot; (error), &quot;L&quot; (below detection limit) and &quot;U&quot; (above detection limit) are also defined for used in place of decimal values.</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="Ratio">
    <xs:annotation>
      <xs:documentation xml:lang="en">A relationship of two Quantity values - expressed as a numerator and a denominator.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="numerator" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">The value of the denominator.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="path" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="sliceName" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="sliceIsConstraining" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="label" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="Coding" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that has the same meaning as the element in a particular terminology.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="slicing" type="ElementDefinition.Slicing" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. 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 xml:lang="en">A concise description of what this element means (e.g. for use in autogenerated summaries).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="definition" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), 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. (Note: The text you are reading is specified in ElementDefinition.definition).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comment" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="requirements" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="alias" type="string" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies additional names by which this element might also be known.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="min" type="unsignedInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">The maximum number of times this element is permitted to appear in the instance.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="base" type="ElementDefinition.Base" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="contentReference" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="type" type="ElementDefinition.Type" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The data type or resource that the value of this element is permitted to be.</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation xml:lang="en">The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').</xs:documentation>
           </xs:annotation>
           <xs:element name="defaultValueBase64Binary" type="base64Binary"/>
           <xs:element name="defaultValueBoolean" type="boolean"/>
           <xs:element name="defaultValueCanonical" type="canonical"/>
           <xs:element name="defaultValueCode" type="code"/>
           <xs:element name="defaultValueDate" type="date"/>
           <xs:element name="defaultValueDateTime" type="dateTime"/>
           <xs:element name="defaultValueDecimal" type="decimal"/>
           <xs:element name="defaultValueId" type="id"/>
           <xs:element name="defaultValueInstant" type="instant"/>
           <xs:element name="defaultValueInteger" type="integer"/>
           <xs:element name="defaultValueInteger64" type="integer64"/>
           <xs:element name="defaultValueMarkdown" type="markdown"/>
           <xs:element name="defaultValueOid" type="oid"/>
           <xs:element name="defaultValuePositiveInt" type="positiveInt"/>
           <xs:element name="defaultValueString" type="string"/>
           <xs:element name="defaultValueTime" type="time"/>
           <xs:element name="defaultValueUnsignedInt" type="unsignedInt"/>
           <xs:element name="defaultValueUri" type="uri"/>
           <xs:element name="defaultValueUrl" type="url"/>
           <xs:element name="defaultValueUuid" type="uuid"/>
           <xs:element name="defaultValueAddress" type="Address"/>
           <xs:element name="defaultValueAge" type="Age"/>
           <xs:element name="defaultValueAnnotation" type="Annotation"/>
           <xs:element name="defaultValueAttachment" type="Attachment"/>
           <xs:element name="defaultValueCodeableConcept" type="CodeableConcept"/>
           <xs:element name="defaultValueCodeableReference" type="CodeableReference"/>
           <xs:element name="defaultValueCoding" type="Coding"/>
           <xs:element name="defaultValueContactPoint" type="ContactPoint"/>
           <xs:element name="defaultValueCount" type="Count"/>
           <xs:element name="defaultValueDistance" type="Distance"/>
           <xs:element name="defaultValueDuration" type="Duration"/>
           <xs:element name="defaultValueHumanName" type="HumanName"/>
           <xs:element name="defaultValueIdentifier" type="Identifier"/>
           <xs:element name="defaultValueMoney" type="Money"/>
           <xs:element name="defaultValuePeriod" type="Period"/>
           <xs:element name="defaultValueQuantity" type="Quantity"/>
           <xs:element name="defaultValueRange" type="Range"/>
           <xs:element name="defaultValueRatio" type="Ratio"/>
           <xs:element name="defaultValueRatioRange" type="RatioRange"/>
           <xs:element name="defaultValueReference" type="Reference"/>
           <xs:element name="defaultValueSampledData" type="SampledData"/>
           <xs:element name="defaultValueSignature" type="Signature"/>
           <xs:element name="defaultValueTiming" type="Timing"/>
           <xs:element name="defaultValueContactDetail" type="ContactDetail"/>
           <xs:element name="defaultValueDataRequirement" type="DataRequirement"/>
           <xs:element name="defaultValueExpression" type="Expression"/>
           <xs:element name="defaultValueParameterDefinition" type="ParameterDefinition"/>
           <xs:element name="defaultValueRelatedArtifact" type="RelatedArtifact"/>
           <xs:element name="defaultValueTriggerDefinition" type="TriggerDefinition"/>
           <xs:element name="defaultValueUsageContext" type="UsageContext"/>
           <xs:element name="defaultValueAvailability" type="Availability"/>
           <xs:element name="defaultValueExtendedContactDetail" type="ExtendedContactDetail"/>
           <xs:element name="defaultValueVirtualServiceDetail" type="VirtualServiceDetail"/>
           <xs:element name="defaultValueDosage" type="Dosage"/>
           <xs:element name="defaultValueMeta" type="Meta"/>
         </xs:choice>
          <xs:element name="meaningWhenMissing" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="orderMeaning" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation xml:lang="en">Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant 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="fixedBase64Binary" type="base64Binary"/>
           <xs:element name="fixedBoolean" type="boolean"/>
           <xs:element name="fixedCanonical" type="canonical"/>
           <xs:element name="fixedCode" type="code"/>
           <xs:element name="fixedDate" type="date"/>
           <xs:element name="fixedDateTime" type="dateTime"/>
           <xs:element name="fixedDecimal" type="decimal"/>
           <xs:element name="fixedId" type="id"/>
           <xs:element name="fixedInstant" type="instant"/>
           <xs:element name="fixedInteger" type="integer"/>
           <xs:element name="fixedInteger64" type="integer64"/>
           <xs:element name="fixedMarkdown" type="markdown"/>
           <xs:element name="fixedOid" type="oid"/>
           <xs:element name="fixedPositiveInt" type="positiveInt"/>
           <xs:element name="fixedString" type="string"/>
           <xs:element name="fixedTime" type="time"/>
           <xs:element name="fixedUnsignedInt" type="unsignedInt"/>
           <xs:element name="fixedUri" type="uri"/>
           <xs:element name="fixedUrl" type="url"/>
           <xs:element name="fixedUuid" type="uuid"/>
           <xs:element name="fixedAddress" type="Address"/>
           <xs:element name="fixedAge" type="Age"/>
           <xs:element name="fixedAnnotation" type="Annotation"/>
           <xs:element name="fixedAttachment" type="Attachment"/>
           <xs:element name="fixedCodeableConcept" type="CodeableConcept"/>
           <xs:element name="fixedCodeableReference" type="CodeableReference"/>
           <xs:element name="fixedCoding" type="Coding"/>
           <xs:element name="fixedContactPoint" type="ContactPoint"/>
           <xs:element name="fixedCount" type="Count"/>
           <xs:element name="fixedDistance" type="Distance"/>
           <xs:element name="fixedDuration" type="Duration"/>
           <xs:element name="fixedHumanName" type="HumanName"/>
           <xs:element name="fixedIdentifier" type="Identifier"/>
           <xs:element name="fixedMoney" type="Money"/>
           <xs:element name="fixedPeriod" type="Period"/>
           <xs:element name="fixedQuantity" type="Quantity"/>
           <xs:element name="fixedRange" type="Range"/>
           <xs:element name="fixedRatio" type="Ratio"/>
           <xs:element name="fixedRatioRange" type="RatioRange"/>
           <xs:element name="fixedReference" type="Reference"/>
           <xs:element name="fixedSampledData" type="SampledData"/>
           <xs:element name="fixedSignature" type="Signature"/>
           <xs:element name="fixedTiming" type="Timing"/>
           <xs:element name="fixedContactDetail" type="ContactDetail"/>
           <xs:element name="fixedDataRequirement" type="DataRequirement"/>
           <xs:element name="fixedExpression" type="Expression"/>
           <xs:element name="fixedParameterDefinition" type="ParameterDefinition"/>
           <xs:element name="fixedRelatedArtifact" type="RelatedArtifact"/>
           <xs:element name="fixedTriggerDefinition" type="TriggerDefinition"/>
           <xs:element name="fixedUsageContext" type="UsageContext"/>
           <xs:element name="fixedAvailability" type="Availability"/>
           <xs:element name="fixedExtendedContactDetail" type="ExtendedContactDetail"/>
           <xs:element name="fixedVirtualServiceDetail" type="VirtualServiceDetail"/>
           <xs:element name="fixedDosage" type="Dosage"/>
           <xs:element name="fixedMeta" type="Meta"/>
         </xs:choice>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation xml:lang="en">Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  

When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.

When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.

When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,

1. If primitive: it must match exactly the pattern value
2. If a complex object: it must match (recursively) the pattern value
3. If an array: it must match (recursively) the pattern value

If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.</xs:documentation>
           </xs:annotation>
           <xs:element name="patternBase64Binary" type="base64Binary"/>
           <xs:element name="patternBoolean" type="boolean"/>
           <xs:element name="patternCanonical" type="canonical"/>
           <xs:element name="patternCode" type="code"/>
           <xs:element name="patternDate" type="date"/>
           <xs:element name="patternDateTime" type="dateTime"/>
           <xs:element name="patternDecimal" type="decimal"/>
           <xs:element name="patternId" type="id"/>
           <xs:element name="patternInstant" type="instant"/>
           <xs:element name="patternInteger" type="integer"/>
           <xs:element name="patternInteger64" type="integer64"/>
           <xs:element name="patternMarkdown" type="markdown"/>
           <xs:element name="patternOid" type="oid"/>
           <xs:element name="patternPositiveInt" type="positiveInt"/>
           <xs:element name="patternString" type="string"/>
           <xs:element name="patternTime" type="time"/>
           <xs:element name="patternUnsignedInt" type="unsignedInt"/>
           <xs:element name="patternUri" type="uri"/>
           <xs:element name="patternUrl" type="url"/>
           <xs:element name="patternUuid" type="uuid"/>
           <xs:element name="patternAddress" type="Address"/>
           <xs:element name="patternAge" type="Age"/>
           <xs:element name="patternAnnotation" type="Annotation"/>
           <xs:element name="patternAttachment" type="Attachment"/>
           <xs:element name="patternCodeableConcept" type="CodeableConcept"/>
           <xs:element name="patternCodeableReference" type="CodeableReference"/>
           <xs:element name="patternCoding" type="Coding"/>
           <xs:element name="patternContactPoint" type="ContactPoint"/>
           <xs:element name="patternCount" type="Count"/>
           <xs:element name="patternDistance" type="Distance"/>
           <xs:element name="patternDuration" type="Duration"/>
           <xs:element name="patternHumanName" type="HumanName"/>
           <xs:element name="patternIdentifier" type="Identifier"/>
           <xs:element name="patternMoney" type="Money"/>
           <xs:element name="patternPeriod" type="Period"/>
           <xs:element name="patternQuantity" type="Quantity"/>
           <xs:element name="patternRange" type="Range"/>
           <xs:element name="patternRatio" type="Ratio"/>
           <xs:element name="patternRatioRange" type="RatioRange"/>
           <xs:element name="patternReference" type="Reference"/>
           <xs:element name="patternSampledData" type="SampledData"/>
           <xs:element name="patternSignature" type="Signature"/>
           <xs:element name="patternTiming" type="Timing"/>
           <xs:element name="patternContactDetail" type="ContactDetail"/>
           <xs:element name="patternDataRequirement" type="DataRequirement"/>
           <xs:element name="patternExpression" type="Expression"/>
           <xs:element name="patternParameterDefinition" type="ParameterDefinition"/>
           <xs:element name="patternRelatedArtifact" type="RelatedArtifact"/>
           <xs:element name="patternTriggerDefinition" type="TriggerDefinition"/>
           <xs:element name="patternUsageContext" type="UsageContext"/>
           <xs:element name="patternAvailability" type="Availability"/>
           <xs:element name="patternExtendedContactDetail" type="ExtendedContactDetail"/>
           <xs:element name="patternVirtualServiceDetail" type="VirtualServiceDetail"/>
           <xs:element name="patternDosage" type="Dosage"/>
           <xs:element name="patternMeta" type="Meta"/>
         </xs:choice>
          <xs:element name="example" type="ElementDefinition.Example" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A sample value for this element demonstrating the type of information that would typically be found in the element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.</xs:documentation>
            </xs:annotation>
           <xs:element name="minValueDate" type="date"  maxOccurs="1"/>
           <xs:element name="minValueDateTime" type="dateTime"  maxOccurs="1"/>
           <xs:element name="minValueInstant" type="instant"  maxOccurs="1"/>
           <xs:element name="minValueTime" type="time"  maxOccurs="1"/>
           <xs:element name="minValueDecimal" type="decimal"  maxOccurs="1"/>
           <xs:element name="minValueInteger" type="integer"  maxOccurs="1"/>
           <xs:element name="minValueInteger64" type="integer64"  maxOccurs="1"/>
           <xs:element name="minValuePositiveInt" type="positiveInt"  maxOccurs="1"/>
           <xs:element name="minValueUnsignedInt" type="unsignedInt"  maxOccurs="1"/>
           <xs:element name="minValueQuantity" type="Quantity"  maxOccurs="1"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.</xs:documentation>
            </xs:annotation>
           <xs:element name="maxValueDate" type="date"  maxOccurs="1"/>
           <xs:element name="maxValueDateTime" type="dateTime"  maxOccurs="1"/>
           <xs:element name="maxValueInstant" type="instant"  maxOccurs="1"/>
           <xs:element name="maxValueTime" type="time"  maxOccurs="1"/>
           <xs:element name="maxValueDecimal" type="decimal"  maxOccurs="1"/>
           <xs:element name="maxValueInteger" type="integer"  maxOccurs="1"/>
           <xs:element name="maxValueInteger64" type="integer64"  maxOccurs="1"/>
           <xs:element name="maxValuePositiveInt" type="positiveInt"  maxOccurs="1"/>
           <xs:element name="maxValueUnsignedInt" type="unsignedInt"  maxOccurs="1"/>
           <xs:element name="maxValueQuantity" type="Quantity"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="maxLength" type="integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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. ```maxLength``` SHOULD only be used on primitive data types that have a have a length (see [Tupe Characteristics](datatypes.html#other) and [[[http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics]]]).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="condition" type="id" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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="mustHaveValue" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="valueAlternatives" type="canonical" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies a list of extensions that can appear in place of a primitive value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="mustSupport" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, implementations that produce or consume resources SHALL provide &quot;support&quot; for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="isModifier" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="isModifierReason" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explains how that element affects the interpretation of the resource or element that contains it.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="isSummary" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="mapping" type="ElementDefinition.Mapping" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">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.Constraint">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="key" type="id" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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="requirements" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of why this constraint is necessary or appropriate.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="severity" type="ConstraintSeverity" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the impact constraint violation has on the conformance of the instance.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="suppress" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates that the warning or best practice guideline should be suppressed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="human" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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="expression" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="source" type="canonical" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the original source of the constraint, for traceability purposes.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Mapping">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="identity" type="id" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">An internal reference to the definition of a mapping.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="language" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the computable language in which mapping.map is expressed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="map" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Expresses what part of the target specification corresponds to this element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="comment" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments that provide information about the mapping or its use.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Base">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="path" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="min" type="unsignedInt" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Minimum cardinality of the base element identified by the path.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="max" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Maximum cardinality of the base element identified by the path.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="code" type="uri" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. &quot;string&quot; is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="profile" type="canonical" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="targetProfile" type="canonical" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used when the type is &quot;Reference&quot; or &quot;canonical&quot;, and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="aggregation" type="AggregationMode" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the type is a reference to another resource, how the resource is or can be aggregated - 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:element name="versioning" type="ReferenceVersionRules" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this reference needs to be version specific or version independent, or whether either can be used.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Example">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="label" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the purpose of this example among the set of examples.</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="1" maxOccurs="1">
           <xs:annotation>
             <xs:documentation xml:lang="en">The actual value for the element, which must be one of the types allowed for this element.</xs:documentation>
           </xs:annotation>
           <xs:element name="valueBase64Binary" type="base64Binary"/>
           <xs:element name="valueBoolean" type="boolean"/>
           <xs:element name="valueCanonical" type="canonical"/>
           <xs:element name="valueCode" type="code"/>
           <xs:element name="valueDate" type="date"/>
           <xs:element name="valueDateTime" type="dateTime"/>
           <xs:element name="valueDecimal" type="decimal"/>
           <xs:element name="valueId" type="id"/>
           <xs:element name="valueInstant" type="instant"/>
           <xs:element name="valueInteger" type="integer"/>
           <xs:element name="valueInteger64" type="integer64"/>
           <xs:element name="valueMarkdown" type="markdown"/>
           <xs:element name="valueOid" type="oid"/>
           <xs:element name="valuePositiveInt" type="positiveInt"/>
           <xs:element name="valueString" type="string"/>
           <xs:element name="valueTime" type="time"/>
           <xs:element name="valueUnsignedInt" type="unsignedInt"/>
           <xs:element name="valueUri" type="uri"/>
           <xs:element name="valueUrl" type="url"/>
           <xs:element name="valueUuid" type="uuid"/>
           <xs:element name="valueAddress" type="Address"/>
           <xs:element name="valueAge" type="Age"/>
           <xs:element name="valueAnnotation" type="Annotation"/>
           <xs:element name="valueAttachment" type="Attachment"/>
           <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
           <xs:element name="valueCodeableReference" type="CodeableReference"/>
           <xs:element name="valueCoding" type="Coding"/>
           <xs:element name="valueContactPoint" type="ContactPoint"/>
           <xs:element name="valueCount" type="Count"/>
           <xs:element name="valueDistance" type="Distance"/>
           <xs:element name="valueDuration" type="Duration"/>
           <xs:element name="valueHumanName" type="HumanName"/>
           <xs:element name="valueIdentifier" type="Identifier"/>
           <xs:element name="valueMoney" type="Money"/>
           <xs:element name="valuePeriod" type="Period"/>
           <xs:element name="valueQuantity" type="Quantity"/>
           <xs:element name="valueRange" type="Range"/>
           <xs:element name="valueRatio" type="Ratio"/>
           <xs:element name="valueRatioRange" type="RatioRange"/>
           <xs:element name="valueReference" type="Reference"/>
           <xs:element name="valueSampledData" type="SampledData"/>
           <xs:element name="valueSignature" type="Signature"/>
           <xs:element name="valueTiming" type="Timing"/>
           <xs:element name="valueContactDetail" type="ContactDetail"/>
           <xs:element name="valueDataRequirement" type="DataRequirement"/>
           <xs:element name="valueExpression" type="Expression"/>
           <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
           <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
           <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
           <xs:element name="valueUsageContext" type="UsageContext"/>
           <xs:element name="valueAvailability" type="Availability"/>
           <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
           <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
           <xs:element name="valueDosage" type="Dosage"/>
           <xs:element name="valueMeta" type="Meta"/>
         </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Slicing">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="discriminator" type="ElementDefinition.Discriminator" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the values 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 xml:lang="en">A human-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 xml:lang="en">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 xml:lang="en">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 xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="strength" type="BindingStrength" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="description" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free-text guidance on the codes that are appropriate for this element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" type="canonical" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Refers to the value set that identifies the set of codes the binding refers to.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="additional" type="ElementDefinition.Additional" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional bindings that help applications implementing this element. Additional bindings do not replace the main binding but provide more information and/or context.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Additional">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="key" type="id" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier for the additional binding within the element that allows additional bindings to be matched across profiles.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="purpose" type="code" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The use of this additional binding.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" type="canonical" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The valueSet that is being bound for the purpose.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="documentation" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Documentation of the purpose of use of the binding, providing additional information about how it is intended to be used.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="shortDoco" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Concise documentation - for summary tables.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="usage" type="UsageContext" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Qualifies the usage of the binding. Typically bindings are qualified by jurisdiction, but they may also be qualified by gender, workflow status, clinical domain etc. The information to decide whether a usage context applies is usually outside the resource, determined by context, and this might present challenges for validation tooling.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="any" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ElementDefinition.Discriminator">
    <xs:annotation>
      <xs:documentation xml:lang="en">Captures constraints on each element within the resource, profile, or extension.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="type" type="DiscriminatorType" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the element value is interpreted when discrimination is evaluated.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="path" type="string" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="PropertyRepresentationEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="xmlAttr">
        <xs:annotation>
          <xs:documentation xml:lang="en">XML Attribute</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="xmlText">
        <xs:annotation>
          <xs:documentation xml:lang="en">XML Text</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="typeAttr">
        <xs:annotation>
          <xs:documentation xml:lang="en">Type Attribute</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cdaText">
        <xs:annotation>
          <xs:documentation xml:lang="en">CDA Text Format</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="xhtml">
        <xs:annotation>
          <xs:documentation xml:lang="en">XHTML</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="PropertyRepresentation">
    <xs:annotation>
      <xs:documentation xml:lang="en">How a property is represented when serialized.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="PropertyRepresentationEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConstraintSeverityEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="warning">
        <xs:annotation>
          <xs:documentation xml:lang="en">Warning</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConstraintSeverity">
    <xs:annotation>
      <xs:documentation xml:lang="en">SHALL applications comply with this constraint?</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="ConstraintSeverityEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AggregationModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="contained">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contained</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="referenced">
        <xs:annotation>
          <xs:documentation xml:lang="en">Referenced</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="bundled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bundled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AggregationMode">
    <xs:annotation>
      <xs:documentation xml:lang="en">How resource references can be aggregated.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="AggregationModeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ReferenceVersionRulesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="either">
        <xs:annotation>
          <xs:documentation xml:lang="en">Either Specific or independent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="independent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Version independent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="specific">
        <xs:annotation>
          <xs:documentation xml:lang="en">Version Specific</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ReferenceVersionRules">
    <xs:annotation>
      <xs:documentation xml:lang="en">Whether a reference needs to be version specific or version independent, or whether either can be used.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="ReferenceVersionRulesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SlicingRulesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="closed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Closed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="open">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="openAtEnd">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open at End</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SlicingRules">
    <xs:annotation>
      <xs:documentation xml:lang="en">How slices are interpreted when evaluating an instance.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="SlicingRulesEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DiscriminatorTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="value">
        <xs:annotation>
          <xs:documentation xml:lang="en">Value</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="exists">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exists</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="pattern">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pattern</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="profile">
        <xs:annotation>
          <xs:documentation xml:lang="en">Profile</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="position">
        <xs:annotation>
          <xs:documentation xml:lang="en">Position</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DiscriminatorType">
    <xs:annotation>
      <xs:documentation xml:lang="en">How an element value is interpreted when discrimination is evaluated.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="DiscriminatorTypeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Distance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A length - a value with a unit that is a physical distance.</xs:documentation>
      <xs:documentation xml:lang="en">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="Quantity">
        <xs:sequence>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Age">
    <xs:annotation>
      <xs:documentation xml:lang="en">A duration of time during which an organism (or a process) has existed.</xs:documentation>
      <xs:documentation xml:lang="en">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="Quantity">
        <xs:sequence>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="VirtualServiceDetail">
    <xs:annotation>
      <xs:documentation xml:lang="en">The set of values required to describe a virtual service's connection details, including some limitations of the service.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="channelType" type="Coding" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of virtual service to connect to (i.e. Teams, Zoom, Specific VMR technology, WhatsApp).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">What address or number needs to be used for a user to connect to the virtual service to join. The channelType informs as to which datatype is appropriate to use (requires knowledge of the specific type).</xs:documentation>
            </xs:annotation>
           <xs:element name="addressUrl" type="url"  maxOccurs="1"/>
           <xs:element name="addressString" type="string"  maxOccurs="1"/>
           <xs:element name="addressContactPoint" type="ContactPoint"  maxOccurs="1"/>
           <xs:element name="addressExtendedContactDetail" type="ExtendedContactDetail"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="additionalInfo" type="url" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A web address that provides additional details on the call, such as alternative/regional call in numbers, or other associated services.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="maxParticipants" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Maximum number of participants supported by the virtual service where there are limitations imposed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="sessionKey" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Some systems require an additional factor/value be provided to access the service.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Availability">
    <xs:annotation>
      <xs:documentation xml:lang="en">Availability data for an {item}, declaring what days/times are available, and any exceptions. The exceptions could be textual only, e.g. Public holidays, or could be time period specific and indicate a specific years dates.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="period" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time when the availability is applicable.  For example, you might use this property to indicate the period during the holiday season when you close an hour early.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="availableTime" type="Availability.AvailableTime" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A collection of times that the {item} is available.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="notAvailableTime" type="Availability.NotAvailableTime" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The {item} is not available during this period of time due to the provided reason.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Availability.AvailableTime">
    <xs:annotation>
      <xs:documentation xml:lang="en">Availability data for an {item}, declaring what days/times are available, and any exceptions. The exceptions could be textual only, e.g. Public holidays, or could be time period specific and indicate a specific years dates.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="daysOfWeek" type="code" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates which days of the week are available between the start and end Times.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="allDay" type="boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Is this always available? (hence times are irrelevant) i.e. 24 hour service.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="availableStartTime" type="time" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The opening time of day. Note: If the AllDay flag is set, then this time is ignored.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="availableEndTime" type="time" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The closing time of day. Note: If the AllDay flag is set, then this time is ignored.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Availability.NotAvailableTime">
    <xs:annotation>
      <xs:documentation xml:lang="en">Availability data for an {item}, declaring what days/times are available, and any exceptions. The exceptions could be textual only, e.g. Public holidays, or could be time period specific and indicate a specific years dates.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="description" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reason that can be presented to the user as to why this time is not available.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="during" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The {item} is not available (seasonally or for a public holiday) during this period.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Reference">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference from one resource to another.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="reference" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a location at which the other resource is found. The reference may be 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="type" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.

The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. &quot;Patient&quot; is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="identifier" type="Identifier" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="display" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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="TriggerDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="type" type="TriggerType" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of triggering event.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="name" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that identifies the event.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="subscriptionTopic" type="canonical" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a SubscriptionTopic resource that defines the event. If this element is provided, no other information about the trigger definition may be supplied.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The timing of the event (if this is a periodic trigger).</xs:documentation>
            </xs:annotation>
           <xs:element name="timingTiming" type="Timing"  maxOccurs="1"/>
           <xs:element name="timingDate" type="date"  maxOccurs="1"/>
           <xs:element name="timingDateTime" type="dateTime"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="data" type="DataRequirement" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="condition" type="Expression" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="TriggerTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="named-event">
        <xs:annotation>
          <xs:documentation xml:lang="en">Named Event</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="periodic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Periodic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-changed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Changed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-added">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Added</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-modified">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Updated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-removed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Removed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-accessed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Accessed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-access-ended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Access Ended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="subscription-topic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subscription Topic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="TriggerType">
    <xs:annotation>
      <xs:documentation xml:lang="en">The type of trigger.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="TriggerTypeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Quantity">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="value" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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="unit" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-readable form of the unit.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="system" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">A computer processable form of the unit in some unit representation system.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuantityComparatorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="&lt;">
        <xs:annotation>
          <xs:documentation xml:lang="en">Less than</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&lt;=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Less or Equal to</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&gt;=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greater or Equal to</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&gt;">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greater than</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ad">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sufficient to achieve this total quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuantityComparator">
    <xs:annotation>
      <xs:documentation xml:lang="en">How the Quantity should be understood and represented.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="QuantityComparatorEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Period">
    <xs:annotation>
      <xs:documentation xml:lang="en">A time period defined by a start and end date and optionally time.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="start" type="dateTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Duration">
    <xs:annotation>
      <xs:documentation xml:lang="en">A length of time.</xs:documentation>
      <xs:documentation xml:lang="en">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="Quantity">
        <xs:sequence>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Range">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of ordered Quantities defined by a low and high limit.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="low" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">The high limit. The boundary is inclusive.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RelatedArtifact">
    <xs:annotation>
      <xs:documentation xml:lang="en">Related artifacts such as dependencies, components, additional documentation, justification, or bibliographic references.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="type" type="RelatedArtifactType" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship to the related artifact.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="label" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="display" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="citation" type="markdown" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Deprecated in favor of the new artifact[x] element. A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="document" type="Attachment" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Deprecated in favor of the new artifact[x] element. The document being referenced, represented as an attachment. This is exclusive with the resource element.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="resource" type="canonical" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Deprecated in favor of the new artifact[x] element. The related artifact, such as a library, value set, profile, or other knowledge resource.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="resourceReference" type="Reference" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Deprecated in favor of the new artifact[x] element. The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The related artifact represented as a canonical or direct reference to a FHIR resource, an Attachment, or directly inline as markdown.</xs:documentation>
            </xs:annotation>
           <xs:element name="artifactMarkdown" type="markdown"  maxOccurs="1"/>
           <xs:element name="artifactAttachment" type="Attachment"  maxOccurs="1"/>
           <xs:element name="artifactCanonical" type="canonical"  maxOccurs="1"/>
           <xs:element name="artifactReference" type="Reference"  maxOccurs="1"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="RelatedArtifactTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="documentation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Documentation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="justification">
        <xs:annotation>
          <xs:documentation xml:lang="en">Justification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="citation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Citation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="predecessor">
        <xs:annotation>
          <xs:documentation xml:lang="en">Predecessor</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="successor">
        <xs:annotation>
          <xs:documentation xml:lang="en">Successor</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="derived-from">
        <xs:annotation>
          <xs:documentation xml:lang="en">Derived From</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="depends-on">
        <xs:annotation>
          <xs:documentation xml:lang="en">Depends On</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="composed-of">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composed Of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="part-of">
        <xs:annotation>
          <xs:documentation xml:lang="en">Part Of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RelatedArtifactType">
    <xs:annotation>
      <xs:documentation xml:lang="en">The type of relationship to the related artifact.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="RelatedArtifactTypeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Annotation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A  text note which also  contains information about who made the statement and when.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual responsible for making the annotation.</xs:documentation>
            </xs:annotation>
           <xs:element name="authorReference" type="Reference"  maxOccurs="1"/>
           <xs:element name="authorString" type="string"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="time" type="dateTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates when this particular annotation was made.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="text" type="markdown" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The text of the annotation in markdown format.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ProductShelfLife">
    <xs:annotation>
      <xs:documentation xml:lang="en">The shelf-life and storage information for a medicinal product item or container can be described using this class.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="type" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">This describes the shelf life, taking into account various scenarios such as shelf life of the packaged Medicinal Product itself, shelf life after transformation where necessary and shelf life after the first opening of a bottle, etc. The shelf life type shall be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The shelf life time period can be specified using a numerical value for the period of time and its unit of time measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.</xs:documentation>
            </xs:annotation>
           <xs:element name="periodDuration" type="Duration"  maxOccurs="1"/>
           <xs:element name="periodString" type="string"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="specialPrecautionsForStorage" type="CodeableConcept" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Special precautions for storage, if any, can be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ContactDetail">
    <xs:annotation>
      <xs:documentation xml:lang="en">Specifies contact information for a person or organization.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="name" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of an individual to contact.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="telecom" type="ContactPoint" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contact details for the individual (if a name was provided) or the organization.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DosageCondition">
    <xs:annotation>
      <xs:documentation xml:lang="en">DosageCondition expresses a time or time period as relative to the time of an event defined in data types other than dateTime.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="code" type="CodeableConcept" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific event occurrence or resource context used as a base point (reference point) in time.  This establishes the context in which the 'path' is evaluated.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="details" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional details about the event - depends on the code.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="operation" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the value is tested.</xs:documentation>
            </xs:annotation>
          </xs:element>
        <xs:choice minOccurs="0" maxOccurs="1">
           <xs:annotation>
             <xs:documentation xml:lang="en">The value for this critera.</xs:documentation>
           </xs:annotation>
           <xs:element name="valueBase64Binary" type="base64Binary"/>
           <xs:element name="valueBoolean" type="boolean"/>
           <xs:element name="valueCanonical" type="canonical"/>
           <xs:element name="valueCode" type="code"/>
           <xs:element name="valueDate" type="date"/>
           <xs:element name="valueDateTime" type="dateTime"/>
           <xs:element name="valueDecimal" type="decimal"/>
           <xs:element name="valueId" type="id"/>
           <xs:element name="valueInstant" type="instant"/>
           <xs:element name="valueInteger" type="integer"/>
           <xs:element name="valueInteger64" type="integer64"/>
           <xs:element name="valueMarkdown" type="markdown"/>
           <xs:element name="valueOid" type="oid"/>
           <xs:element name="valuePositiveInt" type="positiveInt"/>
           <xs:element name="valueString" type="string"/>
           <xs:element name="valueTime" type="time"/>
           <xs:element name="valueUnsignedInt" type="unsignedInt"/>
           <xs:element name="valueUri" type="uri"/>
           <xs:element name="valueUrl" type="url"/>
           <xs:element name="valueUuid" type="uuid"/>
           <xs:element name="valueAddress" type="Address"/>
           <xs:element name="valueAge" type="Age"/>
           <xs:element name="valueAnnotation" type="Annotation"/>
           <xs:element name="valueAttachment" type="Attachment"/>
           <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
           <xs:element name="valueCodeableReference" type="CodeableReference"/>
           <xs:element name="valueCoding" type="Coding"/>
           <xs:element name="valueContactPoint" type="ContactPoint"/>
           <xs:element name="valueCount" type="Count"/>
           <xs:element name="valueDistance" type="Distance"/>
           <xs:element name="valueDuration" type="Duration"/>
           <xs:element name="valueHumanName" type="HumanName"/>
           <xs:element name="valueIdentifier" type="Identifier"/>
           <xs:element name="valueMoney" type="Money"/>
           <xs:element name="valuePeriod" type="Period"/>
           <xs:element name="valueQuantity" type="Quantity"/>
           <xs:element name="valueRange" type="Range"/>
           <xs:element name="valueRatio" type="Ratio"/>
           <xs:element name="valueRatioRange" type="RatioRange"/>
           <xs:element name="valueReference" type="Reference"/>
           <xs:element name="valueSampledData" type="SampledData"/>
           <xs:element name="valueSignature" type="Signature"/>
           <xs:element name="valueTiming" type="Timing"/>
           <xs:element name="valueContactDetail" type="ContactDetail"/>
           <xs:element name="valueDataRequirement" type="DataRequirement"/>
           <xs:element name="valueExpression" type="Expression"/>
           <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
           <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
           <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
           <xs:element name="valueUsageContext" type="UsageContext"/>
           <xs:element name="valueAvailability" type="Availability"/>
           <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
           <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
           <xs:element name="valueDosage" type="Dosage"/>
           <xs:element name="valueMeta" type="Meta"/>
         </xs:choice>
          <xs:element name="text" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free-text (human-readable) description.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="UsageContext">
    <xs:annotation>
      <xs:documentation xml:lang="en">Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="code" type="Coding" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that identifies the type of context being specified by this usage context.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.</xs:documentation>
            </xs:annotation>
           <xs:element name="valueCodeableConcept" type="CodeableConcept"  maxOccurs="1"/>
           <xs:element name="valueQuantity" type="Quantity"  maxOccurs="1"/>
           <xs:element name="valueRange" type="Range"  maxOccurs="1"/>
           <xs:element name="valueReference" type="Reference"  maxOccurs="1"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Expression">
    <xs:annotation>
      <xs:documentation xml:lang="en">A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="description" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A brief, natural language description of the condition that effectively communicates the intended semantics.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="name" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="language" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The media type of the language for the expression.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="expression" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression in the specified language that returns a value.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="reference" type="uri" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A URI that defines where the expression is found.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CodeableReference">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference to a resource (by instance), or instead, a reference to a concept defined in a terminology or ontology (by class).</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="concept" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a concept - e.g. the information is identified by its general class to the degree of precision found in the terminology.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="reference" type="Reference" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a resource the provides exact details about the information being referenced.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Signature">
    <xs:annotation>
      <xs:documentation xml:lang="en">A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="type" type="Coding" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="when" type="instant" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the digital signature was signed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="who" type="Reference" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to an application-usable description of the identity that signed  (e.g. the signature used their private key).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="onBehalfOf" type="Reference" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to an application-usable description of the identity that is represented by the signature.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="targetFormat" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A mime type that indicates the technical format of the target resources signed by the signature.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="sigFormat" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="data" type="base64Binary" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Timing">
    <xs:annotation>
      <xs:documentation xml:lang="en">Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="event" type="dateTime" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies specific times when the event occurs.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="repeat" type="Timing.Repeat" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of rules that describe when the event is scheduled.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="code" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Timing.Repeat">
    <xs:annotation>
      <xs:documentation xml:lang="en">Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.</xs:documentation>
            </xs:annotation>
           <xs:element name="boundsDuration" type="Duration"  maxOccurs="1"/>
           <xs:element name="boundsRange" type="Range"  maxOccurs="1"/>
           <xs:element name="boundsPeriod" type="Period"  maxOccurs="1"/>
          </xs:choice>
          <xs:element name="count" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="countMax" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="duration" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="durationMax" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="durationUnit" type="UnitsOfTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The units of time for the duration, in UCUM units
Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="frequency" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="frequencyMax" type="positiveInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the duration of time over which repetitions are to occur; e.g. to express &quot;3 times per day&quot;, 3 would be the frequency and &quot;1 day&quot; would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="periodMax" type="decimal" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as &quot;do this once every 3-5 days.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="periodUnit" type="UnitsOfTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The units of time for the period in UCUM units
Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="startOffset" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that the events within the period of the repeat do not start until startOffset has elapsed.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="endOffset" type="Quantity" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that the events within the period of the repeat step endOffset before the period ends.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="dayOfWeek" type="code" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">If one or more days of week is provided, then the action happens only on the specified day(s).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="timeOfDay" type="time" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specified time of day for action to take place.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="when" type="EventTiming" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="offset" type="unsignedInt" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="UnitsOfTimeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="s">
        <xs:annotation>
          <xs:documentation xml:lang="en">s</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="min">
        <xs:annotation>
          <xs:documentation xml:lang="en">min</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="h">
        <xs:annotation>
          <xs:documentation xml:lang="en">h</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="d">
        <xs:annotation>
          <xs:documentation xml:lang="en">d</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="wk">
        <xs:annotation>
          <xs:documentation xml:lang="en">wk</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mo">
        <xs:annotation>
          <xs:documentation xml:lang="en">mo</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="a">
        <xs:annotation>
          <xs:documentation xml:lang="en">a</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="UnitsOfTime">
    <xs:annotation>
      <xs:documentation xml:lang="en">A unit of time (units from UCUM).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="UnitsOfTimeEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EventTimingEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="MORN">
        <xs:annotation>
          <xs:documentation xml:lang="en">Morning</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MORN.early">
        <xs:annotation>
          <xs:documentation xml:lang="en">Early Morning</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MORN.late">
        <xs:annotation>
          <xs:documentation xml:lang="en">Late Morning</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NOON">
        <xs:annotation>
          <xs:documentation xml:lang="en">Noon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Afternoon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFT.early">
        <xs:annotation>
          <xs:documentation xml:lang="en">Early Afternoon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFT.late">
        <xs:annotation>
          <xs:documentation xml:lang="en">Late Afternoon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EVE">
        <xs:annotation>
          <xs:documentation xml:lang="en">Evening</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EVE.early">
        <xs:annotation>
          <xs:documentation xml:lang="en">Early Evening</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EVE.late">
        <xs:annotation>
          <xs:documentation xml:lang="en">Late Evening</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NIGHT">
        <xs:annotation>
          <xs:documentation xml:lang="en">Night</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PHS">
        <xs:annotation>
          <xs:documentation xml:lang="en">After Sleep</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IMD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Immediate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HS">
        <xs:annotation>
          <xs:documentation xml:lang="en">HS</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WAKE">
        <xs:annotation>
          <xs:documentation xml:lang="en">WAKE</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="C">
        <xs:annotation>
          <xs:documentation xml:lang="en">C</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CM">
        <xs:annotation>
          <xs:documentation xml:lang="en">CM</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CD">
        <xs:annotation>
          <xs:documentation xml:lang="en">CD</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CV">
        <xs:annotation>
          <xs:documentation xml:lang="en">CV</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AC">
        <xs:annotation>
          <xs:documentation xml:lang="en">AC</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACM">
        <xs:annotation>
          <xs:documentation xml:lang="en">ACM</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACD">
        <xs:annotation>
          <xs:documentation xml:lang="en">ACD</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACV">
        <xs:annotation>
          <xs:documentation xml:lang="en">ACV</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PC">
        <xs:annotation>
          <xs:documentation xml:lang="en">PC</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCM">
        <xs:annotation>
          <xs:documentation xml:lang="en">PCM</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCD">
        <xs:annotation>
          <xs:documentation xml:lang="en">PCD</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCV">
        <xs:annotation>
          <xs:documentation xml:lang="en">PCV</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EventTiming">
    <xs:annotation>
      <xs:documentation xml:lang="en">Real-world event relating to the schedule.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
       <xs:extension base="Element">
         <xs:attribute name="value" type="EventTimingEnum" use="optional"/>
       </xs:extension>
     </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExtendedContactDetail">
    <xs:annotation>
      <xs:documentation xml:lang="en">Specifies contact information for a specific purpose over a period of time, might be handled/monitored by a specific named person or organization.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="purpose" type="CodeableConcept" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The purpose/type of contact.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="name" type="HumanName" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of an individual to contact, some types of contact detail are usually blank.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="telecom" type="ContactPoint" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contact details application for the purpose defined.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="address" type="Address" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Address for the contact.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="organization" type="Reference" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contact detail is handled/monitored by a specific organization. If the name is provided in the contact, then it is referring to the named individual within this organization.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="period" type="Period" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Period that this contact was valid for usage.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DosageDetails">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicates how the medication is/was taken or should be taken by the patient.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="renderedInstruction" type="markdown" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The full representation of the dose of the medication included in all dosage instructions. The renderedInstructions element must always be present to ensure the full dosage intent is communicated in every case.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="step" type="DosageDetails.Step" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">One step in a sequence of steps that comprise the dosage course.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="safety" type="DosageSafety" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Safety Information about the combined dose course.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DosageDetails.Step">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicates how the medication is/was taken or should be taken by the patient.</xs:documentation>
      <xs:documentation xml:lang="en">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="BackboneType">
        <xs:sequence>
          <xs:element name="start" type="RelativeTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the step starts. In the absence of a linked event, the step is assumed to start immediately (or after the previous step).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="end" type="RelativeTime" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the step ends. In the absence of a linked event, the step is assumed to end when the internal timing schedule termnates.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="count" type="integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">How many times to do this step (if not 1).</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="component" type="Dosage" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A dosage details that is part of this step.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="safety" type="DosageSafety" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Safety Information about this step of the dose course.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CodeableConcept">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="coding" type="Coding" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">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="ParameterDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.</xs:documentation>
      <xs:documentation xml:lang="en">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="DataType">
        <xs:sequence>
          <xs:element name="name" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the parameter used to allow access to the value of the parameter in evaluation contexts.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="use" type="code" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the parameter is input or output for the module.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="min" type="integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The minimum number of times this parameter SHALL appear in the request or response.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="max" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum number of times this element is permitted to appear in the request or response.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="documentation" type="string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A brief discussion of what the parameter is for and how it is used by the module.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="type" type="code" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the parameter.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="profile" type="canonical" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MetadataResource">
    <xs:annotation>
      <xs:documentation xml:lang="en">Common Interface declaration for conformance and knowledge artifact resources.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DomainResource">
    <xs:annotation>
      <xs:documentation xml:lang="en">A resource that includes narrative, extensions, and contained resources.</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 xml:lang="en">A human-readable narrative that contains a summary of the resource and can 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 xml:lang="en">These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="extension" type="Extension" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can 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 xml:lang="en">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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, 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.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Resource">
    <xs:annotation>
      <xs:documentation xml:lang="en">This is the base resource type for everything.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Base">
        <xs:sequence>
          <xs:element name="id" type="id" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="meta" type="Meta" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might 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 xml:lang="en">A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc. For DomainResources, if more than one implicitRules policy applies, additional policies may be conveyed using the [additionalImplicitRules](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-additionalImplicitRules.html) extension.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="language" type="code" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The base language in which the resource is written.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CanonicalResource">
    <xs:annotation>
      <xs:documentation xml:lang="en">Common Interface declaration for conformance and knowledge artifact resources.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Account" type="Account">
    <xs:annotation>
      <xs:documentation xml:lang="en">A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Account">
    <xs:annotation>
      <xs:documentation xml:lang="en">A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier used to reference the account.  Might or might not be intended for human use (e.g. credit card number).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="AccountStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the account is presently used/usable or not.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="billingStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Categorizes the account for reporting and searching purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name used for the account when displaying it to humans in reports, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="servicePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date range of services associated with this account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="covers" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An account that collects the charges for a specific set of services offered over a limited time period.  For example, a hospital account might contain all charges related to a given admission, including any inpatient appointments, and possibly re-admissions, of the billing for those re-admissions should be grouped with the initial admission for the purpose of claim submission.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverage" type="Account.Coverage" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="owner" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the service area, hospital, department, etc. with responsibility for managing the Account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides additional information about what the account tracks and how it is used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="guarantor" type="Account.Guarantor" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The parties responsible for balancing the account if other payment options fall short.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosis" type="Account.Diagnosis" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedure" type="Account.Procedure" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parent" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to an associated parent Account which has this account as a sub-account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="currency" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The default currency for the account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="balance" type="Account.Balance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The calculated account balances - these are calculated and processed by the finance system.

The balances with a `term` that is not current are usually generated/updated by an invoicing or similar process.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="calculatedAt" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Time the balance amount was calculated.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Account.Coverage">
    <xs:annotation>
      <xs:documentation xml:lang="en">A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="coverage" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).

A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The priority of the coverage in the context of this account.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Account.Guarantor">
    <xs:annotation>
      <xs:documentation xml:lang="en">A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="party" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity who is responsible.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="onHold" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The timeframe during which the guarantor accepts responsibility for the account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="account" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to a specific Account belonging to the guarantor to use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="responsibility" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount (as a percentage) of the charges the guarantor is responsible.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="limit" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum amount the guarantee will pay.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rank" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The order in which guarantors will be held responsible.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Account.Diagnosis">
    <xs:annotation>
      <xs:documentation xml:lang="en">A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Ranking of the diagnosis (for each type).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The diagnosis relevant to the account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dateOfDiagnosis" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Ranking of the diagnosis (for each type).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="onAdmission" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Was the Diagnosis present on Admission in the related Encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packageCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Account.Procedure">
    <xs:annotation>
      <xs:documentation xml:lang="en">A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Ranking of the procedure (for each type).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The procedure relevant to the account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dateOfService" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How this procedure value should be used in charging the account.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packageCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="device" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any devices that were associated with the procedure relevant to the account.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Account.Balance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="aggregate" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who is expected to pay this part of the balance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="term" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The term of the account balances - The balance value is the amount that was outstanding for this age.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="estimate" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual balance value calculated for the age defined in the term property.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AccountStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AccountStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AccountStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ActivityDefinition" type="ActivityDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ActivityDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the activity definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subtitle" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanatory or alternate title for the activity definition giving additional information about its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this activity definition. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.</xs:documentation>
            </xs:annotation>
            <xs:element name="subjectCodeableConcept" type="CodeableConcept"/>
            <xs:element name="subjectReference" type="Reference"/>
            <xs:element name="subjectCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the activity definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the activity definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the activity definition from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this activity definition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usage" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A detailed description of how the activity definition is used from a clinical perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the activity definition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the activity definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the activity definition content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, or bibliographic references.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="library" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a Library resource containing any formal logic used by the activity definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="kind" minOccurs="0" maxOccurs="1" type="RequestResourceTypes">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profile" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A profile to which the target of the activity definition is expected to conform.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="0" maxOccurs="1" type="RequestIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the activity  should be addressed with respect to other requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doNotPerform" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The timing or frequency upon which the described activity is to occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="timingTiming" type="Timing"/>
            <xs:element name="timingAge" type="Age"/>
            <xs:element name="timingRange" type="Range"/>
            <xs:element name="timingDuration" type="Duration"/>
            <xs:element name="timingRelativeTime" type="RelativeTime"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example &quot;pain&quot;, &quot;on flare-up&quot;, etc.</xs:documentation>
            </xs:annotation>
            <xs:element name="asNeededBoolean" type="boolean"/>
            <xs:element name="asNeededCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="ActivityDefinition.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who should participate in performing the action described.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the food, drug or other product being consumed or supplied in the activity.</xs:documentation>
            </xs:annotation>
            <xs:element name="productReference" type="Reference"/>
            <xs:element name="productCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dosage" minOccurs="0" maxOccurs="unbounded" type="Dosage">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specimenRequirement" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines specimen requirements for the action to be performed, such as required specimens for a lab test.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="observationRequirement" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines observation requirements for the action to be performed, such as body weight or surface area.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="observationResultRequirement" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the observations that are expected to be produced by the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="transform" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dynamicValue" type="ActivityDefinition.DynamicValue" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ActivityDefinition.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="ActionParticipantType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeCanonical" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeReference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The role the participant should play in performing the described action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how the actor will be involved in the action - author, reviewer, witness, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ActivityDefinition.DynamicValue">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="path" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolvable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="1" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression specifying the value of the customized element.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionParticipantTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="careteam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="healthcareservice">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="practitionerrole">
        <xs:annotation>
          <xs:documentation xml:lang="en">PractitionerRole</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="relatedperson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionParticipantType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionParticipantTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="RequestIntentEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="proposal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Proposal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="solicit-offer">
        <xs:annotation>
          <xs:documentation xml:lang="en">Solicit Offer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="offer-response">
        <xs:annotation>
          <xs:documentation xml:lang="en">Offer Response</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="plan">
        <xs:annotation>
          <xs:documentation xml:lang="en">Plan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="directive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Directive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="original-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Original Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reflex-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reflex Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="filler-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Filler Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="instance-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Instance Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="option">
        <xs:annotation>
          <xs:documentation xml:lang="en">Option</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RequestIntent">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="RequestIntentEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="RequestPriorityEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="routine">
        <xs:annotation>
          <xs:documentation xml:lang="en">Routine</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="urgent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Urgent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="asap">
        <xs:annotation>
          <xs:documentation xml:lang="en">ASAP</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="stat">
        <xs:annotation>
          <xs:documentation xml:lang="en">STAT</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RequestPriority">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="RequestPriorityEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ActorDefinition" type="ActorDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Provides a definition of an actor - a system, individual, non-system device, or collective - that plays a role in a process, such as data exchange, along with associated obligations.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ActorDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Provides a definition of an actor - a system, individual, non-system device, or collective - that plays a role in a process, such as data exchange, along with associated obligations.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this actor definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this actor definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the actor definition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this actor definition when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the actor definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the actor definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the actor definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the actor definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this actor definition. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this actor definition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the actor definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the actor definition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the actor definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the actor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate actor definition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this actor definition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the actor definition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the actor definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="ActorDefinitionActorType">
            <xs:annotation>
              <xs:documentation xml:lang="en">What type of actor this is.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Further details about the type of actor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details describing the nature of the actor as well as boundaries that distinguish this type of actor from other actors.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="0" maxOccurs="unbounded" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to additional documentation about the actor, but description and documentation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="baseDefinition" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">An ActorDefinition that is a super-type of this actor.  This actor inherits all of the obligations that apply to the referenced actor definition and can be used wherever the referenced ActorDefinition can.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActorDefinitionActorTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="person">
        <xs:annotation>
          <xs:documentation xml:lang="en">Person</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="system">
        <xs:annotation>
          <xs:documentation xml:lang="en">System</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="collective">
        <xs:annotation>
          <xs:documentation xml:lang="en">Collective</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation xml:lang="en">Other</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActorDefinitionActorType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActorDefinitionActorTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="AdministrableProductDefinition" type="AdministrableProductDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="AdministrableProductDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier for the administrable product instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this administrable product. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="formOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">References a product from which one or more of the constituent parts of that product can be prepared and used as described by this administrable product.  If this administrable product describes the administration of a crushed tablet, the 'formOf' would be the product representing a distribution containing tablets and possibly also a cream.  This is distinct from the 'producedFrom' which refers to the specific components of the product that are used in this preparation, rather than the product as a whole.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="administrableDoseForm" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The dose form of the final product after necessary reconstitution or processing. Contrasts to the manufactured dose form (see ManufacturedItemDefinition). If the manufactured form was 'powder for solution for injection', the administrable dose form could be 'solution for injection' (once mixed with another item having manufactured form 'solvent for solution for injection').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitOfPresentation" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The presentation type in which this item is given to a patient. e.g. for a spray - 'puff' (as in 'contains 100 mcg per puff'), or for a liquid - 'vial' (as in 'contains 5 ml per vial').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="producedFrom" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the specific manufactured items that are part of the 'formOf' product that are used in the preparation of this specific administrable form.  In some cases, an administrable form might use all of the items from the overall product (or there might only be one item), while in other cases, an administrable form might use only a subset of the items available in the overall product.  For example, an administrable form might involve combining a liquid and a powder available as part of an overall product, but not involve applying the also supplied cream. For consistency, it is acceptable to refer to the manufactured item in all cases - from complex many-to-many to simple one-to-one cases - even when there is no transformation or combining involved between the manufactured form and the administrable form. For example an oral solid tablet is usually administered without any transformation or combination, but the administrable form can still be represented as 'producedFrom' the single manufactured tablet.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ingredient" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The ingredients of this administrable medicinal product. This is only needed if the ingredients are not specified either using ManufacturedItemDefinition (via AdministrableProductDefinition.producedFrom) to state which component items are used to make this, or using by incoming references from the Ingredient resource, to state in detail which substances exist within this. This element allows a basic coded ingredient to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="device" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A device that is integral to the medicinal product, in effect being considered as an &quot;ingredient&quot; of the medicinal product. This is not intended for devices that are just co-packaged.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A general description of the product, when in its final form, suitable for administration e.g. effervescent blue liquid, to be swallowed. Intended to be used when the other structured properties of this resource are insufficient or cannot be supported. It is not intended to duplicate information already carried elsewhere.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that this product is known by, within some formal terminology. May be a PhPID. PhPID is really a code or a label, and not an identifier, because it applies to multiple products.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="AdministrableProductDefinition.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Characteristics e.g. a product's onset of action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="routeOfAdministration" type="AdministrableProductDefinition.RouteOfAdministration" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The path by which the product is taken into or makes contact with the body. In some regions this is referred to as the licensed or approved route. RouteOfAdministration cannot be used when the 'formOf' product already uses MedicinalProductDefinition.route (and vice versa).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdministrableProductDefinition.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code expressing the type of characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A value for the characteristic.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of characteristic e.g. assigned or pending.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdministrableProductDefinition.RouteOfAdministration">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded expression for the route.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="firstDose" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The first dose (dose quantity) administered can be specified for the product, using a numerical value and its unit of measurement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxSingleDose" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum single dose that can be administered, specified using a numerical value and its unit of measurement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxDosePerDay" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum dose per day (maximum dose quantity to be administered in any one 24-h period) that can be administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxDosePerTreatmentPeriod" minOccurs="0" maxOccurs="1" type="Ratio">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum dose per treatment period that can be administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxTreatmentPeriod" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum treatment period during which the product can be administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="targetSpecies" type="AdministrableProductDefinition.TargetSpecies" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A species for which this route applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdministrableProductDefinition.TargetSpecies">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded expression for the species.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="withdrawalPeriod" type="AdministrableProductDefinition.WithdrawalPeriod" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A species specific time during which consumption of animal product is not appropriate.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdministrableProductDefinition.WithdrawalPeriod">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="tissue" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded expression for the type of tissue for which the withdrawal period applies, e.g. meat, milk.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value for the time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInformation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Extra information about the withdrawal period.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="AdverseEvent" type="AdverseEvent">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="AdverseEvent">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="AdverseEventStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the adverse event or potential adverse event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actuality" minOccurs="1" maxOccurs="1" type="AdverseEventActuality">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the event actually happened or was a near miss. Note that this is independent of whether anyone was affected or harmed or how severely.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The overall type of event, intended for search and filtering purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific event that occurred or that was averted, such as patient fall, wrong organ removed, or wrong blood transfused.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This subject or group impacted by the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter associated with the start of the AdverseEvent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and perhaps time) when the effect of the AdverseEvent occurred.</xs:documentation>
            </xs:annotation>
            <xs:element name="effectDateTime" type="dateTime"/>
            <xs:element name="effectPeriod" type="Period"/>
          </xs:choice>
          <xs:element name="detected" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated or actual date the AdverseEvent began, in the opinion of the reporter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recordedDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the existence of the AdverseEvent was first recorded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resultingEffect" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the condition that occurred as a result of the adverse event, such as hives due to the exposure to a substance (for example, a drug or a chemical) or a broken leg as a result of the fall.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The information about where the adverse event occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="seriousness" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Assessment whether this event, or averted event, was of clinical importance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the type of outcome from the adverse event, such as resolved, recovering, ongoing, resolved-with-sequelae, or fatal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information on who recorded the adverse event.  May be the patient or a practitioner.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="AdverseEvent.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what participated in the adverse event and how they were involved.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="study" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The research study that the subject is enrolled in.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expectedInResearchStudy" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Considered likely or probable or anticipated in the research study.  Whether the reported event matches any of the outcomes for the patient that are considered by the study as known or likely.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="suspectEntity" type="AdverseEvent.SuspectEntity" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the entity that is suspected to have caused the adverse event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contributingFactor" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contributing factors suspected to have increased the probability or severity of the adverse event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preventiveAction" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Preventive actions that contributed to avoiding the adverse event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mitigatingAction" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The ameliorating action taken after the adverse event occurred in order to reduce the extent of harm.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relevant past history for the subject. In a clinical care context, an example being a patient had an adverse event following a penicillin administration and the patient had a previously documented penicillin allergy. In a clinical trials context, an example is a bunion or rash that was present prior to the study. Additionally, the supporting item can be a document that is relevant to this instance of the adverse event that is not part of the subject's medical history. For example, a clinical note, staff list, or material safety data sheet (MSDS).  Supporting information is not a contributing factor, preventive action, or mitigating action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the adverse event by the performer, subject or other participants.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdverseEvent.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distinguishes the type of involvement of the actor in the adverse event, such as contributor or informant.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what participated in the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdverseEvent.SuspectEntity">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="instance" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the actual instance of what caused the adverse event.  May be a substance, medication, medication administration, medication statement or a device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="causality" type="AdverseEvent.Causality" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information on the possible cause of the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and perhaps time) when the suspect entity occurred.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdverseEvent.Causality">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="assessmentMethod" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method of evaluating the relatedness of the suspected entity to the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entityRelatedness" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the assessment regarding the relatedness of the suspected entity to the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The author of the information on the possible cause of the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AdverseEventActualityEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="actual">
        <xs:annotation>
          <xs:documentation xml:lang="en">Adverse Event</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="potential">
        <xs:annotation>
          <xs:documentation xml:lang="en">Potential Adverse Event</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AdverseEventActuality">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AdverseEventActualityEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AdverseEventStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AdverseEventStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AdverseEventStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="AllergyIntolerance" type="AllergyIntolerance">
    <xs:annotation>
      <xs:documentation xml:lang="en">Risk of harmful or undesirable physiological response which is specific to an individual and associated with exposure to a substance.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="AllergyIntolerance">
    <xs:annotation>
      <xs:documentation xml:lang="en">Risk of harmful or undesirable physiological response which is specific to an individual and associated with exposure to a substance.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="clinicalStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The clinical status of the allergy or intolerance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="verificationStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identification of the underlying physiological mechanism for the reaction risk.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="AllergyIntoleranceCategory">
            <xs:annotation>
              <xs:documentation xml:lang="en">Category of the identified substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="criticality" minOccurs="0" maxOccurs="1" type="AllergyIntoleranceCriticality">
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., &quot;Latex&quot;), an allergy or intolerance condition (e.g., &quot;Latex allergy&quot;), or a negated/excluded code for a specific substance or class (e.g., &quot;No latex allergy&quot;) or a general or categorical negated statement (e.g.,  &quot;No known allergy&quot;, &quot;No known drug allergies&quot;).  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient who has the allergy or intolerance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The encounter when the allergy or intolerance was asserted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated or actual date,  date-time, or age when allergy or intolerance was identified.</xs:documentation>
            </xs:annotation>
            <xs:element name="onsetDateTime" type="dateTime"/>
            <xs:element name="onsetAge" type="Age"/>
            <xs:element name="onsetPeriod" type="Period"/>
            <xs:element name="onsetRange" type="Range"/>
            <xs:element name="onsetString" type="string"/>
          </xs:choice>
          <xs:element name="recordedDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual who recorded the record and takes responsibility for accurately recording its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asserter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The source of the information about the allergy that is recorded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReactionOccurrence" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Represents the date and/or time of the last known occurrence of a reaction event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reaction" type="AllergyIntolerance.Reaction" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details about each adverse reaction event linked to exposure to the identified substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AllergyIntolerance.Reaction">
    <xs:annotation>
      <xs:documentation xml:lang="en">Risk of harmful or undesirable physiological response which is specific to an individual and associated with exposure to a substance.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="substance" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manifestation" minOccurs="1" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text description about the reaction as a whole, including details of the manifestation if required.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="onset" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Record of the date and/or time of the onset of the Reaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="severity" minOccurs="0" maxOccurs="1" type="AllergyIntoleranceSeverity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="exposureRoute" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identification of the route by which the subject was exposed to the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional text about the adverse reaction event not captured in other fields.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AllergyIntoleranceCriticalityEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="low">
        <xs:annotation>
          <xs:documentation xml:lang="en">Low Risk</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="high">
        <xs:annotation>
          <xs:documentation xml:lang="en">High Risk</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unable-to-assess">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unable to Assess Risk</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AllergyIntoleranceCriticality">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AllergyIntoleranceCriticalityEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AllergyIntoleranceCategoryEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="food">
        <xs:annotation>
          <xs:documentation xml:lang="en">Food</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="medication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="environment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Environment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="biologic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Biologic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AllergyIntoleranceCategory">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AllergyIntoleranceCategoryEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AllergyIntoleranceSeverityEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="mild">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mild</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="moderate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Moderate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="severe">
        <xs:annotation>
          <xs:documentation xml:lang="en">Severe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AllergyIntoleranceSeverity">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AllergyIntoleranceSeverityEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Appointment" type="Appointment">
    <xs:annotation>
      <xs:documentation xml:lang="en">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Appointment">
    <xs:annotation>
      <xs:documentation xml:lang="en">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="AppointmentStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cancellationReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The coded reason for the appointment being cancelled. This is often used in reporting/billing/further processing to determine if further actions are required, or specific fees apply.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="class" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceCategory" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A broad categorization of the service that is to be performed during this appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceType" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific service that is to be performed during this appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialty" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specialty of a practitioner that would be required to perform the service requested in this appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appointmentType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The style of appointment or patient that has been booked in the slot (not service type).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the note field.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="replaces" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="virtualService" minOccurs="0" maxOccurs="unbounded" type="VirtualServiceDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Connection details of a virtual service (e.g. conference call).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInformation" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information to support the appointment provided when making the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="previousAppointment" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The previous appointment in a series of related appointments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="originatingAppointment" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The originating appointment in a recurring set of related appointments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="start" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date/Time that the appointment is to take place.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="end" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date/Time that the appointment is to conclude.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="minutesDuration" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of minutes that the appointment is to take. This can be less than the duration between the start and end times.  For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work.  Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestedPeriod" minOccurs="0" maxOccurs="unbounded" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.

The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="slot" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The slots from the participants' schedules that will be filled by the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="account" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of accounts that is expected to be used for billing the activities that result from this Appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cancellationDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date/time describing when the appointment was cancelled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional notes/comments about the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientInstruction" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The request this appointment is allocated to assess (e.g. incoming referral or procedure request).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="Appointment.Participant" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of participants involved in the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recurrenceId" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number that identifies a specific appointment in a recurring pattern.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="occurrenceChanged" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This appointment varies from the recurring pattern.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recurrenceTemplate" type="Appointment.RecurrenceTemplate" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The details of the recurrence pattern or template that is used to generate recurring appointments.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Appointment.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role of participant in the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Participation period of the actor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual, device, location, or service participating in the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="required" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this participant is required to be present at the meeting. If false, the participant is optional.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ParticipationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Participation status of the actor.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Appointment.RecurrenceTemplate">
    <xs:annotation>
      <xs:documentation xml:lang="en">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="timezone" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The timezone of the recurring appointment occurrences.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recurrenceType" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How often the appointment series should recur.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastOccurrenceDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Recurring appointments will not occur after this date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="occurrenceCount" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">How many appointments are planned in the recurrence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="occurrenceDate" minOccurs="0" maxOccurs="unbounded" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of specific dates that will have appointments generated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="weeklyTemplate" type="Appointment.WeeklyTemplate" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about weekly recurring appointments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="monthlyTemplate" type="Appointment.MonthlyTemplate" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about monthly recurring appointments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="yearlyTemplate" type="Appointment.YearlyTemplate" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about yearly recurring appointments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="excludingDate" minOccurs="0" maxOccurs="unbounded" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any dates, such as holidays, that should be excluded from the recurrence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="excludingRecurrenceId" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any dates, such as holidays, that should be excluded from the recurrence.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Appointment.WeeklyTemplate">
    <xs:annotation>
      <xs:documentation xml:lang="en">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="monday" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that recurring appointments should occur on Mondays.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tuesday" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that recurring appointments should occur on Tuesdays.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="wednesday" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that recurring appointments should occur on Wednesdays.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="thursday" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that recurring appointments should occur on Thursdays.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="friday" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that recurring appointments should occur on Fridays.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="saturday" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that recurring appointments should occur on Saturdays.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sunday" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that recurring appointments should occur on Sundays.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="weekInterval" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.

e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Appointment.MonthlyTemplate">
    <xs:annotation>
      <xs:documentation xml:lang="en">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="dayOfMonth" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="nthWeekOfMonth" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates which week within a month the appointments in the series of recurring appointments should occur on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dayOfWeek" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates which day of the week the recurring appointments should occur each nth week.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="monthInterval" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that recurring appointments should occur every nth month.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Appointment.YearlyTemplate">
    <xs:annotation>
      <xs:documentation xml:lang="en">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="yearInterval" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Appointment recurs every nth year.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AppointmentStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="proposed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Proposed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="pending">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="booked">
        <xs:annotation>
          <xs:documentation xml:lang="en">Booked</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="arrived">
        <xs:annotation>
          <xs:documentation xml:lang="en">Arrived</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="fulfilled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fulfilled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="noshow">
        <xs:annotation>
          <xs:documentation xml:lang="en">No Show</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="checked-in">
        <xs:annotation>
          <xs:documentation xml:lang="en">Checked In</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="waitlist">
        <xs:annotation>
          <xs:documentation xml:lang="en">Waitlisted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AppointmentStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AppointmentStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ParticipationStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="accepted">
        <xs:annotation>
          <xs:documentation xml:lang="en">Accepted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="declined">
        <xs:annotation>
          <xs:documentation xml:lang="en">Declined</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="tentative">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tentative</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="needs-action">
        <xs:annotation>
          <xs:documentation xml:lang="en">Needs Action</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ParticipationStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ParticipationStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="AppointmentResponse" type="AppointmentResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="AppointmentResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appointment" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Appointment that this response is replying to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="proposedNewTime" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that the response is proposing a different time that was initially requested.  The new proposed time will be indicated in the start and end properties.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="start" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date/Time that the appointment is to take place, or requested new start time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="end" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participantType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role of participant in the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Person, Location, HealthcareService, or Device that is participating in the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participantStatus" minOccurs="1" maxOccurs="1" type="AppointmentResponseStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional comments about the appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recurring" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that this AppointmentResponse applies to all occurrences in a recurring request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="occurrenceDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The original date within a recurring request. This could be used in place of the recurrenceId to be more direct (or where the template is provided through the simple list of dates in `Appointment.occurrenceDate`).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recurrenceId" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The recurrence ID (sequence number) of the specific appointment when responding to a recurring request.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AppointmentResponseStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="accepted">
        <xs:annotation>
          <xs:documentation xml:lang="en">Accepted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="declined">
        <xs:annotation>
          <xs:documentation xml:lang="en">Declined</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="tentative">
        <xs:annotation>
          <xs:documentation xml:lang="en">Tentative</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="needs-action">
        <xs:annotation>
          <xs:documentation xml:lang="en">Needs Action</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AppointmentResponseStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AppointmentResponseStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ArtifactAssessment" type="ArtifactAssessment">
    <xs:annotation>
      <xs:documentation xml:lang="en">This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ArtifactAssessment">
    <xs:annotation>
      <xs:documentation xml:lang="en">This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A label for use in displaying and selecting the artifact assessment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="citeAs" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Display of the bibliographic citation of the comment, classifier, or rating.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.</xs:documentation>
            </xs:annotation>
            <xs:element name="artifactReference" type="Reference"/>
            <xs:element name="artifactCanonical" type="canonical"/>
            <xs:element name="artifactUri" type="uri"/>
          </xs:choice>
          <xs:element name="relatesTo" type="ArtifactAssessment.RelatesTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relationship that this ArtifactAssessment has with other FHIR or non-FHIR resources that already exist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the artifact assessment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="content" type="ArtifactAssessment.Content" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A component comment, classifier, or rating of the artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="workflowStatus" minOccurs="0" maxOccurs="1" type="ArtifactAssessmentWorkflowStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the workflow status of the comment or change request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disposition" minOccurs="0" maxOccurs="1" type="ArtifactAssessmentDisposition">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the disposition of the responsible party to the comment or change request.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ArtifactAssessment.RelatesTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship to the related artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The artifact that is related to this ArtifactAssessment Resource.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetUri" type="uri"/>
            <xs:element name="targetAttachment" type="Attachment"/>
            <xs:element name="targetCanonical" type="canonical"/>
            <xs:element name="targetReference" type="Reference"/>
            <xs:element name="targetMarkdown" type="markdown"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ArtifactAssessment.Content">
    <xs:annotation>
      <xs:documentation xml:lang="en">This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="summary" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A brief summary of the content of this component.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what type of content this component represents.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Represents a rating, classifier, or assessment of the artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">A quantitative rating of the artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what authored the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="path" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatesTo" type="ArtifactAssessment.RelatesTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relationship that this content component has with other FHIR or non-FHIR resources that already exist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="freeToShare" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Acceptable to publicly share the comment, classifier or rating.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="ArtifactAssessment.Content" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A component comment, classifier, or rating of the artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ArtifactAssessmentDispositionEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="unresolved">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unresolved</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-persuasive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Persuasive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="persuasive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Persuasive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="persuasive-with-modification">
        <xs:annotation>
          <xs:documentation xml:lang="en">Persuasive with Modification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-persuasive-with-modification">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Persuasive with Modification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ArtifactAssessmentDisposition">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ArtifactAssessmentDispositionEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ArtifactAssessmentWorkflowStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="submitted">
        <xs:annotation>
          <xs:documentation xml:lang="en">Submitted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="triaged">
        <xs:annotation>
          <xs:documentation xml:lang="en">Triaged</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="waiting-for-input">
        <xs:annotation>
          <xs:documentation xml:lang="en">Waiting for Input</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="resolved-no-change">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resolved - No Change</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="resolved-change-required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resolved - Change Required</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="deferred">
        <xs:annotation>
          <xs:documentation xml:lang="en">Deferred</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="duplicate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Duplicate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="applied">
        <xs:annotation>
          <xs:documentation xml:lang="en">Applied</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="published">
        <xs:annotation>
          <xs:documentation xml:lang="en">Published</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ArtifactAssessmentWorkflowStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ArtifactAssessmentWorkflowStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="AuditEvent" type="AuditEvent">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="AuditEvent">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Partitions the audit event into one or more categories that can be used to filter searching, to govern access control and/or to guide system behavior.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subtype" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes what happened. The most specific codes for the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="action" minOccurs="0" maxOccurs="1" type="AuditEventAction">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicator for type of action performed during the event that generated the audit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="severity" minOccurs="0" maxOccurs="1" type="AuditEventSeverity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates and enables segmentation of various severity including debugging from critical.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The time or period during which the activity occurred.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurredPeriod" type="Period"/>
            <xs:element name="occurredDateTime" type="dateTime"/>
          </xs:choice>
          <xs:element name="recorded" minOccurs="1" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time when the event was recorded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" type="AuditEvent.Outcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the event succeeded or failed. A free text descripiton can be given in outcome.text.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorization" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The authorization (e.g., PurposeOfUse) that was used during the event being recorded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows tracing of authorization for the events and tracking whether proposals/recommendations were acted upon.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient element is available to enable deterministic tracking of activities that involve the patient as the subject of the data used in an activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This will typically be the encounter the event occurred, but some events MAY be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission lab tests).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="agent" type="AuditEvent.Agent" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An actor taking an active role in the event or activity that is logged.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" type="AuditEvent.Source" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actor that is reporting the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entity" type="AuditEvent.Entity" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific instances of data or objects that have been accessed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AuditEvent.Outcome">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the event succeeded or failed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional details about the error. This MAY be a text description of the error or a system code that identifies the error.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AuditEvent.Agent">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Functional Role of the user when performing the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The structural roles of the agent indicating the agent's competency. The security role enabling the agent with respect to the activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="who" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to who this agent is that was involved in the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestor" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicator that the user is or is not the requestor, or initiator, for the event being audited.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the agent location is known, the agent location when the event occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="policy" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the policy(ies) are known that authorized the agent participation in the event. Typically, a single activity MAY have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">When the event utilizes a network there SHOULD be an agent describing the local system, and an agent describing remote system, with the network interface details.</xs:documentation>
            </xs:annotation>
            <xs:element name="networkReference" type="Reference"/>
            <xs:element name="networkUri" type="uri"/>
            <xs:element name="networkString" type="string"/>
          </xs:choice>
          <xs:element name="authorization" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The authorization (e.g., PurposeOfUse) that was used during the event being recorded.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AuditEvent.Source">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="site" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Logical source location within the healthcare enterprise network.  For example, a hospital or other provider location within a multi-entity provider group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="observer" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier of the source where the event was detected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code specifying the type of source where event originated.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AuditEvent.Entity">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="what" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a specific instance of the entity. The reference SHOULD be version specific. This is allowed to be a Parameters resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code representing the role the entity played in the event being audited.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityLabel" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Security labels for the identified entity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text that describes the entity in more detail.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="query" minOccurs="0" maxOccurs="1" type="base64Binary">
            <xs:annotation>
              <xs:documentation xml:lang="en">The query parameters for a query-type entities.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" type="AuditEvent.Detail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Tagged value pairs for conveying additional information about the entity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="agent" type="AuditEvent.Agent" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity is attributed to an agent to express the agent's responsibility for that entity in the activity. This is most used to indicate when persistence media (the entity) are used by an agent. For example when importing data from a device, the device would be described in an entity, and the user importing data from that media would be indicated as the entity.agent.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AuditEvent.Detail">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of extra detail provided in the value. This element is the tag for the value. Where a simple string is used for the tag name, use the CodeableConcept.display element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The  value of the extra detail.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AuditEventActionEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="C">
        <xs:annotation>
          <xs:documentation xml:lang="en">Create</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="R">
        <xs:annotation>
          <xs:documentation xml:lang="en">Read</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="U">
        <xs:annotation>
          <xs:documentation xml:lang="en">Update</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="D">
        <xs:annotation>
          <xs:documentation xml:lang="en">Delete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="E">
        <xs:annotation>
          <xs:documentation xml:lang="en">Execute</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AuditEventAction">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicator for type of action performed during the event that generated the event.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AuditEventActionEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AuditEventSeverityEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="emergency">
        <xs:annotation>
          <xs:documentation xml:lang="en">Emergency</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="alert">
        <xs:annotation>
          <xs:documentation xml:lang="en">Alert</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="critical">
        <xs:annotation>
          <xs:documentation xml:lang="en">Critical</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="warning">
        <xs:annotation>
          <xs:documentation xml:lang="en">Warning</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="notice">
        <xs:annotation>
          <xs:documentation xml:lang="en">Notice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="informational">
        <xs:annotation>
          <xs:documentation xml:lang="en">Informational</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="debug">
        <xs:annotation>
          <xs:documentation xml:lang="en">Debug</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AuditEventSeverity">
    <xs:annotation>
      <xs:documentation xml:lang="en">The severity of the audit entry.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AuditEventSeverityEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Basic" type="Basic">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:element>
  <xs:complexType name="Basic">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier assigned to the resource for business purposes, outside the context of FHIR.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the 'type' of resource - equivalent to the resource name for other resources.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the patient, practitioner, device or any other resource that is the &quot;focus&quot; of this resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies when the resource was first created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who was responsible for creating the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Binary" type="Binary">
    <xs:annotation>
      <xs:documentation xml:lang="en">A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Binary">
    <xs:annotation>
      <xs:documentation xml:lang="en">A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Resource">
        <xs:sequence>
          <xs:element name="contentType" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">MimeType of the binary content represented as a standard MimeType (BCP 13).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityContext" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="data" minOccurs="0" maxOccurs="1" type="base64Binary">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual content, base64 encoded.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="BiologicallyDerivedProduct" type="BiologicallyDerivedProduct">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource reflects an instance of a biologically derived product. A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="BiologicallyDerivedProduct">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource reflects an instance of a biologically derived product. A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="productCategory" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A category or classification of the product.  Products may be assigned multiple categories, for example a human heart valve can be categorized as an 'MPHO' and 'tissue'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productCode" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A codified value that systematically supports characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parent" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Parent product (if any) for this biologically-derived product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Request to obtain and/or infuse this biologically derived product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique instance identifiers assigned to a biologically derived product. Note: This is a business identifier, not a resource identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="therapyIdentifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to multiple independent BiologicallyDerivedProduct instances that are intended to be administered in the course of the same given therapy. The presence of the same identifier on each BiologicallyDerivedProduct ties those products together.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="biologicalSourceEvent" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processingFacility" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Processing facilities responsible for the labeling and distribution of this biologically derived product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="division" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productStatus" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current status of the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expirationDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date, and where relevant time, of expiration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="collection" type="BiologicallyDerivedProduct.Collection" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">How this product was collected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="storageTempRequirements" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The temperature requirements for storage of the biologically-derived product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="BiologicallyDerivedProduct.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property that is specific to this BiologicallyDerviedProduct instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BiologicallyDerivedProduct.Collection">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource reflects an instance of a biologically derived product. A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="collector" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Healthcare professional who is performing the collection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourcePatient" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient providing the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourceOrganization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Time of product collection.</xs:documentation>
            </xs:annotation>
            <xs:element name="collectedDateTime" type="dateTime"/>
            <xs:element name="collectedPeriod" type="Period"/>
          </xs:choice>
          <xs:element name="procedure" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The procedure performed to collect the biologically derived product.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BiologicallyDerivedProduct.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource reflects an instance of a biologically derived product. A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that specifies the property. It should reference an established coding system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Property values.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="BodyStructure" type="BodyStructure">
    <xs:annotation>
      <xs:documentation xml:lang="en">Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="BodyStructure">
    <xs:annotation>
      <xs:documentation xml:lang="en">Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for this instance of the anatomical structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this body site is in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="includedStructure" type="BodyStructure.IncludedStructure" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The anatomical location(s) or region(s) of the specimen, lesion, or body structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="excludedStructure" type="BodyStructure.IncludedStructure" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The anatomical location(s) or region(s) not occupied or represented by the specimen, lesion, or body structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A summary, characterization or explanation of the body structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="image" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">Image(s) used to identify aspects of the overall structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person to which the body site belongs.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BodyStructure.IncludedStructure">
    <xs:annotation>
      <xs:documentation xml:lang="en">Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="structure" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that represents the included structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="laterality" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that represents the included structure laterality.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyLandmarkOrientation" type="BodyStructure.BodyLandmarkOrientation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Body location in relation to a specific body landmark (e.g., a body structure such a navel, scar, or implanted device).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="spatialReference" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">XY or XYZ-coordinate orientation for structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="image" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">Image(s) used to identify aspects of an included or excluded structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that represents the included structure qualifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="morphology" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BodyStructure.BodyLandmarkOrientation">
    <xs:annotation>
      <xs:documentation xml:lang="en">Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="landmarkDescription" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Body landmark description used as a reference to locate something else.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="clockFacePosition" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An description of the direction away from a landmark something is located based on a radial clock dial.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="distanceFromLandmark" type="BodyStructure.DistanceFromLandmark" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The distance in centimeters a certain observation is made from a body landmark.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="surfaceOrientation" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The surface area a body location is in relation to a landmark.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BodyStructure.DistanceFromLandmark">
    <xs:annotation>
      <xs:documentation xml:lang="en">Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="device" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An instrument, tool, analyzer, etc. used in the measurement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="0" maxOccurs="unbounded" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The measured distance (e.g., in cm) from a body landmark.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Bundle" type="Bundle">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for a collection of resources.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Bundle">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for a collection of resources.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Resource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A persistent identifier for the bundle that won't change as a bundle is copied from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="BundleType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the purpose of this bundle - how it is intended to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="timestamp" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="total" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">If a set of search matches or a history, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search.  It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="link" type="Bundle.Link" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A series of links that provide context to this bundle.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entry" type="Bundle.Entry" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="signature" minOccurs="0" maxOccurs="1" type="Signature">
            <xs:annotation>
              <xs:documentation xml:lang="en">Digital Signature: XML-DSig or JWS. This element is deprecated, and [Provenance based Signatures](signatures.html#Bundle) should be used instead.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issues" minOccurs="0" maxOccurs="1" type="ResourceContainer">
            <xs:annotation>
              <xs:documentation xml:lang="en">An OperationOutcome that captures issues and warnings that relate to the construction of the Bundle and the content within it.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Bundle.Link">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for a collection of resources.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="relation" minOccurs="1" maxOccurs="1" type="LinkRelationTypes">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reference details for the link.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Bundle.Entry">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for a collection of resources.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="link" type="Bundle.Link" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A series of links that provide context to this entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fullUrl" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value unless:
* the Bundle is a batch or transaction request or response AND
* the entry is
    * invoking a create
  * invoking or responding to an operation where the body is not a single identified resource
  * invoking or returning the results of a search or history operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" minOccurs="0" maxOccurs="1" type="ResourceContainer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="search" type="Bundle.Search" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the search process that lead to the creation of this entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" type="Bundle.Request" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information about how this entry should be processed as part of a transaction or batch.  For history, it shows how the entry was processed to create the version contained in the entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="response" type="Bundle.Response" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Bundle.Search">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for a collection of resources.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="mode" minOccurs="0" maxOccurs="1" type="SearchEntryMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="score" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">When searching, the server's search ranking score for the entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Bundle.Request">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for a collection of resources.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="method" minOccurs="1" maxOccurs="1" type="HTTPVerb">
            <xs:annotation>
              <xs:documentation xml:lang="en">In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The URL for this entry, relative to the root (the address to which the request is posted).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ifNoneMatch" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the ETag values match, return a 304 Not Modified status. See the API documentation for [&quot;Conditional Read&quot;](http.html#cread).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ifModifiedSince" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Only perform the operation if the last updated date matches. See the API documentation for [&quot;Conditional Read&quot;](http.html#cread).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ifMatch" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Only perform the operation if the Etag value matches. For more information, see the API section [&quot;Managing Resource Contention&quot;](http.html#concurrency).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ifNoneExist" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [&quot;Conditional Create&quot;](http.html#ccreate). This is just the query portion of the URL - what follows the &quot;?&quot; (not including the &quot;?&quot;).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Bundle.Response">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for a collection of resources.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location header created by processing this operation, populated if the operation returns a location.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="etag" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastModified" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date/time that the resource was modified on the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="1" type="ResourceContainer">
            <xs:annotation>
              <xs:documentation xml:lang="en">An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="HTTPVerbEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="GET">
        <xs:annotation>
          <xs:documentation xml:lang="en">GET</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HEAD">
        <xs:annotation>
          <xs:documentation xml:lang="en">HEAD</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="POST">
        <xs:annotation>
          <xs:documentation xml:lang="en">POST</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PUT">
        <xs:annotation>
          <xs:documentation xml:lang="en">PUT</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DELETE">
        <xs:annotation>
          <xs:documentation xml:lang="en">DELETE</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PATCH">
        <xs:annotation>
          <xs:documentation xml:lang="en">PATCH</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="HTTPVerb">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="HTTPVerbEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="BundleTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="document">
        <xs:annotation>
          <xs:documentation xml:lang="en">Document</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="message">
        <xs:annotation>
          <xs:documentation xml:lang="en">Message</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="transaction">
        <xs:annotation>
          <xs:documentation xml:lang="en">Transaction</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="transaction-response">
        <xs:annotation>
          <xs:documentation xml:lang="en">Transaction Response</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="batch">
        <xs:annotation>
          <xs:documentation xml:lang="en">Batch</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="batch-response">
        <xs:annotation>
          <xs:documentation xml:lang="en">Batch Response</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="history">
        <xs:annotation>
          <xs:documentation xml:lang="en">History List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="searchset">
        <xs:annotation>
          <xs:documentation xml:lang="en">Search Results</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="collection">
        <xs:annotation>
          <xs:documentation xml:lang="en">Collection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="subscription-notification">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subscription Notification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="BundleType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="BundleTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SearchEntryModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="match">
        <xs:annotation>
          <xs:documentation xml:lang="en">Match</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="include">
        <xs:annotation>
          <xs:documentation xml:lang="en">Include</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="outcome">
        <xs:annotation>
          <xs:documentation xml:lang="en">Outcome</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SearchEntryMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SearchEntryModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="LinkRelationTypesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="about">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that is the subject of the link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="acl">
        <xs:annotation>
          <xs:documentation xml:lang="en">Asserts that the link target provides an access control description for the link context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="alternate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a substitute for this context</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="amphtml">
        <xs:annotation>
          <xs:documentation xml:lang="en">Used to reference alternative content that uses the AMP profile of the HTML format.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appendix">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to an appendix.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="apple-touch-icon">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to an icon for the context. Synonym for icon.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="apple-touch-startup-image">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a launch screen for the context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="archives">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a collection of records, documents, or other
      materials of historical interest.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="author">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to the context's author.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="blocked-by">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies the entity that blocks access to a resource
      following receipt of a legal demand.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="bookmark">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gives a permanent link to use for bookmarking purposes.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="canonical">
        <xs:annotation>
          <xs:documentation xml:lang="en">Designates the preferred version of a resource (the IRI and its contents).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="chapter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a chapter in a collection of resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cite-as">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates that the link target is preferred over the link context for the purpose of permanent citation.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="collection">
        <xs:annotation>
          <xs:documentation xml:lang="en">The target IRI points to a resource which represents the collection resource for the context IRI.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="contents">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a table of contents.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="convertedFrom">
        <xs:annotation>
          <xs:documentation xml:lang="en">The document linked to was later converted to the
      document that contains this link relation.  For example, an RFC can
      have a link to the Internet-Draft that became the RFC; in that case,
      the link relation would be &quot;convertedFrom&quot;.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="copyright">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a copyright statement that applies to the
    link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="create-form">
        <xs:annotation>
          <xs:documentation xml:lang="en">The target IRI points to a resource where a submission form can be obtained.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="current">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource containing the most recent
      item(s) in a collection of resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="describedby">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource providing information about the
      link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="describes">
        <xs:annotation>
          <xs:documentation xml:lang="en">The relationship A 'describes' B asserts that
      resource A provides a description of resource B. There are no
      constraints on the format or representation of either A or B,
      neither are there any further constraints on either resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="disclosure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a list of patent disclosures made with respect to 
      material for which 'disclosure' relation is specified.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dns-prefetch">
        <xs:annotation>
          <xs:documentation xml:lang="en">Used to indicate an origin that will be used to fetch required 
      resources for the link context, and that the user agent ought to resolve 
      as early as possible.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="duplicate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource whose available representations
      are byte-for-byte identical with the corresponding representations of
      the context IRI.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="edit">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that can be used to edit the
      link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="edit-form">
        <xs:annotation>
          <xs:documentation xml:lang="en">The target IRI points to a resource where a submission form for
      editing associated resource can be obtained.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="edit-media">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that can be used to edit media
      associated with the link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="enclosure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies a related resource that is potentially
      large and might require special handling.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="external">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that is not part of the same site as the current context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="first">
        <xs:annotation>
          <xs:documentation xml:lang="en">An IRI that refers to the furthest preceding resource
    in a series of resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="glossary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a glossary of terms.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="help">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to context-sensitive help.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="hosts">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource hosted by the server indicated by
      the link context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="hub">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a hub that enables registration for
    notification of updates to the context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="icon">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to an icon representing the link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="index">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to an index.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalAfter">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that ends before the beginning of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalBefore">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalContains">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalDisjoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource, or ends before the beginning of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalDuring">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalEquals">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalFinishedBy">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalFinishes">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalIn">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins before or is coincident with the beginning of the time interval associated with the context resource, and ends after or is coincident with the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalMeets">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval whose beginning coincides with the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalMetBy">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval whose end coincides with the beginning of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalOverlappedBy">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the beginning of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalOverlaps">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval that begins before the end of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalStartedBy">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="intervalStarts">
        <xs:annotation>
          <xs:documentation xml:lang="en">refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="item">
        <xs:annotation>
          <xs:documentation xml:lang="en">The target IRI points to a resource that is a member of the collection represented by the context IRI.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="last">
        <xs:annotation>
          <xs:documentation xml:lang="en">An IRI that refers to the furthest following resource
      in a series of resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="latest-version">
        <xs:annotation>
          <xs:documentation xml:lang="en">Points to a resource containing the latest (e.g.,
      current) version of the context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="license">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a license associated with this context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="linkset">
        <xs:annotation>
          <xs:documentation xml:lang="en">The link target of a link with the &quot;linkset&quot; relation
      type provides a set of links, including links in which the link
      context of the link participates.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="lrdd">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to further information about the link's context,
      expressed as a LRDD (&quot;Link-based Resource Descriptor Document&quot;)
      resource.  See  for information about
      processing this relation type in host-meta documents. When used
      elsewhere, it refers to additional links and other metadata.
      Multiple instances indicate additional LRDD resources. LRDD
      resources MUST have an &quot;application/xrd+xml&quot; representation, and
      MAY have others.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="manifest">
        <xs:annotation>
          <xs:documentation xml:lang="en">Links to a manifest file for the context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mask-icon">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a mask that can be applied to the icon for the context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="media-feed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a feed of personalised media recommendations relevant to the link context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="memento">
        <xs:annotation>
          <xs:documentation xml:lang="en">The Target IRI points to a Memento, a fixed resource that will not change state anymore.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="micropub">
        <xs:annotation>
          <xs:documentation xml:lang="en">Links to the context's Micropub endpoint.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="modulepreload">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a module that the user agent is to preemptively fetch and store for use in the current context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="monitor">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that can be used to monitor changes in an HTTP resource.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="monitor-group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="next">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates that the link's context is a part of a series, and
      that the next in the series is the link target.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="next-archive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to the immediately following archive resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="nofollow">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates that the context’s original author or publisher does not endorse the link target.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="noopener">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates that any newly created top-level browsing context which results from following the link will not be an auxiliary browsing context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="noreferrer">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates that no referrer information is to be leaked when following the link.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="opener">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates that any newly created top-level browsing context which results from following the link will be an auxiliary browsing context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="openid2.local_id">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to an OpenID Authentication server on which the context relies for an assertion that the end user controls an Identifier.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="openid2.provider">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource which accepts OpenID Authentication protocol messages for the context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="original">
        <xs:annotation>
          <xs:documentation xml:lang="en">The Target IRI points to an Original Resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="P3Pv1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a P3P privacy policy for the context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="payment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates a resource where payment is accepted.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="pingback">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gives the address of the pingback resource for the link context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preconnect">
        <xs:annotation>
          <xs:documentation xml:lang="en">Used to indicate an origin that will be used to fetch required 
      resources for the link context. Initiating an early connection, which 
      includes the DNS lookup, TCP handshake, and optional TLS negotiation, 
      allows the user agent to mask the high latency costs of establishing a 
      connection.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="predecessor-version">
        <xs:annotation>
          <xs:documentation xml:lang="en">Points to a resource containing the predecessor
      version in the version history.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="prefetch">
        <xs:annotation>
          <xs:documentation xml:lang="en">The prefetch link relation type is used to identify a resource 
      that might be required by the next navigation from the link context, and 
      that the user agent ought to fetch, such that the user agent can deliver a 
      faster response once the resource is requested in the future.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preload">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that should be loaded early in the 
      processing of the link's context, without blocking rendering.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="prerender">
        <xs:annotation>
          <xs:documentation xml:lang="en">Used to identify a resource that might be required by the next 
      navigation from the link context, and that the user agent ought to fetch 
      and execute, such that the user agent can deliver a faster response once 
      the resource is requested in the future.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="prev">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates that the link's context is a part of a series, and
      that the previous in the series is the link target.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preview">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that provides a preview of the link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="previous">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to the previous resource in an ordered series
      of resources.  Synonym for &quot;prev&quot;.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="prev-archive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to the immediately preceding archive resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="privacy-policy">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a privacy policy associated with the link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="profile">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifying that a resource representation conforms
to a certain profile, without affecting the non-profile semantics
of the resource representation.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="publication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Links to a publication manifest. A manifest represents 
      structured information about a publication, such as informative metadata, 
      a list of resources, and a default reading order.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="related">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies a related resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="restconf">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies the root of RESTCONF API as configured on this HTTP server.
      The &quot;restconf&quot; relation defines the root of the API defined in RFC8040.
      Subsequent revisions of RESTCONF will use alternate relation values to support 
      protocol versioning.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="replies">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies a resource that is a reply to the context
      of the link.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ruleinput">
        <xs:annotation>
          <xs:documentation xml:lang="en">The resource identified by the link target provides an input value to an 
    instance of a rule, where the resource which represents the rule instance is 
    identified by the link context.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="search">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that can be used to search through
      the link's context and related resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="section">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a section in a collection of resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="self">
        <xs:annotation>
          <xs:documentation xml:lang="en">Conveys an identifier for the link's context.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="service">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indicates a URI that can be used to retrieve a
      service document.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="service-desc">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies service description for the context that
      is primarily intended for consumption by machines.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="service-doc">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies service documentation for the context that
      is primarily intended for human consumption.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="service-meta">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies general metadata for the context that is
      primarily intended for consumption by machines.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="sponsored">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that is within a context that is 
		sponsored (such as advertising or another compensation agreement).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="start">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to the first resource in a collection of
      resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="status">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies a resource that represents the context's
      status.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="stylesheet">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a stylesheet.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="subsection">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource serving as a subsection in a
      collection of resources.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="successor-version">
        <xs:annotation>
          <xs:documentation xml:lang="en">Points to a resource containing the successor version
      in the version history.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="sunset">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies a resource that provides information about
      the context's retirement policy.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="tag">
        <xs:annotation>
          <xs:documentation xml:lang="en">Gives a tag (identified by the given address) that applies to
      the current document.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="terms-of-service">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to the terms of service associated with the link's context.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="timegate">
        <xs:annotation>
          <xs:documentation xml:lang="en">The Target IRI points to a TimeGate for an Original Resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="timemap">
        <xs:annotation>
          <xs:documentation xml:lang="en">The Target IRI points to a TimeMap for an Original Resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ugc">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a resource that is within a context that is User Generated Content.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="up">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refers to a parent document in a hierarchy of
      documents.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="version-history">
        <xs:annotation>
          <xs:documentation xml:lang="en">Points to a resource containing the version history
      for the context.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="via">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies a resource that is the source of the
      information in the link's context.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="webmention">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifies a target URI that supports the Webmention protocol.
    This allows clients that mention a resource in some form of publishing process
    to contact that endpoint and inform it that this resource has been mentioned.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="working-copy">
        <xs:annotation>
          <xs:documentation xml:lang="en">Points to a working copy for this resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="working-copy-of">
        <xs:annotation>
          <xs:documentation xml:lang="en">Points to the versioned resource from which this
      working copy was obtained.
    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="LinkRelationTypes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="LinkRelationTypesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CapabilityStatement" type="CapabilityStatement">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CapabilityStatement">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this CapabilityStatement when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the capability statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this capability statement. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the capability statement was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the capability statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate capability statement instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actorDefinition" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">ActorDefinitions to describe the specific sets of functionality supported by (or that should be supported by) systems (via obligations).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this capability statement is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the capability statement and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the capability statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="kind" minOccurs="1" maxOccurs="1" type="CapabilityStatementKind">
            <xs:annotation>
              <xs:documentation xml:lang="en">The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instantiates" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="imports" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="software" type="CapabilityStatement.Software" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="implementation" type="CapabilityStatement.Implementation" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fhirVersion" minOccurs="1" maxOccurs="1" type="FHIRVersion">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="format" minOccurs="1" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of the formats supported by this implementation using their content types.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patchFormat" minOccurs="0" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of the patch formats supported by this implementation using their content types.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="acceptLanguage" minOccurs="0" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of the languages supported by this implementation that are usefully supported in the ```Accept-Language``` header.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="implementationGuide" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of implementation guides that the server does (or should) support in their entirety.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rest" type="CapabilityStatement.Rest" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A definition of the restful capabilities of the solution, if any.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="messaging" type="CapabilityStatement.Messaging" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the messaging capabilities of the solution.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="document" type="CapabilityStatement.Document" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A document definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Software">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name the software is known by.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version identifier for the software covered by this statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="releaseDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date this version of the software was released.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Implementation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="1" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the specific installation that this capability statement relates to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="custodian" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Rest">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="RestfulCapabilityMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies whether this portion of the statement is describing the ability to initiate or receive restful interactions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the system's restful capabilities that apply across all applications, such as security.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="security" type="CapabilityStatement.Security" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about security implementation from an interface perspective - what a client needs to know.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" type="CapabilityStatement.Resource" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A specification of the restful capabilities of the solution for a specific resource type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interaction" type="CapabilityStatement.Interaction1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A specification of restful operations supported by the system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="searchParam" type="CapabilityStatement.SearchParam" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation. This is only for searches executed against the system-level endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operation" type="CapabilityStatement.Operation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Definition of an operation or a named query together with its parameters and their meaning and type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="compartment" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Security">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="cors" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Server adds CORS headers when responding to requests - this enables Javascript applications to use the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="service" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Types of security services that are supported/required by the system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">General description of how security works.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Resource">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">A relative URL, in which case it is a type of resource exposed via the restful interface, either a resource defined in this specification, or an [additional resource](resource.html#additional), or else a full URL referring to some other type that specialises the base resource (e.g. a custom resource).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The definition of the resource, if the resource is an additional resource. If it is not an additional resource, then this element must not be present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profile" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A system-wide profile that is applied across *all* instances of the resource supported by the system. For example, if declared on Observation, this profile is the &quot;superset&quot; of capabilities for laboratory *and* vitals *and* other domains. See further discussion in [Using Profiles](profiling.html#profile-uses).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportedProfile" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of profiles representing different use cases the system hosts/produces. A supported profile is a statement about the functionality of the data and services provided by the server (or the client) for supported use cases. For example, a system can define and declare multiple Observation profiles for laboratory observations, vital sign observations, etc. By declaring supported profiles, systems provide a way to determine whether individual resources are conformant. See further discussion in [Using Profiles](profiling.html#profile-uses).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information about the resource type used by the system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interaction" type="CapabilityStatement.Interaction" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a restful interaction supported by the solution.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="versioning" minOccurs="0" maxOccurs="1" type="ResourceVersionPolicy">
            <xs:annotation>
              <xs:documentation xml:lang="en">This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="readHistory" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag for whether the server is able to return past versions as part of the vRead interaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="updateCreate" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this interaction means that the server allows the client to create new identities on the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conditionalCreate" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag that indicates that the server supports conditional create.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conditionalRead" minOccurs="0" maxOccurs="1" type="ConditionalReadStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that indicates how the server supports conditional read.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conditionalUpdate" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag that indicates that the server supports conditional update.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conditionalPatch" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag that indicates that the server supports conditional patch.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conditionalDelete" minOccurs="0" maxOccurs="1" type="ConditionalDeleteStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that indicates how the server supports conditional delete.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referencePolicy" minOccurs="0" maxOccurs="unbounded" type="ReferenceHandlingPolicy">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of flags that defines how references are supported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="searchInclude" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of _include values supported by the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="searchRevInclude" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of _revinclude (reverse include) values supported by the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="searchParam" type="CapabilityStatement.SearchParam" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operation" type="CapabilityStatement.Operation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Interaction">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="TypeRestfulInteraction">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded identifier of the interaction, supported by the system resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Guidance specific to the implementation of this interaction, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.SearchParam">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The label used for the search parameter in this particular system's API - i.e. the 'name' portion of the name-value pair that will appear as part of the search URL.  This SHOULD be the same as the SearchParameter.code of the defining SearchParameter.  However, it can sometimes differ if necessary to disambiguate when a server supports multiple SearchParameters that happen to share the same code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="SearchParamType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of value a search parameter refers to, and how the content is interpreted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Operation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the operation or query. For an operation, this name is prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called. This SHOULD be the same as the OperationDefinition.code of the defining OperationDefinition.  However, it can sometimes differ if necessary to disambiguate when a server supports multiple OperationDefinition that happen to share the same code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Interaction1">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="SystemRestfulInteraction">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded identifier of the interaction, supported by the system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Guidance specific to the implementation of this interaction, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Messaging">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="endpoint" type="CapabilityStatement.Endpoint" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An endpoint (network accessible address) to which messages and/or replies are to be sent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reliableCache" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportedMessage" type="CapabilityStatement.SupportedMessage" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">References to message definitions for messages this system can send or receive.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Endpoint">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="protocol" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of the messaging transport protocol(s) identifiers, supported by this endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="address" minOccurs="1" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.SupportedMessage">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="EventCapabilityMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">The mode of this event declaration - whether application is sender or receiver.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CapabilityStatement.Document">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="DocumentMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Mode of this document declaration - whether an application is a producer or consumer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profile" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A profile on the document Bundle that constrains which resources are present, and their contents.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CapabilityStatementKindEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="instance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Instance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="capability">
        <xs:annotation>
          <xs:documentation xml:lang="en">Capability</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CapabilityStatementKind">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CapabilityStatementKindEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EventCapabilityModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="sender">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sender</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="receiver">
        <xs:annotation>
          <xs:documentation xml:lang="en">Receiver</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EventCapabilityMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EventCapabilityModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ResourceVersionPolicyEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="no-version">
        <xs:annotation>
          <xs:documentation xml:lang="en">No VersionId Support</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="versioned">
        <xs:annotation>
          <xs:documentation xml:lang="en">Versioned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="versioned-update">
        <xs:annotation>
          <xs:documentation xml:lang="en">VersionId tracked fully</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ResourceVersionPolicy">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ResourceVersionPolicyEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DocumentModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="producer">
        <xs:annotation>
          <xs:documentation xml:lang="en">Producer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="consumer">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consumer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DocumentMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DocumentModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="RestfulCapabilityModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="client">
        <xs:annotation>
          <xs:documentation xml:lang="en">Client</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="server">
        <xs:annotation>
          <xs:documentation xml:lang="en">Server</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RestfulCapabilityMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="RestfulCapabilityModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="TypeRestfulInteractionEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="read">
        <xs:annotation>
          <xs:documentation xml:lang="en">read</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="vread">
        <xs:annotation>
          <xs:documentation xml:lang="en">vread</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="update">
        <xs:annotation>
          <xs:documentation xml:lang="en">update</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="update-conditional">
        <xs:annotation>
          <xs:documentation xml:lang="en">update-conditional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="patch">
        <xs:annotation>
          <xs:documentation xml:lang="en">patch</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="patch-conditional">
        <xs:annotation>
          <xs:documentation xml:lang="en">patch-conditional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="delete">
        <xs:annotation>
          <xs:documentation xml:lang="en">delete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="delete-conditional-single">
        <xs:annotation>
          <xs:documentation xml:lang="en">delete-conditional-single</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="delete-conditional-multiple">
        <xs:annotation>
          <xs:documentation xml:lang="en">delete-conditional-multiple</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="delete-history">
        <xs:annotation>
          <xs:documentation xml:lang="en">delete-history</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="delete-history-version">
        <xs:annotation>
          <xs:documentation xml:lang="en">delete-history-version</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="history-instance">
        <xs:annotation>
          <xs:documentation xml:lang="en">history-instance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="history-type">
        <xs:annotation>
          <xs:documentation xml:lang="en">history-type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="create">
        <xs:annotation>
          <xs:documentation xml:lang="en">create</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="create-conditional">
        <xs:annotation>
          <xs:documentation xml:lang="en">create-conditional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="search-type">
        <xs:annotation>
          <xs:documentation xml:lang="en">search-type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="TypeRestfulInteraction">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="TypeRestfulInteractionEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SystemRestfulInteractionEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="transaction">
        <xs:annotation>
          <xs:documentation xml:lang="en">transaction</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="batch">
        <xs:annotation>
          <xs:documentation xml:lang="en">batch</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="search-system">
        <xs:annotation>
          <xs:documentation xml:lang="en">search-system</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="history-system">
        <xs:annotation>
          <xs:documentation xml:lang="en">history-system</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SystemRestfulInteraction">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SystemRestfulInteractionEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConditionalReadStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="not-supported">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Supported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="modified-since">
        <xs:annotation>
          <xs:documentation xml:lang="en">If-Modified-Since</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-match">
        <xs:annotation>
          <xs:documentation xml:lang="en">If-None-Match</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="full-support">
        <xs:annotation>
          <xs:documentation xml:lang="en">Full Support</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConditionalReadStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConditionalReadStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ReferenceHandlingPolicyEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="literal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Literal References</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="logical">
        <xs:annotation>
          <xs:documentation xml:lang="en">Logical References</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="resolves">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resolves References</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="enforced">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reference Integrity Enforced</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="local">
        <xs:annotation>
          <xs:documentation xml:lang="en">Local References Only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ReferenceHandlingPolicy">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ReferenceHandlingPolicyEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConditionalDeleteStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="not-supported">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Supported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="single">
        <xs:annotation>
          <xs:documentation xml:lang="en">Single Deletes Supported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="multiple">
        <xs:annotation>
          <xs:documentation xml:lang="en">Multiple Deletes Supported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConditionalDeleteStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConditionalDeleteStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CarePlan" type="CarePlan">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CarePlan">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="replaces" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Completed or terminated care plan whose function is taken by this new care plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A larger care plan of which this particular care plan is a component or step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="RequestStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="CarePlanIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies what &quot;kind&quot; of plan this is to support differentiation between multiple co-existing plans; e.g. &quot;Home health&quot;, &quot;psychiatric&quot;, &quot;asthma&quot;, &quot;disease management&quot;, &quot;wellness plan&quot;, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human-friendly name for the care plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the scope and nature of the plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the patient or group whose intended care is described by the plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates when the plan did (or is intended to) come into effect and end.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Represents when this particular CarePlan record was created in the system, which is often a system-generated date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="custodian" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contributor" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the individual(s), organization or device who provided the contents of the care plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="careTeam" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="addresses" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="goal" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the intended objective(s) of carrying out the care plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="activity" type="CarePlan.Activity" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">General notes about the care plan not covered elsewhere.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CarePlan.Activity">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="performedActivity" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an &quot;event&quot; resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using the CarePlan.activity.plannedActivityReference (a reference to a “request” resource).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="progress" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Notes about the adherence/status/progress of the activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="plannedActivityReference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The details of the proposed activity represented in a specific resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CarePlanIntentEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="proposal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Proposal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="plan">
        <xs:annotation>
          <xs:documentation xml:lang="en">Plan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="option">
        <xs:annotation>
          <xs:documentation xml:lang="en">Option</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="directive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Directive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CarePlanIntent">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CarePlanIntentEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="RequestStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">Draft</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="revoked">
        <xs:annotation>
          <xs:documentation xml:lang="en">Revoked</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RequestStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="RequestStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CareTeam" type="CareTeam">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Care Team includes all the people, organizations, and care teams who participate or plan to participate in the coordination and delivery of care.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CareTeam">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Care Team includes all the people, organizations, and care teams who participate or plan to participate in the coordination and delivery of care.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CareTeamStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the current state of the care team.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A label for human use intended to distinguish like teams.  E.g. the &quot;red&quot; vs. &quot;green&quot; trauma teams.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the patient or group whose intended care is handled by the team.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates when the team did (or is intended to) come into effect and end.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="CareTeam.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies all people and organizations who are expected to be involved in the care team.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes why the care team exists.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingOrganization" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization responsible for the care team.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="telecom" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">A central contact detail for the care team (that applies to all members).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the CareTeam.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CareTeam.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Care Team includes all the people, organizations, and care teams who participate or plan to participate in the coordination and delivery of care.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates specific responsibility of an individual within the care team, such as &quot;Primary care physician&quot;, &quot;Trained social worker counselor&quot;, &quot;Caregiver&quot;, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="member" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific person or organization who is participating/expected to participate in the care team.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="onBehalfOf" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Entity that the participant is acting as a proxy of, or an agent of, or in the interest of, or as a representative of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">When the member is generally available within this care team.</xs:documentation>
            </xs:annotation>
            <xs:element name="effectivePeriod" type="Period"/>
            <xs:element name="effectiveTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The basis for the member's role participation in care team.  For example, supporting documentation that establishes legal power of attorney or court ordered guardianship.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CareTeamStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="proposed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Proposed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="suspended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Suspended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CareTeamStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CareTeamStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Claim" type="Claim">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Claim">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The category of claim, e.g. oral, pharmacy, vision, institutional, professional.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="1" maxOccurs="1" type="Use">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party/group to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="billablePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period for which charges are being submitted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enterer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual who created the claim, predetermination or preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Insurer who is target of the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider which is responsible for the claim, predetermination or preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider-required urgency of processing the request. Typical values include: stat, normal, deferred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fundsReserve" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate whether and for whom funds are to be reserved for future claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="related" type="Claim.Related" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prescription" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="originalPrescription" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payee" type="Claim.Payee" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party to be reimbursed for cost of the products and services according to the terms of the policy.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referral" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Healthcare encounters related to this claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="facility" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Facility where the services were provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosisRelatedGroup" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" type="Claim.Event" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information code for an event with a corresponding date or period.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="careTeam" type="Claim.CareTeam" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The members of the team who provided the products and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" type="Claim.SupportingInfo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosis" type="Claim.Diagnosis" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about diagnoses relevant to the claim items.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedure" type="Claim.Procedure" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Procedures performed on the patient relevant to the billing items with the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" type="Claim.Insurance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Financial instruments for reimbursement for the health care products and services specified on the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="accident" type="Claim.Accident" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details of an accident which resulted in injuries which required the products and services listed in the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="Claim.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim line. Either a simple  product or service or a 'group' of details which can each be a simple items or groups of sub-details.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="total" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total value of the all the items in the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Related">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="claim" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to a related claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to convey how the claims are related.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An alternate organizational reference to the case or file to which this particular claim pertains.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Payee">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of Party to be reimbursed: subscriber, provider, other.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="party" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the individual or organization to whom any payment will be made.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Event">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded event such as when a service is expected or a card printed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A date or period in the past or future indicating when the event occurred or is expectd to occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="whenDateTime" type="dateTime"/>
            <xs:element name="whenPeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.CareTeam">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify care team entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Member of the team who provided the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialty" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specialization of the practitioner or provider which is applicable for this service.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.SupportingInfo">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify supporting information entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The general class of the information supplied: information; exception; accident, employment; onset, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subCategory" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A finer classification within the more general category.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when or period to which this information refers.</xs:documentation>
            </xs:annotation>
            <xs:element name="timingDateTime" type="dateTime"/>
            <xs:element name="timingPeriod" type="Period"/>
            <xs:element name="timingTiming" type="Timing"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueCanonical" type="canonical"/>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueId" type="id"/>
            <xs:element name="valueInstant" type="instant"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueInteger64" type="integer64"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueOid" type="oid"/>
            <xs:element name="valuePositiveInt" type="positiveInt"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueUnsignedInt" type="unsignedInt"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueUrl" type="url"/>
            <xs:element name="valueUuid" type="uuid"/>
            <xs:element name="valueAddress" type="Address"/>
            <xs:element name="valueAge" type="Age"/>
            <xs:element name="valueAnnotation" type="Annotation"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueCodeableReference" type="CodeableReference"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueContactPoint" type="ContactPoint"/>
            <xs:element name="valueCount" type="Count"/>
            <xs:element name="valueDistance" type="Distance"/>
            <xs:element name="valueDuration" type="Duration"/>
            <xs:element name="valueHumanName" type="HumanName"/>
            <xs:element name="valueIdentifier" type="Identifier"/>
            <xs:element name="valueMoney" type="Money"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueRatioRange" type="RatioRange"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueSignature" type="Signature"/>
            <xs:element name="valueTiming" type="Timing"/>
            <xs:element name="valueContactDetail" type="ContactDetail"/>
            <xs:element name="valueDataRequirement" type="DataRequirement"/>
            <xs:element name="valueExpression" type="Expression"/>
            <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
            <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
            <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
            <xs:element name="valueUsageContext" type="UsageContext"/>
            <xs:element name="valueAvailability" type="Availability"/>
            <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
            <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
            <xs:element name="valueDosage" type="Dosage"/>
            <xs:element name="valueMeta" type="Meta"/>
          </xs:choice>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides the reason in the situation where a reason code is required in addition to the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Diagnosis">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify diagnosis entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The nature of illness or problem in a coded form or as a reference to an external defined Condition.</xs:documentation>
            </xs:annotation>
            <xs:element name="diagnosisCodeableConcept" type="CodeableConcept"/>
            <xs:element name="diagnosisReference" type="Reference"/>
          </xs:choice>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the condition was observed or the relative ranking.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="onAdmission" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indication of whether the diagnosis was present on admission to a facility.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Procedure">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify procedure entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the condition was observed or the relative ranking.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date and optionally time the procedure was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The code or reference to a Procedure resource which identifies the clinical intervention performed.</xs:documentation>
            </xs:annotation>
            <xs:element name="procedureCodeableConcept" type="CodeableConcept"/>
            <xs:element name="procedureReference" type="Reference"/>
          </xs:choice>
          <xs:element name="udi" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifiers associated with this line item.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Insurance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focal" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business identifier to be used when the claim is sent for adjudication against this insurance policy.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverage" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="businessArrangement" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A business agreement number established between the provider and the insurer for special business processing purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="claimResponse" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the adjudication of the line items for the Coverage specified in this insurance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Accident">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="date" minOccurs="1" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date of an accident event  related to the products and services contained in the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The physical location of the accident event.</xs:documentation>
            </xs:annotation>
            <xs:element name="locationAddress" type="Address"/>
            <xs:element name="locationReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify item entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="careTeamSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">CareTeam members related to this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosisSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Diagnosis applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedureSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Procedures applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exceptions, special conditions and supporting information applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Request or Referral for Goods or Service to be rendered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or dates when the service or product was supplied, performed or completed.</xs:documentation>
            </xs:annotation>
            <xs:element name="servicedDate" type="date"/>
            <xs:element name="servicedPeriod" type="Period"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the product or service was provided.</xs:documentation>
            </xs:annotation>
            <xs:element name="locationCodeableConcept" type="CodeableConcept"/>
            <xs:element name="locationAddress" type="Address"/>
            <xs:element name="locationReference" type="Reference"/>
          </xs:choice>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udi" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifiers associated with this line item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" type="Claim.BodySite" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical location where the service is performed or applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Healthcare encounters related to this claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" type="Claim.Detail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.BodySite">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="site" minOccurs="1" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical service site on the patient (limb, tooth, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subSite" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A region or surface of the bodySite, e.g. limb region or tooth surface(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.Detail">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify item entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udi" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifiers associated with this line item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetail" type="Claim.SubDetail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Claim.SubDetail">
    <xs:annotation>
      <xs:documentation xml:lang="en">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify item entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for line item.detail.subDetail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udi" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifiers associated with this line item.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="UseEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="claim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Claim</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preauthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preauthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="predetermination">
        <xs:annotation>
          <xs:documentation xml:lang="en">Predetermination</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Use">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="UseEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FinancialResourceStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">Draft</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FinancialResourceStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="FinancialResourceStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ClaimResponse" type="ClaimResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ClaimResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this claim response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="1" maxOccurs="1" type="Use">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party/group to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party responsible for authorization, adjudication and reimbursement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider which is responsible for the claim, predetermination or preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Original request resource reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="1" maxOccurs="1" type="ClaimProcessingCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The outcome of the claim, predetermination, or preauthorization processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decision" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disposition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human readable description of the status of the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference from the Insurer which is used in later communications which refers to this adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time frame during which this authorization is effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" type="ClaimResponse.Event" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information code for an event with a corresponding date or period.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payeeType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of Party to be reimbursed: subscriber, billing provider, other.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Healthcare encounters related to this claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosisRelatedGroup" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" type="ClaimResponse.SupportingInfo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="ClaimResponse.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="addItem" type="ClaimResponse.AddItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The first-tier service adjudications for payer added product or service lines.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results which are presented at the header level rather than at the line-item or add-item levels.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="total" type="ClaimResponse.Total" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Categorized monetary totals for the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payment" type="ClaimResponse.Payment" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Payment details for the adjudication of the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fundsReserve" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="formCode" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code for the form to be used for printing the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="form" minOccurs="0" maxOccurs="1" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual form, by reference or inclusion, for printing the content or an EOB.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processNote" type="ClaimResponse.ProcessNote" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A note that describes or explains adjudication results in a human readable form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communicationRequest" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Request for additional supporting or authorizing information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" type="ClaimResponse.Insurance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Financial instruments for reimbursement for the health care products and services specified on the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="error" type="ClaimResponse.Error" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Errors encountered during the processing of the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Event">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded event such as when a service is expected or a card printed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A date or period in the past or future indicating when the event occurred or is expectd to occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="whenDateTime" type="dateTime"/>
            <xs:element name="whenPeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.SupportingInfo">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify supporting information entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The general class of the information supplied: information; exception; accident, employment; onset, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when or period to which this information refers.</xs:documentation>
            </xs:annotation>
            <xs:element name="timingDateTime" type="dateTime"/>
            <xs:element name="timingPeriod" type="Period"/>
            <xs:element name="timingTiming" type="Timing"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueCanonical" type="canonical"/>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueId" type="id"/>
            <xs:element name="valueInstant" type="instant"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueInteger64" type="integer64"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueOid" type="oid"/>
            <xs:element name="valuePositiveInt" type="positiveInt"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueUnsignedInt" type="unsignedInt"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueUrl" type="url"/>
            <xs:element name="valueUuid" type="uuid"/>
            <xs:element name="valueAddress" type="Address"/>
            <xs:element name="valueAge" type="Age"/>
            <xs:element name="valueAnnotation" type="Annotation"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueCodeableReference" type="CodeableReference"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueContactPoint" type="ContactPoint"/>
            <xs:element name="valueCount" type="Count"/>
            <xs:element name="valueDistance" type="Distance"/>
            <xs:element name="valueDuration" type="Duration"/>
            <xs:element name="valueHumanName" type="HumanName"/>
            <xs:element name="valueIdentifier" type="Identifier"/>
            <xs:element name="valueMoney" type="Money"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueRatioRange" type="RatioRange"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueSignature" type="Signature"/>
            <xs:element name="valueTiming" type="Timing"/>
            <xs:element name="valueContactDetail" type="ContactDetail"/>
            <xs:element name="valueDataRequirement" type="DataRequirement"/>
            <xs:element name="valueExpression" type="Expression"/>
            <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
            <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
            <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
            <xs:element name="valueUsageContext" type="UsageContext"/>
            <xs:element name="valueAvailability" type="Availability"/>
            <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
            <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
            <xs:element name="valueDosage" type="Dosage"/>
            <xs:element name="valueMeta" type="Meta"/>
          </xs:choice>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides the reason in the situation where a reason code is required in addition to the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="itemSequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely reference the claim item entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exceptions, special conditions and supporting information applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" type="ClaimResponse.Detail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.ReviewOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="decision" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reasons for the result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference from the Insurer which is used in later communications which refers to this adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time frame during which this authorization is effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Adjudication">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code supporting the understanding of the adjudication result and explaining variance from expected amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Monetary amount associated with the category.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">A non-monetary value associated with the category. Mutually exclusive to the amount element above.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decisionDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time the adjudication decision occured.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Detail">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="detailSequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely reference the claim detail entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetail" type="ClaimResponse.SubDetail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A sub-detail adjudication of a simple product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.SubDetail">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="subDetailSequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely reference the claim sub-detail entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.AddItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="itemSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Claim items which this service line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detailSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the details within the claim item which this line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subdetailSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the sub-details within the details within the claim item which this line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exceptions, special conditions and supporting information applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The providers who are authorized for the services rendered to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Request or Referral for Goods or Service to be rendered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or dates when the service or product was supplied, performed or completed.</xs:documentation>
            </xs:annotation>
            <xs:element name="servicedDate" type="date"/>
            <xs:element name="servicedPeriod" type="Period"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the product or service was provided.</xs:documentation>
            </xs:annotation>
            <xs:element name="locationCodeableConcept" type="CodeableConcept"/>
            <xs:element name="locationAddress" type="Address"/>
            <xs:element name="locationReference" type="Reference"/>
          </xs:choice>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" type="ClaimResponse.BodySite" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical location where the service is performed or applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" type="ClaimResponse.Detail1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The second-tier service adjudications for payer added services.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.BodySite">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="site" minOccurs="1" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical service site on the patient (limb, tooth, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subSite" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A region or surface of the bodySite, e.g. limb region or tooth surface(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Detail1">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetail" type="ClaimResponse.SubDetail1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The third-tier service adjudications for payer added services.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.SubDetail1">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Total">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Monetary total amount associated with the category.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Payment">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this represents partial or complete payment of the benefits payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjustment" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjustmentReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reason for the payment adjustment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated date the payment will be issued or the actual issue date of payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Benefits payable less any payment adjustment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Issuer's unique identifier for the payment instrument.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.ProcessNote">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="class" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the business purpose of the note.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="number" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify a note entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business purpose of the note text.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="1" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The explanation or description associated with the processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="language" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to define the language used in the text of the note.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Insurance">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focal" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverage" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="businessArrangement" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A business agreement number established between the provider and the insurer for special business processing purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="claimResponse" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the adjudication of the line items for the Coverage specified in this insurance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Error">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="itemSequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detailSequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetailSequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An error code, from a specified code system, which details why the claim could not be adjudicated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ClaimProcessingCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="queued">
        <xs:annotation>
          <xs:documentation xml:lang="en">Queued</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Processing Complete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial Processing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ClaimProcessingCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ClaimProcessingCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ClinicalUseDefinition" type="ClinicalUseDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ClinicalUseDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifier for this issue.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="ClinicalUseDefinitionType">
            <xs:annotation>
              <xs:documentation xml:lang="en">indication | contraindication | interaction | undesirable-effect | warning.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A categorisation of the issue, primarily for dividing warnings into subject heading areas such as &quot;Pregnancy and Lactation&quot;, &quot;Overdose&quot;, &quot;Effects on Ability to Drive and Use Machines&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The medication, product, substance, device, procedure etc. for which this is an indication, contraindication, interaction, undesirable effect, or warning.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this is a current issue or one that has been retired etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="undesirableEffect" type="ClinicalUseDefinition.UndesirableEffect" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describe the possible undesirable effects (negative outcomes) from the use of the medicinal product as treatment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="indication" type="ClinicalUseDefinition.Indication" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifics for when this is an indication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contraindication" type="ClinicalUseDefinition.Contraindication" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifics for when this is a contraindication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interaction" type="ClinicalUseDefinition.Interaction" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifics for when this is an interaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="population" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The population group to which this applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="library" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Logic used by the clinical use definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="warning" type="ClinicalUseDefinition.Warning" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClinicalUseDefinition.UndesirableEffect">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="symptomConditionEffect" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The situation in which the undesirable effect may manifest.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classification" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">High level classification of the effect.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="frequencyOfOccurrence" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How often the effect is seen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="management" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Actions for managing the undesirable effect.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClinicalUseDefinition.Indication">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="diseaseSymptomProcedure" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The situation that is being documented as an indication for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diseaseStatus" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the disease or symptom for the indication, for example &quot;chronic&quot; or &quot;metastatic&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comorbidity" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A comorbidity (concurrent condition) or coinfection as part of the indication. Where this repeats it means that any one of these is relevant, rather than all of them needing to be present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intendedEffect" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The intended effect, aim or strategy to be achieved.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Timing or duration information, that may be associated with use with the indicated condition e.g. Adult patients suffering from myocardial infarction (from a few days until less than 35 days), ischaemic stroke (from 7 days until less than 6 months).</xs:documentation>
            </xs:annotation>
            <xs:element name="durationRange" type="Range"/>
            <xs:element name="durationString" type="string"/>
          </xs:choice>
          <xs:element name="undesirableEffect" type="ClinicalUseDefinition.UndesirableEffect" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An unwanted side effect or negative outcome that may happen if you use the drug (or other subject of this resource) for this indication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="applicability" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that returns true or false, indicating whether the indication is applicable or not, after having applied its other elements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="otherTherapy" type="ClinicalUseDefinition.OtherTherapy" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the use of the medicinal product in relation to other therapies described as part of the contraindication.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClinicalUseDefinition.OtherTherapy">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="relationshipType" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship between the medicinal product indication or contraindication and another therapy.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="treatment" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to a specific medication (active substance, medicinal product or class of products, biological, food etc.) as part of an indication or contraindication.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClinicalUseDefinition.Contraindication">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="diseaseSymptomProcedure" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The situation that is being documented as contraindicating against this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diseaseStatus" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the disease or symptom for the contraindication, for example &quot;chronic&quot; or &quot;metastatic&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comorbidity" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A comorbidity (concurrent condition) or coinfection. Where this repeats it means that any one of these is relevant, rather than all of them needing to be present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="indication" type="ClinicalUseDefinition.Indication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The indication which this is a contraindication for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="applicability" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that returns true or false, indicating whether the indication is applicable or not, after having applied its other elements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="management" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Actions for managing the contraindication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="otherTherapy" type="ClinicalUseDefinition.OtherTherapy" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the use of the medicinal product in relation to other therapies described as part of the contraindication.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClinicalUseDefinition.Interaction">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="interactant" type="ClinicalUseDefinition.Interactant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific medication, product, food, substance etc. or laboratory test that interacts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effect" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The effect of the interaction, for example &quot;reduced gastric absorption of primary medication&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="incidence" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The incidence of the interaction, e.g. theoretical, observed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="management" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Actions for managing the interaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="severity" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The severity of the interaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClinicalUseDefinition.Interactant">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific medication, product, food, substance etc. or laboratory test that interacts.</xs:documentation>
            </xs:annotation>
            <xs:element name="itemReference" type="Reference"/>
            <xs:element name="itemCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="route" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The route by which the item is administered to cause the interaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClinicalUseDefinition.Warning">
    <xs:annotation>
      <xs:documentation xml:lang="en">A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A textual definition of this warning, with formatting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded or unformatted textual definition of this warning.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ClinicalUseDefinitionTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="indication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Indication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="contraindication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contraindication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="interaction">
        <xs:annotation>
          <xs:documentation xml:lang="en">Interaction</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="undesirable-effect">
        <xs:annotation>
          <xs:documentation xml:lang="en">Undesirable Effect</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="warning">
        <xs:annotation>
          <xs:documentation xml:lang="en">Warning</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ClinicalUseDefinitionType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ClinicalUseDefinitionTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CodeSystem" type="CodeSystem">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CodeSystem">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which CodeSystem is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this code system. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the code system was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the code system from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate code system instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this code system is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the code system and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the CodeSystem content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptions related to the content of the CodeSystem. Topics provide a high-level categorization as well as keywords for the CodeSystem that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the CodeSystem.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the CodeSystem.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the CodeSystem.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the CodeSystem for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts. If the type is `successor` or `predecessor`, the related resource must be a CodeSystem.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="caseSensitive" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If code comparison is case sensitive when codes within this system are compared to each other.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Canonical reference to the value set that contains all codes in the code system independent of code status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="hierarchyMeaning" minOccurs="0" maxOccurs="1" type="CodeSystemHierarchyMeaning">
            <xs:annotation>
              <xs:documentation xml:lang="en">The meaning of the hierarchy of concepts as represented in this resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="compositional" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code system defines a compositional (post-coordination) grammar.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="versionNeeded" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="content" minOccurs="1" maxOccurs="1" type="CodeSystemContentMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplements" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical URL of the code system that this code system supplement is adding designations and properties to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="count" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="filter" type="CodeSystem.Filter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A filter that can be used in a value set compose statement when selecting concepts using a filter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="CodeSystem.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property defines an additional slot through which additional information can be provided about a concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="concept" type="CodeSystem.Concept" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CodeSystem.Filter">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code that identifies this filter when it is used as a filter in [ValueSet](valueset.html#).compose.include.filter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of how or why the filter is used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operator" minOccurs="1" maxOccurs="unbounded" type="FilterOperator">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of operators that can be used with the filter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of what the value for the filter should be.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CodeSystem.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the property- why it is defined, and how its value might be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="PropertyType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the property value. Properties of type &quot;code&quot; contain a code defined by the code system (e.g. a reference to another defined concept).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CodeSystem.Concept">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code - a text symbol - that uniquely identifies the concept within the code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human readable string that is the recommended default way to present this concept to a user.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="designation" type="CodeSystem.Designation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="CodeSystem.Property1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property value for this concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="concept" type="CodeSystem.Concept" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CodeSystem.Designation">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="language" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The language this designation is defined for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that details how this designation would be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additionalUse" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional codes that detail how this designation would be used, if there is more than one use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The text value for this designation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CodeSystem.Property1">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is a reference to CodeSystem.property.code or is a code from [http://hl7.org/fhir/concept-properties](codesystem.html#defined-props) in the case that there is no corresponding code defined in `CodeSystem.property.code`.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of this property.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FilterOperatorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="is-a">
        <xs:annotation>
          <xs:documentation xml:lang="en">Is A (by subsumption)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="descendent-of">
        <xs:annotation>
          <xs:documentation xml:lang="en">Descendent Of (by subsumption)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="is-not-a">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not (Is A) (by subsumption)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="regex">
        <xs:annotation>
          <xs:documentation xml:lang="en">Regular Expression</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Set</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-in">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not in Set</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="generalizes">
        <xs:annotation>
          <xs:documentation xml:lang="en">Generalizes (by Subsumption)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="child-of">
        <xs:annotation>
          <xs:documentation xml:lang="en">Child Of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="descendent-leaf">
        <xs:annotation>
          <xs:documentation xml:lang="en">Descendent Leaf</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="exists">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exists</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FilterOperator">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="FilterOperatorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="PropertyTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation xml:lang="en">code (internal reference)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding (external reference)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">dateTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation xml:lang="en">decimal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="PropertyType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="PropertyTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CodeSystemHierarchyMeaningEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="grouped-by">
        <xs:annotation>
          <xs:documentation xml:lang="en">Grouped By</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="is-a">
        <xs:annotation>
          <xs:documentation xml:lang="en">Is-A</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="part-of">
        <xs:annotation>
          <xs:documentation xml:lang="en">Part Of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="classified-with">
        <xs:annotation>
          <xs:documentation xml:lang="en">Classified With</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CodeSystemHierarchyMeaning">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CodeSystemHierarchyMeaningEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CodeSystemContentModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="not-present">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Present</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="example">
        <xs:annotation>
          <xs:documentation xml:lang="en">Example</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="fragment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fragment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Complete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="supplement">
        <xs:annotation>
          <xs:documentation xml:lang="en">Supplement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CodeSystemContentMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CodeSystemContentModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Communication" type="Communication">
    <xs:annotation>
      <xs:documentation xml:lang="en">A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Communication">
    <xs:annotation>
      <xs:documentation xml:lang="en">A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An order, proposal or plan fulfilled in whole or in part by this Communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A larger event (e.g. Communication, Procedure) of which this particular communication is a component or step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="inResponseTo" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Prior communication that this communication is in response to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="EventStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the transmission.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures the reason for the current state of the Communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of message conveyed such as alert, notification, reminder, instruction, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="medium" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A channel that was used for this communication (e.g. email, fax, SMS).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient or group that was the focus of this communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the purpose/content, similar to a subject line in an email.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="about" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other resources that pertain to this communication and to which this communication should be associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this Communication was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sent" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time when this communication was sent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="received" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time when this communication arrived at the destination.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recipient" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity (e.g. person, organization, clinical information system, care team or device) which is the target of the communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sender" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity (e.g. person, organization, clinical information system, or device) which is the source of the communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reason or justification for the communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payload" type="Communication.Payload" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text, attachment(s), or resource(s) that was communicated to the recipient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional notes or commentary about the communication by the sender, receiver or other interested parties.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Communication.Payload">
    <xs:annotation>
      <xs:documentation xml:lang="en">A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A communicated content (or for multi-part communications, one portion of the communication).</xs:documentation>
            </xs:annotation>
            <xs:element name="contentAttachment" type="Attachment"/>
            <xs:element name="contentReference" type="Reference"/>
            <xs:element name="contentCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EventStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="preparation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preparation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-done">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Done</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="stopped">
        <xs:annotation>
          <xs:documentation xml:lang="en">Stopped</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EventStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EventStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CommunicationRequest" type="CommunicationRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to convey information from a sender to a recipient.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CommunicationRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to convey information from a sender to a recipient.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan or proposal that is fulfilled in whole or in part by this request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="replaces" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Completed or terminated request(s) whose function is taken by this new request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="RequestStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the proposal or order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures the reason for the current state of the CommunicationRequest.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="RequestIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the level of authority/intentionality associated with the CommunicationRequest and where the request fits into the workflow chain.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of message to be sent such as alert, notification, reminder, instruction, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doNotPerform" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true indicates that the CommunicationRequest is asking for the specified action to *not* occur.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="medium" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A channel that was used for this communication (e.g. email, fax).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient or group that is the focus of this communication request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="about" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other resources that pertain to this communication request and to which this communication request should be associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this CommunicationRequest was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payload" type="CommunicationRequest.Payload" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text, attachment(s), or resource(s) to be communicated to the recipient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The time when this communication is to occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
          </xs:choice>
          <xs:element name="authoredOn" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">For draft requests, indicates the date of initial creation.  For requests with other statuses, indicates the date of activation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requester" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The device, individual, or organization who asks for the information to be shared.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recipient" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationProvider" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes why the request is being made in coded or textual form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the request by the requester, sender, recipient, subject or other participants.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CommunicationRequest.Payload">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to convey information from a sender to a recipient.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The content (or for multi-part communications, one portion of the communication) to be communicated.</xs:documentation>
            </xs:annotation>
            <xs:element name="contentAttachment" type="Attachment"/>
            <xs:element name="contentReference" type="Reference"/>
            <xs:element name="contentCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CompartmentDefinition" type="CompartmentDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A compartment definition that defines how resources are accessed on a server.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CompartmentDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A compartment definition that defines how resources are accessed on a server.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the capability statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this compartment definition. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the compartment definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the compartment definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the compartment definition from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this compartment definition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CompartmentType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Which compartment this definition describes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="search" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the search syntax is supported,.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" type="CompartmentDefinition.Resource" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about how a resource is related to the compartment.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CompartmentDefinition.Resource">
    <xs:annotation>
      <xs:documentation xml:lang="en">A compartment definition that defines how resources are accessed on a server.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="ResourceType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of a resource supported by the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="param" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The search parameter 'code' as defined in the core specification that represents the link to the compartment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="startParam" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Search Parameter for mapping requests made with $everything.start (e.g. on [Patient.$everything](https://build.fhir.org/ig/HL7/admin-incubator/branches/main/en/OperationDefinition-Patient-everything.html)).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endParam" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Search Parameter for mapping requests made with $everything.end (e.g. on [Patient.$everything](https://build.fhir.org/ig/HL7/admin-incubator/branches/main/en/OperationDefinition-Patient-everything.html)).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CompartmentTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encounter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation xml:lang="en">EpisodeOfCare</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CompartmentType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CompartmentTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Composition" type="Composition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and has traceability to the author who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Composition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and has traceability to the author who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explicitly assigned identifier of a variation of the content in the Composition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="consent" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">References the consents associated with this document. Examples include a consent to perform the clinical service being documented (.event) or a consent for the information contained in the document to be released to a third party.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan, proposal or order that is fulfilled in whole or in part by this composition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="CompositionStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the clinical encounter or type of care this documentation is associated with.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The composition editing time, when the composition was last logically changed by the author.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Composition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies who is responsible for the information in the composition, not necessarily who typed it in.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="Composition.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies supporting entities, including parents, relatives, caregivers, insurance policyholders, guarantors, and others related in some way to the patient. A supporting person or organization is an individual or an organization with a relationship to the patient. A supporting person who is playing multiple roles would be recorded in multiple participants (e.g., emergency contact and next-of-kin).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the {{title}}. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Official human-readable label for the composition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">For any additional notes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="attester" type="Composition.Attester" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A participant who has attested to the accuracy of the composition/document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="custodian" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatesTo" type="Composition.RelatesTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relationships that this composition has with other compositions or documents (FHIR or non-FHIR resources) that already exist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" type="Composition.Event" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The clinical service, such as a colonoscopy or an appendectomy, being documented.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="section" type="Composition.Section" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The root of the sections that make up the composition.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Composition.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and has traceability to the author who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Meaning and purpose of participation, in creation of the clinical document. The list includes: data entry person, informant, primary information recipient, and tracker. Other types are allowed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="function" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exact function of the participant in the creation of the clinical document. This is more granular than type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="time" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Time period of participation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="party" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who the participant is.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Composition.Attester">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and has traceability to the author who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of attestation the authenticator offers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="time" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the composition was attested by the party.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="party" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who attested the composition in the specified way.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Composition.RelatesTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and has traceability to the author who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship to the related artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The artifact that is related to this Composition Resource.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetUri" type="uri"/>
            <xs:element name="targetAttachment" type="Attachment"/>
            <xs:element name="targetCanonical" type="canonical"/>
            <xs:element name="targetReference" type="Reference"/>
            <xs:element name="targetMarkdown" type="markdown"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Composition.Event">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and has traceability to the author who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a &quot;History and Physical Report&quot; in which case the procedure being documented is necessarily a &quot;History and Physical&quot; act. The events may be included as a code or as a reference to an other resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Composition.Section">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and has traceability to the author who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code identifying the kind of content contained within the section. This must be consistent with the section title.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies who is responsible for the information in this section, not necessarily who typed it in.   

The actual author of the section when it is not the author of the composition. If author is not specified, the author is assumed to be the author of the parent section or the author of the composition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="Narrative">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-readable narrative that contains the attested content of the section, 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.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the section contents that is not represented by any of the section entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="orderedBy" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the order applied to the items in the section entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the actual resource from which the narrative in the section is derived.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="emptyReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="section" type="Composition.Section" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A nested sub-section within this section.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CompositionStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="registered">
        <xs:annotation>
          <xs:documentation xml:lang="en">Registered</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preliminary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preliminary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="final">
        <xs:annotation>
          <xs:documentation xml:lang="en">Final</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="amended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="corrected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Corrected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="deprecated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Deprecated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CompositionStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CompositionStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ConceptMap" type="ConceptMap">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ConceptMap">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which ConceptMap is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this concept map. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the concept map was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the concept map from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate concept map instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this concept map is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the concept map and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the ConceptMap content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptions related to the content of the ConceptMap. Topics provide a high-level categorization as well as keywords for the ConceptMap that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the ConceptMap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the ConceptMap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the ConceptMap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the ConceptMap for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts. If the type is `successor` or `predecessor`, the related resource must be a ConceptMap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="ConceptMap.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property defines a slot through which additional information can be provided about a map from source -&gt; target.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additionalAttribute" type="ConceptMap.AdditionalAttribute" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An additionalAttribute defines an additional data element found in the source or target data model where the data will come from or be mapped to. Some mappings are based on data in addition to the source data element, where codes in multiple fields are combined to a single field (or vice versa).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.  Limits the scope of the map to source codes (ConceptMap.group.element code or valueSet) that are members of this value set.</xs:documentation>
            </xs:annotation>
            <xs:element name="sourceScopeUri" type="uri"/>
            <xs:element name="sourceScopeCanonical" type="canonical"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for the target value set that provides important context about how the mapping choices are made.  Limits the scope of the map to target codes (ConceptMap.group.element.target code or valueSet) that are members of this value set.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetScopeUri" type="uri"/>
            <xs:element name="targetScopeCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="group" type="ConceptMap.Group" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A group of mappings that all have the same source and target system.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is used to identify the property. The code is used internally (in ConceptMap.group.element.target.property.code) and also in the $translate operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the formal meaning of the property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the property - why it is defined, and how its value might be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="ConceptMapPropertyType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the property value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="system" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The CodeSystem that defines the codes from which values of type ```code``` in property values.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.AdditionalAttribute">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is used to identify this additional data attribute. The code is used internally in ConceptMap.group.element.target.dependsOn.attribute and ConceptMap.group.element.target.product.attribute.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the formal definition of the source/target data element. For elements defined by the FHIR specification, or using a FHIR logical model, the correct format is {canonical-url}#{element-id}.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the additional attribute and/or the data element it refers to - why it is defined, and how the value might be used in mappings, and a discussion of issues associated with the use of the data element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="ConceptMapAttributeType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the source data contained in this concept map for this data element.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Group">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="source" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that identifies the source system where the concepts to be mapped are defined.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that identifies the target system that the concepts will be mapped to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="element" type="ConceptMap.Element" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Mappings for an individual concept in the source to one or more concepts in the target.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unmapped" type="ConceptMap.Unmapped" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">What to do when there is no mapping to a target concept from the source concept and ConceptMap.group.element.noMap is not true. This provides the &quot;default&quot; to be applied when there is no target concept mapping specified or the expansion of ConceptMap.group.element.target.valueSet is empty.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Element">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identity (code or path) or the element/item being mapped.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The display for the code. The display is only provided to help editors when editing the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of concepts from the ConceptMap.group.source code system which are all being mapped to the target as part of this mapping rule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noMap" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If noMap = true this indicates that no mapping to a target concept exists for this source concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments related to the mapping of the source element, potentially including why there is no target.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" type="ConceptMap.Target" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A concept from the target value set that this concept maps to.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Target">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identity (code or path) or the element/item that the map refers to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The display for the code. The display is only provided to help editors when editing the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of concepts from the ConceptMap.group.target code system which are all being mapped to as part of this mapping rule. The effect of using this data element is the same as having multiple ConceptMap.group.element.target elements with one for each concept in the ConceptMap.group.element.target.valueSet value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="1" maxOccurs="1" type="ConceptMapRelationship">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relationship between the source and target concepts. The relationship is read from source to target (e.g. source-is-narrower-than-target).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments related to the mapping to the target element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="ConceptMap.Property1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property value for this source -&gt; target mapping.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dependsOn" type="ConceptMap.DependsOn" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified data attribute can be resolved, and it has the specified value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="product" type="ConceptMap.DependsOn" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Product is the output of a ConceptMap that provides additional values that go in other attributes / data elemnts of the target data.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Property1">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a mapping property defined in ConceptMap.property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element and that ConceptMap.property element SHALL have a system element.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueCode" type="code"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.DependsOn">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="attribute" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the additional attribute that holds a value the map depends on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Data element value that the map depends on / produces. If the data type is a code, that code SHALL come from the .group.source code system for .dependsOn.valueCode or from the .group.target code system for .product.valueCode.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueQuantity" type="Quantity"/>
          </xs:choice>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">This mapping applies if the data element value is a code from this value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Unmapped">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="ConceptMapGroupUnmappedMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped source code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The display for the code. The display is only provided to help editors when editing the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments related to the choice of how to handle unmapped elements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of fixed codes to use when the mode = 'fixed'  - all unmapped codes are mapped to each of the fixed codes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="1" type="ConceptMapRelationship">
            <xs:annotation>
              <xs:documentation xml:lang="en">The default relationship value to apply between the source and target concepts when the source code is unmapped and the mode is 'fixed' or 'use-source-code'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="otherMap" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConceptMapPropertyTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding (external reference)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">dateTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation xml:lang="en">decimal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation xml:lang="en">code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConceptMapPropertyType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConceptMapPropertyTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConceptMapAttributeTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation xml:lang="en">code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConceptMapAttributeType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConceptMapAttributeTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConceptMapGroupUnmappedModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="use-source-code">
        <xs:annotation>
          <xs:documentation xml:lang="en">Use Provided Source Code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="fixed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fixed Code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other-map">
        <xs:annotation>
          <xs:documentation xml:lang="en">Other Map</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConceptMapGroupUnmappedMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConceptMapGroupUnmappedModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Condition" type="Condition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Condition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="clinicalStatus" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The clinical status of the condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="verificationStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The verification status to support the clinical status of the condition.  The verification status pertains to the condition, itself, not to any specific condition attribute.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A category assigned to the condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="severity" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A subjective assessment of the severity of the condition as evaluated by the clinician.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identification of the condition, problem or diagnosis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The anatomical location where this condition manifests itself.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyStructure" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the body structure on the subject's body where this condition manifests itself.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the patient or group who the condition record is associated with.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this Condition was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated or actual date or date-time the condition, situation, or concern began, in the opinion of the clinician.</xs:documentation>
            </xs:annotation>
            <xs:element name="onsetDateTime" type="dateTime"/>
            <xs:element name="onsetAge" type="Age"/>
            <xs:element name="onsetPeriod" type="Period"/>
            <xs:element name="onsetRange" type="Range"/>
            <xs:element name="onsetString" type="string"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or estimated date that the condition resolved or went into remission. This is called &quot;abatement&quot; because of the many overloaded connotations associated with &quot;remission&quot; or &quot;resolution&quot; - Some conditions, such as chronic conditions, are never really resolved, but they can abate.</xs:documentation>
            </xs:annotation>
            <xs:element name="abatementDateTime" type="dateTime"/>
            <xs:element name="abatementAge" type="Age"/>
            <xs:element name="abatementPeriod" type="Period"/>
            <xs:element name="abatementRange" type="Range"/>
            <xs:element name="abatementString" type="string"/>
          </xs:choice>
          <xs:element name="recordedDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual who recorded the record and takes responsibility for accurately recording its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asserter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual or device that is making the condition statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="stage" type="Condition.Stage" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A simple summary of the stage such as &quot;Stage 3&quot; or &quot;Early Onset&quot;. The determination of the stage is disease-specific, such as cancer, retinopathy of prematurity, kidney diseases, Alzheimer's, or Parkinson disease.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="evidence" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting evidence / manifestations that are the basis for determining the Condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information about the Condition. This is a general notes/comments entry  for description of the Condition, its diagnosis and prognosis.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Condition.Stage">
    <xs:annotation>
      <xs:documentation xml:lang="en">A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="summary" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A simple summary of the stage such as &quot;Stage 3&quot; or &quot;Early Onset&quot;. The determination of the stage is disease-specific, such as cancer, retinopathy of prematurity, kidney diseases, Alzheimer's, or Parkinson disease.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="assessment" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to a formal record of the evidence on which the staging assessment is based.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of staging, such as pathological or clinical staging.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Consent" type="Consent">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Consent">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for this copy of the Consent Statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ConsentState">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the current state of this Consent resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient, healthcare practitioner, research subject, or a group of persons to whom this consent applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date the consent instance was agreed to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Effective period for this Consent Resource and all provisions unless specified in that provision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="grantor" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity responsible for granting the rights listed in a Consent Directive.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="grantee" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manager" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actor that manages the consent through its lifecycle.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="controller" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actor that controls/enforces the access according to the consent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourceAttachment" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The source on which this consent statement is based. The source might be a scanned original paper form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourceReference" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="regulatoryBasis" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of codes that indicate the regulatory basis (if any) that this consent supports.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="policyBasis" type="Consent.PolicyBasis" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Reference or URL used to uniquely identify the policy the organization will enforce for this Consent. This Reference or URL should be specific to the version of the policy and should be dereferencable to a computable policy of some form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="policyText" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Reference to the human readable policy explaining the basis for the Consent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="verification" type="Consent.Verification" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether a treatment instruction (e.g. artificial respiration: yes or no) was verified with the patient, his/her family or another authorized person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decision" minOccurs="0" maxOccurs="1" type="ConsentProvisionType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Action to take - permit or deny - as default.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provision" type="Consent.Provision" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Consent.PolicyBasis">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Reference that identifies the policy the organization will enforce for this Consent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">A URI that links to a computable version of the policy the organization will enforce for this Consent.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Consent.Verification">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="verified" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Has the instruction been verified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Extensible list of verification type starting with verification and re-validation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="verifiedBy" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person who conducted the verification/validation of the Grantor decision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="verifiedWith" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who verified the instruction (Patient, Relative or other Authorized Person).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="unbounded" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date(s) verification was collected.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Consent.Provision">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Timeframe for this provision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" type="Consent.Actor" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who or what is controlled by this provision. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="action" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Actions controlled by this provision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityLabel" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The context of the activities a user is taking - why the user is accessing the data - that are controlled by this provision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentType" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The documentType(s) covered by this provision. The type can be a CDA document, or some other type that indicates what sort of information the consent relates to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resourceType" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The resourceType(s) covered by this provision. The type can be a FHIR resource type or a profile on a type that indicates what information the consent relates to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this code is found in an instance, then the provision applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dataPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Clinical or Operational Relevant period of time that bounds the data controlled by this provision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="data" type="Consent.Data" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The resources controlled by this provision if specific resources are referenced.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">A computable (FHIRPath or other) definition of what is controlled by this consent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provision" type="Consent.Provision" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provisions which provide exceptions to the base provision or subprovisions.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Consent.Actor">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the individual is involved in the resources content that is described in the exception.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Consent.Data">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="meaning" minOccurs="1" maxOccurs="1" type="ConsentDataMeaning">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the resource reference is interpreted when testing consent restrictions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a specific resource that defines which resources are covered by this consent.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConsentProvisionTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="deny">
        <xs:annotation>
          <xs:documentation xml:lang="en">Deny</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="permit">
        <xs:annotation>
          <xs:documentation xml:lang="en">Permit</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConsentProvisionType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConsentProvisionTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConsentDataMeaningEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="instance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Instance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="related">
        <xs:annotation>
          <xs:documentation xml:lang="en">Related</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dependents">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dependents</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="authoredby">
        <xs:annotation>
          <xs:documentation xml:lang="en">AuthoredBy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConsentDataMeaning">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConsentDataMeaningEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConsentStateEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-done">
        <xs:annotation>
          <xs:documentation xml:lang="en">Abandoned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConsentState">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConsentStateEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Contract" type="Contract">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Contract">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for this Contract or a derivative that references a Source Contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Canonical identifier for this contract, represented as a URI (globally unique).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An edition identifier used for business purposes to label business significant variants.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="ContractResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="legalState" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instantiatesCanonical" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instantiatesUri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contentDerivative" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The minimal content derived from the basal information source at a specific stage in its lifecycle.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issued" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When this  Contract was issued.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="applies" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relevant time or time-period when this Contract is applicable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expirationType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The target entity impacted by or of interest to parties to the agreement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authority" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="domain" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="site" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sites in which the contract is complied with,  exercised, or in force.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subtitle" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A more detailed or qualifying explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="alias" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or organization that authored the Contract definition, derivative, or instance in any legal state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="scope" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.</xs:documentation>
            </xs:annotation>
            <xs:element name="topicCodeableConcept" type="CodeableConcept"/>
            <xs:element name="topicReference" type="Reference"/>
          </xs:choice>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state.  Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contentDefinition" type="Contract.ContentDefinition" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="term" type="Contract.Term" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information that may be needed by/relevant to the performer in their execution of this term action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relevantHistory" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract.  The Provenance.entity indicates the target that was changed in the update (see [Provenance.entity](provenance-definitions.html#Provenance.entity)).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="signer" type="Contract.Signer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="friendly" type="Contract.Friendly" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The &quot;patient friendly language&quot; versionof the Contract in whole or in parts. &quot;Patient friendly language&quot; means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="legal" type="Contract.Legal" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of Legal expressions or representations of this Contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rule" type="Contract.Rule" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of Computable Policy Rule Language Representations of this Contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the &quot;source of truth&quot; and which would be the basis for legal action related to enforcement of this Contract.</xs:documentation>
            </xs:annotation>
            <xs:element name="legallyBindingAttachment" type="Attachment"/>
            <xs:element name="legallyBindingReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.ContentDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Detailed Precusory content type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The  individual or organization that published the Contract precursor content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publicationDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and optionally time) when the contract was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publicationStatus" minOccurs="1" maxOccurs="1" type="ContractResourcePublicationStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">amended | appended | cancelled | disputed | entered-in-error | executable +.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to Contract precursor content. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the Contract precursor content.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Term">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for this particular Contract Provision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issued" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When this Contract Provision was issued.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="applies" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relevant time or time-period when this Contract Provision is applicable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity that the term applies to.</xs:documentation>
            </xs:annotation>
            <xs:element name="topicCodeableConcept" type="CodeableConcept"/>
            <xs:element name="topicReference" type="Reference"/>
          </xs:choice>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A specialized legal clause or condition based on overarching contract type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Statement of a provision in a policy or a contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityLabel" type="Contract.SecurityLabel" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Security labels that protect the handling of information about the term and its elements, which may be specifically identified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="offer" type="Contract.Offer" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The matter of concern in the context of this provision of the agrement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asset" type="Contract.Asset" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contract Term Asset List.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="action" type="Contract.Action" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="group" type="Contract.Term" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Nested group of Contract Provisions.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.SecurityLabel">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="number" minOccurs="0" maxOccurs="unbounded" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number used to link this term or term element to the applicable Security Label.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classification" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Security label privacy tag that specifies the level of confidentiality protection required for this term and/or term elements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Security label privacy tag that specifies the applicable privacy and security policies governing this term and/or term elements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="control" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Security label privacy tag that specifies the manner in which term and/or term elements are to be protected.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Offer">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for this particular Contract Provision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="party" type="Contract.Party" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Offer Recipient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decision" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decisionMode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the decision about a Contract was conveyed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answer" type="Contract.Answer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Response to offer text.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human readable form of this Contract Offer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="linkId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The id of the clause or question text of the offer in the referenced questionnaire/response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityLabelNumber" minOccurs="0" maxOccurs="unbounded" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Security labels that protects the offer.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Party">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="1" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Participant in the offer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the party participates in the offer.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Answer">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Asset">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="scope" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Differentiates the kind of the asset .</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Target entity type about which the term may be concerned.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeReference" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Associated entities.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subtype" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">May be a subtype or part of an offered asset.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the applicability of the term to an asset resource instance, and instances it refers to or instances that refer to it, and/or are owned by the offeree.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="context" type="Contract.Context" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Circumstance of the asset.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the quality and completeness of the asset that may be a factor in its valuation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="periodType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of Asset availability for use or ownership.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="unbounded" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Asset relevant contractual time period.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usePeriod" minOccurs="0" maxOccurs="unbounded" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Time period of asset use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="linkId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answer" type="Contract.Answer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Response to assets.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityLabelNumber" minOccurs="0" maxOccurs="unbounded" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Security labels that protects the asset.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valuedItem" type="Contract.ValuedItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contract Valued Item List.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Context">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository),  location held, e.g., building,  jurisdiction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Context description.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.ValuedItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific type of Contract Valued Item that may be priced.</xs:documentation>
            </xs:annotation>
            <xs:element name="entityCodeableConcept" type="CodeableConcept"/>
            <xs:element name="entityReference" type="Reference"/>
          </xs:choice>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a Contract Valued Item instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectiveTime" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the time during which this Contract ValuedItem information is effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Contract Valued Item unit valuation measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="points" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Terms of valuation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When payment is due.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="responsible" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who will make payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recipient" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who will receive payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="linkId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Id  of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityLabelNumber" minOccurs="0" maxOccurs="unbounded" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of security labels that define which terms are controlled by this condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Action">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="doNotPerform" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">True if the term prohibits the  action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" type="Contract.Subject" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Entity of the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reason or purpose for the action stipulated by this Contract Provision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="linkId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Current state of the term action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="context" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Encounter or Episode with primary association to the specified term activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contextLinkId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">When action happens.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
            <xs:element name="occurrenceTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="requester" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who or what initiated the action and has responsibility for its activation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requesterLinkId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performerType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of individual that is desired or required to perform or not perform the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performerRole" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of role or competency of an individual desired or required to perform or not perform the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what is being asked to perform (or not perform) the ction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performerLinkId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Id [identifier??] of the clause or question text related to the reason type or reference of this  action in the referenced form or QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited. Either a coded concept, or another resource whose existence justifies permitting or not permitting this action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reasonLinkId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Id [identifier??] of the clause or question text related to the reason type or reference of this  action in the referenced form or QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the term action made by the requester, performer, subject or other participants.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityLabelNumber" minOccurs="0" maxOccurs="unbounded" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Security labels that protects the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Subject">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="1" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity the action is performed or not performed on or for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role type of agent assigned roles in this Contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Signer">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role of this Contract signer, e.g. notary, grantee.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="party" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Party which is a signator to this Contract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="signature" minOccurs="1" maxOccurs="unbounded" type="Signature">
            <xs:annotation>
              <xs:documentation xml:lang="en">Legally binding Contract DSIG signature contents in Base64.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Friendly">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.</xs:documentation>
            </xs:annotation>
            <xs:element name="contentAttachment" type="Attachment"/>
            <xs:element name="contentReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Legal">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Contract legal text in human renderable form.</xs:documentation>
            </xs:annotation>
            <xs:element name="contentAttachment" type="Attachment"/>
            <xs:element name="contentReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Contract.Rule">
    <xs:annotation>
      <xs:documentation xml:lang="en">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).</xs:documentation>
            </xs:annotation>
            <xs:element name="contentAttachment" type="Attachment"/>
            <xs:element name="contentReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ContractResourceStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="amended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="disputed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Disputed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="executable">
        <xs:annotation>
          <xs:documentation xml:lang="en">Executable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="executed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Executed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="negotiable">
        <xs:annotation>
          <xs:documentation xml:lang="en">Negotiable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="offered">
        <xs:annotation>
          <xs:documentation xml:lang="en">Offered</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="policy">
        <xs:annotation>
          <xs:documentation xml:lang="en">Policy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="rejected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Rejected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="renewed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Renewed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="revoked">
        <xs:annotation>
          <xs:documentation xml:lang="en">Revoked</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="resolved">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resolved</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="terminated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Terminated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ContractResourceStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ContractResourceStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ContractResourcePublicationStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="amended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="disputed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Disputed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="executable">
        <xs:annotation>
          <xs:documentation xml:lang="en">Executable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="executed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Executed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="negotiable">
        <xs:annotation>
          <xs:documentation xml:lang="en">Negotiable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="offered">
        <xs:annotation>
          <xs:documentation xml:lang="en">Offered</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="policy">
        <xs:annotation>
          <xs:documentation xml:lang="en">Policy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="rejected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Rejected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="renewed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Renewed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="revoked">
        <xs:annotation>
          <xs:documentation xml:lang="en">Revoked</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="resolved">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resolved</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="terminated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Terminated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ContractResourcePublicationStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ContractResourcePublicationStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Coverage" type="Coverage">
    <xs:annotation>
      <xs:documentation xml:lang="en">Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Coverage">
    <xs:annotation>
      <xs:documentation xml:lang="en">Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier of the coverage as issued by the insurer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance. The status element does not indicate whether the policy reflected in the instance is in-force at any particular point in time, that would be conveyed via the 'period' element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="kind" minOccurs="1" maxOccurs="1" type="Kind">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nature of the coverage be it insurance, or cash payment such as self-pay.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentBy" type="Coverage.PaymentBy" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Link to the paying party and optionally what specifically they will be responsible to pay.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="policyHolder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who 'owns' the insurance policy.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subscriber" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subscriberId" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The insurer assigned ID for the Subscriber.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="beneficiary" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who benefits from the insurance coverage; the patient when products and/or services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dependent" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A designator for a dependent under the coverage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relationship of beneficiary (patient) to the subscriber.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force. When non-contiguous periods of coverage need to be documented it is recommended that this is accomplished through the use of an extension,rather than complicating coverage period calculations for many users of the Coverage resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The program or plan underwriter, payor, insurance company.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="class" type="Coverage.Class" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A suite of underwriter specific classifiers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="order" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care. For example; a patient might have (0) auto insurance (1) their own health insurance and (2) spouse's health insurance. When claiming for treatments which were not the result of an auto accident then only coverages (1) and (2) above would be applicable and would apply in the order specified in parenthesis. Coverage.order conveys the Coordination of Benefit (COB) ordering of coverage independent of use-case, for a use-case dependent set of Coverages see Account.coverage.priority.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="costToBeneficiary" type="Coverage.CostToBeneficiary" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been  included on the health card.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subrogation" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contract" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The policy(s) which constitute this insurance coverage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurancePlan" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The insurance plan details, benefits and costs, which constitute this insurance coverage.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Coverage.PaymentBy">
    <xs:annotation>
      <xs:documentation xml:lang="en">Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="party" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of parties providing non-insurance payment for the treatment costs.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="responsibility" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en"> Description of the financial responsibility.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Coverage.Class">
    <xs:annotation>
      <xs:documentation xml:lang="en">Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of classification for which an insurer-specific class label or number and optional name is provided.  For example, type may be used to identify a class of coverage or employer group, policy, or plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The alphanumeric identifier associated with the insurer issued label.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short description for the class.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Coverage.CostToBeneficiary">
    <xs:annotation>
      <xs:documentation xml:lang="en">Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The category of patient centric costs associated with treatment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unit" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if the benefits apply to an individual or to the family.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="term" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount due from the patient for the cost category.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueMoney" type="Money"/>
          </xs:choice>
          <xs:element name="exception" type="Coverage.Exception" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A suite of codes indicating exceptions or reductions to patient costs and their effective periods.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Coverage.Exception">
    <xs:annotation>
      <xs:documentation xml:lang="en">Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code for the specific exception.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The timeframe the exception is in force.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="KindEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="insurance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Insurance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="self-pay">
        <xs:annotation>
          <xs:documentation xml:lang="en">Self-pay</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation xml:lang="en">Other</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Kind">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="KindEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CoverageEligibilityRequest" type="CoverageEligibilityRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CoverageEligibilityRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this coverage eligiblity request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the requestor expects the processor to complete processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="1" maxOccurs="unbounded" type="EligibilityRequestPurpose">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" type="CoverageEligibilityRequest.Event" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information code for an event with a corresponding date or period.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or dates when the enclosed suite of services were performed or completed.</xs:documentation>
            </xs:annotation>
            <xs:element name="servicedDate" type="date"/>
            <xs:element name="servicedPeriod" type="Period"/>
          </xs:choice>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enterer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Person who created the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider which is responsible for the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurer" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Insurer who issued the coverage in question and is the recipient of the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="facility" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Facility where the services are intended to be provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" type="CoverageEligibilityRequest.SupportingInfo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" type="CoverageEligibilityRequest.Insurance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Financial instruments for reimbursement for the health care products and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="CoverageEligibilityRequest.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityRequest.Event">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded event such as when a service is expected or a card printed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A date or period in the past or future indicating when the event occurred or is expectd to occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="whenDateTime" type="dateTime"/>
            <xs:element name="whenPeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityRequest.SupportingInfo">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify supporting information entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="information" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appliesToAll" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityRequest.Insurance">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="focal" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverage" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="businessArrangement" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A business agreement number established between the provider and the insurer for special business processing purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityRequest.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="supportingInfoSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exceptions, special conditions and supporting information applicable for this service or product line.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the product, service, drug or other billing code for the item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner who is responsible for the product or service to be rendered to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount charged to the patient by the provider for a single unit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="facility" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Facility where the services will be provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosis" type="CoverageEligibilityRequest.Diagnosis" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Patient diagnosis for which care is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The plan/proposal/order describing the proposed service in detail.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityRequest.Diagnosis">
    <xs:annotation>
      <xs:documentation xml:lang="en">The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The nature of illness or problem in a coded form or as a reference to an external defined Condition.</xs:documentation>
            </xs:annotation>
            <xs:element name="diagnosisCodeableConcept" type="CodeableConcept"/>
            <xs:element name="diagnosisReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EligibilityRequestPurposeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="auth-requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage auth-requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="benefits">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage benefits</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="discovery">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage Discovery</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="validation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage Validation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EligibilityRequestPurpose">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EligibilityRequestPurposeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CoverageEligibilityResponse" type="CoverageEligibilityResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CoverageEligibilityResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this coverage eligiblity request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="1" maxOccurs="unbounded" type="EligibilityResponsePurpose">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" type="CoverageEligibilityResponse.Event" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information code for an event with a corresponding date or period.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or dates when the enclosed suite of services were performed or completed.</xs:documentation>
            </xs:annotation>
            <xs:element name="servicedDate" type="date"/>
            <xs:element name="servicedPeriod" type="Period"/>
          </xs:choice>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider which is responsible for the eligibility, claim, predetermination or preauthorization request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the original request resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="1" maxOccurs="1" type="EligibilityOutcome">
            <xs:annotation>
              <xs:documentation xml:lang="en">The outcome of the request processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disposition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human readable description of the status of the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurer" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Insurer who issued the coverage in question and is the author of the response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" type="CoverageEligibilityResponse.Insurance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Financial instruments for reimbursement for the health care products and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="form" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code for the form to be used for printing the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="error" type="CoverageEligibilityResponse.Error" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Errors encountered during the processing of the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityResponse.Event">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded event such as when a service is expected or a card printed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A date or period in the past or future indicating when the event occurred or is expectd to occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="whenDateTime" type="dateTime"/>
            <xs:element name="whenPeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityResponse.Insurance">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="coverage" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="inforce" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="benefitPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The term of the benefits documented in this response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="CoverageEligibilityResponse.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Benefits and optionally current balances, and authorization details by category or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityResponse.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the product, service, drug or other billing code for the item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner who is eligible for the provision of the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="excluded" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short name or tag for the benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A richer description of the benefit or services covered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unit" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if the benefits apply to an individual or to the family.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="term" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="benefit" type="CoverageEligibilityResponse.Benefit" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Benefits used to date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorizationRequired" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A boolean flag indicating whether a preauthorization is required prior to actual service delivery.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorizationSupporting" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Codes or comments regarding information or actions associated with the preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorizationUrl" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">A web location for obtaining requirements or descriptive information regarding the preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityResponse.Benefit">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Classification of benefit being provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of the benefit which is permitted under the coverage.</xs:documentation>
            </xs:annotation>
            <xs:element name="allowedUnsignedInt" type="unsignedInt"/>
            <xs:element name="allowedString" type="string"/>
            <xs:element name="allowedMoney" type="Money"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of the benefit which have been consumed to date.</xs:documentation>
            </xs:annotation>
            <xs:element name="usedUnsignedInt" type="unsignedInt"/>
            <xs:element name="usedString" type="string"/>
            <xs:element name="usedMoney" type="Money"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CoverageEligibilityResponse.Error">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An error code,from a specified code system, which details why the eligibility check could not be performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EligibilityOutcomeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="queued">
        <xs:annotation>
          <xs:documentation xml:lang="en">Queued</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Processing Complete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial Processing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EligibilityOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EligibilityOutcomeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EligibilityResponsePurposeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="auth-requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage auth-requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="benefits">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage benefits</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="discovery">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage Discovery</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="validation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage Validation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EligibilityResponsePurpose">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EligibilityResponsePurposeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="DetectedIssue" type="DetectedIssue">
    <xs:annotation>
      <xs:documentation xml:lang="en">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, gaps in care, etc.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DetectedIssue">
    <xs:annotation>
      <xs:documentation xml:lang="en">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, gaps in care, etc.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this detected issue by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="DetectedIssueStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the detected issue.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Partitions the detected issue into one or more categories that can be used to filter searching, to govern access control and/or to guide system behavior.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that identifies the specific type of issue detected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="severity" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the subject whose record the detected issue is associated with.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this detected issue was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date, period or timing when the detected issue did occur or is occurring.</xs:documentation>
            </xs:annotation>
            <xs:element name="identifiedDateTime" type="dateTime"/>
            <xs:element name="identifiedPeriod" type="Period"/>
            <xs:element name="identifiedTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual or device responsible for the issue being raised.  For example, a decision support application or a pharmacist conducting a medication review.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="implicated" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the resource representing the current activity or proposed activity that is potentially problematic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="evidence" type="DetectedIssue.Evidence" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting evidence or manifestations that provide the basis for identifying the detected issue such as a GuidanceResponse or MeasureReport.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A textual explanation of the detected issue.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualityOfEvidence" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quality of the evidence supporting identification of the detected issue. The code system used specifies the quality scale used to grade this evidence source while the code specifies the actual quality score (represented as a coded value) associated with the evidence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expectedOnsetType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time frame in which the clinical effects of the detected issue may be expected to occur. Rapid refers to an expected onset within 24 hours. Delayed refers to an expected onset in more than 24 hours.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="medicationClass" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Represents the medication class that is responsible for the detected issue.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managementCode" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication of the importance or type of step that should or may be taken in order to address the detected issue. This is different than mitigation in that it is not specifically providing actions to be taken, rather general suggestions about approach.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mitigation" type="DetectedIssue.Mitigation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates an action that has been taken or is committed to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting.  Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DetectedIssue.Evidence">
    <xs:annotation>
      <xs:documentation xml:lang="en">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, gaps in care, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A manifestation that led to the recording of this detected issue.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Links to resources that constitute evidence for the detected issue such as a GuidanceResponse or MeasureReport.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DetectedIssue.Mitigation">
    <xs:annotation>
      <xs:documentation xml:lang="en">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, gaps in care, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="action" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates when the mitigating action was documented.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Clinicians may add additional notes or justifications about the mitigation action. For example, patient can have this drug because they have had it before without any issues. Multiple justifications may be provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DetectedIssueStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="preliminary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preliminary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="final">
        <xs:annotation>
          <xs:documentation xml:lang="en">Final</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknwon</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mitigated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mitigated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DetectedIssueStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DetectedIssueStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Device" type="Device">
    <xs:annotation>
      <xs:documentation xml:lang="en">A manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Device">
    <xs:annotation>
      <xs:documentation xml:lang="en">A manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique instance identifiers assigned to a device by manufacturers other organizations or owners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reference to the definition for the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udiCarrier" type="Device.UdiCarrier" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifier (UDI) placed on a device label or package. Note that the Device may include multiple UDIs if it is sold in multiple jurisdictions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="FHIRDeviceStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Device record status. This is not the status of the device like availability.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="availabilityStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The availability of the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="biologicalSourceEvent" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A production identifier of the donor, donation, or pooling event associated with the biological material incorporated into the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name of the manufacturer or entity legally responsible for the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufactureDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time when the device was manufactured.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expirationDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time beyond which this device is no longer valid or should not be used (if applicable).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lotNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Lot number assigned by the manufacturer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serialNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The serial number assigned by the organization when the device was manufactured.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" type="Device.Name" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device.  This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modelNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The manufacturer's model number for the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The part number or catalog number of the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Devices may be associated with one or more categories.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind or type of device. A device instance may have more than one type - in which case those are the types that apply to the specific instance of the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="deviceVersion" type="Device.DeviceVersion" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual design of the device or software version running on the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conformsTo" type="Device.ConformsTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="Device.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Static or essentially fixed characteristics or features of the device (e.g., time or timing attributes, resolution, accuracy, intended use or instructions for use, and physical attributes) that are not otherwise captured in more specific attributes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additive" type="Device.Additive" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Material added to a container device (typically used in specimen collection or initial processing).  The material may be added by the device manufacturer or by a different party subsequent to manufacturing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details for an organization or a particular human that is responsible for the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The place where the device can be found.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptive information, usage information or implantation information that is not captured in an existing element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="safety" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides additional safety characteristics about a medical device.  For example devices containing latex.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parent" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The higher level or encompassing device that this device is a logical part of.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Device.UdiCarrier">
    <xs:annotation>
      <xs:documentation xml:lang="en">A manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="deviceIdentifier" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The device identifier (UDI-DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device. The UDI-DI portion is placed on a device label or package. Note that the DeviceDefinition may include multiple UDI-DIs if it is sold in multiple jurisdictions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="deviceIdentifierSystem" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Establishes the namespace for the issuing agency's system (e.g, GS1's GTIN, ICCBBA's ISBT-128) used to create the device identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issuer" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include: 
1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 
2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-diI, 
3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 
4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di # Informationsstelle für Arzneispezialitäten (IFA GmbH) (EU only): http://hl7.org/fhir/NamingSystem/ifa-gmbh-di.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/us-fda-udi or in the European Union by the European Commission http://hl7.org/fhir/NamingSystem/eu-ec-udi.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="carrierAIDC" minOccurs="0" maxOccurs="1" type="base64Binary">
            <xs:annotation>
              <xs:documentation xml:lang="en">The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation as printed on the packaging of the device - e.g., a barcode , 2D Matrix, or RFID. Some AIDC representations contain non-printable characters and cannot be represented in a string format.  For this reason, AIDC format SHALL be base64Binary encoded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="carrierHRF" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The full UDI carrier as the human readable form (HRF) representation as printed on the packaging of the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entryType" minOccurs="0" maxOccurs="1" type="UDIEntryType">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded entry to indicate how the data was entered.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Device.Name">
    <xs:annotation>
      <xs:documentation xml:lang="en">A manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual name that identifies the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the kind of name. RegisteredName | UserFriendlyName | PatientReportedName.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the default or preferred name to be displayed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Device.DeviceVersion">
    <xs:annotation>
      <xs:documentation xml:lang="en">A manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the device version, e.g. manufacturer, approved, internal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The hardware or software module of the device to which the version applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="installDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date the version was installed on the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version text.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Device.ConformsTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">A manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the type of the standard, specification, or formal guidance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specification" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Device.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">A manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that specifies the property, such as resolution, color, size, being represented.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the property specified by the associated property.type code.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Device.Additive">
    <xs:annotation>
      <xs:documentation xml:lang="en">A manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the substance added to the container.  This is represented as a concept from a code system or described in a Substance resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of the additive substance in the container; may be volume, dimensions, or other appropriate measurements, depending on the container and additive substance type.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FHIRDeviceStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FHIRDeviceStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="FHIRDeviceStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="UDIEntryTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="barcode">
        <xs:annotation>
          <xs:documentation xml:lang="en">Barcode</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="rfid">
        <xs:annotation>
          <xs:documentation xml:lang="en">RFID</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="manual">
        <xs:annotation>
          <xs:documentation xml:lang="en">Manual</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="card">
        <xs:annotation>
          <xs:documentation xml:lang="en">Card</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="self-reported">
        <xs:annotation>
          <xs:documentation xml:lang="en">Self Reported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="electronic-transmission">
        <xs:annotation>
          <xs:documentation xml:lang="en">Electronic Transmission</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="UDIEntryType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="UDIEntryTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="DeviceAlert" type="DeviceAlert">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a noteworthy condition or occurrence determined to exist by a device.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DeviceAlert">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a noteworthy condition or occurrence determined to exist by a device.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this alert, by the source device, gateway software, manufacturers, or other systems or organizations. These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedure" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The procedure (or procedures) during which the alert condition was raised.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="DeviceAlertStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the device alert.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Partitions the device alert into one or more categories that can be used to filter searching, to govern access control and/or to guide system behavior.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">physiological | technical.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The alert priority is usually reported by the source device. A priority of `info` SHOULD indicate that the alert is “for information only” and urgent action is not required. The element MAY be omitted if the priority is unknown.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that indicates the specific condition that triggered the alert.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who or what the alert is about.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which the alert condition was raised.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="presence" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the alert condition is currently active.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">This element is used to record the date or time period when the alert condition did occur or is occurring.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
          </xs:choice>
          <xs:element name="device" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the device that detected the alert condition. The device could be a top-level Device or component Device (such as an MDS, VMD, or Channel); or might identify the specific DeviceMetric of a Device (e.g., a heart rate reading) that was in an alert condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="acknowledged" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication of whether (true) or not (false) the alert condition has been acknowledged.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="acknowledgedBy" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication of who or what acknowledged the alert condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The principal physical location of the subject at the time the alert condition occurred. This could be different from the location of the alerting device at that time, and from the current location of either the subject or the alert condition detecting device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" type="DeviceAlert.DerivedFrom" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value causing the alert condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="label" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The label might combine information from the alert code, priority, the measurement type, measurement value, body sites and other sources, e.g., “HR &gt; 180”.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="signal" type="DeviceAlert.Signal" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Annunciation or notification of the alert condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceAlert.DerivedFrom">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a noteworthy condition or occurrence determined to exist by a device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="observation" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the Observation whose value is causing the alert condition; or, if `component` is present, the Observation with a component causing the alert condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">If applicable, the code of the component (of the Observation identified in `derivedFrom.observation`) having a value causing the alert condition. This might be used when the alert is associated with a specific component of an Observation, rather than the overall Observation; for example, a low diastolic blood pressure. Since the component is identified by matching `Observation.component.code`, if more than one component have the same code, the specific component is ambiguous. Repetitions of this element indicate additional components contributing to the alert condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="limit" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The limits beyond which a value was detected to cause the alert condition. The actual value is the `Observation.value[x]` referenced by `derivedFrom.observation` or, if specified, the `Observation.component.value[x]` of the component (with `Observation.component.code` matching `derivedFrom.component`) of the reference Observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceAlert.Signal">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a noteworthy condition or occurrence determined to exist by a device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="activationState" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Paused indicates that annunciation has temporarily been disabled (&quot;snooze&quot;).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="presence" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the signal is currently being annunciated. An on signal is currently being annunciated; a latched signal is currently being being annunciated although the alert condition has ended; an off signal is not currently being annunciated; and an acknowledged signal is not currently being annunciated because the user has acknowledged the signal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="annunciator" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Signalling by the source device is local; signalling elsewhere is considered remote. A reference to the &quot;top level&quot; signalling device could also be present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manifestation" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the signal is being annunciated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details of the signal manifestation, such as a 1 meter visual indicator or a 4 meter visual indicator.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="indication" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the signal was being annunciated. If there is no indicated period end, the annunciation is on-going.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DeviceAlertStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DeviceAlertStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DeviceAlertStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="DeviceAssociation" type="DeviceAssociation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of association or dissociation of a device with a subject (e.g. patient) and/or operator.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DeviceAssociation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of association or dissociation of a device with a subject (e.g. patient) and/or operator.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Instance identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="device" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the device that is being associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the relationship between the device and subject.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="DeviceAssociationCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the state of the Device association.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reasons given for the current association status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="associationStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">State of the device’s association (e.g., implanted, attached, on, off, standby, defective).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual, group of individuals or device that the device is on or associated with.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity for which the device is being used, benefitting from the device, or which the device is being operated upon, which is usually distinct from the association subject, such as an operator or similar.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyStructure" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Current anatomical location of the device in/on subject.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Begin and end dates and times for the device association.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DeviceAssociationCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DeviceAssociationCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en">A coded concept specifying the state of the device association.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DeviceAssociationCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="DeviceDefinition" type="DeviceDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DeviceDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this DeviceDefinition when it is referenced in a specification, model, design or an instance; also called its canonical identifier.  This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this DeviceDefinition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the DeviceDefinition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this DeviceDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the DeviceDefinition when it is referenced in a specification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the DeviceDefinition. This name should be usable as an identifier for the resource by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the DeviceDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of this DeviceDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this DeviceDefinition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and optionally time) when the DeviceDefinition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the DeviceDefinition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the DeviceDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the DeviceDefinition from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate DeviceDefinitions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this DeviceDefinition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the DeviceDefinition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the DeviceDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the DeviceDefinition content was or is planned to be effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The part number or catalog number of the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name of the manufacturer  or legal representative e.g. labeler. Whether this is the actual manufacturer or the labeler or responsible depends on implementation and jurisdiction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modelNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The model number for the device for example as defined by the manufacturer or labeler, or other agency.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udiDeviceIdentifier" type="DeviceDefinition.UdiDeviceIdentifier" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Device Identifier (DI) portion of the Unique Device Identifier (UDI) placed on a device label or package. Also known as UDI-DI. Note that the DeviceDefinition may include multiple UDI-DIs if it is sold in multiple jurisdictions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="regulatoryIdentifier" type="DeviceDefinition.RegulatoryIdentifier" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier associated with the regulatory documentation (certificates, technical documentation, post-market surveillance documentation and reports) of a set of device models sharing the same intended purpose, risk class and essential design and manufacturing characteristics. One example is the Basic UDI-DI in Europe.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="deviceName" type="DeviceDefinition.DeviceName" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name or names of the device as given by the manufacturer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classification" type="DeviceDefinition.Classification" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">What kind of device or device system this is.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conformsTo" type="DeviceDefinition.ConformsTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="hasPart" type="DeviceDefinition.HasPart" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A device that is part (for example a component) of the present device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packaging" type="DeviceDefinition.Packaging" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the packaging of the device, i.e. how the device is packaged.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="deviceVersion" type="DeviceDefinition.DeviceVersion" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version of the device or software.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="safety" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Safety characteristics of the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="shelfLifeStorage" minOccurs="0" maxOccurs="unbounded" type="ProductShelfLife">
            <xs:annotation>
              <xs:documentation xml:lang="en">Shelf Life and storage information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outputLanguage" minOccurs="0" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Language code for the human-readable text strings produced by the device (all supported).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="DeviceDefinition.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Static or essentially fixed characteristics or features of this kind of device that are otherwise not captured in more specific attributes, e.g., time or timing attributes, resolution, accuracy, and physical attributes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="link" type="DeviceDefinition.Link" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptive information, usage information or implantation information that is not captured in an existing element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="material" type="DeviceDefinition.Material" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A substance used to create the material(s) of which the device is made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productionIdentifierInUDI" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="guideline" type="DeviceDefinition.Guideline" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information aimed at providing directions for the usage of this model of device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="correctiveAction" type="DeviceDefinition.CorrectiveAction" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Tracking of latest field safety corrective action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="chargeItem" type="DeviceDefinition.ChargeItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Billing code or reference associated with the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.UdiDeviceIdentifier">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="deviceIdentifier" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issuer" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that assigns the identifier algorithm.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The jurisdiction to which the deviceIdentifier applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="marketDistribution" type="DeviceDefinition.MarketDistribution" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates where and when the device is available on the market.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="deviceIdentifierSystem" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Establishes the namespace for the issuing agency's system (e.g, GS1's GTIN, ICCBBA's ISBT-128) used to create the device identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.MarketDistribution">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="marketPeriod" minOccurs="1" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Begin and end dates for the commercial distribution of the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subJurisdiction" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">National state or territory to which the marketDistribution recers, typically where the device is commercialized.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.RegulatoryIdentifier">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of identifier itself.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier used in the associated regulatory context.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issuer" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that issued this identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The applicable jurisdiction overseeing the enforcement of the Identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifierSystem" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Establishes the namespace for the issuing agency's system (e.g, GS1's GTIN, ICCBBA's ISBT-128) used to create the identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.DeviceName">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of deviceName.
RegisteredName | UserFriendlyName | PatientReportedName.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.Classification">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A classification or risk class of the device model.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="justification" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Further information qualifying this classification of the device model.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.ConformsTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the type of the standard, specification, or formal guidance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specification" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Standard, regulation, certification, or guidance website, document, or other publication, or similar, supporting the conformance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.HasPart">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The device that is part of the current device.</xs:documentation>
            </xs:annotation>
            <xs:element name="definitionCanonical" type="canonical"/>
            <xs:element name="definitionCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="count" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of instances of the component device in the current device.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.Packaging">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business identifier of the packaged medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that defines the specific type of packaging.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="count" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of items contained in the package (devices or sub-packages).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="distributor" type="DeviceDefinition.Distributor" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An organization that distributes the packaged device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udiDeviceIdentifier" type="DeviceDefinition.UdiDeviceIdentifier" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifier (UDI) Barcode string on the packaging.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packaging" type="DeviceDefinition.Packaging" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows packages within packages.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.Distributor">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distributor's human-readable name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organizationReference" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distributor as an Organization resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.DeviceVersion">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the device version, e.g. manufacturer, approved, internal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The hardware or software module of the device to which the version applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version text.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that specifies the property such as a resolution or color being represented.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the property specified by the associated property.type code.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.Link">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="relation" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type indicates the relationship of the related device to the device instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the linked device.</xs:documentation>
            </xs:annotation>
            <xs:element name="relatedDeviceCanonical" type="canonical"/>
            <xs:element name="relatedDeviceCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.Material">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="substance" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A substance that the device contains, may contain, or is made of - for example latex - to be used to determine patient compatibility. This is not intended to represent the composition of the device, only the clinically relevant materials.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="alternate" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates an alternative material of the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="allergenicIndicator" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the substance is a known or suspected allergen.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.Guideline">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The circumstances that form the setting for using the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usageInstruction" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Detailed written and visual directions for the user on how to use the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">A source of information or reference for this guideline.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="indication" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A clinical condition for which the device was designed to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contraindication" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A specific situation when a device should not be used because it may cause harm.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="warning" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific hazard alert information that a user needs to know before using the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intendedUse" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the general purpose or medical use of the device or its function.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.CorrectiveAction">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="recall" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the last corrective action known for this device was a recall.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="scope" minOccurs="0" maxOccurs="1" type="DeviceCorrectiveActionScope">
            <xs:annotation>
              <xs:documentation xml:lang="en">The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="1" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Start and end dates of the  corrective action.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceDefinition.ChargeItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition of a kind of device or device component. Typically, this definition corresponds to a device model although it may be a broader category of device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="chargeItemCode" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code or reference for the charge item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="count" minOccurs="1" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coefficient applicable to the billing code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">A specific time period in which this charge item applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The context to which this charge item applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DeviceCorrectiveActionScopeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="model">
        <xs:annotation>
          <xs:documentation xml:lang="en">Model</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="lot-numbers">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lot Numbers</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="serial-numbers">
        <xs:annotation>
          <xs:documentation xml:lang="en">Serial Numbers</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DeviceCorrectiveActionScope">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DeviceCorrectiveActionScopeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="DeviceMetric" type="DeviceMetric">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a measurement, calculation or setting capability of a device.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DeviceMetric">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a measurement, calculation or setting capability of a device.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Instance identifiers assigned to a device, by the device or gateway software, manufacturers, other organizations or owners. For example, handle ID.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="DeviceMetricStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates current state of the record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operationalStatus" minOccurs="0" maxOccurs="1" type="DeviceMetricOperationalStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates current operational state of the device. For example: On, Off, Standby, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the category of the observation generation process. A DeviceMetric can be, for example, a setting, measurement, or calculation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="device" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The device to which this DeviceMetric applies. The referenced device could be a top-level device or a component of a device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unit" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="color" minOccurs="0" maxOccurs="1" type="ColorCodesOrRGB">
            <xs:annotation>
              <xs:documentation xml:lang="en">The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="measurementFrequency" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The frequency at which the metric is taken or recorded. Devices measure metrics at a wide range of frequencies; for example, an ECG might sample measurements in the millisecond range, while an NIBP might trigger only once an hour. Less often, the measurementFrequency is based on a unit other than time, such as distance (e.g., for a measuring wheel). The update period could be different than the measurement frequency, if the device does not update the published observed value with the same frequency as it was measured.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="availability" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the metric is derived (measured) by a continuous means or by an intermittent means.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="calibration" type="DeviceMetric.Calibration" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the calibrations that have been performed or that are required to be performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceMetric.Calibration">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a measurement, calculation or setting capability of a device.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the type of the calibration method.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="state" minOccurs="0" maxOccurs="1" type="DeviceMetricCalibrationState">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the state of the calibration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="time" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the time last calibration has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ColorCodesOrRGBEnum">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:pattern value="[\s\S]+"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ColorCodesOrRGB">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ColorCodesOrRGBEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DeviceMetricCalibrationStateEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="not-calibrated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Calibrated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="calibration-required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Calibration Required</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="calibrated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Calibrated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unspecified">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unspecified</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DeviceMetricCalibrationState">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DeviceMetricCalibrationStateEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DeviceMetricOperationalStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="on">
        <xs:annotation>
          <xs:documentation xml:lang="en">On</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="off">
        <xs:annotation>
          <xs:documentation xml:lang="en">Off</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="standby">
        <xs:annotation>
          <xs:documentation xml:lang="en">Standby</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DeviceMetricOperationalStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DeviceMetricOperationalStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DeviceMetricStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DeviceMetricStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DeviceMetricStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="DeviceRequest" type="DeviceRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DeviceRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers assigned to this order by the orderer or by the receiver.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Plan/proposal/order fulfilled by this request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="replaces" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The request takes the place of the referenced completed or terminated request(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="RequestStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="RequestIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the request is a proposal, plan, an original order or a reflex order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the request should be addressed with respect to other requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doNotPerform" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates that the provider is asking for the patient to either stop using or to not start using the specified device or category of devices. For example, the patient has undergone surgery and the provider is indicating that the patient should not wear contact lenses.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The details of the device to be used.</xs:documentation>
            </xs:annotation>
            <xs:element name="productCodeableConcept" type="CodeableConcept"/>
            <xs:element name="productReference" type="Reference"/>
            <xs:element name="productCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of devices to be provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" type="DeviceRequest.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific parameters for the ordered item.  For example, the prism value for lenses.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient who will use the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An encounter that provides additional context in which this request is made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. &quot;Every 8 hours&quot;; &quot;Three times a day&quot;; &quot;1/2 an hour before breakfast for 10 days from 23-Dec 2011:&quot;; &quot;15 Oct 2013, 17 Oct 2013 and 1 Nov 2013&quot;.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
            <xs:element name="occurrenceTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="authoredOn" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the request transitioned to being actionable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requester" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or entity who initiated the request and has responsibility for its activation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The desired individual or entity to provide the device to the subject of the request (e.g., patient, location).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The preferred location(s) where the device should actually be used in coded or free text form. E.g. at home or nursing day care center.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reason or justification for the use of this device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeeded" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This status is to indicate whether the request is a PRN or may be given as needed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeededFor" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reason for using the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional clinical information about the patient that may influence the request fulfilment.  For example, this may include where on the subject's body the device will be used (i.e. the target site).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relevantHistory" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Key events in the history of the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeviceRequest.Parameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or string that identifies the device detail being asserted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the device detail.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueBoolean" type="boolean"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="DiagnosticReport" type="DiagnosticReport">
    <xs:annotation>
      <xs:documentation xml:lang="en">The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DiagnosticReport">
    <xs:annotation>
      <xs:documentation xml:lang="en">The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers assigned to this report by the performer or other systems.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details concerning a service requested.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="DiagnosticReportStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the diagnostic report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or name that describes this diagnostic report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatesTo" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other DiagnosticReports that the current DiagnosticReport replaces, amendens, extends, or otherwise relates to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The encounter (e.g. a patient and healthcare provider interaction) that is associated with the DiagnosticReport.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.</xs:documentation>
            </xs:annotation>
            <xs:element name="effectiveDateTime" type="dateTime"/>
            <xs:element name="effectivePeriod" type="Period"/>
          </xs:choice>
          <xs:element name="issued" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedure" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The performed procedure(s) that are reported on in the DiagnosticReport.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The diagnostic service that is responsible for issuing the report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resultsInterpreter" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner or organization that is responsible for the report's conclusions and interpretations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specimen" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details about the specimens on which this diagnostic report is based.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="result" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">[Observations](observation.html)  that are part of this diagnostic report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments about the diagnostic report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="study" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">One or more links to full details of any study performed during the diagnostic investigation. An ImagingStudy might comprise a set of radiologic images obtained via a procedure that are analyzed as a group. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. A GenomicStudy might comprise one or more analyses, each serving a specific purpose. These analyses may vary in method (e.g., karyotyping, CNV, or SNV detection), performer, software, devices used, or regions targeted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" type="DiagnosticReport.SupportingInfo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">This backbone element contains supporting information that was used in the creation of the report not included in the results already included in the report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="media" type="DiagnosticReport.Media" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of key images or data associated with this report. The images or data are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="composition" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to a Composition resource instance that provides structure for organizing the contents of the DiagnosticReport.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conclusion" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conclusionCode" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">One or more codes and/or references that represent the summary conclusion (interpretation/impression) of the diagnostic report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recomendation" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Proposed follow-up actions based on the findings and interpretations of the diagnostic test for which this report is the subject.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="presentedForm" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communication" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Communications initiated during the generation of the DiagnosticReport by members of the organization fulfilling that order. e.g. direct communication of time critical results by the radiologist to the referring physician.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparison" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Prior data and findings made available for comparison when determining the current interpretation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DiagnosticReport.SupportingInfo">
    <xs:annotation>
      <xs:documentation xml:lang="en">The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code value for the role of the supporting information in the diagnostic report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reference for the supporting information in the diagnostic report.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DiagnosticReport.Media">
    <xs:annotation>
      <xs:documentation xml:lang="en">The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="link" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the image or data source.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="DiagnosticReportStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="registered">
        <xs:annotation>
          <xs:documentation xml:lang="en">Registered</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preliminary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preliminary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="modified">
        <xs:annotation>
          <xs:documentation xml:lang="en">Modified</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="final">
        <xs:annotation>
          <xs:documentation xml:lang="en">Final</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="amended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="corrected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Corrected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="DiagnosticReportStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="DiagnosticReportStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="DocumentReference" type="DocumentReference">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this &quot;document&quot; encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DocumentReference">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this &quot;document&quot; encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this document reference by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explicitly assigned identifier of a variation of the content in the DocumentReference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A procedure that is fulfilled in whole or in part by the creation of this media.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="DocumentReferenceStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the document reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="docStatus" minOccurs="0" maxOccurs="1" type="CompositionStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the underlying document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modality" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Imaging modality used. This may include both acquisition and non-acquisition modalities.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the particular kind of document referenced  (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="context" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this document reference was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a &quot;History and Physical Report&quot; in which the procedure being documented is necessarily a &quot;History and Physical&quot; act.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="related" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any other resource this document reference was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyStructure" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The anatomic structures included in the document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="facilityType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of facility where the patient was seen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="practiceSetting" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time period over which the service that is described by the document was provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the document reference was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies who is responsible for adding the information to the document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="attester" type="DocumentReference.Attester" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A participant who has authenticated the accuracy of the document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="custodian" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatesTo" type="DocumentReference.RelatesTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relationships that this document has with other document references that already exist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human-readable description of the source document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="securityLabel" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of Security-Tag codes specifying the level of privacy/security of the Document found at DocumentReference.content.attachment.url. Note that DocumentReference.meta.security contains the security labels of the data elements in DocumentReference, while DocumentReference.securityLabel contains the security labels for the document the reference refers to. The distinction recognizes that the document may contain sensitive information, while the DocumentReference is metadata about the document and thus might not be as sensitive as the document. For example: a psychotherapy episode may contain highly sensitive information, while the metadata may simply indicate that some episode happened.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="content" type="DocumentReference.Content" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The document and format referenced.  If there are multiple content element repetitions, these must all represent the same document in different format, or attachment metadata.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DocumentReference.Attester">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this &quot;document&quot; encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of attestation the authenticator offers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="time" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the document was attested by the party.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="party" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who attested the document in the specified way.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DocumentReference.RelatesTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this &quot;document&quot; encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship that this document has with anther document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The target document of this relationship.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DocumentReference.Content">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this &quot;document&quot; encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="attachment" minOccurs="1" maxOccurs="1" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The document or URL of the document along with critical metadata to prove content has integrity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profile" type="DocumentReference.Profile" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier of the document constraints, encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DocumentReference.Profile">
    <xs:annotation>
      <xs:documentation xml:lang="en">A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this &quot;document&quot; encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Code|uri|canonical.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueCanonical" type="canonical"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Encounter" type="Encounter">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Encounter">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier(s) by which this encounter is known.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="EncounterStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the encounter (not the state of the patient within the encounter - that is subjectState).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="businessStatus" type="Encounter.BusinessStatus" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A granular, workflows specific set of statuses that apply to the encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="class" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the urgency of the encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceType" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Broad categorization of the service that is to be provided (e.g. cardiology).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="episodeOfCare" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem.  The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The request this encounter satisfies (e.g. incoming referral or procedure request).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="careTeam" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Another Encounter of which this encounter is a part of (administratively or in time).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceProvider" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation.  Refer to the colonoscopy example on the Encounter examples tab.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="Encounter.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of people responsible for providing the service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appointment" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The appointment that scheduled this encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="virtualService" minOccurs="0" maxOccurs="unbounded" type="VirtualServiceDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Connection details of a virtual service (e.g. conference call).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actualPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual start and end time of the encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="plannedStartDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The planned start date/time (or admission date) of the encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="plannedEndDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The planned end date/time (or discharge date) of the encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="length" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.

When missing it is the time in between the start and end values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" type="Encounter.Reason" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of medical reasons that are expected to be addressed during the episode of care.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosis" type="Encounter.Diagnosis" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of diagnosis relevant to this encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="account" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of accounts that may be used for billing for this Encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dietPreference" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Diet preferences reported by the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialArrangement" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any special requests that have been made for this encounter, such as the provision of specific equipment or other things.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialCourtesy" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="admission" type="Encounter.Admission" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details about the stay during which a healthcare service is provided.

This does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" type="Encounter.Location" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of locations where  the patient has been during this encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Encounter.BusinessStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current business status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of workflow the status is tracking.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectiveDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date/time when the encounter entered this business status.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Encounter.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role of participant in encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Encounter.Reason">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="use" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Encounter.Diagnosis">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="condition" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Encounter.Admission">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="preAdmissionIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Pre-admission identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="origin" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location/organization from which the patient came before admission.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="admitSource" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">From where patient was admitted (physician referral, transfer).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reAdmission" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="destination" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Location/organization to which the patient is discharged.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dischargeDisposition" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Category or kind of location after discharge.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Encounter.Location">
    <xs:annotation>
      <xs:documentation xml:lang="en">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.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="location" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location where the encounter takes place.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="EncounterLocationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="form" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Time period during which the patient was present at the location.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EncounterLocationStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="planned">
        <xs:annotation>
          <xs:documentation xml:lang="en">Planned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reserved">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reserved</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EncounterLocationStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EncounterLocationStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EncounterStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="planned">
        <xs:annotation>
          <xs:documentation xml:lang="en">Planned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="discharged">
        <xs:annotation>
          <xs:documentation xml:lang="en">Discharged</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="discontinued">
        <xs:annotation>
          <xs:documentation xml:lang="en">Discontinued</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EncounterStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EncounterStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Endpoint" type="Endpoint">
    <xs:annotation>
      <xs:documentation xml:lang="en">The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Endpoint">
    <xs:annotation>
      <xs:documentation xml:lang="en">The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for the organization that is used to identify the endpoint across multiple disparate systems.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="EndpointStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The endpoint status represents whether the endpoint can currently be used for connections or why it can't be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="connectionType" minOccurs="1" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A friendly name that this endpoint can be referred to with.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="environmentType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of environment(s) exposed at this endpoint (dev, prod, test, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingOrganization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that provides technical management services for this endpoint.  This would be the organization that acts as the public help desk for when the endpoint is not functioning.  It does NOT necessarily represent the organization who is the steward of data being provided/accepted by the endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details for a human to contact about the endpoint. The primary use of this for system administrator troubleshooting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The interval during which the endpoint is expected to be operational.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="availability" minOccurs="0" maxOccurs="1" type="Availability">
            <xs:annotation>
              <xs:documentation xml:lang="en">The times the endpoint is expected to be available, including transient downtimes and any exceptions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payload" type="Endpoint.Payload" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of payloads that are provided/available at this endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="address" minOccurs="1" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">The uri that describes the actual end-point to connect to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="header" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional headers / information to send as part of the notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Endpoint.Payload">
    <xs:annotation>
      <xs:documentation xml:lang="en">The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The payload type describes the acceptable content that can be communicated on the endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mimeType" minOccurs="0" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profileCanonical" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The FHIR profile that is expected at this endpoint. It describes the resources that are handled, or even simply which resource types -e.g. Vital Sign Observations or QuestionnaireResponse.
The `profileUri` may be used when a FHIR Structure Definition is not available/appropriate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profileUri" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The profile (as a uri) that is expected at this endpoint when not represented using a FHIR profile.

e.g. CDA Template ID expressed as an OID (in the Uri).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EndpointStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="limited">
        <xs:annotation>
          <xs:documentation xml:lang="en">Limited</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="suspended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Suspended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="off">
        <xs:annotation>
          <xs:documentation xml:lang="en">Off</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EndpointStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EndpointStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="EnrollmentRequest" type="EnrollmentRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the insurance enrollment details to the insurer regarding a specified coverage.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="EnrollmentRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the insurance enrollment details to the insurer regarding a specified coverage.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Response business identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Insurer who is target  of the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner who is responsible for the services rendered to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="candidate" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The subject or group of subjects to be enrolled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverage" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the program or plan identification, underwriter or payor.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="EnrollmentResponse" type="EnrollmentResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="EnrollmentResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Response business identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Original request resource reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="1" type="EnrollmentOutcome">
            <xs:annotation>
              <xs:documentation xml:lang="en">Processing status: error, complete.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disposition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the status of the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when the enclosed suite of services were performed or completed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Insurer who produced this adjudicated response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestProvider" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner who is responsible for the services rendered to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="candidate" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The subject or group of subjects to be enrolled.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EnrollmentOutcomeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="queued">
        <xs:annotation>
          <xs:documentation xml:lang="en">Queued</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Processing Complete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial Processing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EnrollmentOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EnrollmentOutcomeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="EpisodeOfCare" type="EpisodeOfCare">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:element>
  <xs:complexType name="EpisodeOfCare">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="EpisodeOfCareStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">planned | waitlist | active | onhold | finished | cancelled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusHistory" type="EpisodeOfCare.StatusHistory" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" type="EpisodeOfCare.Reason" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of medical reasons that are expected to be addressed during the episode of care.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosis" type="EpisodeOfCare.Diagnosis" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of medical conditions that were addressed during the episode of care.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient/group who is the focus of this episode of care.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingOrganization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The interval during which the managing organization assumes the defined responsibility.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referralRequest" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="careManager" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner that is the care manager/care coordinator for this patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="careTeam" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of practitioners that may be facilitating this episode of care for specific purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="account" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of accounts that may be used for billing for this EpisodeOfCare.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EpisodeOfCare.StatusHistory">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="EpisodeOfCareStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">planned | waitlist | active | onhold | finished | cancelled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="1" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during this EpisodeOfCare that the specific status applied.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EpisodeOfCare.Reason">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="use" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The medical reason that is expected to be addressed during the episode of care, expressed as a text, code or a reference to another resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EpisodeOfCare.Diagnosis">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="condition" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The medical condition that was addressed during the episode of care, expressed as a text, code or a reference to another resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EpisodeOfCareStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="planned">
        <xs:annotation>
          <xs:documentation xml:lang="en">Planned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="waitlist">
        <xs:annotation>
          <xs:documentation xml:lang="en">Waitlist</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="onhold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="finished">
        <xs:annotation>
          <xs:documentation xml:lang="en">Finished</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EpisodeOfCareStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EpisodeOfCareStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="EventDefinition" type="EventDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EventDefinition resource provides a reusable description of when a particular event can occur.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="EventDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EventDefinition resource provides a reusable description of when a particular event can occur.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this event definition when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the event definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subtitle" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanatory or alternate title for the event definition giving additional information about its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this event definition. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or group definition that describes the intended subject of the event definition.</xs:documentation>
            </xs:annotation>
            <xs:element name="subjectCodeableConcept" type="CodeableConcept"/>
            <xs:element name="subjectReference" type="Reference"/>
          </xs:choice>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the event definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the event definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the event definition from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate event definition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this event definition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usage" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A detailed description of how the event definition is used from a clinical perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the event definition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the event definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the event definition content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related resources such as additional documentation, justification, or bibliographic references.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="trigger" minOccurs="1" maxOccurs="unbounded" type="TriggerDefinition">
            <xs:annotation>
              <xs:documentation xml:lang="en">The trigger element defines when the event occurs. If more than one trigger condition is specified, the event fires whenever any one of the trigger conditions is met.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Evidence" type="Evidence">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Evidence">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this summary when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the summary.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="citeAs" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Display of the suggested method of how to cite this Evidence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this summary. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the summary was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual, organization, or device primarily involved in the creation and maintenance of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the evidence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who entered the data for the evidence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual, organization, or device primarily responsible for internal coherence of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual, organization, or device primarily responsible for review of some aspect of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual, organization, or device responsible for officially endorsing the content for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this Evidence is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the Evidence and/or its contents. Copyright statements are legal notices of intellectual property ownership and may include restrictions on the use and publishing of the Evidence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatesTo" type="Evidence.RelatesTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relationships that this Evidence has with other FHIR or non-FHIR resources that already exist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language summary of the evidence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="assertion" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Declarative description of the Evidence, such as conclusion or bottom line statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Footnotes and/or explanatory notes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="variableDefinition" type="Evidence.VariableDefinition" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description, classification, and definition of a single variable. The collection of variables defines what the evidence is about.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="synthesisType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The design of the synthesis (combination of studies) that produced this evidence. The design is described with any number of synthesis characteristics, such as type of meta-analysis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="studyDesign" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The design of the study that produced this evidence. The design is described with any number of study design characteristics.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statistic" type="Evidence.Statistic" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Values and parameters for a single statistic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="certainty" type="Evidence.Certainty" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Assessment of certainty, confidence in the estimates, or quality of the evidence.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Evidence.RelatesTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship to the related artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The artifact that is related to this Evidence Resource.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetUri" type="uri"/>
            <xs:element name="targetAttachment" type="Attachment"/>
            <xs:element name="targetCanonical" type="canonical"/>
            <xs:element name="targetReference" type="Reference"/>
            <xs:element name="targetMarkdown" type="markdown"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Evidence.VariableDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A text description or summary of the variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Footnotes and/or explanatory notes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="variableRole" minOccurs="1" maxOccurs="1" type="EvidenceVariableRole">
            <xs:annotation>
              <xs:documentation xml:lang="en">Classification of the role of the variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="roleSubtype" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sub-classification of the role of the variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparatorCategory" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reference value used for comparison.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="observed" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Definition of the actual variable related to the statistic(s), i.e., the population being the actual study sample or the measured variable (exposure, outcome, or covariate) being the actual observation that occurred or will occur in the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intended" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Definition of the intended variable related to the Evidence, i.e., the population, exposure, or outcome for which the statistical finding is being interpreted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="directnessMatch" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indication of quality of match between intended variable to actual variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Evidence.Statistic">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language summary of the statistic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Footnotes and/or explanatory notes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statisticType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of statistic, e.g., relative risk. The statistic type is a classification that formally defines the relationship between the variables (noted in Evidence.variableDefinition) and the value specification (noted in Evidence.statistic.quantity).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the measured variable (outcome) is handled categorically, the category element is used to define which category the statistic is reporting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Statistic value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfEvents" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberAffected" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sampleSize" type="Evidence.SampleSize" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Count of participants in the study sample.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="attributeEstimate" type="Evidence.AttributeEstimate" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A statistical attribute of the statistic such as a measure of heterogeneity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modelCharacteristic" type="Evidence.ModelCharacteristic" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A component of the method to generate the statistic.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Evidence.SampleSize">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human-readable summary of study sample size. A human-readable string to clarify or explain concepts about the sample size.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Footnote or explanatory note about the sample size.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfStudies" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Count of studies or samples combined to become the total sample for the statistic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfParticipants" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Count of members in the total sample for the statistic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="knownDataCount" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of participants with known results for measured variables.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberAnalyzed" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Total number of participants who were analayzed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Evidence.AttributeEstimate">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human-readable summary of the estimate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Footnote or explanatory note about the estimate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of attribute estimate, e.g., confidence interval or p value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The singular quantity of the attribute estimate, for attribute estimates represented as single values, which may include a unit of measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="level" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Use 0.95 for a 95% confidence interval.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="range" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">Lower and upper bound values of the attribute estimate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="attributeEstimate" type="Evidence.AttributeEstimate" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A nested attribute estimate; which is the attribute estimate of an attribute estimate.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Evidence.ModelCharacteristic">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of a component of the method to generate the statistic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Further specification of the value of the component of the method to generate the statistic.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="intended" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">The plan for analysis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="applied" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This model characteristic is part of the analysis that was applied, whether or not the analysis followed the plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="variable" type="Evidence.Variable" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A variable adjusted for in the adjusted analysis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="attribute" type="Evidence.AttributeEstimate" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An attribute of the model characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Evidence.Variable">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="variableDefinition" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description and definition of the variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="handling" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the variable is classified for use in adjusted analysis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueCategory" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Qualitative label used for grouping values of a dichotomous, ordinal, or polychotomous variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueQuantity" minOccurs="0" maxOccurs="unbounded" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Quantitative label used for grouping values of a dichotomous, ordinal, or polychotomous variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueRange" minOccurs="0" maxOccurs="unbounded" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">Range of quantitative labels used for grouping values of a dichotomous, ordinal, or polychotomous variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Evidence.Certainty">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual description of certainty.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Footnotes and/or explanatory notes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Aspect of certainty being rated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rating" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Assessment or judgement of the aspect.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rater" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual or group who did the rating.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subcomponent" type="Evidence.Certainty" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A domain or subdomain of certainty.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EvidenceVariableRoleEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="population">
        <xs:annotation>
          <xs:documentation xml:lang="en">Population</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="exposure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exposure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="outcome">
        <xs:annotation>
          <xs:documentation xml:lang="en">Outcome</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="covariate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Covariate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EvidenceVariableRole">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EvidenceVariableRoleEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="EvidenceVariable" type="EvidenceVariable">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceVariable resource describes an element that knowledge (Evidence) is about.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="EvidenceVariable">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceVariable resource describes an element that knowledge (Evidence) is about.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the evidence variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="shortTitle" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="citeAs" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Display of the suggested method of how to cite this EvidenceVariable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this EvidenceVariable. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the evidence variable was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the evidence variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person or entity that entered the data into the EvidenceVariable Resource instance, if different than the author or creator of the intellectual property contained within the EvidenceVariable Resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language summary of the evidence variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-readable string to clarify or explain concepts about the resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this EvidenceVariable is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the EvidenceVariable and/or its contents. Copyright statements are legal notices of intellectual property ownership and may include restrictions on the use and publishing of the EvidenceVariable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted . (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.

See guidance around (not) making local changes to elements [here](canonicalresource.html#localization).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the resource content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatesTo" type="EvidenceVariable.RelatesTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relationships that this EvidenceVariable has with other FHIR or non-FHIR resources that already exist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actual" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">True if the actual variable measured, false if a conceptual representation of the intended variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The meaning of the evidence variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definitionModifier" type="EvidenceVariable.DefinitionModifier" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Further specification of the definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="handling" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method of handling in statistical analysis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" type="EvidenceVariable.Category" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A grouping for dichotomous, ordinal, or polychotomouos variables.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conditional" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">The context, situation, or parameters that determine whether the data is obtained to determine the value of the variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Classification of the variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dataStorage" type="EvidenceVariable.DataStorage" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the data element is organized and where the data element (expressing the value of the variable) is found in the dataset.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="timing" minOccurs="0" maxOccurs="1" type="RelativeTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the variable is observed in relation to a reference point in time defined by context or event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the variable is observed in relation to calendar dates and times.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="constraint" type="EvidenceVariable.Constraint" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Limit on acceptability of data used to express values of the variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="missingDataMeaning" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A method or transformation applied for missing data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unacceptableDataHandling" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A method or transformation applied for data that does not match required patterns.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceVariable.RelatesTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceVariable resource describes an element that knowledge (Evidence) is about.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship to the related artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The artifact that is related to this EvidenceVariable Resource.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetUri" type="uri"/>
            <xs:element name="targetAttachment" type="Attachment"/>
            <xs:element name="targetCanonical" type="canonical"/>
            <xs:element name="targetReference" type="Reference"/>
            <xs:element name="targetMarkdown" type="markdown"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceVariable.DefinitionModifier">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceVariable resource describes an element that knowledge (Evidence) is about.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Attribute of the definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Specification of the definition attribute.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueRelativeTime" type="RelativeTime"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueExpression" type="Expression"/>
            <xs:element name="valueUri" type="uri"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceVariable.Category">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceVariable resource describes an element that knowledge (Evidence) is about.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the grouping.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Definition of the grouping.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceVariable.DataStorage">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceVariable resource describes an element that knowledge (Evidence) is about.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="datatype" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of data used to express values of the variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="path" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The mapping (order of elements) to reach the element containing the  data element in the dataset.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="delimiter" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A character or series of characters that is used within a string to signal the separation of discrete values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="EvidenceVariable.DataStorage" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A part of the value for a variable that is stored in 2 or more parts.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceVariable.Constraint">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceVariable resource describes an element that knowledge (Evidence) is about.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="conditional" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The context, situation, or parameters that determine whether this constraint applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="minimumQuantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The lowest permissible value of the variable, used with variables that have a number-based datatype (with or without units).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maximumQuantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The highest permissible value of the variable, used with variables that have a number-based datatype (with or without units).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="earliestDateTime" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The earliest permissible value of the variable, used with variables that have a date-based or dateTime-based datatype.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="latestDateTime" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The latest permissible value of the variable, used with variables that have a date-based or dateTime-based datatype.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="minimumStringLength" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The lowest number of characters allowed for a value of the variable, used with variables that have a string-based datatype.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maximumStringLength" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The highest number of characters allowed for a value of the variable, used with variables that have a string-based datatype.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A rule, such as a format or other expectation, for the data values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">A rule, such as a format or other expectation, for the data values, expressed as an Expression.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expectedValueSet" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of anticipated values used to express value of the variable, used with variables that have a codeable concept-based datatype.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expectedUnitsValueSet" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of anticipated values used to express units for the value of the variable, used with variables that have a Quantity-based datatype.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="anyValueAllowed" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the value expressed for a variable is allowed to not be restricted to the expected value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ExampleScenario" type="ExampleScenario">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ExampleScenario">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the ExampleScenario. This name should be usable as an identifier for the resource by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the ExampleScenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this example scenario. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the example scenario was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the example scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the ExampleScenario from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the example scenario and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the example scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" type="ExampleScenario.Actor" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A system or person who shares or receives an instance within the scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instance" type="ExampleScenario.Instance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A single data collection that is shared as part of the scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="process" type="ExampleScenario.Process" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A group of operations that represents a significant step within a scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExampleScenario.Actor">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="key" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique string within the scenario that is used to reference the actor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="ActorDefinitionActorType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The category of actor - person or system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human-readable name for the actor used when rendering the scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanation of who/what the actor is and its role in the scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The formal definition of the actor in the scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExampleScenario.Instance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="key" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique string within the scenario that is used to reference the instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="structureType" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code indicating the kind of data structure (FHIR resource or some other standard) this is an instance of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="structureVersion" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Conveys the version of the data structure instantiated.  I.e. what release of FHIR, X12, OpenEHR, etc. is instance compliant with.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Refers to a profile, template or other ruleset the instance adheres to.</xs:documentation>
            </xs:annotation>
            <xs:element name="structureProfileCanonical" type="canonical"/>
            <xs:element name="structureProfileUri" type="uri"/>
          </xs:choice>
          <xs:element name="title" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short descriptive label the instance to be used in tables or diagrams.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanation of what the instance contains and what it's for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="content" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to an instance (typically an example) that shows the data that would corespond to this instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" type="ExampleScenario.Version" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Represents the instance as it was at a specific time-point.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="containedInstance" type="ExampleScenario.ContainedInstance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">References to other instances that can be found within this instance (e.g. the observations contained in a bundle).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExampleScenario.Version">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="key" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique string within the instance that is used to reference the version of the instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short descriptive label the version to be used in tables or diagrams.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanation of what this specific version of the instance contains and represents.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="content" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to an instance (typically an example) that shows the data that would flow at this point in the scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExampleScenario.ContainedInstance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="instanceReference" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the key of an instance found within this one.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="versionReference" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the key of a specific version of an instance in this instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExampleScenario.Process">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="title" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short descriptive label the process to be used in tables or diagrams.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanation of what the process represents and what it does.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preConditions" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the initial state of the actors, environment and data before the process starts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="postConditions" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the final state of the actors, environment and data after the process has been successfully completed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="step" type="ExampleScenario.Step" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A significant action that occurs as part of the process.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExampleScenario.Step">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="number" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the step, e.g. 1.2.5.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="process" type="ExampleScenario.Process" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that the step is a complex sub-process with its own steps.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="workflow" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that the step is defined by a seaparate scenario instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operation" type="ExampleScenario.Operation" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The step represents a single operation invoked on receiver by sender.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="alternative" type="ExampleScenario.Alternative" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates an alternative step that can be taken instead of the sub-process, scenario or operation.  E.g. to represent non-happy-path/exceptional/atypical circumstances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="pause" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates that, following this step, there is a pause in the flow and the subsequent step will occur at some later time (triggered by some event).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExampleScenario.Operation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The standardized type of action (FHIR or otherwise).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short descriptive label the step to be used in tables or diagrams.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="initiator" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The system that invokes the action/transmits the data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="receiver" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The system on which the action is invoked/receives the data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanation of what the operation represents and what it does.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="initiatorActive" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If false, the initiator is deactivated right after the operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="receiverActive" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If false, the receiver is deactivated right after the operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" type="ExampleScenario.ContainedInstance" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the instance that is transmitted from requester to receiver as part of the invocation of the operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="response" type="ExampleScenario.ContainedInstance" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the instance that is transmitted from receiver to requester as part of the operation's synchronous response (if any).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExampleScenario.Alternative">
    <xs:annotation>
      <xs:documentation xml:lang="en">A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification.  This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="title" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-readable description of the alternative explaining when the alternative should occur rather than the base step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="step" type="ExampleScenario.Step" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the operation, sub-process or scenario that happens if the alternative option is selected.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ExplanationOfBenefit" type="ExplanationOfBenefit">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:element>
  <xs:complexType name="ExplanationOfBenefit">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this explanation of benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ExplanationOfBenefitStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The category of claim, e.g. oral, pharmacy, vision, institutional, professional.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="1" maxOccurs="1" type="Use">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party/group to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="billablePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period for which charges are being submitted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enterer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual who created the claim, predetermination or preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party responsible for authorization, adjudication and reimbursement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider which is responsible for the claim, predetermination or preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider-required urgency of processing the request. Typical values include: stat, normal deferred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fundsReserveRequested" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate whether and for whom funds are to be reserved for future claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fundsReserve" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="related" type="ExplanationOfBenefit.Related" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prescription" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="originalPrescription" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" type="ExplanationOfBenefit.Event" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information code for an event with a corresponding date or period.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payee" type="ExplanationOfBenefit.Payee" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party to be reimbursed for cost of the products and services according to the terms of the policy.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referral" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Healthcare encounters related to this claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="facility" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Facility where the services were provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="claim" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="claimResponse" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="1" maxOccurs="1" type="ClaimProcessingCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The outcome of the claim, predetermination, or preauthorization processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decision" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disposition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human readable description of the status of the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference from the Insurer which is used in later communications which refers to this adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRefPeriod" minOccurs="0" maxOccurs="unbounded" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosisRelatedGroup" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="careTeam" type="ExplanationOfBenefit.CareTeam" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The members of the team who provided the products and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" type="ExplanationOfBenefit.SupportingInfo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosis" type="ExplanationOfBenefit.Diagnosis" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about diagnoses relevant to the claim items.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedure" type="ExplanationOfBenefit.Procedure" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Procedures performed on the patient relevant to the billing items with the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="precedence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" type="ExplanationOfBenefit.Insurance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Financial instruments for reimbursement for the health care products and services specified on the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="accident" type="ExplanationOfBenefit.Accident" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details of a accident which resulted in injuries which required the products and services listed in the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="ExplanationOfBenefit.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="addItem" type="ExplanationOfBenefit.AddItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The first-tier service adjudications for payer added product or service lines.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ExplanationOfBenefit.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results which are presented at the header level rather than at the line-item or add-item levels.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="total" type="ExplanationOfBenefit.Total" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Categorized monetary totals for the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payment" type="ExplanationOfBenefit.Payment" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Payment details for the adjudication of the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="formCode" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code for the form to be used for printing the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="form" minOccurs="0" maxOccurs="1" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual form, by reference or inclusion, for printing the content or an EOB.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processNote" type="ExplanationOfBenefit.ProcessNote" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A note that describes or explains adjudication results in a human readable form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="benefitPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The term of the benefits documented in this response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="benefitBalance" type="ExplanationOfBenefit.BenefitBalance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Balance by Benefit Category.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Related">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="claim" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to a related Claim or ExplanationOfBenefit as a representation of a claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to convey how the claims are related.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An alternate organizational reference to the case or file to which this particular claim pertains.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Event">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded event such as when a service is expected or a card printed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A date or period in the past or future indicating when the event occurred or is expectd to occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="whenDateTime" type="dateTime"/>
            <xs:element name="whenPeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Payee">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of Party to be reimbursed: Subscriber, billing provider, other.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="party" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the individual or organization to whom any payment will be made.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.CareTeam">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify care team entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Member of the team who provided the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialty" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specialization of the practitioner or provider which is applicable for this service.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.SupportingInfo">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify supporting information entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The general class of the information supplied: information; exception; accident, employment; onset, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when or period to which this information refers.</xs:documentation>
            </xs:annotation>
            <xs:element name="timingDateTime" type="dateTime"/>
            <xs:element name="timingPeriod" type="Period"/>
            <xs:element name="timingTiming" type="Timing"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueCanonical" type="canonical"/>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueId" type="id"/>
            <xs:element name="valueInstant" type="instant"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueInteger64" type="integer64"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueOid" type="oid"/>
            <xs:element name="valuePositiveInt" type="positiveInt"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueUnsignedInt" type="unsignedInt"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueUrl" type="url"/>
            <xs:element name="valueUuid" type="uuid"/>
            <xs:element name="valueAddress" type="Address"/>
            <xs:element name="valueAge" type="Age"/>
            <xs:element name="valueAnnotation" type="Annotation"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueCodeableReference" type="CodeableReference"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueContactPoint" type="ContactPoint"/>
            <xs:element name="valueCount" type="Count"/>
            <xs:element name="valueDistance" type="Distance"/>
            <xs:element name="valueDuration" type="Duration"/>
            <xs:element name="valueHumanName" type="HumanName"/>
            <xs:element name="valueIdentifier" type="Identifier"/>
            <xs:element name="valueMoney" type="Money"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueRatioRange" type="RatioRange"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueSignature" type="Signature"/>
            <xs:element name="valueTiming" type="Timing"/>
            <xs:element name="valueContactDetail" type="ContactDetail"/>
            <xs:element name="valueDataRequirement" type="DataRequirement"/>
            <xs:element name="valueExpression" type="Expression"/>
            <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
            <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
            <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
            <xs:element name="valueUsageContext" type="UsageContext"/>
            <xs:element name="valueAvailability" type="Availability"/>
            <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
            <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
            <xs:element name="valueDosage" type="Dosage"/>
            <xs:element name="valueMeta" type="Meta"/>
          </xs:choice>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides the reason in the situation where a reason code is required in addition to the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Diagnosis">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify diagnosis entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The nature of illness or problem in a coded form or as a reference to an external defined Condition.</xs:documentation>
            </xs:annotation>
            <xs:element name="diagnosisCodeableConcept" type="CodeableConcept"/>
            <xs:element name="diagnosisReference" type="Reference"/>
          </xs:choice>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the condition was observed or the relative ranking.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="onAdmission" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indication of whether the diagnosis was present on admission to a facility.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Procedure">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify procedure entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the condition was observed or the relative ranking.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date and optionally time the procedure was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The code or reference to a Procedure resource which identifies the clinical intervention performed.</xs:documentation>
            </xs:annotation>
            <xs:element name="procedureCodeableConcept" type="CodeableConcept"/>
            <xs:element name="procedureReference" type="Reference"/>
          </xs:choice>
          <xs:element name="udi" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifiers associated with this line item.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Insurance">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="focal" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverage" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Accident">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date of an accident event  related to the products and services contained in the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The physical location of the accident event.</xs:documentation>
            </xs:annotation>
            <xs:element name="locationAddress" type="Address"/>
            <xs:element name="locationReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify item entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="careTeamSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Care team members related to this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosisSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Diagnoses applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedureSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Procedures applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exceptions, special conditions and supporting information applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Request or Referral for Goods or Service to be rendered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or dates when the service or product was supplied, performed or completed.</xs:documentation>
            </xs:annotation>
            <xs:element name="servicedDate" type="date"/>
            <xs:element name="servicedPeriod" type="Period"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the product or service was provided.</xs:documentation>
            </xs:annotation>
            <xs:element name="locationCodeableConcept" type="CodeableConcept"/>
            <xs:element name="locationAddress" type="Address"/>
            <xs:element name="locationReference" type="Reference"/>
          </xs:choice>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udi" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifiers associated with this line item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" type="ExplanationOfBenefit.BodySite" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical location where the service is performed or applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Healthcare encounters related to this claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ExplanationOfBenefit.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ExplanationOfBenefit.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" type="ExplanationOfBenefit.Detail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Second-tier of goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.BodySite">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="site" minOccurs="1" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical service site on the patient (limb, tooth, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subSite" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A region or surface of the bodySite, e.g. limb region or tooth surface(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.ReviewOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="decision" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reasons for the result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference from the Insurer which is used in later communications which refers to this adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time frame during which this authorization is effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Adjudication">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code supporting the understanding of the adjudication result and explaining variance from expected amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Monetary amount associated with the category.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">A non-monetary value associated with the category. Mutually exclusive to the amount element above.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decisionDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time the adjudication decision occured.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Detail">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udi" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifiers associated with this line item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ExplanationOfBenefit.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ExplanationOfBenefit.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetail" type="ExplanationOfBenefit.SubDetail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Third-tier of goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.SubDetail">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="udi" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique Device Identifiers associated with this line item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ExplanationOfBenefit.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ExplanationOfBenefit.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.AddItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="itemSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Claim items which this service line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detailSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the details within the claim item which this line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetailSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exceptions, special conditions and supporting information applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The providers who are authorized for the services rendered to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Request or Referral for Goods or Service to be rendered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or dates when the service or product was supplied, performed or completed.</xs:documentation>
            </xs:annotation>
            <xs:element name="servicedDate" type="date"/>
            <xs:element name="servicedPeriod" type="Period"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the product or service was provided.</xs:documentation>
            </xs:annotation>
            <xs:element name="locationCodeableConcept" type="CodeableConcept"/>
            <xs:element name="locationAddress" type="Address"/>
            <xs:element name="locationReference" type="Reference"/>
          </xs:choice>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" type="ExplanationOfBenefit.BodySite1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical location where the service is performed or applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ExplanationOfBenefit.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ExplanationOfBenefit.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" type="ExplanationOfBenefit.Detail1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The second-tier service adjudications for payer added services.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.BodySite1">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="site" minOccurs="1" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical service site on the patient (limb, tooth, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subSite" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A region or surface of the bodySite, e.g. limb region or tooth surface(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Detail1">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ExplanationOfBenefit.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ExplanationOfBenefit.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetail" type="ExplanationOfBenefit.SubDetail1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The third-tier service adjudications for payer added services.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.SubDetail1">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPaid" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ExplanationOfBenefit.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ExplanationOfBenefit.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Total">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Monetary total amount associated with the category.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Payment">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this represents partial or complete payment of the benefits payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjustment" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjustmentReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reason for the payment adjustment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated date the payment will be issued or the actual issue date of payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Benefits payable less any payment adjustment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Issuer's unique identifier for the payment instrument.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.ProcessNote">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="class" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the business purpose of the note.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="number" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify a note entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business purpose of the note text.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The explanation or description associated with the processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="language" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to define the language used in the text of the note.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.BenefitBalance">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="excluded" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short name or tag for the benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A richer description of the benefit or services covered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unit" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if the benefits apply to an individual or to the family.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="term" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="financial" type="ExplanationOfBenefit.Financial" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Benefits Used to date.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ExplanationOfBenefit.Financial">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Classification of benefit being provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of the benefit which is permitted under the coverage.</xs:documentation>
            </xs:annotation>
            <xs:element name="allowedUnsignedInt" type="unsignedInt"/>
            <xs:element name="allowedString" type="string"/>
            <xs:element name="allowedMoney" type="Money"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of the benefit which have been consumed to date.</xs:documentation>
            </xs:annotation>
            <xs:element name="usedUnsignedInt" type="unsignedInt"/>
            <xs:element name="usedMoney" type="Money"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ExplanationOfBenefitStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">Draft</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered In Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ExplanationOfBenefitStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ExplanationOfBenefitStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="FamilyMemberHistory" type="FamilyMemberHistory">
    <xs:annotation>
      <xs:documentation xml:lang="en">Significant health conditions for a person related to the patient relevant in the context of care for the patient.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="FamilyMemberHistory">
    <xs:annotation>
      <xs:documentation xml:lang="en">Significant health conditions for a person related to the patient relevant in the context of care for the patient.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FamilyHistoryStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code specifying the status of the record of the family history of a specific family member.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dataAbsentReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes why the family member's history is not available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person who this history concerns.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and possibly time) when the family member history was recorded or last updated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual who recorded the record and takes responsibility for its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asserter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual or device that is making the family member history statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">This will either be a name or a description; e.g. &quot;Aunt Susan&quot;, &quot;my cousin with the red hair&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship this person has to the patient (father, mother, brother etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sex" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The birth sex of the family member.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual or approximate date of birth of the relative.</xs:documentation>
            </xs:annotation>
            <xs:element name="bornPeriod" type="Period"/>
            <xs:element name="bornDate" type="date"/>
            <xs:element name="bornString" type="string"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The age of the relative at the time the family member history is recorded.</xs:documentation>
            </xs:annotation>
            <xs:element name="ageAge" type="Age"/>
            <xs:element name="ageRange" type="Range"/>
            <xs:element name="ageString" type="string"/>
          </xs:choice>
          <xs:element name="estimatedAge" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates that the age value specified is an estimated value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.</xs:documentation>
            </xs:annotation>
            <xs:element name="deceasedBoolean" type="boolean"/>
            <xs:element name="deceasedAge" type="Age"/>
            <xs:element name="deceasedRange" type="Range"/>
            <xs:element name="deceasedDate" type="date"/>
            <xs:element name="deceasedString" type="string"/>
          </xs:choice>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes why the family member history occurred in coded or textual form, or Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" type="FamilyMemberHistory.Condition" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedure" type="FamilyMemberHistory.Procedure" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The significant Procedures (or procedure) that the family member had. This is a repeating section to allow a system to represent more than one procedure per resource, though there is nothing stopping multiple resources - one per procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="FamilyMemberHistory.Condition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Significant health conditions for a person related to the patient relevant in the context of care for the patient.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual condition, allergy, or intolerance specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contributedToDeath" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.</xs:documentation>
            </xs:annotation>
            <xs:element name="onsetAge" type="Age"/>
            <xs:element name="onsetRange" type="Range"/>
            <xs:element name="onsetPeriod" type="Period"/>
            <xs:element name="onsetString" type="string"/>
          </xs:choice>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">An area where general notes can be placed about this specific condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="FamilyMemberHistory.Procedure">
    <xs:annotation>
      <xs:documentation xml:lang="en">Significant health conditions for a person related to the patient relevant in the context of care for the patient.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual procedure specified. Could be a coded procedure or a less specific string depending on how much is known about the procedure and the capabilities of the creating system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what happened following the procedure. If the procedure resulted in death, deceased date is captured on the relation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contributedToDeath" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.</xs:documentation>
            </xs:annotation>
            <xs:element name="performedAge" type="Age"/>
            <xs:element name="performedRange" type="Range"/>
            <xs:element name="performedPeriod" type="Period"/>
            <xs:element name="performedString" type="string"/>
            <xs:element name="performedDateTime" type="dateTime"/>
          </xs:choice>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">An area where general notes can be placed about this specific procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FamilyHistoryStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="health-unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Health Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FamilyHistoryStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="FamilyHistoryStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Flag" type="Flag">
    <xs:annotation>
      <xs:documentation xml:lang="en">Prospective warnings of potential issues when providing care to the patient.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Flag">
    <xs:annotation>
      <xs:documentation xml:lang="en">Prospective warnings of potential issues when providing care to the patient.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="FlagStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supports basic workflow.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows a flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The coded value or textual component of the flag to display to the user.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient, related person, location, group, organization, or practitioner etc. this is about record this flag is associated with.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This alert is only relevant during the encounter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person, organization or device that created the flag.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information that may be relevant to the flag, such as why the flag was created or how to guide management of the flag.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FlagStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FlagStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="FlagStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Goal" type="Goal">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the intended objective(s) for a patient, group, or organizational care. Examples include a patient's weight loss, restoration of an activity of daily living for a patient, obtaining herd immunity via immunization for a group, meeting a process improvement objective for an organization, etc.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Goal">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the intended objective(s) for a patient, group, or organizational care. Examples include a patient's weight loss, restoration of an activity of daily living for a patient, obtaining herd immunity via immunization for a group, meeting a process improvement objective for an organization, etc.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lifecycleStatus" minOccurs="1" maxOccurs="1" type="GoalLifecycleStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The state of the goal throughout its lifecycle.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="achievementStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the progression, or lack thereof, towards the goal against the target.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a category the goal falls within.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="continuous" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">After meeting the goal, ongoing activity is needed to sustain the goal objective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human-readable and/or coded description of a specific desired objective of care, such as &quot;control blood pressure&quot; or &quot;negotiate an obstacle course&quot; or &quot;dance with child at wedding&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the patient, group or organization for whom the goal is being established.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or event after which the goal should begin being pursued.</xs:documentation>
            </xs:annotation>
            <xs:element name="startDate" type="date"/>
            <xs:element name="startCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="acceptance" type="Goal.Acceptance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the acceptance and relative priority assigned to the goal by the patient, practitioners and other stakeholders.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" type="Goal.Target" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what should be done by when.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies when the current achievement status took effect.  I.e. When achieved, when improving, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures the reason for the current lifecycle status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual who recorded the record and takes responsibility for its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whose goal this is - patient goal, practitioner goal, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="addresses" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identified conditions and other resources that provide the context for why the goal exists.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any comments related to the goal.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Goal.Acceptance">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the intended objective(s) for a patient, group, or organizational care. Examples include a patient's weight loss, restoration of an activity of daily living for a patient, obtaining herd immunity via immunization for a group, meeting a process improvement objective for an organization, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="participant" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person ororganization whose acceptance/priority is being reflected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="GoalAcceptStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the specified individual has accepted the goal or not.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the relative priority assigned to the goal by the stakeholder.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Goal.Target">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the intended objective(s) for a patient, group, or organizational care. Examples include a patient's weight loss, restoration of an activity of daily living for a patient, obtaining herd immunity via immunization for a group, meeting a process improvement objective for an organization, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="measure" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value. A CodeableConcept target value could be Positive, Negative, Abnormal, Normal, Present, Absent, Yes, No.</xs:documentation>
            </xs:annotation>
            <xs:element name="detailQuantity" type="Quantity"/>
            <xs:element name="detailRange" type="Range"/>
            <xs:element name="detailCodeableConcept" type="CodeableConcept"/>
            <xs:element name="detailString" type="string"/>
            <xs:element name="detailBoolean" type="boolean"/>
            <xs:element name="detailInteger" type="integer"/>
            <xs:element name="detailRatio" type="Ratio"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates either the date or the duration after start by which the goal should be met.</xs:documentation>
            </xs:annotation>
            <xs:element name="dueDate" type="date"/>
            <xs:element name="dueDuration" type="Duration"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="GoalLifecycleStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="proposed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Proposed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="planned">
        <xs:annotation>
          <xs:documentation xml:lang="en">Planned</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="accepted">
        <xs:annotation>
          <xs:documentation xml:lang="en">Accepted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="rejected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Rejected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="GoalLifecycleStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="GoalLifecycleStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="GoalAcceptStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="agree">
        <xs:annotation>
          <xs:documentation xml:lang="en">Agree</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="disagree">
        <xs:annotation>
          <xs:documentation xml:lang="en">Disagree</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="pending">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="GoalAcceptStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="GoalAcceptStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Group" type="Group">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a defined collection of entities that may be discussed or acted upon collectively but which are not typically expected to act collectively.  These collections are also not typically formally or legally recognized.

NOTE: Group may be used to define families or households, which in some circumstances may act collectively or have a degree of legal or formal recognition.  This should be considered an exception.  When Group is used for types of entities other than Patient or RelatedPerson, the expectation remains that the Group will not act collectively or have formal recognition - use Organization if these behaviors are needed.

For example, it is possible for a 'family' Group to be a performer of an Observation or owner of a Task.  However, this is not permitted for a Group made up of Practitioners, PractitionerRoles or Organizations.  Organization or CareTeam would need to be used instead.  A Group of Practitioners could, however, be a subject of an Observation.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Group">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a defined collection of entities that may be discussed or acted upon collectively but which are not typically expected to act collectively.  These collections are also not typically formally or legally recognized.

NOTE: Group may be used to define families or households, which in some circumstances may act collectively or have a degree of legal or formal recognition.  This should be considered an exception.  When Group is used for types of entities other than Patient or RelatedPerson, the expectation remains that the Group will not act collectively or have formal recognition - use Organization if these behaviors are needed.

For example, it is possible for a 'family' Group to be a performer of an Observation or owner of a Task.  However, this is not permitted for a Group made up of Practitioners, PractitionerRoles or Organizations.  Organization or CareTeam would need to be used instead.  A Group of Practitioners could, however, be a subject of an Observation.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this Group when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Group is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Group is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this participant by one of the applications involved.  These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the Group when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Group author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence without additional knowledge.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A label assigned to the group for human identification and communication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the Group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of this Group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this Group is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and optionally time) when the Group was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the Group changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the Group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of what the group represents and how it is intended to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Groups.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this Group is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the Group and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the Group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="GroupType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the broad classification of the kind of resources the group includes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="membership" minOccurs="1" maxOccurs="1" type="GroupMembershipBasis">
            <xs:annotation>
              <xs:documentation xml:lang="en">Basis for membership in the Group:

* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.
* 'conceptual': The Group.characteristics specified are both necessary and sufficient to determine membership. The 'conceptual' Group is a 'definitional' Group in which the Group.type is not bound to FHIR types.
* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that describes the use of the group. The use of the group usually dictates what kind of entities can be members of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A count of the number of resource instances that are part of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingEntity" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Entity responsible for defining and maintaining Group characteristics and/or registered members.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="combinationMethod" minOccurs="0" maxOccurs="1" type="GroupCharacteristicCombination">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to specify how two or more characteristics are combined.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="combinationThreshold" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides the value of &quot;n&quot; when &quot;at-least&quot; or &quot;at-most&quot; codes are used for combinationMethod.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characteristic" type="Group.Characteristic" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies traits whose presence r absence is shared by members of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="member" type="Group.Member" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the resource instances that are members of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Group.Characteristic">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a defined collection of entities that may be discussed or acted upon collectively but which are not typically expected to act collectively.  These collections are also not typically formally or legally recognized.

NOTE: Group may be used to define families or households, which in some circumstances may act collectively or have a degree of legal or formal recognition.  This should be considered an exception.  When Group is used for types of entities other than Patient or RelatedPerson, the expectation remains that the Group will not act collectively or have formal recognition - use Organization if these behaviors are needed.

For example, it is possible for a 'family' Group to be a performer of an Observation or owner of a Task.  However, this is not permitted for a Group made up of Practitioners, PractitionerRoles or Organizations.  Organization or CareTeam would need to be used instead.  A Group of Practitioners could, however, be a subject of an Observation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that identifies the kind of trait being asserted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the trait that holds (or does not hold - see 'exclude') for members of the group.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueExpression" type="Expression"/>
          </xs:choice>
          <xs:element name="exclude" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates the characteristic is one that is NOT held by members of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Method for how the characteristic value was determined.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="formula" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">A CQL, FHIRPath, or other expression that is used to generate the value for this characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="determiner" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity who is expected to evaluate the characteristic value for candidate group members.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="offset" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the reference point for comparison when other than 0.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of occurrences meeting the characteristic.</xs:documentation>
            </xs:annotation>
            <xs:element name="instancesUnsignedInt" type="unsignedInt"/>
            <xs:element name="instancesRange" type="Range"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Length of time in which the characteristic is met.</xs:documentation>
            </xs:annotation>
            <xs:element name="durationDuration" type="Duration"/>
            <xs:element name="durationRange" type="Range"/>
          </xs:choice>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="timing" minOccurs="0" maxOccurs="unbounded" type="RelativeTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Timing in which the characteristic is determined.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Group.Member">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a defined collection of entities that may be discussed or acted upon collectively but which are not typically expected to act collectively.  These collections are also not typically formally or legally recognized.

NOTE: Group may be used to define families or households, which in some circumstances may act collectively or have a degree of legal or formal recognition.  This should be considered an exception.  When Group is used for types of entities other than Patient or RelatedPerson, the expectation remains that the Group will not act collectively or have formal recognition - use Organization if these behaviors are needed.

For example, it is possible for a 'family' Group to be a performer of an Observation or owner of a Task.  However, this is not permitted for a Group made up of Practitioners, PractitionerRoles or Organizations.  Organization or CareTeam would need to be used instead.  A Group of Practitioners could, however, be a subject of an Observation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="entity" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="involvement" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that describes how a user is involved in the group. Some groups (e.g. exposure-group) typically don't have variance between members, or it is not tracked, while for other groups (e.g. family, household) this may be meaningful.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period that the member was in the group, if known.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="inactive" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that the member is no longer in the group, but previously may have been a member.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="GroupTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="person">
        <xs:annotation>
          <xs:documentation xml:lang="en">Person</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="animal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Animal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="careteam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="healthcareservice">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="relatedperson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="specimen">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specimen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="medication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="medicinalproductdefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="substance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Substance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="substancedefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="biologicallyDerivedProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">BiologicallyDerivedProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="nutritionProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="GroupType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="GroupTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="GroupMembershipBasisEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="definitional">
        <xs:annotation>
          <xs:documentation xml:lang="en">Definitional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="conceptual">
        <xs:annotation>
          <xs:documentation xml:lang="en">Conceptual</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="enumerated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Enumerated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="GroupMembershipBasis">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="GroupMembershipBasisEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="GroupCharacteristicCombinationEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="all-of">
        <xs:annotation>
          <xs:documentation xml:lang="en">All of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="any-of">
        <xs:annotation>
          <xs:documentation xml:lang="en">Any of</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="at-least">
        <xs:annotation>
          <xs:documentation xml:lang="en">At least</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="at-most">
        <xs:annotation>
          <xs:documentation xml:lang="en">At most</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="except-subset">
        <xs:annotation>
          <xs:documentation xml:lang="en">Except subset</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="GroupCharacteristicCombination">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="GroupCharacteristicCombinationEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="GuidanceResponse" type="GuidanceResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GuidanceResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="requestIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this guidance response by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier, CodeableConcept or canonical reference to the guidance that was requested.</xs:documentation>
            </xs:annotation>
            <xs:element name="moduleUri" type="uri"/>
            <xs:element name="moduleCanonical" type="canonical"/>
            <xs:element name="moduleCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="GuidanceResponseStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or set of individuals the action is being or was performed on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this guidance response was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="occurrenceDateTime" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates when the guidance response was processed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a reference to the device that performed the guidance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The principal physical location where the guidance response was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the reason for the guidance response in coded or textual form, or Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a mechanism to communicate additional information about the response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="evaluationMessage" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outputParameters" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="result" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actions, if any, produced by the evaluation of the artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dataRequirement" minOccurs="0" maxOccurs="unbounded" type="DataRequirement">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="GuidanceResponseStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="success">
        <xs:annotation>
          <xs:documentation xml:lang="en">Success</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-requested">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Requested</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Required</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="failure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Failure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered In Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="GuidanceResponseStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="GuidanceResponseStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="HealthcareService" type="HealthcareService">
    <xs:annotation>
      <xs:documentation xml:lang="en">The details of a healthcare service available at a location.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="HealthcareService">
    <xs:annotation>
      <xs:documentation xml:lang="en">The details of a healthcare service available at a location.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">External identifiers for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="providedBy" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that provides this healthcare service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="offeredIn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the HealthcareService is representing a specific, schedulable service, the availableIn property can refer to a generic service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the broad category of service being performed or delivered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific type of service that may be delivered or performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialty" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Collection of specialties handled by the Healthcare service. This is more of a medical term.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location(s) where this healthcare service may be provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Further description of the service as it would be presented to a consumer while searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="extraDetails" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Extra details about the service that can't be placed in the other fields.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="photo" minOccurs="0" maxOccurs="1" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ExtendedContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contact details of communication devices available relevant to the specific HealthcareService. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverageArea" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location(s) that this service is available to (not where the service is provided).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceProvisionCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code(s) that detail the conditions under which the healthcare service is available/offered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eligibility" type="HealthcareService.Eligibility" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Does this service have specific eligibility requirements that need to be met in order to use the service?</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="program" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Programs that this service is applicable to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characteristic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Collection of characteristics (attributes).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communication" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referralMethod" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referralRequired" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether or not a prospective consumer will require a referral for a particular service at a site to be provided by the Organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appointmentRequired" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="availability" minOccurs="0" maxOccurs="1" type="Availability">
            <xs:annotation>
              <xs:documentation xml:lang="en">A collection of times that the healthcare service is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="HealthcareService.Eligibility">
    <xs:annotation>
      <xs:documentation xml:lang="en">The details of a healthcare service available at a location.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded value for the eligibility.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Sometimes an eligibility code requires additional data to calculate the eligibility rules.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the eligibility conditions for the service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period that this eligibility rule is a requirement for this service.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ImagingSelection" type="ImagingSelection">
    <xs:annotation>
      <xs:documentation xml:lang="en">A selection of DICOM SOP instances within a single Study and Series. This might include additional specifics such as a set of frames or an image region, allowing linkage to an Observation Resource.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ImagingSelection">
    <xs:annotation>
      <xs:documentation xml:lang="en">A selection of DICOM SOP instances within a single Study and Series. This might include additional specifics such as a set of frames or an image region, allowing linkage to an Observation Resource.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this imaging selection by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ImagingSelectionStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the imaging selection. This is distinct from the status of any imaging study, service request, or task associated with the imaging selection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Classifies the general purpose of the imaging selection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modality" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The distinct modality for this selected series. This MAY be either an acquisition modality (e.g. CT, MR) or a non-acquisition modality (e.g. segmentation, presentation state).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the type of imaging selection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The subject, typically a patient, of the imaging selection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issued" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date and time the imaging selection was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" type="ImagingSelection.Performer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed the imaging selection and how they were involved.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan or order that is fulfilled in whole or in part by this imaging selection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The imaging study from which the imaging selection is made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="studyUid" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Study Instance UID for the DICOM Study from which the images were selected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="seriesUid" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The DICOM Series Instance UID of the selected series.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="seriesNumber" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numeric identifier of the selected series in the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="frameOfReferenceUid" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier used to group composite instances that have the same coordinate system that conveys spatial and/or temporal information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The anatomic structures selected. See [DICOM Part 16 Annex L](http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite MAY include the laterality of body part imaged.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual focus of an imaging selection when it is another imaging selection resource and not the patient of record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The network services providing access to the selected images, frames, etc. See implementation notes for information about using DICOM endpoints.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instance" type="ImagingSelection.Instance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Each imaging selection includes one or more selected DICOM SOP instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="imageRegion3D" type="ImagingSelection.ImageRegion3D" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies a 3D image region, defined by a region type and a set of 3D coordinates.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImagingSelection.Performer">
    <xs:annotation>
      <xs:documentation xml:lang="en">A selection of DICOM SOP instances within a single Study and Series. This might include additional specifics such as a set of frames or an image region, allowing linkage to an Observation Resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distinguishes the type of involvement of the performer in the imaging selection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed the imaging selection.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImagingSelection.Instance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A selection of DICOM SOP instances within a single Study and Series. This might include additional specifics such as a set of frames or an image region, allowing linkage to an Observation Resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="uid" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The SOP Instance UID for the selected DICOM this image or other DICOM content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="number" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of the instance assigned by the creator of the series. MAY or MAY NOT correspond to intended display order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sopClass" minOccurs="0" maxOccurs="1" type="oid">
            <xs:annotation>
              <xs:documentation xml:lang="en">DICOM instance type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="frameNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of frame numbers selected from a multiframe SOP Instance (See [DICOM PS 3.3 Table 10.3](https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_10.3.html#table_10-3)).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referencedContentItemIdentifier" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of Referenced Content Item Identifier values selected from a DICOM SR or other structured document SOP Instance (See [DICOM PS 3.3 C.17.3.2.5](https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.17.3.2.5.html)).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="segmentNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of segment numbers selected from a segmentation SOP Instance (See [DICOM PS 3.3 Table C.8.20-4](https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.20.4.html#table_C.8.20-4)).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="regionOfInterest" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of Region of Interest (ROI) numbers selected from a radiotherapy structure set SOP Instance (See [DICOM PS 3.3 C.8.8.5](https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.8.5.html)).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="waveFormChannel" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of channels in a Waveform selected from an instance of a waveform SOP Class.
Each channel is specified as a pair of values where the first value is the Multiplex Group Number, and the second value is the Channel Number within the multiplex group (See [DICOM PS 3.3 C.18.5.1.1](https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.18.5.html#sect_C.18.5.1.1)).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="imageRegion2D" type="ImagingSelection.ImageRegion2D" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies an image region, defined by a region type and a set of 2D coordinates in pixel space.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImagingSelection.ImageRegion2D">
    <xs:annotation>
      <xs:documentation xml:lang="en">A selection of DICOM SOP instances within a single Study and Series. This might include additional specifics such as a set of frames or an image region, allowing linkage to an Observation Resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="regionType" minOccurs="1" maxOccurs="1" type="ImagingSelectionDGraphicType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of image region.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coordinate" minOccurs="1" maxOccurs="unbounded" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">The coordinates defining the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution.
The origin at the TLHC of the TLHC pixel is 0.0\0.0, the BRHC of the TLHC pixel is 1.0\1.0, and the BRHC of the BRHC pixel is the number of columns\rows in the image / frames. The values SHALL be within the range 0\0 to the number of columns\rows in the image / frames.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImagingSelection.ImageRegion3D">
    <xs:annotation>
      <xs:documentation xml:lang="en">A selection of DICOM SOP instances within a single Study and Series. This might include additional specifics such as a set of frames or an image region, allowing linkage to an Observation Resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="regionType" minOccurs="1" maxOccurs="1" type="ImagingSelectionDGraphicType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the type of image region.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coordinate" minOccurs="1" maxOccurs="unbounded" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">The coordinates defining the image region. Encoded as an ordered set of (x,y,z) triplets (in mm and MAY be negative) that define a region of interest in the patient-relative Reference Coordinate System defined by ImagingSelection.frameOfReferenceUid element.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ImagingSelectionStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="available">
        <xs:annotation>
          <xs:documentation xml:lang="en">Available</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ImagingSelectionStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ImagingSelectionStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ImagingSelectionDGraphicTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="point">
        <xs:annotation>
          <xs:documentation xml:lang="en">POINT</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="multipoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">MULTIPOINT</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="polyline">
        <xs:annotation>
          <xs:documentation xml:lang="en">POLYLINE</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="polygon">
        <xs:annotation>
          <xs:documentation xml:lang="en">POLYGON</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ellipse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ELLIPSE</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ellipsoid">
        <xs:annotation>
          <xs:documentation xml:lang="en">ELLIPSOID</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ImagingSelectionDGraphicType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ImagingSelectionDGraphicTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ImagingStudy" type="ImagingStudy">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 can have multiple series of different modality values.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ImagingStudy">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 can have multiple series of different modality values.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this imaging study by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server. Typically this will include the DICOM Study Instance UID.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ImagingStudyStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the imaging study. This is distinct from the status of any service request or task associated with the imaging study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modality" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">All the distinct values of series.modality. This MAY be either an acquisition or a non-acquisition modality.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The subject, typically a patient, of the imaging study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The healthcare event (e.g. a patient and healthcare provider interaction) during which the imaging data represented by this imaging study was acquired.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="started" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date and time the study started.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan or order that is fulfilled in whole or in part by this imaging study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="procedure" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The performed procedure(s) during which the data associated with this imaging study was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referrer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The referring physician.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The principal physical location where the imaging study was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes why the imaging study occurred in coded or textual form or indicates another resource whose existence justifies this imaging study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the imaging study by the performer, subject or other participants.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description or classification of the imaging study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfSeries" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of known Series in the Study. This value might be present even if the ImagingStudy.series element is empty or only partially populated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfInstances" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of known SOP Instances in Study. This value might be present even if the ImagingStudy.series.instance elements are empty or only partially populated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="series" type="ImagingStudy.Series" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of Series belonging to the study. Each Series contains a set of SOP Instances, which could be images, waveforms, or other content.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImagingStudy.Series">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 can have multiple series of different modality values.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="uid" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The DICOM Series Instance UID of the series.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="number" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numeric identifier of this series in the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modality" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The distinct modality for this series. This MAY be either an acquisition modality (e.g., CT, MR) or a non-acquisition modality (e.g., segmentation, presentation state).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description or classification of the series.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfInstances" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of SOP Instances in the Series. The value given MAY be larger than the number of instance elements this series contains due to resource availability, security, or other factors. This element SHOULD be present if any instance elements are present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The network service providing access for the study. See implementation notes for information about [using DICOM endpoints](imagingstudy.html#endpoints).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The anatomic structures examined. See [DICOM Part 16 Annex L](http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite MAY include the laterality of body part imaged.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specimen" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specimen imaged, e.g., for whole slide imaging of a biopsy.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="started" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time the series was started.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" type="ImagingStudy.Performer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed the series and how they were involved.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instance" type="ImagingStudy.Instance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A single SOP instance within the series, e.g. an image, or presentation state.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImagingStudy.Performer">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 can have multiple series of different modality values.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distinguishes the type of involvement of the performer in the imaging study..</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed the imaging study.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImagingStudy.Instance">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 can have multiple series of different modality values.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="uid" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The DICOM SOP Instance UID for this image or other DICOM content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sopClass" minOccurs="1" maxOccurs="1" type="oid">
            <xs:annotation>
              <xs:documentation xml:lang="en">DICOM instance  type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="number" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of the instance assigned by the creator of the series. MAY or MAY NOT correspond to intended display order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The title of the instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ImagingStudyStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="registered">
        <xs:annotation>
          <xs:documentation xml:lang="en">Registered</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="available">
        <xs:annotation>
          <xs:documentation xml:lang="en">Available</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ImagingStudyStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ImagingStudyStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Immunization" type="Immunization">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Immunization">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this immunization record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan, order or recommendation fulfilled in whole or in part by this immunization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ImmunizationStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the current status of the immunization event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the reason the immunization event was **not performed** or was **entered in error**.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="vaccineCode" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Vaccine that was administered or was to be administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="administeredProduct" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication of which product was administered to the patient. This is typically a more detailed representation of the concept conveyed by the vaccineCode data element. If a Medication resource is referenced, it may be to a stand-alone resource or a contained resource within the Immunization resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name of vaccine manufacturer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lotNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Lot number of the  vaccine product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expirationDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date vaccine batch expires.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient who either received or did not receive the immunization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The visit or admission or other contact between patient and health care provider the immunization was performed as part of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInformation" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information that is relevant to the immunization (e.g. for a vaccine recipient who is pregnant, the gestational age of the fetus). The reason why a vaccine was given (e.g. occupation, underlying medical condition) should be conveyed in Immunization.reason, not as supporting information. The reason why a vaccine was not given (e.g. contraindication) should be conveyed in Immunization.statusReason, not as supporting information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Date vaccine administered or was to be administered.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrenceString" type="string"/>
          </xs:choice>
          <xs:element name="primarySource" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the data contained in the resource was captured by the individual/organization which was responsible for the administration of the vaccine rather than as 'secondary reported' data documented by a third party. A value of 'true' means this data originated with the individual/organization which was responsible for the administration of the vaccine.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSource" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Typically the source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The service delivery location where the vaccine administration occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="site" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Body site where vaccine was administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="route" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The path by which the vaccine product is taken into the body.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doseQuantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of vaccine product that was administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" type="Immunization.Performer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who performed the immunization event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Extra information about the immunization that is not conveyed by the other attributes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes why the immunization occurred in coded or textual form, or indicates another resource (Condition, Observation or DiagnosticReport) whose existence justifies this immunization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isSubpotent" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subpotentReason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reason why a dose is considered to be subpotent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programEligibility" type="Immunization.ProgramEligibility" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a patient's eligibility for a funding program.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fundingSource" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publicly purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reaction" type="Immunization.Reaction" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Categorical data indicating that an adverse event is associated in time to an immunization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="protocolApplied" type="Immunization.ProtocolApplied" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The protocol (set of recommendations) being followed by the provider who administered the dose.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Immunization.Performer">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the function played by the performer in the immunization event (e.g. ordering provider, administering provider, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner or organization who performed the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Immunization.ProgramEligibility">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="program" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates which program the patient had their eligibility evaluated for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programStatus" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the patient's eligibility status for a specific payment program.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Immunization.Reaction">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date of reaction to the immunization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manifestation" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details of the reaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reported" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Self-reported indicator.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Immunization.ProtocolApplied">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="series" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">One possible path to achieve presumed immunity against a disease - within the context of an authority.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authority" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the authority who published the protocol (e.g. ACIP) that is being followed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="targetDisease" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The vaccine preventable disease the dose is being administered against.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doseNumber" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Nominal position in a series as intended by the practitioner administering the dose.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="seriesDoses" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ImmunizationStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-done">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Done</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ImmunizationStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of codes indicating the current status of an Immunization.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ImmunizationStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ImplementationGuide" type="ImplementationGuide">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ImplementationGuide">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this implementation guide when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the implementation guide.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this implementation guide. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the implementation guide was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the implementation guide.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the implementation guide from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate implementation guide instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this implementation guide is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the implementation guide and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the implementation guide.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packageId" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The NPM package name for this Implementation Guide, used in the NPM package distribution, which is the primary mechanism by which FHIR based tooling manages IG dependencies. This value must be globally unique, and should be assigned with care.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="license" minOccurs="0" maxOccurs="1" type="SPDXLicense">
            <xs:annotation>
              <xs:documentation xml:lang="en">The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fhirVersion" minOccurs="1" maxOccurs="unbounded" type="FHIRVersion">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version(s) of the FHIR specification that this ImplementationGuide targets - e.g. describes how to use. The value of this element is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.6.0. for this version.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dependsOn" type="ImplementationGuide.DependsOn" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="global" type="ImplementationGuide.Global" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of profiles that all resources covered by this implementation guide must conform to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" type="ImplementationGuide.Definition" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The information needed by an IG publisher tool to publish the whole implementation guide.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manifest" type="ImplementationGuide.Manifest" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about an assembled implementation guide, created by the publication tooling.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.DependsOn">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="uri" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A canonical reference to the Implementation guide for the dependency.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packageId" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The NPM package name for the Implementation Guide that this IG depends on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version of the IG that is depended on, when the correct version is required to understand the IG correctly.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description explaining the nature of the dependency on the listed IG.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Global">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="ResourceType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of resource that all instances must conform to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profile" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the profile that all instances must conform to.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Definition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="grouping" type="ImplementationGuide.Grouping" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A logical group of resources. Logical groups can be used when building pages.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" type="ImplementationGuide.Resource" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="page" type="ImplementationGuide.Page" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A page / section in the implementation guide. The root page is the implementation guide home page.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" type="ImplementationGuide.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of parameters that defines how the implementation guide is built. The parameters are defined by the relevant tools that build the implementation guides.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="template" type="ImplementationGuide.Template" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A template for building resources.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Grouping">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human-readable title to display for the package of resources when rendering the implementation guide.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human readable text describing the package.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Resource">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where this resource is found.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fhirVersion" minOccurs="0" maxOccurs="unbounded" type="FHIRVersion">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the FHIR Version(s) this artifact is intended to apply to. If no versions are specified, the resource is assumed to apply to all the versions stated in ImplementationGuide.fhirVersion.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the reason that a resource has been included in the implementation guide.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isExample" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates the resource is an example instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profile" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, indicates profile(s) the instance is valid against.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupingId" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the id of the grouping this resource appears in.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Page">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the URL or the actual content to provide for the page.</xs:documentation>
            </xs:annotation>
            <xs:element name="sourceUrl" type="url"/>
            <xs:element name="sourceString" type="string"/>
            <xs:element name="sourceMarkdown" type="markdown"/>
          </xs:choice>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">The url by which the page should be known when published.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="generation" minOccurs="1" maxOccurs="1" type="GuidePageGeneration">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that indicates how the page is generated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="page" type="ImplementationGuide.Page" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Nested Pages/Sections under this page.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Parameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A tool-specific code that defines the parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Value for named type.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Template">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of template specified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The source location for the template.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="scope" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The scope in which the template applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Manifest">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="rendering" minOccurs="0" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">A pointer to official web page, PDF or other rendering of the implementation guide.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" type="ImplementationGuide.Resource1" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="page" type="ImplementationGuide.Page1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about a page within the IG.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="image" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a relative path to an image that exists within the IG.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="other" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Resource1">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where this resource is found.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isExample" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates the resource is an example instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profile" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, indicates profile(s) the instance is valid against.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relativePath" minOccurs="0" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relative path for primary page for this resource within the IG.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ImplementationGuide.Page1">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relative path to the page.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Label for the page intended for human display.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="anchor" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of an anchor available on the page.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SPDXLicenseEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="not-open-source">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not open source</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="0BSD">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD Zero Clause License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AAL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Attribution Assurance License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Abstyles">
        <xs:annotation>
          <xs:documentation xml:lang="en">Abstyles License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Adobe-2006">
        <xs:annotation>
          <xs:documentation xml:lang="en">Adobe Systems Incorporated Source Code License Agreement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Adobe-Glyph">
        <xs:annotation>
          <xs:documentation xml:lang="en">Adobe Glyph List License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ADSL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amazon Digital Services License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Academic Free License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFL-1.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Academic Free License v1.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Academic Free License v2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFL-2.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Academic Free License v2.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFL-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Academic Free License v3.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Afmparse">
        <xs:annotation>
          <xs:documentation xml:lang="en">Afmparse License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AGPL-1.0-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">Affero General Public License v1.0 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AGPL-1.0-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">Affero General Public License v1.0 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AGPL-3.0-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Affero General Public License v3.0 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AGPL-3.0-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Affero General Public License v3.0 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Aladdin">
        <xs:annotation>
          <xs:documentation xml:lang="en">Aladdin Free Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AMDPLPA">
        <xs:annotation>
          <xs:documentation xml:lang="en">AMD's plpa_map.c License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AML">
        <xs:annotation>
          <xs:documentation xml:lang="en">Apple MIT License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AMPAS">
        <xs:annotation>
          <xs:documentation xml:lang="en">Academy of Motion Picture Arts and Sciences BSD</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ANTLR-PD">
        <xs:annotation>
          <xs:documentation xml:lang="en">ANTLR Software Rights Notice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Apache-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Apache License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Apache-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Apache License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Apache-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Apache License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="APAFML">
        <xs:annotation>
          <xs:documentation xml:lang="en">Adobe Postscript AFM License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="APL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Adaptive Public License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="APSL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Apple Public Source License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="APSL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Apple Public Source License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="APSL-1.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Apple Public Source License 1.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="APSL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Apple Public Source License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Artistic-1.0-cl8">
        <xs:annotation>
          <xs:documentation xml:lang="en">Artistic License 1.0 w/clause 8</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Artistic-1.0-Perl">
        <xs:annotation>
          <xs:documentation xml:lang="en">Artistic License 1.0 (Perl)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Artistic-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Artistic License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Artistic-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Artistic License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bahyph">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bahyph License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Barr">
        <xs:annotation>
          <xs:documentation xml:lang="en">Barr License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Beerware">
        <xs:annotation>
          <xs:documentation xml:lang="en">Beerware License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BitTorrent-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">BitTorrent Open Source License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BitTorrent-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">BitTorrent Open Source License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Borceux">
        <xs:annotation>
          <xs:documentation xml:lang="en">Borceux license</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-1-Clause">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 1-Clause License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-2-Clause-FreeBSD">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 2-Clause FreeBSD License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-2-Clause-NetBSD">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 2-Clause NetBSD License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-2-Clause-Patent">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD-2-Clause Plus Patent License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-2-Clause">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 2-Clause &quot;Simplified&quot; License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-3-Clause-Attribution">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD with attribution</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-3-Clause-Clear">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 3-Clause Clear License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-3-Clause-LBNL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lawrence Berkeley National Labs BSD variant license</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-3-Clause-No-Nuclear-License-2014">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 3-Clause No Nuclear License 2014</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-3-Clause-No-Nuclear-License">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 3-Clause No Nuclear License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-3-Clause-No-Nuclear-Warranty">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 3-Clause No Nuclear Warranty</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-3-Clause">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 3-Clause &quot;New&quot; or &quot;Revised&quot; License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-4-Clause-UC">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD-4-Clause (University of California-Specific)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-4-Clause">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD 4-Clause &quot;Original&quot; or &quot;Old&quot; License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-Protection">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD Protection License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSD-Source-Code">
        <xs:annotation>
          <xs:documentation xml:lang="en">BSD Source Code Attribution</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Boost Software License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="bzip2-1.0.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">bzip2 and libbzip2 License v1.0.5</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="bzip2-1.0.6">
        <xs:annotation>
          <xs:documentation xml:lang="en">bzip2 and libbzip2 License v1.0.6</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Caldera">
        <xs:annotation>
          <xs:documentation xml:lang="en">Caldera License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CATOSL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Computer Associates Trusted Open Source License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution 1.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution 2.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-2.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution 2.5 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution 3.0 Unported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution 4.0 International</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial 1.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial 2.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-2.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial 2.5 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial 3.0 Unported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial 4.0 International</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-ND-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-ND-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-ND-2.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-ND-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-ND-4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial No Derivatives 4.0 International</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-SA-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial Share Alike 1.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-SA-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial Share Alike 2.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-SA-2.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial Share Alike 2.5 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-SA-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial Share Alike 3.0 Unported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-NC-SA-4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Non Commercial Share Alike 4.0 International</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-ND-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution No Derivatives 1.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-ND-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution No Derivatives 2.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-ND-2.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution No Derivatives 2.5 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-ND-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution No Derivatives 3.0 Unported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-ND-4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution No Derivatives 4.0 International</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-SA-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Share Alike 1.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-SA-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Share Alike 2.0 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-SA-2.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Share Alike 2.5 Generic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-SA-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Share Alike 3.0 Unported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC-BY-SA-4.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Attribution Share Alike 4.0 International</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CC0-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Creative Commons Zero v1.0 Universal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CDDL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Common Development and Distribution License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CDDL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Common Development and Distribution License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CDLA-Permissive-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Community Data License Agreement Permissive 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CDLA-Sharing-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Community Data License Agreement Sharing 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CECILL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">CeCILL Free Software License Agreement v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CECILL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">CeCILL Free Software License Agreement v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CECILL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">CeCILL Free Software License Agreement v2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CECILL-2.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">CeCILL Free Software License Agreement v2.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CECILL-B">
        <xs:annotation>
          <xs:documentation xml:lang="en">CeCILL-B Free Software License Agreement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CECILL-C">
        <xs:annotation>
          <xs:documentation xml:lang="en">CeCILL-C Free Software License Agreement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClArtistic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Clarified Artistic License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CNRI-Jython">
        <xs:annotation>
          <xs:documentation xml:lang="en">CNRI Jython License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CNRI-Python-GPL-Compatible">
        <xs:annotation>
          <xs:documentation xml:lang="en">CNRI Python Open Source GPL Compatible License Agreement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CNRI-Python">
        <xs:annotation>
          <xs:documentation xml:lang="en">CNRI Python License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condor-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Condor Public License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CPAL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Common Public Attribution License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Common Public License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CPOL-1.02">
        <xs:annotation>
          <xs:documentation xml:lang="en">Code Project Open License 1.02</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Crossword">
        <xs:annotation>
          <xs:documentation xml:lang="en">Crossword License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CrystalStacker">
        <xs:annotation>
          <xs:documentation xml:lang="en">CrystalStacker License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CUA-OPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">CUA Office Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Cube">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cube License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="curl">
        <xs:annotation>
          <xs:documentation xml:lang="en">curl License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="D-FSL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Deutsche Freie Software Lizenz</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="diffmark">
        <xs:annotation>
          <xs:documentation xml:lang="en">diffmark license</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DOC">
        <xs:annotation>
          <xs:documentation xml:lang="en">DOC License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Dotseqn">
        <xs:annotation>
          <xs:documentation xml:lang="en">Dotseqn License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DSDP">
        <xs:annotation>
          <xs:documentation xml:lang="en">DSDP License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dvipdfm">
        <xs:annotation>
          <xs:documentation xml:lang="en">dvipdfm License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ECL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Educational Community License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ECL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Educational Community License v2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EFL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Eiffel Forum License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EFL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Eiffel Forum License v2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="eGenix">
        <xs:annotation>
          <xs:documentation xml:lang="en">eGenix.com Public License 1.1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Entessa">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entessa Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Eclipse Public License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EPL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Eclipse Public License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ErlPL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Erlang Public License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EUDatagrid">
        <xs:annotation>
          <xs:documentation xml:lang="en">EU DataGrid Software License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EUPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">European Union Public License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EUPL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">European Union Public License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EUPL-1.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">European Union Public License 1.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Eurosym">
        <xs:annotation>
          <xs:documentation xml:lang="en">Eurosym License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Fair">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fair License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Frameworx-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Frameworx Open License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FreeImage">
        <xs:annotation>
          <xs:documentation xml:lang="en">FreeImage Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FSFAP">
        <xs:annotation>
          <xs:documentation xml:lang="en">FSF All Permissive License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FSFUL">
        <xs:annotation>
          <xs:documentation xml:lang="en">FSF Unlimited License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FSFULLR">
        <xs:annotation>
          <xs:documentation xml:lang="en">FSF Unlimited License (with License Retention)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FTL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Freetype Project License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GFDL-1.1-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Free Documentation License v1.1 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GFDL-1.1-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Free Documentation License v1.1 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GFDL-1.2-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Free Documentation License v1.2 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GFDL-1.2-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Free Documentation License v1.2 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GFDL-1.3-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Free Documentation License v1.3 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GFDL-1.3-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Free Documentation License v1.3 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Giftware">
        <xs:annotation>
          <xs:documentation xml:lang="en">Giftware License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GL2PS">
        <xs:annotation>
          <xs:documentation xml:lang="en">GL2PS License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Glide">
        <xs:annotation>
          <xs:documentation xml:lang="en">3dfx Glide License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Glulxe">
        <xs:annotation>
          <xs:documentation xml:lang="en">Glulxe License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="gnuplot">
        <xs:annotation>
          <xs:documentation xml:lang="en">gnuplot License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GPL-1.0-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU General Public License v1.0 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GPL-1.0-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU General Public License v1.0 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GPL-2.0-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU General Public License v2.0 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GPL-2.0-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU General Public License v2.0 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GPL-3.0-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU General Public License v3.0 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GPL-3.0-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU General Public License v3.0 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="gSOAP-1.3b">
        <xs:annotation>
          <xs:documentation xml:lang="en">gSOAP Public License v1.3b</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HaskellReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">Haskell Language Report License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HPND">
        <xs:annotation>
          <xs:documentation xml:lang="en">Historical Permission Notice and Disclaimer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IBM-pibs">
        <xs:annotation>
          <xs:documentation xml:lang="en">IBM PowerPC Initialization and Boot Software</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ICU">
        <xs:annotation>
          <xs:documentation xml:lang="en">ICU License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IJG">
        <xs:annotation>
          <xs:documentation xml:lang="en">Independent JPEG Group License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImageMagick">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImageMagick License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="iMatix">
        <xs:annotation>
          <xs:documentation xml:lang="en">iMatix Standard Function Library Agreement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Imlib2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Imlib2 License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Info-ZIP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Info-ZIP License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Intel-ACPI">
        <xs:annotation>
          <xs:documentation xml:lang="en">Intel ACPI Software License Agreement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Intel">
        <xs:annotation>
          <xs:documentation xml:lang="en">Intel Open Source License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Interbase-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Interbase Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IPA">
        <xs:annotation>
          <xs:documentation xml:lang="en">IPA Font License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">IBM Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ISC">
        <xs:annotation>
          <xs:documentation xml:lang="en">ISC License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JasPer-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">JasPer License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JSON">
        <xs:annotation>
          <xs:documentation xml:lang="en">JSON License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LAL-1.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Licence Art Libre 1.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LAL-1.3">
        <xs:annotation>
          <xs:documentation xml:lang="en">Licence Art Libre 1.3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Latex2e">
        <xs:annotation>
          <xs:documentation xml:lang="en">Latex2e License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Leptonica">
        <xs:annotation>
          <xs:documentation xml:lang="en">Leptonica License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LGPL-2.0-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Library General Public License v2 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LGPL-2.0-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Library General Public License v2 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LGPL-2.1-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Lesser General Public License v2.1 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LGPL-2.1-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Lesser General Public License v2.1 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LGPL-3.0-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Lesser General Public License v3.0 only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LGPL-3.0-or-later">
        <xs:annotation>
          <xs:documentation xml:lang="en">GNU Lesser General Public License v3.0 or later</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LGPLLR">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lesser General Public License For Linguistic Resources</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Libpng">
        <xs:annotation>
          <xs:documentation xml:lang="en">libpng License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="libtiff">
        <xs:annotation>
          <xs:documentation xml:lang="en">libtiff License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LiLiQ-P-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Licence Libre du Québec – Permissive version 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LiLiQ-R-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Licence Libre du Québec – Réciprocité version 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LiLiQ-Rplus-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Licence Libre du Québec – Réciprocité forte version 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Linux-OpenIB">
        <xs:annotation>
          <xs:documentation xml:lang="en">Linux Kernel Variant of OpenIB.org license</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lucent Public License Version 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LPL-1.02">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lucent Public License v1.02</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LPPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">LaTeX Project Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LPPL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">LaTeX Project Public License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LPPL-1.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">LaTeX Project Public License v1.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LPPL-1.3a">
        <xs:annotation>
          <xs:documentation xml:lang="en">LaTeX Project Public License v1.3a</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LPPL-1.3c">
        <xs:annotation>
          <xs:documentation xml:lang="en">LaTeX Project Public License v1.3c</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MakeIndex">
        <xs:annotation>
          <xs:documentation xml:lang="en">MakeIndex License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MirOS">
        <xs:annotation>
          <xs:documentation xml:lang="en">MirOS License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MIT-0">
        <xs:annotation>
          <xs:documentation xml:lang="en">MIT No Attribution</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MIT-advertising">
        <xs:annotation>
          <xs:documentation xml:lang="en">Enlightenment License (e16)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MIT-CMU">
        <xs:annotation>
          <xs:documentation xml:lang="en">CMU License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MIT-enna">
        <xs:annotation>
          <xs:documentation xml:lang="en">enna License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MIT-feh">
        <xs:annotation>
          <xs:documentation xml:lang="en">feh License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MIT">
        <xs:annotation>
          <xs:documentation xml:lang="en">MIT License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MITNFA">
        <xs:annotation>
          <xs:documentation xml:lang="en">MIT +no-false-attribs license</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motosoto">
        <xs:annotation>
          <xs:documentation xml:lang="en">Motosoto License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mpich2">
        <xs:annotation>
          <xs:documentation xml:lang="en">mpich2 License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mozilla Public License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MPL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mozilla Public License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MPL-2.0-no-copyleft-exception">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mozilla Public License 2.0 (no copyleft exception)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MPL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mozilla Public License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MS-PL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Microsoft Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MS-RL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Microsoft Reciprocal License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MTLL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Matrix Template Library License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Multics">
        <xs:annotation>
          <xs:documentation xml:lang="en">Multics License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mup">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mup License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NASA-1.3">
        <xs:annotation>
          <xs:documentation xml:lang="en">NASA Open Source Agreement 1.3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Naumen">
        <xs:annotation>
          <xs:documentation xml:lang="en">Naumen Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NBPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Net Boolean Public License v1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NCSA">
        <xs:annotation>
          <xs:documentation xml:lang="en">University of Illinois/NCSA Open Source License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Net-SNMP">
        <xs:annotation>
          <xs:documentation xml:lang="en">Net-SNMP License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NetCDF">
        <xs:annotation>
          <xs:documentation xml:lang="en">NetCDF license</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Newsletr">
        <xs:annotation>
          <xs:documentation xml:lang="en">Newsletr License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NGPL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nethack General Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NLOD-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Norwegian Licence for Open Government Data</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NLPL">
        <xs:annotation>
          <xs:documentation xml:lang="en">No Limit Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Nokia">
        <xs:annotation>
          <xs:documentation xml:lang="en">Nokia Open Source License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NOSL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Netizen Open Source License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Noweb">
        <xs:annotation>
          <xs:documentation xml:lang="en">Noweb License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Netscape Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NPL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Netscape Public License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NPOSL-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Non-Profit Open Software License 3.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NRL">
        <xs:annotation>
          <xs:documentation xml:lang="en">NRL License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NTP">
        <xs:annotation>
          <xs:documentation xml:lang="en">NTP License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OCCT-PL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open CASCADE Technology Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OCLC-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">OCLC Research Public License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ODbL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">ODC Open Database License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OFL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">SIL Open Font License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OFL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">SIL Open Font License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OGTSL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open Group Test Suite License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-1.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v1.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-1.3">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v1.3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-1.4">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v1.4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.0.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.0.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.2.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.2.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.2.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License 2.2.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.3">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.4">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.5</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.6">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.6</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.7">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.7</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OLDAP-2.8">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open LDAP Public License v2.8</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OML">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open Market License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OpenSSL">
        <xs:annotation>
          <xs:documentation xml:lang="en">OpenSSL License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OSET-PL-2.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">OSET Public License version 2.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OSL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open Software License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OSL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open Software License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OSL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open Software License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OSL-2.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open Software License 2.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OSL-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Open Software License 3.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PDDL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">ODC Public Domain Dedication &amp; License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PHP-3.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">PHP License v3.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PHP-3.01">
        <xs:annotation>
          <xs:documentation xml:lang="en">PHP License v3.01</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Plexus">
        <xs:annotation>
          <xs:documentation xml:lang="en">Plexus Classworlds License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PostgreSQL">
        <xs:annotation>
          <xs:documentation xml:lang="en">PostgreSQL License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="psfrag">
        <xs:annotation>
          <xs:documentation xml:lang="en">psfrag License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="psutils">
        <xs:annotation>
          <xs:documentation xml:lang="en">psutils License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Python-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Python License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Qhull">
        <xs:annotation>
          <xs:documentation xml:lang="en">Qhull License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Q Public License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Rdisc">
        <xs:annotation>
          <xs:documentation xml:lang="en">Rdisc License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RHeCos-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Red Hat eCos Public License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RPL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reciprocal Public License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RPL-1.5">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reciprocal Public License 1.5</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RPSL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">RealNetworks Public Source License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RSA-MD">
        <xs:annotation>
          <xs:documentation xml:lang="en">RSA Message-Digest License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RSCPL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ricoh Source Code Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ruby">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ruby License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SAX-PD">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sax Public Domain Notice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Saxpath">
        <xs:annotation>
          <xs:documentation xml:lang="en">Saxpath License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SCEA">
        <xs:annotation>
          <xs:documentation xml:lang="en">SCEA Shared Source License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sendmail">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sendmail License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SGI-B-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">SGI Free Software License B v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SGI-B-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">SGI Free Software License B v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SGI-B-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">SGI Free Software License B v2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SimPL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Simple Public License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SISSL-1.2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sun Industry Standards Source License v1.2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SISSL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sun Industry Standards Source License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sleepycat">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sleepycat License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SMLNJ">
        <xs:annotation>
          <xs:documentation xml:lang="en">Standard ML of New Jersey License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SMPPL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Secure Messaging Protocol Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SNIA">
        <xs:annotation>
          <xs:documentation xml:lang="en">SNIA Public License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Spencer-86">
        <xs:annotation>
          <xs:documentation xml:lang="en">Spencer License 86</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Spencer-94">
        <xs:annotation>
          <xs:documentation xml:lang="en">Spencer License 94</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Spencer-99">
        <xs:annotation>
          <xs:documentation xml:lang="en">Spencer License 99</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sun Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SugarCRM-1.1.3">
        <xs:annotation>
          <xs:documentation xml:lang="en">SugarCRM Public License v1.1.3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SWL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Scheme Widget Library (SWL) Software License Agreement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TCL">
        <xs:annotation>
          <xs:documentation xml:lang="en">TCL/TK License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TCP-wrappers">
        <xs:annotation>
          <xs:documentation xml:lang="en">TCP Wrappers License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TMate">
        <xs:annotation>
          <xs:documentation xml:lang="en">TMate Open Source License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TORQUE-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">TORQUE v2.5+ Software License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TOSL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Trusster Open Source License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Unicode-DFS-2015">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unicode License Agreement - Data Files and Software (2015)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Unicode-DFS-2016">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unicode License Agreement - Data Files and Software (2016)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Unicode-TOU">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unicode Terms of Use</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Unlicense">
        <xs:annotation>
          <xs:documentation xml:lang="en">The Unlicense</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="UPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Universal Permissive License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Vim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Vim License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VOSTROM">
        <xs:annotation>
          <xs:documentation xml:lang="en">VOSTROM Public License for Open Source</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VSL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Vovida Software License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="W3C-19980720">
        <xs:annotation>
          <xs:documentation xml:lang="en">W3C Software Notice and License (1998-07-20)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="W3C-20150513">
        <xs:annotation>
          <xs:documentation xml:lang="en">W3C Software Notice and Document License (2015-05-13)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="W3C">
        <xs:annotation>
          <xs:documentation xml:lang="en">W3C Software Notice and License (2002-12-31)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Watcom-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sybase Open Watcom Public License 1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Wsuipa">
        <xs:annotation>
          <xs:documentation xml:lang="en">Wsuipa License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WTFPL">
        <xs:annotation>
          <xs:documentation xml:lang="en">Do What The F*ck You Want To Public License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="X11">
        <xs:annotation>
          <xs:documentation xml:lang="en">X11 License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Xerox">
        <xs:annotation>
          <xs:documentation xml:lang="en">Xerox License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XFree86-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">XFree86 License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="xinetd">
        <xs:annotation>
          <xs:documentation xml:lang="en">xinetd License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Xnet">
        <xs:annotation>
          <xs:documentation xml:lang="en">X.Net License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="xpp">
        <xs:annotation>
          <xs:documentation xml:lang="en">XPP License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XSkat">
        <xs:annotation>
          <xs:documentation xml:lang="en">XSkat License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="YPL-1.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Yahoo! Public License v1.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="YPL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Yahoo! Public License v1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Zed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zed License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Zend-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zend License v2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Zimbra-1.3">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zimbra Public License v1.3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Zimbra-1.4">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zimbra Public License v1.4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="zlib-acknowledgement">
        <xs:annotation>
          <xs:documentation xml:lang="en">zlib/libpng License with Acknowledgement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Zlib">
        <xs:annotation>
          <xs:documentation xml:lang="en">zlib License</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZPL-1.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zope Public License 1.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZPL-2.0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zope Public License 2.0</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ZPL-2.1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Zope Public License 2.1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SPDXLicense">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SPDXLicenseEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="GuidePageGenerationEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="html">
        <xs:annotation>
          <xs:documentation xml:lang="en">HTML</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="markdown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Markdown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="xml">
        <xs:annotation>
          <xs:documentation xml:lang="en">XML</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="generated">
        <xs:annotation>
          <xs:documentation xml:lang="en">Generated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="GuidePageGeneration">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="GuidePageGenerationEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Ingredient" type="Ingredient">
    <xs:annotation>
      <xs:documentation xml:lang="en">An ingredient of a manufactured item or pharmaceutical product.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Ingredient">
    <xs:annotation>
      <xs:documentation xml:lang="en">An ingredient of a manufactured item or pharmaceutical product.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this ingredient. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="for" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product which this ingredient is a constituent part of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A classification of the ingredient identifying its purpose within the product, e.g. active, inactive.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="function" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: antioxidant, alkalizing agent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="group" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A classification of the ingredient according to where in the physical item it tends to be used, such the outer shell of a tablet, inner body or ink.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="allergenicIndicator" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the ingredient is a known or suspected allergen. Note that this is a property of the substance, so if a reference to a SubstanceDefinition is used to describe that (rather than just a code), the allergen information should go there, not here.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A place for providing any notes that are relevant to the component, e.g. removed during process, adjusted for loss on drying.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" type="Ingredient.Manufacturer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization(s) that manufacture this ingredient. Can be used to indicate:         1) Organizations we are aware of that manufacture this ingredient         2) Specific Manufacturer(s) currently being used         3) Set of organisations allowed to manufacture this ingredient for this product         Users must be clear on the application of context relevant to their use case.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="substance" type="Ingredient.Substance" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The substance that comprises this ingredient.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Ingredient.Manufacturer">
    <xs:annotation>
      <xs:documentation xml:lang="en">An ingredient of a manufactured item or pharmaceutical product.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="IngredientManufacturerRole">
            <xs:annotation>
              <xs:documentation xml:lang="en">The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An organization that manufactures this ingredient.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Ingredient.Substance">
    <xs:annotation>
      <xs:documentation xml:lang="en">An ingredient of a manufactured item or pharmaceutical product.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or full resource that represents the ingredient's substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="strength" type="Ingredient.Strength" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. The allowed repetitions do not represent different strengths, but are different representations - mathematically equivalent - of a single strength.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Ingredient.Strength">
    <xs:annotation>
      <xs:documentation xml:lang="en">An ingredient of a manufactured item or pharmaceutical product.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. Unit of presentation refers to the quantity that the item occurs in e.g. a strength per tablet size, perhaps 'per 20mg' (the size of the tablet). It is not generally normalized as a unitary unit, which would be 'per mg').</xs:documentation>
            </xs:annotation>
            <xs:element name="presentationRatio" type="Ratio"/>
            <xs:element name="presentationRatioRange" type="RatioRange"/>
            <xs:element name="presentationCodeableConcept" type="CodeableConcept"/>
            <xs:element name="presentationQuantity" type="Quantity"/>
          </xs:choice>
          <xs:element name="textPresentation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A textual representation of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The strength per unitary volume (or mass).</xs:documentation>
            </xs:annotation>
            <xs:element name="concentrationRatio" type="Ratio"/>
            <xs:element name="concentrationRatioRange" type="RatioRange"/>
            <xs:element name="concentrationCodeableConcept" type="CodeableConcept"/>
            <xs:element name="concentrationQuantity" type="Quantity"/>
          </xs:choice>
          <xs:element name="textConcentration" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A textual representation of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basis" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that indicates if the strength is, for example, based on the ingredient substance as stated or on the substance base (when the ingredient is a salt).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="measurementPoint" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">For when strength is measured at a particular point or distance. There are products where strength is measured at a particular point. For example, the strength of the ingredient in some inhalers is measured at a particular position relative to the point of aerosolization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="country" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The country or countries for which the strength range applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referenceStrength" type="Ingredient.ReferenceStrength" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Strength expressed in terms of a reference substance. For when the ingredient strength is additionally expressed as equivalent to the strength of some other closely related substance (e.g. salt vs. base). Reference strength represents the strength (quantitative composition) of the active moiety of the active substance. There are situations when the active substance and active moiety are different, therefore both a strength and a reference strength are needed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Ingredient.ReferenceStrength">
    <xs:annotation>
      <xs:documentation xml:lang="en">An ingredient of a manufactured item or pharmaceutical product.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="substance" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relevant reference substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Strength expressed in terms of a reference substance.</xs:documentation>
            </xs:annotation>
            <xs:element name="strengthRatio" type="Ratio"/>
            <xs:element name="strengthRatioRange" type="RatioRange"/>
            <xs:element name="strengthQuantity" type="Quantity"/>
          </xs:choice>
          <xs:element name="measurementPoint" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">For when strength is measured at a particular point or distance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="country" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The country or countries for which the strength range applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="InsurancePlan" type="InsurancePlan">
    <xs:annotation>
      <xs:documentation xml:lang="en">InsurancePlan describes the costs to the subscriber or beneficiary associated with benefits, as well as additional information about the offering, such as who administers the plan, a coverage area, contact information, etc.  The specific benefits covered by the plan are described in the `InsuranceProduct` referenced in `InsurancePlan.product`.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="InsurancePlan">
    <xs:annotation>
      <xs:documentation xml:lang="en">InsurancePlan describes the costs to the subscriber or beneficiary associated with benefits, as well as additional information about the offering, such as who administers the plan, a coverage area, contact information, etc.  The specific benefits covered by the plan are described in the `InsuranceProduct` referenced in `InsurancePlan.product`.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers, such as the plan ID and/or group ID associated with the insurance plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of plan. For example, &quot;Platinum&quot; or &quot;High Deductable&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="product" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product that this plan is available under.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverageArea" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The geographic region in which a health insurance plan's benefits apply.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the network that providing the type of coverage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="generalCost" type="InsurancePlan.GeneralCost" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Overall costs associated with the plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specificCost" type="InsurancePlan.SpecificCost" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Costs associated with the coverage provided by the product-plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="InsurancePlan.GeneralCost">
    <xs:annotation>
      <xs:documentation xml:lang="en">InsurancePlan describes the costs to the subscriber or beneficiary associated with benefits, as well as additional information about the offering, such as who administers the plan, a coverage area, contact information, etc.  The specific benefits covered by the plan are described in the `InsuranceProduct` referenced in `InsurancePlan.product`.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of cost.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupSize" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of participants enrolled in the plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cost" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Value of the cost.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information about the general costs associated with this plan.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="InsurancePlan.SpecificCost">
    <xs:annotation>
      <xs:documentation xml:lang="en">InsurancePlan describes the costs to the subscriber or beneficiary associated with benefits, as well as additional information about the offering, such as who administers the plan, a coverage area, contact information, etc.  The specific benefits covered by the plan are described in the `InsuranceProduct` referenced in `InsurancePlan.product`.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">General category of benefit (Medical; Dental; Vision; Drug; Mental Health; Substance Abuse; Hospice, Home Health).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="benefit" type="InsurancePlan.Benefit" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of the specific benefits under this category of benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="InsurancePlan.Benefit">
    <xs:annotation>
      <xs:documentation xml:lang="en">InsurancePlan describes the costs to the subscriber or beneficiary associated with benefits, as well as additional information about the offering, such as who administers the plan, a coverage area, contact information, etc.  The specific benefits covered by the plan are described in the `InsuranceProduct` referenced in `InsurancePlan.product`.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of specific benefit (preventative; primary care office visit; speciality office visit; hospitalization; emergency room; urgent care).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cost" type="InsurancePlan.Cost" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of the costs associated with a specific benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="InsurancePlan.Cost">
    <xs:annotation>
      <xs:documentation xml:lang="en">InsurancePlan describes the costs to the subscriber or beneficiary associated with benefits, as well as additional information about the offering, such as who administers the plan, a coverage area, contact information, etc.  The specific benefits covered by the plan are described in the `InsuranceProduct` referenced in `InsurancePlan.product`.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of cost (copay; individual cap; family cap; coinsurance; deductible).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="applicability" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the cost applies to in-network or out-of-network providers (in-network; out-of-network; other).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information about the cost, such as information about funding sources (e.g. HSA, HRA, FSA, RRA).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual cost value. (some of the costs may be represented as percentages rather than currency, e.g. 10% coinsurance).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="InsuranceProduct" type="InsuranceProduct">
    <xs:annotation>
      <xs:documentation xml:lang="en">A product is a discrete package of health insurance coverage benefits that are offered under a particular network, by an organization (payer) and additional information about the offering, such as who it is owned and administered by, a coverage area, contact information, etc.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="InsuranceProduct">
    <xs:annotation>
      <xs:documentation xml:lang="en">A product is a discrete package of health insurance coverage benefits that are offered under a particular network, by an organization (payer) and additional information about the offering, such as who it is owned and administered by, a coverage area, contact information, etc.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this health insurance product which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the health insurance product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of health insurance product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Official name of the health insurance product as designated by the owner.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="alias" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of alternate names that the product is known as, or was known as in the past.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time that the health insurance product is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ownedBy" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity that is providing  the health insurance product and underwriting the risk.  This is typically an insurance carriers, other third-party payers, or health plan sponsors comonly referred to as 'payers'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="administeredBy" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An organization which administer other services such as underwriting, customer service and/or claims processing on behalf of the health insurance product owner.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverageArea" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The geographic region in which a health insurance product's benefits apply.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ExtendedContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contact details of communication devices available relevant to the specific Insurance Product. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The technical endpoints providing access to services operated for the health insurance product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the network included in the health insurance product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverage" type="InsuranceProduct.Coverage" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details about the coverage offered by the insurance product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="related" type="InsuranceProduct.Related" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Another product that is related to this product. Often used to create relationships to parents or families of products.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="InsuranceProduct.Coverage">
    <xs:annotation>
      <xs:documentation xml:lang="en">A product is a discrete package of health insurance coverage benefits that are offered under a particular network, by an organization (payer) and additional information about the offering, such as who it is owned and administered by, a coverage area, contact information, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of coverage  (Medical; Dental; Mental Health; Substance Abuse; Vision; Drug; Short Term; Long Term Care; Hospice; Home Health).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the network that providing the type of coverage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="benefit" type="InsuranceProduct.Benefit" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific benefits under this type of coverage.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="InsuranceProduct.Benefit">
    <xs:annotation>
      <xs:documentation xml:lang="en">A product is a discrete package of health insurance coverage benefits that are offered under a particular network, by an organization (payer) and additional information about the offering, such as who it is owned and administered by, a coverage area, contact information, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of benefit (primary care; specialty care; inpatient; outpatient).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requirement" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The referral requirements to have access/coverage for this benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="limit" type="InsuranceProduct.Limit" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific limits on the benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="InsuranceProduct.Limit">
    <xs:annotation>
      <xs:documentation xml:lang="en">A product is a discrete package of health insurance coverage benefits that are offered under a particular network, by an organization (payer) and additional information about the offering, such as who it is owned and administered by, a coverage area, contact information, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="value" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum amount of a service item a plan will pay for a covered benefit.  For examples. wellness visits, or eyeglasses.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific limit on the benefit.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="InsuranceProduct.Related">
    <xs:annotation>
      <xs:documentation xml:lang="en">A product is a discrete package of health insurance coverage benefits that are offered under a particular network, by an organization (payer) and additional information about the offering, such as who it is owned and administered by, a coverage area, contact information, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="product" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Related Product reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relationship of this product to the related product. an example would be 'sub-plan' where this product is a sub-plan of the related.product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Period of time that the product relationship is valid. The start and/or end dates can be empty if this is an open ended relationship.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Invoice" type="Invoice">
    <xs:annotation>
      <xs:documentation xml:lang="en">Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Invoice">
    <xs:annotation>
      <xs:documentation xml:lang="en">Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="InvoiceStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the Invoice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cancelledReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or set of individuals receiving the goods and services billed in this invoice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recipient" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or Organization responsible for balancing of this invoice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="creation" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date/time(s) of when this Invoice was posted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Date/time(s) range of services included in this invoice.</xs:documentation>
            </xs:annotation>
            <xs:element name="periodDate" type="date"/>
            <xs:element name="periodPeriod" type="Period"/>
          </xs:choice>
          <xs:element name="participant" type="Invoice.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed or participated in the charged service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issuer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organizationissuing the Invoice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="account" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Account which is supposed to be balanced with this Invoice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lineItem" type="Invoice.LineItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Each line item represents one charge for goods and services rendered. Details such.ofType(date), code and amount are found in the referenced ChargeItem resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="totalPriceComponent" minOccurs="0" maxOccurs="unbounded" type="MonetaryComponent">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions.  The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="totalNet" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Invoice total , taxes excluded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="totalGross" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Invoice total, tax included.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentTerms" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Payment details such as banking details, period of payment, deductibles, methods of payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the invoice by the issuer, subject, or other participants.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Invoice.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The device, practitioner, etc. who performed or participated in the service.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Invoice.LineItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sequence in which the items appear on the invoice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Date/time(s) range when this service was delivered or completed.</xs:documentation>
            </xs:annotation>
            <xs:element name="servicedDate" type="date"/>
            <xs:element name="servicedPeriod" type="Period"/>
          </xs:choice>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.</xs:documentation>
            </xs:annotation>
            <xs:element name="chargeItemReference" type="Reference"/>
            <xs:element name="chargeItemCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="priceComponent" minOccurs="0" maxOccurs="unbounded" type="MonetaryComponent">
            <xs:annotation>
              <xs:documentation xml:lang="en">The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="InvoiceStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">draft</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="issued">
        <xs:annotation>
          <xs:documentation xml:lang="en">issued</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="balanced">
        <xs:annotation>
          <xs:documentation xml:lang="en">balanced</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">entered in error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="InvoiceStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="InvoiceStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Library" type="Library">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Library resource is a general-purpose container for knowledge artifact definitions. It can be used to describe and expose existing knowledge artifacts such as logic libraries and information model descriptions, as well as to describe a collection of knowledge artifacts.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Library">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Library resource is a general-purpose container for knowledge artifact definitions. It can be used to describe and expose existing knowledge artifacts such as logic libraries and information model descriptions, as well as to describe a collection of knowledge artifacts.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge artifacts, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the library.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subtitle" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanatory or alternate title for the library giving additional information about its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this library. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or group definition that describes the intended subject of the contents of the library.</xs:documentation>
            </xs:annotation>
            <xs:element name="subjectCodeableConcept" type="CodeableConcept"/>
            <xs:element name="subjectReference" type="Reference"/>
          </xs:choice>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the library was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the library.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the library from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate library instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this library is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usage" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A detailed description of how the library is used from a clinical perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the library and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the library.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the library content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, or bibliographic references.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="ParameterDefinition">
            <xs:annotation>
              <xs:documentation xml:lang="en">The parameter element defines parameters used by the library.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dataRequirement" minOccurs="0" maxOccurs="unbounded" type="DataRequirement">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="content" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="List" type="List">
    <xs:annotation>
      <xs:documentation xml:lang="en">A List is a curated collection of resources, for things such as problem lists, allergy lists, facility list, organization list, etc.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="List">
    <xs:annotation>
      <xs:documentation xml:lang="en">A List is a curated collection of resources, for things such as problem lists, allergy lists, facility list, organization list, etc.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for the List assigned for business purposes outside the context of FHIR.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ListStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the current state of this list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="ListMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A label for the list assigned by the author.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This code defines the purpose of the list - why it was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The common subject(s) (or patient(s)) of the resources that are in the list if there is one (or a set of subjects).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The encounter that is the context in which this list was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date list was last reviewed/revised and determined to be 'current'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="orderedBy" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">What order applies to the items in the list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments that apply to the overall list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entry" type="List.Entry" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Entries in this list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="emptyReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the list is empty, why the list is empty.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="List.Entry">
    <xs:annotation>
      <xs:documentation xml:lang="en">A List is a curated collection of resources, for things such as problem lists, allergy lists, facility list, organization list, etc.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="flag" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The flag allows the system constructing the list to indicate the role and significance of the item in the list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="deleted" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">True if this item is marked as deleted in the list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When this item was added to the list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the actual resource from which data was derived.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ListStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="current">
        <xs:annotation>
          <xs:documentation xml:lang="en">Current</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="retired">
        <xs:annotation>
          <xs:documentation xml:lang="en">Retired</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered In Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ListStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ListStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ListModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="working">
        <xs:annotation>
          <xs:documentation xml:lang="en">Working List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="snapshot">
        <xs:annotation>
          <xs:documentation xml:lang="en">Snapshot List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="changes">
        <xs:annotation>
          <xs:documentation xml:lang="en">Change List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ListMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ListModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Location" type="Location">
    <xs:annotation>
      <xs:documentation xml:lang="en">Details and position information for a place where services are provided and resources and participants may be stored, found, contained, or accommodated.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Location">
    <xs:annotation>
      <xs:documentation xml:lang="en">Details and position information for a place where services are provided and resources and participants may be stored, found, contained, or accommodated.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique code or number identifying the location to its users.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="LocationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status property covers the general availability of the resource, not the current value which may be covered by the operationalStatus, or by a schedule/slots if they are configured for the location.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operationalStatus" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded representation of this Location, where the codes may be found in a geospatial system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name of the location as used by humans. Does not need to be unique.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="alias" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of alternate names that the location is known as, or was known as, in the past.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the Location, which helps in finding or referencing the place.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mode" minOccurs="0" maxOccurs="1" type="LocationMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether a resource instance represents a specific location or a class of locations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the type of services that are available at this location.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ExtendedContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="address" minOccurs="0" maxOccurs="1" type="Address">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical location.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="form" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical form of the location, e.g. building, room, vehicle, road, virtual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="position" type="Location.Position" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingOrganization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization responsible for the provisioning and upkeep of the location.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Another Location of which this Location is physically a part of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characteristic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Collection of characteristics (attributes).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="hoursOfOperation" minOccurs="0" maxOccurs="1" type="Availability">
            <xs:annotation>
              <xs:documentation xml:lang="en">What days/times during a week is this location usually open, and any exceptions where the location is not available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="virtualService" minOccurs="0" maxOccurs="unbounded" type="VirtualServiceDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Technical endpoints providing access to services operated for the location.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Location.Position">
    <xs:annotation>
      <xs:documentation xml:lang="en">Details and position information for a place where services are provided and resources and participants may be stored, found, contained, or accommodated.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="longitude" minOccurs="1" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="latitude" minOccurs="1" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="altitude" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="LocationModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="instance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Instance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="kind">
        <xs:annotation>
          <xs:documentation xml:lang="en">Kind</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="LocationMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="LocationModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="LocationStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="suspended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Suspended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="LocationStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="LocationStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ManufacturedItemDefinition" type="ManufacturedItemDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ManufacturedItemDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this item. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A descriptive name applied to this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturedDoseForm" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Dose form as manufactured and before any transformation into the pharmaceutical product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitOfPresentation" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The “real-world” units in which the quantity of the manufactured item is described.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Manufacturer of the item, one of several possible.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="marketingStatus" minOccurs="0" maxOccurs="unbounded" type="MarketingStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ingredient" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The ingredients of this manufactured item. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="ManufacturedItemDefinition.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">General characteristics of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="ManufacturedItemDefinition.Component" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical parts of the manufactured item, that it is intrinsically made from. This is distinct from the ingredients that are part of its chemical makeup.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ManufacturedItemDefinition.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code expressing the type of characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A value for the characteristic.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ManufacturedItemDefinition.Component">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defining type of the component e.g. shell, layer, ink.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="function" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The function of this component within the item e.g. delivers active ingredient, masks taste.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="unbounded" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The measurable amount of total quantity of all substances in the component, expressible in different ways (e.g. by mass or volume).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="constituent" type="ManufacturedItemDefinition.Constituent" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="ManufacturedItemDefinition.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">General characteristics of this component.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="ManufacturedItemDefinition.Component" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A component that this component contains or is made from.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ManufacturedItemDefinition.Constituent">
    <xs:annotation>
      <xs:documentation xml:lang="en">The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="amount" minOccurs="0" maxOccurs="unbounded" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The measurable amount of the substance, expressible in different ways (e.g. by mass or volume).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The physical location of the constituent/ingredient within the component. Example – if the component is the bead in the capsule, then the location would be where the ingredient resides within the product part – intragranular, extra-granular, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="function" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The function of this constituent within the component e.g. binder.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="hasIngredient" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The ingredient that is the constituent of the given component.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Measure" type="Measure">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Measure">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subtitle" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanatory or alternate title for the measure giving additional information about its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this measure. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.</xs:documentation>
            </xs:annotation>
            <xs:element name="subjectCodeableConcept" type="CodeableConcept"/>
            <xs:element name="subjectReference" type="Reference"/>
          </xs:choice>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the measure was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the measure from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate measure instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this measure is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usage" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A detailed description, from a clinical perspective, of how the measure is used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the measure and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the measure content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reportingFrequency" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The frequency that this measure should be reported, usually specified by the program it is being submitted to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, or bibliographic references.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="library" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a Library resource containing the formal logic used by the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disclaimer" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="riskAdjustment" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rateAggregation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rationale" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a detailed justification of the need for the measure including statements pertaining to importance criterion: impact, gap in care, and evidence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="clinicalRecommendationStatement" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="term" type="Measure.Term" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a description of an individual term used within the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="guidance" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="group" type="Measure.Group" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A group of population criteria for the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplementalData" type="Measure.SupplementalData" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Measure.Term">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A codeable representation of the defined term.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a definition for the term as used within the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Measure.Group">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that is unique within the Measure allowing linkage to the equivalent item in a MeasureReport resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the title for the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this population group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The intended subjects for the measure. If this element is not provided, there is no subject context (i.e. population criteria are evaluated from the perspective of the entire system, rather than from the perspective of a particular subject).</xs:documentation>
            </xs:annotation>
            <xs:element name="subjectCodeableConcept" type="CodeableConcept"/>
            <xs:element name="subjectReference" type="Reference"/>
          </xs:choice>
          <xs:element name="basis" minOccurs="0" maxOccurs="1" type="FHIRTypes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The population basis specifies the type of elements in the population. For a subject-based measure, this is boolean (because the subject and the population basis are the same, and the population criteria define yes/no values for each individual in the population). For measures that have a population basis that is different than the subject, this element specifies the type of the population basis. For example, an encounter-based measure has a subject of Patient and a population basis of Encounter, and the population criteria all return lists of Encounters.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basisRequirement" minOccurs="0" maxOccurs="unbounded" type="DataRequirement">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies population basis requirements (i.e. what constitutes a case, or what is being counted) as a DataRequirement. If multiple basisRequirements are specified, criteria expressions may return data that satisfies ANY basisRequirement. A data element satisfies a basisRequirement if the instance `is` of the type, conforms to ALL the specified profiles, and matches ALL the codeFilters. basisRequirements SHALL specify type, MAY specify profile and codeFilter, and SHALL NOT specify dateFilter, valueFilter, limit, or sort. If basis is specified, any basisRequirement SHALL be consistent with the specified basis (i.e. the type of each basisRequirement SHALL be the same type as, or a subtype of the basis type).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="scoring" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="scoringUnit" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the expected units of measure for the measure score. This element SHOULD be specified as a UCUM unit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="scoringPrecision" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the score is a decimal value this should be used to specify the expected minimum number of digits after the decimal point to use for the precision of the value. When a scoringUnit is also specified, this value is the expected minimum number of digits after the decimal point when the score is expressed in the units specified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="compositeScoring" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="Measure.Component" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this is a composite measure, a component of the composite.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rateAggregation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="improvementNotation" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range). Exercise caution when using any values besides increase or decrease for improvementNotation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="improvementNotationGuidance" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Narrative text to explain the improvement notation and how to interpret it.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="library" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a Library resource containing the formal logic used by the measure group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="population" type="Measure.Population" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A population criteria for the measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="stratifier" type="Measure.Stratifier" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A stratifier for the measure, specified as either a criteria expression, or a set of components that define value-based stratifier expressions.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Measure.Component">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="measure" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The measure that contains the definition of the component calculation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the id of a particular group within the measure referenced by the related artifact resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="weight" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">What is the weight of the contribution of this measure to the overall score.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Measure.Population">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that is unique within the Measure allowing linkage to the equivalent population in a MeasureReport resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the title for the group's population.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of population criteria.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this population criteria.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="criteria" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that specifies the criteria for the population, typically the name of an expression in a library.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupDefinition" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Group resource that defines this population as a set of characteristics.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="inputPopulationId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The id of a population element in this measure that provides the input for this population criteria. In most cases, the scoring structure of the measure implies specific relationships (e.g. the Numerator uses the Denominator as the source in a proportion scoring). In some cases, however, multiple possible choices exist and must be resolved explicitly. For example in a ratio measure with multiple initial populations, the denominator must specify which population should be used as the starting point.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="aggregateMethod" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies which method should be used to aggregate measure observation values. For most scoring types, this is implied by scoring (e.g. a proportion measure counts members of the populations). For continuous variables, however, this information must be specified to ensure correct calculation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Measure.Stratifier">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that is unique within the Measure allowing linkage to the equivalent item in a MeasureReport resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the title for the stratifier of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this stratifier criteria.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="criteria" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that specifies a criteria-based stratifier for the measure. This is typically the name of an expression defined within a referenced library, and SHALL use the same basis as other population criteria for the population group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupDefinition" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Group resource that defines this population as a set of characteristics.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="Measure.Component1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A component of a value-based stratifier for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Measure.Component1">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that is unique within the Measure allowing linkage to the equivalent item in a MeasureReport resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this stratifier criteria component.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="criteria" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that returns the value of this component of the stratifier for a member of the population. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element, evaluated from the perspective of the measure subject. If this is a non-subject-based measure, the expression may be a reference to a function that takes an argument of the type of the measure basis, allowing the stratifier value to be determined for each member of the population.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupDefinition" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Group resource that defines this population as a set of characteristics.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value set defining the set of possible values for stratum in this stratifier. If criteria and valueSet are both present, they SHALL be consistent (i.e. criteria expressions SHALL produce stratum values that are codes in the value set referenced by this element). Note that this MAY be strictly at the code level (e.g. an Age Range code that is just the string value `01Y--05Y` with the system ignored).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unit" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what units, if any, stratifier values are expected to be expressed in. This element SHOULD be specified in UCUM units or calendar units.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Measure.SupplementalData">
    <xs:annotation>
      <xs:documentation xml:lang="en">The Measure resource provides the definition of a quality measure.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that is unique within the Measure allowing linkage to the equivalent item in a MeasureReport resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usage" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this supplemental data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="criteria" minOccurs="1" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value set defining the set of possible values for supplemental data in this element. If criteria and valueSet are both present, they SHALL be consistent (i.e. criteria expressions SHALL produce supplemental data values that are codes in the value set referenced by this element). Note that this MAY be strictly at the code level (e.g. an Age Range code that is just the string value `01Y--05Y` with the system ignored).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unit" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what units, if any, supplemental data values are expected to be expressed in. This element SHOULD be specified in UCUM units or calendar units.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="MeasureReport" type="MeasureReport">
    <xs:annotation>
      <xs:documentation xml:lang="en">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="MeasureReport">
    <xs:annotation>
      <xs:documentation xml:lang="en">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The category of measure report instance this is such as Data Exchange for Quality Measures (DEQM), Risk Adjustment, or Value-Based Performance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="messages" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to an OperationOutcome that contains any information, warning, and/or error messages that were generated while processing an operation such as $evaluate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="MeasureReportStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The MeasureReport status. No data will be available until the MeasureReport status is complete.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="MeasureReportType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dataUpdateType" minOccurs="0" maxOccurs="1" type="SubmitDataUpdateType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the data submitted in a data-exchange report represents a snapshot or incremental update. A snapshot update replaces all previously submitted data for the receiver, whereas an incremental update represents only updated and/or changed data and should be applied as a differential update to the existing submitted data for the receiver.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="measure" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the Measure that was calculated to produce this report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optional subject identifying the individual or individuals the report is for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date this measure report was generated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reporter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or organization that is reporting the data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reportingVendor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the vendor who queried the data, calculated results and/or generated the report. The ‘reporting vendor’ is intended to represent the submitting entity when it is not the same as the reporting entity. This extension is used when the Receiver is interested in getting vendor information in the report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the location for which the data is being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="1" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reporting period for which the report was calculated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="inputParameters" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a Parameters resource (typically represented using a contained resource) that represents any input parameters that were provided to the operation that generated the report. If the input parameter includes stratifiers, then the MeasureReport SHALL include the input parameters.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="group" type="MeasureReport.Group" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The results of the calculation, one for each population group in the measure. A MeasureReport SHALL have a group element corresponding to each group element defined in the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplementalData" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a Resource that represents additional information collected for the report. If the value of the supplemental data is not a Resource (i.e. evaluating the supplementalData expression for this case in the measure results in a value that is not a FHIR Resource), it is reported as a reference to a contained Observation resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="evaluatedResource" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Evaluated resources are used to capture what data was involved in the calculation of a measure. This usage is only allowed for individual reports to ensure that the size of the MeasureReport resource is bounded.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MeasureReport.Group">
    <xs:annotation>
      <xs:documentation xml:lang="en">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The group from the Measure that corresponds to this group in the MeasureReport resource. This element SHALL be populated based on the corresponding element in the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the title for of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="calculatedDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date the Measure Report was calculated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The meaning of the population group as defined in the measure definition. This element SHALL be populated with at least the codings in the code of the corresponding group in the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this population group. This element SHOULD be populated based on the description of the corresponding group in the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optional subject identifying the individual or individuals the report is for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="scoring" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented. It is expected to be the same as the scoring element on the referenced Measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="improvementNotation" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether improvement in the measure is noted by an increase or decrease in the measure score. Exercise caution when using any values besides increase or decrease for improvementNotation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="improvementNotationGuidance" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Narrative text to explain the improvement notation and how to interpret it.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="population" type="MeasureReport.Population" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The populations that make up the population group, one for each type of population appropriate for the measure. Each group in the MeasureReport SHALL have populations as defined in the corresponding group of the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.</xs:documentation>
            </xs:annotation>
            <xs:element name="measureScoreQuantity" type="Quantity"/>
            <xs:element name="measureScoreDateTime" type="dateTime"/>
            <xs:element name="measureScoreCodeableConcept" type="CodeableConcept"/>
            <xs:element name="measureScorePeriod" type="Period"/>
            <xs:element name="measureScoreRange" type="Range"/>
            <xs:element name="measureScoreDuration" type="Duration"/>
            <xs:element name="measureScoreBoolean" type="boolean"/>
            <xs:element name="measureScoreRatio" type="Ratio"/>
          </xs:choice>
          <xs:element name="stratifier" type="MeasureReport.Stratifier" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The stratification results for this measure group, calculated as defined by the stratifier element of the measure being reported. Each group in the MeasureReport SHALL have stratifiers as defined in the corresponding group of the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MeasureReport.Population">
    <xs:annotation>
      <xs:documentation xml:lang="en">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The population from the Measure that corresponds to this population in the MeasureReport resource. This element SHALL be populated based on the corresponding element in the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the title for of the group's population.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the population. This element SHALL be populated with at least the codings in the code element of the corresponding population in the Measure group being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this population criteria. This element SHOULD be populated based on the description element of the corresponding population in the Measure group being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="count" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of members of the population.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="countQuantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of members of the population, specified as a quantity to support identifying units, as well as to support some composite measure calculation use cases where the resulting count of the population is a decimal value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectResults" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element refers to a List of individual level MeasureReport resources, one for each subject in this population.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectReport" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to an individual level MeasureReport resource for a member of the population.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjects" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optional Group identifying the individuals that make up the population.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MeasureReport.Stratifier">
    <xs:annotation>
      <xs:documentation xml:lang="en">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The stratifier from the Measure that corresponds to this stratifier in the MeasureReport resource. This element SHALL be populated based on the corresponding element in the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the title for of the group's stratifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The meaning of this stratifier, as defined in the measure definition. This element SHALL be populated with at least the codings in the code element of the corresponding stratifier in the Measure group being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this stratifier criteria. This element SHOULD be populated with the description element of the corresponding stratifier in the Measure group being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="stratum" type="MeasureReport.Stratum" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MeasureReport.Stratum">
    <xs:annotation>
      <xs:documentation xml:lang="en">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
          <xs:element name="component" type="MeasureReport.Component" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A stratifier component value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="population" type="MeasureReport.Population1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The populations that make up the stratum, one for each type of population appropriate to the measure. For each stratifier, systems MAY provide population breakdowns in addition to the stratified scores.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.</xs:documentation>
            </xs:annotation>
            <xs:element name="measureScoreQuantity" type="Quantity"/>
            <xs:element name="measureScoreDateTime" type="dateTime"/>
            <xs:element name="measureScoreCodeableConcept" type="CodeableConcept"/>
            <xs:element name="measureScorePeriod" type="Period"/>
            <xs:element name="measureScoreRange" type="Range"/>
            <xs:element name="measureScoreDuration" type="Duration"/>
            <xs:element name="measureScoreBoolean" type="boolean"/>
            <xs:element name="measureScoreRatio" type="Ratio"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MeasureReport.Component">
    <xs:annotation>
      <xs:documentation xml:lang="en">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The stratifier component from the Measure that corresponds to this stratifier component in the MeasureReport resource. This element SHALL be populated based on the corresponding element in the Measure being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code for the stratum component value. This element SHALL be populated with at least the codings in the code element of the corresponding component of the stratifier being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this stratifier criteria component. This element MAY be populated with the description of the corresponding component of the stratifier being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The stratum component value.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MeasureReport.Population1">
    <xs:annotation>
      <xs:documentation xml:lang="en">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The population from the Measure that corresponds to this population in the MeasureReport resource. This element SHALL be populated with the linkId corresponding to the population being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the population. This element SHALL be populated with at least the codings in the code element of the corresponding population being reported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="count" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of members of the population in this stratum.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="countQuantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of members of the population in this stratum, specified as a quantity to support identifying units, as well as to support some composite measure calculation use cases where the resulting count of the population is a decimal value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectResults" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element refers to a List of individual level MeasureReport resources, one for each subject in this population in this stratum.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectReport" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to an individual level MeasureReport resource for a member of the population.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjects" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optional Group identifying the individuals that make up the population.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SubmitDataUpdateTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="incremental">
        <xs:annotation>
          <xs:documentation xml:lang="en">Incremental</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="snapshot">
        <xs:annotation>
          <xs:documentation xml:lang="en">Snapshot</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SubmitDataUpdateType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SubmitDataUpdateTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MeasureReportStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Complete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="pending">
        <xs:annotation>
          <xs:documentation xml:lang="en">Pending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MeasureReportStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en">The status of the measure report.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MeasureReportStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MeasureReportTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="individual">
        <xs:annotation>
          <xs:documentation xml:lang="en">Individual</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="subject-list">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subject List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="summary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Summary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data-exchange">
        <xs:annotation>
          <xs:documentation xml:lang="en">Data Exchange</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MeasureReportType">
    <xs:annotation>
      <xs:documentation xml:lang="en">The type of the measure report.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MeasureReportTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Medication" type="Medication">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Medication">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifier for this medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code (or set of codes) that specify this medication, or a textual description. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems. The name of the medication can be conveyed in the code.text even if it is different from any of the coding displayName values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="MedicationStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate if the medication is in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="marketingAuthorizationHolder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The company or other legal entity that has authorization, from the appropriate drug regulatory authority,  to market a medicine in one or more jurisdictions.  Typically abbreviated MAH.Note:  The MAH may manufacture the product and may also contract the manufacturing of the product to one or more companies (organizations).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doseForm" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the form of the item.  Powder; tablets; capsule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packageSize" type="Medication.PackageSize" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the code does not specify the package size, this backbone element can be used to specify the overall amount of medication in the package.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ingredient" type="Medication.Ingredient" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a particular constituent of interest in the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instance" type="Medication.Instance" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information that only applies to packages (not products).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a definitional resource that provides more information about this medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Medication.PackageSize">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="numberOfItems" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of items in the package that are represented by the code, e.g. 5 vials or 100 tablets.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amountPerItem" minOccurs="0" maxOccurs="1" type="Ratio">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount per each item, e.g. 10 ml / vial.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Medication.Ingredient">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="item" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The ingredient (substance or medication) that the ingredient.strength relates to.  This is represented as a concept from a code system or described in another resource (Substance or Medication).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isActive" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indication of whether this ingredient affects the therapeutic action of the drug.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indication of whether this ingredient affects the therapeutic action of the drug.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.</xs:documentation>
            </xs:annotation>
            <xs:element name="strengthRatio" type="Ratio"/>
            <xs:element name="strengthCodeableConcept" type="CodeableConcept"/>
            <xs:element name="strengthQuantity" type="Quantity"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Medication.Instance">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for the physical instance, typically a serial number.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lotNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The assigned lot number of a batch of the specified product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expirationDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When this specific instance of product will expire.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MedicationStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MedicationStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MedicationStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="MedicationAdministration" type="MedicationAdministration">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient consuming or otherwise being administered 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:element>
  <xs:complexType name="MedicationAdministration">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient consuming or otherwise being administered 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:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan that is fulfilled in whole or in part by this MedicationAdministration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A larger event of which this particular event is a component or step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="MedicationAdministrationStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">Will generally be set to show that the administration has been completed.  For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code indicating why the status of the administration changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of medication administration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="medication" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person or animal or group receiving the medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInformation" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information (for example, patient height and weight) that supports the administration of the medication.  This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration.  For example, if the dose says &quot;give &quot;x&quot; if the heartrate exceeds &quot;y&quot;&quot;, then the heart rate can be included using this attribute.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
            <xs:element name="occurrenceTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="recorded" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date the occurrence of the  MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isSubPotent" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication that the full dose was not administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subPotentReason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reason or reasons why the full dose was not administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" type="MedicationAdministration.Performer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The performer of the medication treatment.  For devices this is the device that performed the administration of the medication.  An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code, Condition or observation that supports why the medication was administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The original request, instruction or authority to perform the administration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="device" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The device that is to be used for the administration of the medication (for example, PCA Pump).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Extra information about the medication administration that is not conveyed by the other attributes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dosage" type="MedicationAdministration.Dosage" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the medication dosage information details e.g. dose, rate, site, route, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eventHistory" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A summary of the events of interest that have occurred, such as when the administration was verified.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicationAdministration.Performer">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient consuming or otherwise being administered 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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distinguishes the type of involvement of the performer in the medication administration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed the medication administration.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicationAdministration.Dosage">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes the event of a patient consuming or otherwise being administered 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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.

The dosage instructions should reflect the dosage of the medication that was administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="site" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded specification of the anatomic site where the medication first entered the body.  For example, &quot;left arm&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="route" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient.  For example, topical, intravenous, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.  This attribute will most often NOT be populated.  It is most commonly used for injections.  For example, Slow Push, Deep IV.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dose" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of the medication given at one administration event.   Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the speed with which the medication was or will be introduced into the patient.  Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours.  Other examples:  200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.</xs:documentation>
            </xs:annotation>
            <xs:element name="rateRatio" type="Ratio"/>
            <xs:element name="rateQuantity" type="Quantity"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MedicationAdministrationStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-done">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Done</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="stopped">
        <xs:annotation>
          <xs:documentation xml:lang="en">Stopped</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MedicationAdministrationStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MedicationAdministrationStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="MedicationDispense" type="MedicationDispense">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="MedicationDispense">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan that is fulfilled in whole or in part by this MedicationDispense.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The procedure or medication administration that triggered the dispense.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="MedicationDispenseStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code specifying the state of the set of dispense events.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="notPerformedReason" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the reason why a dispense was not performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusChanged" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and maybe time) when the status of the dispense record changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the type of medication dispense (for example, drug classification like ATC, where meds would be administered, legal category of the medication.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="medication" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the medication supplied (or intended to be supplied). This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A link to a resource representing the person or the group to whom the medication will be given.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The encounter that establishes the context for this event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInformation" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information that supports the medication being dispensed.  For example, there may be requirements that a specific lab test has been completed prior to dispensing or the patient's weight at the time of dispensing is documented.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" type="MedicationDispense.Performer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The principal physical location where the dispense was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorizingPrescription" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the medication order that is being dispensed against.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of medication that has been (or was intended to be) dispensed. Includes unit of measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="daysSupply" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of medication expressed as a timing amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fillNumber" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Represents the known number of the fill over the entire lifetime of the prescription, i.e. if this is the first dispense by this pharmacy but the third fill overall, then the fillNumber will be 3.  Each fill number represents one dispensation, even if that dispensation is not for the full quantity.  Partial fills are not represented by decimal quantities, i.e., a partial fill of 40 tablets (full quantity is 100 tablets) adds 1 to the prior fill number, not 0.4. This means that the 'fillNumber' may sometimes be higher than the MedicationRequest.numberOfRepeatsAllowed, as the latter assumes full fills, while fillNumber does not.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorded" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date the occurrence of the MedicationDispense was first captured in the system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="whenPrepared" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time when the dispensed product was packaged and reviewed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="whenHandedOver" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time the dispensed product was provided to the patient or their representative.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="destination" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identification of the facility/location where the medication was/will be shipped to, as part of the dispense event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="receiver" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the person who picked up the medication or the location or organization where the medication was delivered. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional or a location, or organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Extra information about the dispense that could not be conveyed in the other attributes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dosageInstruction" minOccurs="0" maxOccurs="1" type="DosageDetails">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how the medication is to be used by the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doseAdministrationAid" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides information about the type of adherence packaging supplied for the medication dispense.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="substitution" type="MedicationDispense.Substitution" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether or not substitution was made as part of the dispense.  In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen.  This block explains what substitution did or did not happen and why.  If nothing is specified, substitution was not done.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eventHistory" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A summary of the events of interest that have occurred, such as when the dispense was verified.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicationDispense.Performer">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distinguishes the type of performer in the dispense.  For example, date enterer, packager, final checker.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The device, practitioner, etc. who performed the action.  It should be assumed that the actor is the dispenser of the medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicationDispense.Substitution">
    <xs:annotation>
      <xs:documentation xml:lang="en">Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="wasSubstituted" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">True if the dispenser dispensed a different drug or product from what was prescribed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code signifying whether a different drug was dispensed from what was prescribed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the reason for the substitution (or lack of substitution) from what was prescribed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="responsibleParty" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person or organization that has primary responsibility for the substitution.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MedicationDispenseStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="preparation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preparation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unfulfilled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unfulfilled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="declined">
        <xs:annotation>
          <xs:documentation xml:lang="en">Declined</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MedicationDispenseStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en">A coded concept specifying the state of the dispense event.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MedicationDispenseStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="MedicationRequest" type="MedicationRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called &quot;MedicationRequest&quot; rather than &quot;MedicationPrescription&quot; or &quot;MedicationOrder&quot; to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="MedicationRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called &quot;MedicationRequest&quot; rather than &quot;MedicationPrescription&quot; or &quot;MedicationOrder&quot; to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whenever the medication request is being issued because of another request, eg. a procedure that is being planned (ServiceRequest) and MedicationRequests are known to be needed, this element documents those requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priorPrescription" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to an order/prescription that is being replaced by this MedicationRequest.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="MedicationrequestStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code specifying the current state of the order.  Generally, this will be active or completed state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures the reason for the current state of the MedicationRequest.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusChanged" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and perhaps time) when the status was changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="MedicationRequestIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the request is a proposal, plan, or an original order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An arbitrary categorization or grouping of the medication request.  It could be used for indicating where meds are intended to be administered, eg. in an inpatient setting or in a patient's home, or a legal category of the medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the Medication Request should be addressed with respect to other requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doNotPerform" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, indicates the provider is ordering a patient should not take the specified medication. The reason for this order can be provided in the .reason element. A MedicationRequest with .doNotPerform = true will not result in any dispense or administration.  A request not to take or administer medication is a standalone request, and does not update any other medication request.   When true, active orders that may exist for the same medication are expected to be canceled/ended, and new orders for the same medication are not expected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="medication" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or group for whom the medication has been requested.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSource" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person or organization who provided the information about this request, if the source is someone other than the requestor. The informationSource element is generally used when details of a prescription are being reported by someone who is not the requestor, e.g., I indicate that I received a prescription for a med out of my jurisdiction and the details are recorded in the system as a MedicationRequest. Normally when this element is populated, the .isRecordOfRequest element would be set to &quot;true&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this [x] was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInformation" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information to support fulfilling (i.e. dispensing or administering) of the medication, for example, patient height and weight, a MedicationStatement for the patient).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authoredOn" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and perhaps time) when the prescription was initially written or authored on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requester" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual, organization, or device that initiated the request and has responsibility for its activation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isRecordOfRequest" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">The information in this instance is a record of the Medication Request and is not request or order itself and should not be considered as such, i.e. the information should not be used for medication dispense | supply and administration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performerType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the type of performer of the administration of the medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specified desired performer of the medication treatment (e.g. the performer of the medication administration).  For devices, this is the device that is intended to perform the administration of the medication.  An IV Pump would be an example of a device that is performing the administration.  Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="device" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The intended type of device that is to be used for the administration of the medication (for example, PCA Pump).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the medication request was issued as a result of something that occurred, i.e. a lab test or a performed procedure, this documents those reasons.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="courseOfTherapyType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The description of the overall pattern of the administration of the medication to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Extra information about the prescription that could not be conveyed by the other attributes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The period over which the medication is to be taken. Can be specified as a duration or a range. Where there are multiple dosageInstruction lines (for example, tapering doses), this is the earliest date and the latest end date of the dosageInstructions.</xs:documentation>
            </xs:annotation>
            <xs:element name="effectiveTimingDuration" type="Duration"/>
            <xs:element name="effectiveTimingRange" type="Range"/>
            <xs:element name="effectiveTimingPeriod" type="Period"/>
          </xs:choice>
          <xs:element name="dosageInstruction" minOccurs="0" maxOccurs="1" type="DosageDetails">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific instructions for how the medication is to be used by the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dispenseRequest" type="MedicationRequest.DispenseRequest" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order).  Note that this information is not always sent with the order.  There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="substitution" type="MedicationRequest.Substitution" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eventHistory" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicationRequest.DispenseRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called &quot;MedicationRequest&quot; rather than &quot;MedicationPrescription&quot; or &quot;MedicationOrder&quot; to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="initialFill" type="MedicationRequest.InitialFill" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the quantity or duration for the first dispense of the medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dispenseInterval" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">The minimum period of time that must occur between dispenses of the medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="validityPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">This indicates the validity period of a prescription (stale dating the Prescription).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfRepeatsAllowed" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus &quot;3 repeats&quot;, then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.  A prescriber may explicitly say that zero refills are permitted after the initial dispense.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount that is to be dispensed for one fill.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expectedSupplyDuration" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dispenser" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the intended performing Organization that will dispense the medication as specified by the prescriber.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dispenserInstruction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides additional information to the dispenser, for example, counselling to be provided to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doseAdministrationAid" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides information about the type of adherence packaging to be supplied for the medication dispense.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="destination" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identification of the facility/location where the medication is expected to be delivered.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicationRequest.InitialFill">
    <xs:annotation>
      <xs:documentation xml:lang="en">An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called &quot;MedicationRequest&quot; rather than &quot;MedicationPrescription&quot; or &quot;MedicationOrder&quot; to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount or quantity to provide as part of the first dispense.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="duration" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">The length of time that the first dispense is expected to last.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicationRequest.Substitution">
    <xs:annotation>
      <xs:documentation xml:lang="en">An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called &quot;MedicationRequest&quot; rather than &quot;MedicationPrescription&quot; or &quot;MedicationOrder&quot; to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">True if the prescriber allows a different drug to be dispensed from what was prescribed.</xs:documentation>
            </xs:annotation>
            <xs:element name="allowedBoolean" type="boolean"/>
            <xs:element name="allowedCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the reason for the substitution, or why substitution must or must not be performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MedicationrequestStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="stopped">
        <xs:annotation>
          <xs:documentation xml:lang="en">Stopped</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">Draft</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MedicationrequestStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MedicationrequestStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MedicationRequestIntentEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="proposal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Proposal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="plan">
        <xs:annotation>
          <xs:documentation xml:lang="en">Plan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="original-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Original Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reflex-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reflex Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="filler-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Filler Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="instance-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Instance Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="option">
        <xs:annotation>
          <xs:documentation xml:lang="en">Option</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MedicationRequestIntent">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MedicationRequestIntentEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="MedicationStatement" type="MedicationStatement">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. 

The primary difference between a medicationstatement and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationstatement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="MedicationStatement">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. 

The primary difference between a medicationstatement and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationstatement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A larger event of which this particular MedicationStatement is a component or step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="MedicationStatementStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code representing the status of recording the medication statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of medication statement.  

The committee will revisit these codes, expecting to use a codesystem from [terminology.hl7.org](http://terminology.hl7.org).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="medication" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the medication taken (or not taken). This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person, animal or group who is/was taking the medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The encounter that establishes the context for this MedicationStatement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.adherence element is Not Taking).</xs:documentation>
            </xs:annotation>
            <xs:element name="effectiveDateTime" type="dateTime"/>
            <xs:element name="effectivePeriod" type="Period"/>
            <xs:element name="effectiveTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="dateAsserted" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when the Medication Statement was asserted by the information source.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual, organization, or device that created the statement and has responsibility for its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSource" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The concept(s), Condition(s) or observation(s) that lead to the medication being taken (or not taken).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides extra information about the Medication Statement that is not conveyed by the other attributes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedClinicalInformation" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Link to information that is relevant to a medication statement, for example, illicit drug use, gestational age, etc. This is normally not the actual indication for the medication being used - that indication would be represented with .reason.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dosage" minOccurs="0" maxOccurs="1" type="DosageDetails">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how the medication is/was or should be taken by the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adherence" type="MedicationStatement.Adherence" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the medication is or is not being consumed or administered.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicationStatement.Adherence">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. 

The primary difference between a medicationstatement and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationstatement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of the adherence for the medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures the reason for the current use or adherence of a medication.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MedicationStatementStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="recorded">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recorded</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">Draft</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MedicationStatementStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MedicationStatementStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="MedicinalProductDefinition" type="MedicinalProductDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="MedicinalProductDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifier for this product. Could be an MPID. When in development or being regulated, products are typically referenced by official identifiers, assigned by a manufacturer or regulator, and unique to a product (which, when compared to a product instance being prescribed, is actually a product type). See also MedicinalProductDefinition.code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Regulatory type, e.g. Investigational or Authorized.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="domain" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this medicine applies to human or veterinary uses.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A business identifier relating to a specific version of the product, this is commonly used to support revisions to an existing product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status within the lifecycle of this product record. A high-level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date at which the given status became applicable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">General description of this product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="combinedPharmaceuticalDoseForm" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The dose form for a single part product, or combined form of a multiple part product. This is one concept that describes all the components. It does not represent the form with components physically mixed, if that might be necessary, for which see (AdministrableProductDefinition.administrableDoseForm).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="route" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The path by which the product is taken into or makes contact with the body. In some regions this is referred to as the licensed or approved route. See also AdministrableProductDefinition resource. MedicinalProductDefinition.route is the same concept as AdministrableProductDefinition.routeOfAdministration.code, and they cannot be used together.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="indication" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of indication(s) for this product, used when structured indications are not required. In cases where structured indications are required, they are captured using the ClinicalUseDefinition resource. An indication is a medical situation for which using the product is appropriate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="legalStatusOfSupply" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The legal status of supply of the medicinal product as classified by the regulator.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additionalMonitoringIndicator" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the Medicinal Product is subject to additional monitoring for regulatory reasons, such as heightened reporting requirements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialMeasures" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the Medicinal Product is subject to special measures for regulatory reasons, such as a requirement to conduct post-authorization studies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="pediatricUseIndicator" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">If authorised for use in children, or infants, neonates etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classification" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows the product to be classified by various systems, commonly WHO ATC.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="marketingStatus" minOccurs="0" maxOccurs="unbounded" type="MarketingStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Marketing status of the medicinal product, in contrast to marketing authorization. This refers to the product being actually 'on the market' as opposed to being allowed to be on the market (which is an authorization).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packagedMedicinalProduct" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Package type for the product. See also the PackagedProductDefinition resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comprisedOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Types of medicinal manufactured items and/or devices that this product consists of, such as tablets, capsule, or syringes. Used as a direct link when the item's packaging is not being recorded (see also PackagedProductDefinition.package.containedItem.item).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ingredient" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The ingredients of this medicinal product - when not detailed in other resources. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource, or indirectly via incoming AdministrableProductDefinition, PackagedProductDefinition or ManufacturedItemDefinition references. In cases where those levels of detail are not used, the ingredients may be specified directly here as codes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="impurity" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any component of the drug product which is not the chemical entity defined as the drug substance, or an excipient in the drug product. This includes process-related impurities and contaminants, product-related impurities including degradation products.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="attachedDocument" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information or supporting documentation about the medicinal product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="masterFile" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A master file for the medicinal product (e.g. Pharmacovigilance System Master File). Drug master files (DMFs) are documents submitted to regulatory agencies to provide confidential detailed information about facilities, processes or articles used in the manufacturing, processing, packaging and storing of drug products.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" type="MedicinalProductDefinition.Contact" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A product specific contact, person (in a role), or an organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="clinicalTrial" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Clinical trials or studies that this product is involved in.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that this product is known by, usually within some formal terminology, perhaps assigned by a third party (i.e. not the manufacturer or regulator). Products (types of medications) tend to be known by identifiers during development and within regulatory process. However when they are prescribed they tend to be identified by codes. The same product may be have multiple codes, applied to it by multiple organizations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" type="MedicinalProductDefinition.Name" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product's name, including full name and possibly coded parts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="crossReference" type="MedicinalProductDefinition.CrossReference" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to another product, e.g. for linking authorised to investigational product, or a virtual product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operation" type="MedicinalProductDefinition.Operation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A manufacturing or administrative process or step associated with (or performed on) the medicinal product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characteristic" type="MedicinalProductDefinition.Characteristic" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows the key product features to be recorded, such as &quot;sugar free&quot;, &quot;modified release&quot;, &quot;parallel import&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicinalProductDefinition.Contact">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows the contact to be classified, for example QPPV, Pharmacovigilance Enquiry Information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A product specific contact, person (in a role), or an organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicinalProductDefinition.Name">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="productName" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The full product name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of product name, such as rINN, BAN, Proprietary, Non-Proprietary.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="part" type="MedicinalProductDefinition.Part" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coding words or phrases of the name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usage" type="MedicinalProductDefinition.Usage" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Country and jurisdiction where the name applies, and associated language.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicinalProductDefinition.Part">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="part" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A fragment of a product name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifying type for this part of the name (e.g. strength part).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicinalProductDefinition.Usage">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="country" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Country code for where this name applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Jurisdiction code for where this name applies. A jurisdiction may be a sub- or supra-national entity (e.g. a state or a geographic region).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="language" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Language code for this name.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicinalProductDefinition.CrossReference">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="product" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to another product, e.g. for linking authorised to investigational product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship, for instance branded to generic, virtual to actual product, product to development product (investigational), parallel import version.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicinalProductDefinition.Operation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of manufacturing operation e.g. manufacturing itself, re-packaging. For the authorization of this, a RegulatedAuthorization would point to the same plan or activity referenced here.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectiveDate" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date range of applicability.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organization" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization or establishment responsible for (or associated with) the particular process or step, examples include the manufacturer, importer, agent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="confidentialityIndicator" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies whether this particular business or manufacturing process is considered proprietary or confidential.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MedicinalProductDefinition.Characteristic">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code expressing the type of characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A value for the characteristic.text.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="MessageDefinition" type="MessageDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="MessageDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the message definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="replaces" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A MessageDefinition that is superseded by this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this message definition. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the message definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the message definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the message definition from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this message definition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the message definition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the message definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="base" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The MessageDefinition that is the basis for the contents of this resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parent" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a protocol or workflow that this MessageDefinition represents a step in.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Event code or link to the EventDefinition.</xs:documentation>
            </xs:annotation>
            <xs:element name="eventCoding" type="Coding"/>
            <xs:element name="eventUri" type="uri"/>
          </xs:choice>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="MessageSignificanceCategory">
            <xs:annotation>
              <xs:documentation xml:lang="en">The impact of the content of the message.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" type="MessageDefinition.Focus" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the resource (or resources) that are being addressed by the event.  For example, the Encounter for an admit message or two Account records for a merge.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="responseRequired" minOccurs="0" maxOccurs="1" type="MessageheaderResponseRequest">
            <xs:annotation>
              <xs:documentation xml:lang="en">Declare at a message definition level whether a response is required or only upon error or success, or never.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="allowedResponse" type="MessageDefinition.AllowedResponse" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what types of messages may be sent as an application-level response to this message.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MessageDefinition.Focus">
    <xs:annotation>
      <xs:documentation xml:lang="en">Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="ResourceType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of resource that must be the focus for this message.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profile" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A profile that reflects constraints for the focal resource (and potentially for related resources).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="min" minOccurs="1" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="max" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MessageDefinition.AllowedResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="message" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the message definition that must be adhered to by this supported response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="situation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MessageSignificanceCategoryEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="consequence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consequence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="currency">
        <xs:annotation>
          <xs:documentation xml:lang="en">Currency</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="notification">
        <xs:annotation>
          <xs:documentation xml:lang="en">Notification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MessageSignificanceCategory">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MessageSignificanceCategoryEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="MessageheaderResponseRequestEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="always">
        <xs:annotation>
          <xs:documentation xml:lang="en">Always</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error/reject conditions only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="never">
        <xs:annotation>
          <xs:documentation xml:lang="en">Never</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-success">
        <xs:annotation>
          <xs:documentation xml:lang="en">Successful completion only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="MessageheaderResponseRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="MessageheaderResponseRequestEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="MessageHeader" type="MessageHeader">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:element>
  <xs:complexType name="MessageHeader">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that identifies the event this message represents and connects it with its definition. Events are defined by codes, or by URIs that identify events, or by reference to EventDefinition or SubscriptionTopic resources that define the event directly. This element is intentionally unbound, and the selection of appropriate event codes is delegated to implementations and implementation guides. For codes, a good set of example codes is found in [the V2 event codes](https://terminology.hl7.org/ValueSet-v2-0003.html).</xs:documentation>
            </xs:annotation>
            <xs:element name="eventCoding" type="Coding"/>
            <xs:element name="eventUri" type="uri"/>
            <xs:element name="eventCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="destination" type="MessageHeader.Destination" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The destination application which the message is intended for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" type="MessageHeader.Source" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The source application from which this message originated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded indication of the cause for the event - indicates  a reason for the occurrence of the event that is a focus of this message.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="response" type="MessageHeader.Response" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the message that this message is a response to.  Only present if this message is a response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual data of the message - a reference to the root/focus class of the event. This is allowed to be a Parameters resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Permanent link to the MessageDefinition for this message.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MessageHeader.Destination">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates where the message should be routed.</xs:documentation>
            </xs:annotation>
            <xs:element name="endpointUrl" type="url"/>
            <xs:element name="endpointReference" type="Reference"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human-readable name for the target system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="receiver" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MessageHeader.Source">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the routing target to send acknowledgements to.</xs:documentation>
            </xs:annotation>
            <xs:element name="endpointUrl" type="url"/>
            <xs:element name="endpointReference" type="Reference"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human-readable name for the source system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="software" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">May include configuration or other information useful in debugging.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Can convey versions of multiple systems in situations where a message passes through multiple hands.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="1" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">An e-mail, phone, website or other contact point to use to resolve issues with message communications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sender" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the sending entity to allow the use of a trust relationship.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="MessageHeader.Response">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="1" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Bundle.identifier of the message to which this message is a response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="ResponseType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="details" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Full details of any issues found in the message.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ResponseTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="ok">
        <xs:annotation>
          <xs:documentation xml:lang="en">OK</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="transient-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Transient Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="fatal-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fatal Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ResponseType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ResponseTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="NamingSystem" type="NamingSystem">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:element>
  <xs:complexType name="NamingSystem">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this naming system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this naming system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the naming system is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this naming system when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the naming system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the naming system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which NamingSystem is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the naming system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this naming system. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="kind" minOccurs="1" maxOccurs="1" type="NamingSystemType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the purpose for the naming system - what kinds of things does it make unique?</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this naming system is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the naming system was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the naming system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="responsible" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Categorizes a naming system for easier search by grouping related naming systems.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate naming system instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this naming system is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the naming system and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the naming system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the NamingSystem content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptions related to the content of the NamingSystem. Topics provide a high-level categorization as well as keywords for the NamingSystem that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the NamingSystem.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the NamingSystem.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the NamingSystem.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the NamingSystem for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts. If the type is `successor` or `predecessor`, the related resource must be a NamingSystem.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usage" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uniqueId" type="NamingSystem.UniqueId" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how the system may be identified when referenced in electronic exchange.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NamingSystem.UniqueId">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="NamingSystemIdentifierType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the unique identifier scheme used for this particular identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The string that should be sent over the wire to identify the code system or identifier system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preferred" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether this identifier is the &quot;preferred&quot; identifier of this type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Notes about the past or intended usage of this identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authoritative" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether this identifier ie endorsed by the official owner of the associated naming system.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NamingSystemIdentifierTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="oid">
        <xs:annotation>
          <xs:documentation xml:lang="en">OID</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uuid">
        <xs:annotation>
          <xs:documentation xml:lang="en">UUID</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uri">
        <xs:annotation>
          <xs:documentation xml:lang="en">URI</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="iri-stem">
        <xs:annotation>
          <xs:documentation xml:lang="en">IRI stem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="v2csmnemonic">
        <xs:annotation>
          <xs:documentation xml:lang="en">V2CSMNemonic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation xml:lang="en">Other</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NamingSystemIdentifierType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="NamingSystemIdentifierTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NamingSystemTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="codesystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">Code System</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="identifier">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifier</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="root">
        <xs:annotation>
          <xs:documentation xml:lang="en">Root</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NamingSystemType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="NamingSystemTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="NutritionIntake" type="NutritionIntake">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of intake by a patient.  A NutritionIntake may indicate that the patient may be consuming the food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula now or has consumed it in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label, or from a clinician documenting observed intake.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="NutritionIntake">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of intake by a patient.  A NutritionIntake may indicate that the patient may be consuming the food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula now or has consumed it in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label, or from a clinician documenting observed intake.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers associated with this Nutrition Intake that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan, proposal or order that is fulfilled in whole or in part by this event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A larger event of which this particular event is a component or step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="EventStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code representing the patient or other source's judgment about the state of the intake that this assertion is about.  Generally, this will be active or completed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures the reason for the current state of the NutritionIntake.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Overall type of nutrition intake.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person or group who is/was consuming the food (i.e. solid and/or liquid).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The encounter that establishes the context for this NutritionIntake.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The interval of time during which it is being asserted that the patient is/was consuming the food (i.e. solid and/or liquid).</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
          </xs:choice>
          <xs:element name="recorded" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when the Nutrition Intake was asserted by the information source.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth.  It may also indicate the source that provided the information about the consumption.</xs:documentation>
            </xs:annotation>
            <xs:element name="reportedBoolean" type="boolean"/>
            <xs:element name="reportedReference" type="Reference"/>
          </xs:choice>
          <xs:element name="nutritionItem" type="NutritionIntake.NutritionItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nutrition product intended for consumption and/or administration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" type="NutritionIntake.Performer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who or what performed the intake and how they were involved.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the intake occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows linking the NutritionIntake to the underlying NutritionOrder, or to other information, such as AllergyIntolerance, that supports or is used to derive the NutritionIntake.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reason, Condition or observation for why the food (i.e. solid and/or liquid) is /was consumed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides extra information about the Nutrition Intake that is not conveyed by the other attributes.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionIntake.NutritionItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of intake by a patient.  A NutritionIntake may indicate that the patient may be consuming the food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula now or has consumed it in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label, or from a clinician documenting observed intake.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what a category of item that is intended to be consumed: e.g., food (i.e. solid and/or liquid), breastmilk, infant formula, supplements, enteral formula.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="nutritionProduct" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the food (i.e. solid and/or liquid) product that is to be consumed. This is potentially a link to a resource representing the details of the food product or a simple attribute carrying a code that identifies the food from a known list of foods.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="consumedItem" type="NutritionIntake.ConsumedItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">What nutrition item was consumed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="notConsumedItem" type="NutritionIntake.NotConsumedItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">What nutrition item was not consumed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionIntake.ConsumedItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of intake by a patient.  A NutritionIntake may indicate that the patient may be consuming the food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula now or has consumed it in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label, or from a clinician documenting observed intake.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="schedule" minOccurs="0" maxOccurs="1" type="Timing">
            <xs:annotation>
              <xs:documentation xml:lang="en">Scheduled frequency of consumption.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Quantity of the specified food (i.e. solid and/or liquid).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Rate of enteral feeding administration.</xs:documentation>
            </xs:annotation>
            <xs:element name="rateQuantity" type="Quantity"/>
            <xs:element name="rateRatio" type="Ratio"/>
          </xs:choice>
          <xs:element name="totalIntake" type="NutritionIntake.TotalIntake" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Nutrients and/or energy contained in the intake.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionIntake.TotalIntake">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of intake by a patient.  A NutritionIntake may indicate that the patient may be consuming the food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula now or has consumed it in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label, or from a clinician documenting observed intake.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="nutrient" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of nutrient consumed. This could be a macronutrient (protein, fat, carbohydrate), or a vitamin and mineral.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Total amount of nutrient consumed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="energy" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Total energy consumed in kilocalories or kilojoules.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionIntake.NotConsumedItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of intake by a patient.  A NutritionIntake may indicate that the patient may be consuming the food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula now or has consumed it in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label, or from a clinician documenting observed intake.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Document the reason the nutrition item was not consumed, such as refused, held, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="schedule" minOccurs="0" maxOccurs="1" type="Timing">
            <xs:annotation>
              <xs:documentation xml:lang="en">The intended frequency of consumption that was not followed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Quantity of the specified food (i.e. solid and/or liquid) that was not consumed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionIntake.Performer">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of intake by a patient.  A NutritionIntake may indicate that the patient may be consuming the food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula now or has consumed it in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food (i.e., solid and/or liquid), breastmilk, infant formula, supplements, enteral formula consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label, or from a clinician documenting observed intake.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of performance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who or what performed the intake.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="NutritionOrder" type="NutritionOrder">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="NutritionOrder">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers assigned to this order by the order sender or by the order receiver.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan or request that is fulfilled in whole or in part by this nutrition order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to all nutrition orders that were authorized more or less simultaneously by a single author, representing the composite or group identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="RequestStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The workflow status of the nutrition order/request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="RequestIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the Nutrition Order should be addressed with respect to other        requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The person or set of individuals who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An encounter that provides additional information about the healthcare context in which this request is made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInformation" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information to support fulfilling (i.e. dispensing or administering) of the nutrition,        for example, patient height and weight).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dateTime" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time that this nutrition order was requested.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requester" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specified desired performer of the nutrition order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="allergyIntolerance" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A link to a record of allergies or intolerances  which should be included in the nutrition order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="foodPreferenceModifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This modifier is used to convey order-specific modifiers about the type of food (i.e. solid and/or liquid) that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="excludeFoodModifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This modifier is used to convey Order-specific modifiers that should not be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to what should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outsideFoodAllowed" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This modifier is used to convey whether a food item, brought in by the patient, family, and/or caregiver, can be consumed by the patient.  If set to true, indicates that the receiving system does not need to supply the food item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="oralDiet" type="NutritionOrder.OralDiet" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Diet given orally that may include texture modification, such as International Dysphagia Diet Standardisation Initiative Framework - Slightly Thick Level 1 drinks and Minced and International Dysphagia Diet Standardisation Initiative Framework - Minced and Moist Level 5 food as well as, for example, Decreased potassium diet (ie, nutrient modification), Halal diet (ie, cultural modification), and/or Low microbial diet (eg, other modification).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplement" type="NutritionOrder.Supplement" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Oral nutritional products given in order to add further nutritional value to the patient's diet.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enteralFormula" type="NutritionOrder.EnteralFormula" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additive" type="NutritionOrder.Additive" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates modular components to be provided in addition or mixed with the oral diet, supplement, and/or enteral feeding.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the nutrition order by the requester, performer, subject or other participants.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.OralDiet">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of diet or dietary restriction such as fiber restricted diet or diet for diabetes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="schedule" type="NutritionOrder.Schedule" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Schedule information for an oral diet.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="nutrient" type="NutritionOrder.Nutrient" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the quantity and the nutrient modified (for example carbohydrate, fiber or sodium) in the oral diet.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="texture" type="NutritionOrder.Texture" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Class that describes any texture modifications in addition to the oral diet type required for the patient to safely consume various types of foods (i.e. solid and/or liquid).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instruction" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free text or additional instructions or information pertaining to the oral diet.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="caloricDensity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of energy (calories or kilojoules) that the oral diet should provide.  For example, an infant formula feeding of 30 ounces of 20 kcal/ounce (67 kcal/100 mL) formula per day.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.Schedule">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="timing" minOccurs="0" maxOccurs="unbounded" type="Timing">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time period and frequency at which the diet should be given.  The diet should be given for the combination of all schedules if more than one schedule is present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeeded" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the diet is only taken when needed within a specific administration schedule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeededFor" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the diet is only taken based on a precondition for taking the diet.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.Nutrient">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="modifier" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nutrient that is being modified such as carbohydrate or sodium.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of the specified nutrient to include in diet.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.Texture">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="modifier" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Texture modifications in the addition to the oral diet type that should be made, e.g. easy to chew, chopped, ground, and pureed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The food (i.e. solid and/or liquid) type(s) (e.g. meats, all foods)  that the texture modification applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.Supplement">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productName" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product or brand name of the nutritional supplement such as &quot;Acme Protein Shake&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="schedule" type="NutritionOrder.Schedule1" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Schedule information for a supplement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of the nutritional supplement to be given.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instruction" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free text or additional instructions or information pertaining to the oral supplement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="caloricDensity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of energy (calories or kilojoules) that the supplement should provide per specified volume, typically per ml or fluid oz.  For example, a patient may required a supplement that provides 24 calories per fluid ounce.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.Schedule1">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="timing" minOccurs="0" maxOccurs="unbounded" type="Timing">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time period and frequency at which the supplement should be given.  The supplement should be given for the combination of all schedules if more than one schedule is present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeeded" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the supplement is only taken when needed within a specific dosing schedule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeededFor" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the supplement is only taken based on a precondition for taking the supplement.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.EnteralFormula">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of adult or pediatric enteral feeding such as an adult standard formula with fiber or a soy-based infant feeding.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productName" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product or brand name of the enteral feeding product such as &quot;ACME Adult Standard Formula&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The intended type of device that is to be used for the administration of the enteral formula.</xs:documentation>
            </xs:annotation>
            <xs:element name="deliveryDeviceCodeableConcept" type="CodeableConcept"/>
            <xs:element name="deliveryDeviceCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="caloricDensity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of energy (calories or kilojoules) that the feeding should provide per specified volume, typically per mL or fluid oz.  For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="routeOfAdministration" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The administration into the patient's gastrointestinal  tract for purposes of providing the formula feeding, e.g. nasogastric tube, oral.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="administration" type="NutritionOrder.Administration" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Formula feeding administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxVolumeToAdminister" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum total quantity of formula feeding that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="administrationInstruction" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free text formula administration, feeding instructions or additional instructions or information.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.Administration">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="schedule" type="NutritionOrder.Schedule2" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Schedule information for an enteral feeding.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The volume of formula feeding to provide to the patient per the specified administration schedule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The rate of administration of formula feeding via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.</xs:documentation>
            </xs:annotation>
            <xs:element name="rateQuantity" type="Quantity"/>
            <xs:element name="rateRatio" type="Ratio"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.Schedule2">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="timing" minOccurs="0" maxOccurs="unbounded" type="Timing">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time period and frequency at which the enteral feeding should be given.  The enteral feeding should be given for the combination of all schedules if more than one schedule is present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeeded" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the enteral feeding is only taken when needed within a specific dosing schedule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeededFor" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the enteral feeding is only taken based on a precondition for taking the enteral feeding.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionOrder.Additive">
    <xs:annotation>
      <xs:documentation xml:lang="en">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to an individual or group.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="modularType" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the oral diet, supplement, and/or enteral feeding.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productName" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product or brand name of the type of modular additive to be added to the oral diet, supplement, and/or enteral feeding.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of additive to be given in addition or to be mixed in with the oral diet, supplement, and/or enteral feeding.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="routeOfAdministration" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The administration into the patient's gastrointestinal  tract for purposes of providing the additive, e.g. nasogastric tube, oral.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="NutritionProduct" type="NutritionProduct">
    <xs:annotation>
      <xs:documentation xml:lang="en">A food or supplement that is consumed by patients.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="NutritionProduct">
    <xs:annotation>
      <xs:documentation xml:lang="en">A food or supplement that is consumed by patients.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that specifies the product or a textual description if no code is available. This could be such codes as a USDA Branded Food Products Database number, a USDA Food Data Central (FDC) ID number, Universal Product Code (UPC), a Langual code, or a country specific food database code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="NutritionProductStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Nutrition products fall into various categories based on their composition (e.g., Fruit and Grain, Vegetables) or form (e.g., Beverages).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organisation (manufacturer, representative or legal authorization holder) or person that is responsible for nutrition product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="nutrient" type="NutritionProduct.Nutrient" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product's nutritional information expressed by the nutrients.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ingredientSummary" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The textual description of the ingredients in the product.  For example, the following is a concatenated list of the ingredients for a peanut butter would read 'ROASTED PEANUTS, SUGAR, HYDROGENATED VEGETABLE OIL (COTTONSEED, SOYBEAN AND RAPESEED OIL) TO PREVENT SEPARATION, SALT'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="ingredient" type="NutritionProduct.Ingredient" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Ingredients contained in this product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="energy" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of energy present in the product expressed in kilocalories or kilojoules.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characteristic" type="NutritionProduct.Characteristic" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies descriptive properties of the nutrition product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instance" type="NutritionProduct.Instance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Conveys instance-level information about this product item. One or several physical, countable instances or occurrences of the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionProduct.Nutrient">
    <xs:annotation>
      <xs:documentation xml:lang="en">A food or supplement that is consumed by patients.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="item" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The (relevant) nutrients in the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of nutrient expressed in one or more units, either X per pack / per serving / per dose or X amount.</xs:documentation>
            </xs:annotation>
            <xs:element name="amountRatio" type="Ratio"/>
            <xs:element name="amountQuantity" type="Quantity"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionProduct.Ingredient">
    <xs:annotation>
      <xs:documentation xml:lang="en">A food or supplement that is consumed by patients.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="item" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The ingredient contained in the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of ingredient that is in the product.</xs:documentation>
            </xs:annotation>
            <xs:element name="amountRatio" type="Ratio"/>
            <xs:element name="amountQuantity" type="Quantity"/>
          </xs:choice>
          <xs:element name="allergen" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A known or suspected allergenic and/or substance that is associated with an intolerance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionProduct.Characteristic">
    <xs:annotation>
      <xs:documentation xml:lang="en">A food or supplement that is consumed by patients.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code specifying which characteristic of the product is being described (for example, colour, shape).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual characteristic value corresponding to the type.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueBoolean" type="boolean"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="NutritionProduct.Instance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A food or supplement that is consumed by patients.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of items or instances that the resource considers, for instance when referring to 2 identical units together.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier for the physical instance, typically a serial number or manufacturer number.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name or brand for the specific product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lotNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identification of the batch or lot of the product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expiry" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time after which the product is no longer expected to be in proper condition, or its use is not advised or not allowed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useBy" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time after which the product is no longer expected to be in proper condition, or its use is not advised or not allowed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="biologicalSourceEvent" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier of the donation, collection, or pooling event from which biological material in this nutrition product was derived.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NutritionProductStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="NutritionProductStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="NutritionProductStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Observation" type="Observation">
    <xs:annotation>
      <xs:documentation xml:lang="en">Measurements and simple assertions made about a patient, device or other subject.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Observation">
    <xs:annotation>
      <xs:documentation xml:lang="en">Measurements and simple assertions made about a patient, device or other subject.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan, proposal or order that is fulfilled in whole or in part by this event.  For example, a MedicationRequest may require a patient to have laboratory test performed before  it is dispensed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="triggeredBy" type="Observation.TriggeredBy" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the observation(s) that triggered the performance of this observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A larger event of which this particular Observation is a component or step.  For example,  an observation as part of a procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ObservationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the result value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that classifies the general type of observation being made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes what was observed. Sometimes this is called the observation &quot;name&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient, or group of patients, location, device, organization, procedure or practitioner this observation is about and into whose or what record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual focus of an observation when it is not the subject of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus. As another use case,

a caregiver (RelatedPerson) has back strain and is unable to provide ADL support to a patient (Subject).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organizer" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This observation serves as an organizer or grouper for a set of (one or more) sub-observations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.</xs:documentation>
            </xs:annotation>
            <xs:element name="effectiveDateTime" type="dateTime"/>
            <xs:element name="effectivePeriod" type="Period"/>
            <xs:element name="effectiveTiming" type="Timing"/>
            <xs:element name="effectiveInstant" type="instant"/>
          </xs:choice>
          <xs:element name="issued" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who was responsible for asserting the observed value as &quot;true&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The information determined as a result of making the observation, if the information has a simple value.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
          <xs:element name="dataAbsentReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a reason why the expected value in the element Observation.value[x] is missing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interpretation" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A categorical assessment of an observation value.  For example, high, low, normal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interpretationContext" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other preceding or concurrent information that is critical to understand the context and significance of the observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments about the observation or the results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">DEPRECATED: This element is deprecated. Use bodyStructure instead. Indicates the site on the subject's body where the observation was made (i.e. the target site).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyStructure" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the body structure on the subject's body where the observation was made (i.e. the target site).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to perform the observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specimen" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specimen that was used when this observation was made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="device" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the device that generates the measurements or the device settings for the device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referenceRange" type="Observation.ReferenceRange" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an &quot;OR&quot;.   In other words, to represent two distinct target populations, two `referenceRange` elements would be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="hasMember" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="Observation.Component" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Observation.TriggeredBy">
    <xs:annotation>
      <xs:documentation xml:lang="en">Measurements and simple assertions made about a patient, device or other subject.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="observation" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the triggering observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="TriggeredBytype">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of trigger.
Reflex | Repeat | Re-run.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides the reason why this observation was performed as a result of the observation(s) referenced.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Observation.ReferenceRange">
    <xs:annotation>
      <xs:documentation xml:lang="en">Measurements and simple assertions made about a patient, device or other subject.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="low" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the low bound of the reference range.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="high" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the high bound of the reference range.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="normalValue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the normal value of the reference range.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appliesTo" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.  Multiple `appliesTo`  are interpreted as an &quot;AND&quot; of the target populations.  For example, to represent a target population of African American females, both a code of female and a code for African American would be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="age" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of &quot;Negative&quot; or a list or table of &quot;normals&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Observation.Component">
    <xs:annotation>
      <xs:documentation xml:lang="en">Measurements and simple assertions made about a patient, device or other subject.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes what was observed. Sometimes this is called the observation &quot;code&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The information determined as a result of making the observation, if the information has a simple value.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
          <xs:element name="dataAbsentReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a reason why the expected value in the element Observation.component.value[x] is missing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interpretation" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A categorical assessment of an observation value.  For example, high, low, normal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referenceRange" type="Observation.ReferenceRange" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Guidance on how to interpret the value by comparison to a normal or recommended range.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ObservationStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="registered">
        <xs:annotation>
          <xs:documentation xml:lang="en">Registered</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="specimen-in-process">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specimen-in-Process</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preliminary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preliminary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="final">
        <xs:annotation>
          <xs:documentation xml:lang="en">Final</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="amended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="corrected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Corrected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cannot-be-obtained">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cannot be obtained</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ObservationStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ObservationStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="TriggeredBytypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="reflex">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reflex</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="repeat">
        <xs:annotation>
          <xs:documentation xml:lang="en">Repeat (per policy)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="re-run">
        <xs:annotation>
          <xs:documentation xml:lang="en">Re-run (per policy)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="TriggeredBytype">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="TriggeredBytypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ObservationDefinition" type="ObservationDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ObservationDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URL that is used to identify this ObservationDefinition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this ObservationDefinition is (or will be) published. The URL SHOULD include the major version of the ObservationDefinition. For more information see Technical and Business Versions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this ObservationDefinition by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the ObservationDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the ObservationDefinition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the ObservationDefinition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this ObservationDefinition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and optionally time) when the ObservationDefinition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the ObservationDefinition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Helps establish the &quot;authority/credibility&quot; of the ObservationDefinition. May also allow for contact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the ObservationDefinition from the consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate ObservationDefinition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A jurisdiction in which the ObservationDefinition is intended to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explains why this ObservationDefinition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Copyright statement relating to the ObservationDefinition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the ObservationDefinition content was or is planned to be effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFromCanonical" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical URL pointing to another FHIR-defined ObservationDefinition that is adhered to in whole or in part by this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFromUri" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The URL pointing to an externally-defined observation definition, guideline or other definition that is adhered to in whole or in part by this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that describes the intended kind of subject of Observation instances conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performerType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of individual/organization/device that is expected to act upon instances of this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that classifies the general type of observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes what will be observed. Sometimes this is called the observation &quot;name&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="permittedDataType" minOccurs="0" maxOccurs="unbounded" type="ObservationDataType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="multipleResultsAllowed" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Multiple results allowed for observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyStructure" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The body structure on the subject's body where the observation is to be made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method or technique used to perform the observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specimen" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of specimen that this type of observation is produced on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The measurement model of device or actual device used to produce observations of this type.</xs:documentation>
            </xs:annotation>
            <xs:element name="deviceReference" type="Reference"/>
            <xs:element name="deviceCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="preferredReportName" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="permittedUnit" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Units allowed for the valueQuantity element in the instance observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualifiedValue" type="ObservationDefinition.QualifiedValue" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of qualified values associated with a context and a set of conditions -  provides a range for quantitative and ordinal observations and a collection of value sets for qualitative observations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="hasMember" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This ObservationDefinition defines a group  observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="ObservationDefinition.Component" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Some observations have multiple component observations, expressed as separate code value pairs.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ObservationDefinition.QualifiedValue">
    <xs:annotation>
      <xs:documentation xml:lang="en">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="context" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A concept defining the context for this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appliesTo" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The target population this  set of qualified values applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sexParameterForClinicalUse" minOccurs="0" maxOccurs="1" type="AdministrativeGender">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sex parameter for clinical use this set of qualified values applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="age" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The age range this  set of qualified values applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gestationalAge" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The gestational age this  set of qualified values applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the criterion for which the qualified value is valid.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rangeCategory" minOccurs="0" maxOccurs="1" type="ObservationRangeCategory">
            <xs:annotation>
              <xs:documentation xml:lang="en">The category of range of values for continuous or ordinal observations that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="range" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The range of values defined for continuous or ordinal observations that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="validCodedValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of valid coded results for qualitative observations  that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="normalCodedValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of normal coded results for qualitative observations  that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="abnormalCodedValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of abnormal coded results for qualitative observations  that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="criticalCodedValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of critical coded results for qualitative observations  that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interpretation" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The expected coded interpretation values of an observation that matches this qualified interval. For example, high, low, normal.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ObservationDefinition.Component">
    <xs:annotation>
      <xs:documentation xml:lang="en">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes what will be observed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="permittedDataType" minOccurs="0" maxOccurs="unbounded" type="ObservationDataType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The data types allowed for the value element of the instance of this component observations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="permittedUnit" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Units allowed for the valueQuantity element in the instance observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualifiedValue" type="ObservationDefinition.QualifiedValue" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of qualified values associated with a context and a set of conditions -  provides a range for quantitative and ordinal observations and a collection of value sets for qualitative observations.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ObservationDataTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeableConcept">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeableConcept</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Range">
        <xs:annotation>
          <xs:documentation xml:lang="en">Range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ratio">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ratio</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SampledData">
        <xs:annotation>
          <xs:documentation xml:lang="en">SampledData</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="time">
        <xs:annotation>
          <xs:documentation xml:lang="en">time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">dateTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Period">
        <xs:annotation>
          <xs:documentation xml:lang="en">Period</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ObservationDataType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ObservationDataTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ObservationRangeCategoryEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="reference">
        <xs:annotation>
          <xs:documentation xml:lang="en">reference range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="critical">
        <xs:annotation>
          <xs:documentation xml:lang="en">critical range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="absolute">
        <xs:annotation>
          <xs:documentation xml:lang="en">absolute range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ObservationRangeCategory">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ObservationRangeCategoryEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="OperationDefinition" type="OperationDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="OperationDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this implementation guide when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the operation definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of this operation definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="kind" minOccurs="1" maxOccurs="1" type="OperationKind">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this is an operation or a named query.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the operation definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the operation definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the operation definition from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this operation definition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the operation definition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the operation definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="affectsState" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="synchronicity" minOccurs="0" maxOccurs="1" type="OperationSynchronicityControl">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that this operation must always be handled as synchronous or asynchronous, or that the server must provide both options, and clients can choose.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The label that is recommended to be used in the URL for this operation. In some cases, servers may need to use a different CapabilityStatement operation.name to differentiate between multiple SearchParameters that happen to have the same code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information about how to use this operation or named query.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="base" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that this operation definition is a constraining profile on the base.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" minOccurs="0" maxOccurs="unbounded" type="VersionIndependentResourceTypesAll">
            <xs:annotation>
              <xs:documentation xml:lang="en">The types on which this operation can be executed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="system" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instance" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether this operation can be invoked on a particular instance of one of the given types.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="inputProfile" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outputProfile" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" type="OperationDefinition.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The parameters for the operation/query.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="overload" type="OperationDefinition.Overload" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OperationDefinition.Parameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of used to identify the parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="1" maxOccurs="1" type="OperationParameterUse">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this is an input or an output parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="scope" minOccurs="0" maxOccurs="unbounded" type="OperationParameterScope">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, indicates that the parameter applies when the operation is being invoked at the specified level.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="min" minOccurs="1" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The minimum number of times this parameter SHALL appear in the request or response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="max" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum number of times this element is permitted to appear in the request or response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the meaning or use of this parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="FHIRTypes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type for this parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="allowedType" minOccurs="0" maxOccurs="unbounded" type="FHIRTypes">
            <xs:annotation>
              <xs:documentation xml:lang="en">Support for polymorphic types. If the parameter type is abstract, this element lists allowed sub-types for the parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="targetProfile" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used when the type is &quot;Reference&quot; or &quot;canonical&quot;, and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="searchType" minOccurs="0" maxOccurs="1" type="SearchParamType">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the parameter is understood if/when it used as search parameter. This is only used if the parameter is a string.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="binding" type="OperationDefinition.Binding" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referencedFrom" type="OperationDefinition.ReferencedFrom" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="part" type="OperationDefinition.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The parts of a nested Parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OperationDefinition.Binding">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="strength" minOccurs="1" maxOccurs="1" type="BindingStrength">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OperationDefinition.ReferencedFrom">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="source" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourceId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The id of the element in the referencing resource that is expected to resolve to this resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OperationDefinition.Overload">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="parameterName" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name of parameter to include in overload.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments to go on overload.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="OperationParameterUseEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="in">
        <xs:annotation>
          <xs:documentation xml:lang="en">In</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="out">
        <xs:annotation>
          <xs:documentation xml:lang="en">Out</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="OperationParameterUse">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="OperationParameterUseEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="VersionIndependentResourceTypesAllEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Account">
        <xs:annotation>
          <xs:documentation xml:lang="en">Account</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActivityDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActivityDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActorDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActorDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdministrableProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdministrableProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdverseEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdverseEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AllergyIntolerance">
        <xs:annotation>
          <xs:documentation xml:lang="en">AllergyIntolerance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appointment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AppointmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">AppointmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ArtifactAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">ArtifactAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AuditEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AuditEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Basic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Basic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Binary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Binary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BiologicallyDerivedProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">BiologicallyDerivedProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BodyStructure">
        <xs:annotation>
          <xs:documentation xml:lang="en">BodyStructure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bundle">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bundle</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CanonicalResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">CanonicalResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CapabilityStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">CapabilityStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">CarePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CareTeam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Claim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Claim</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClaimResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalUseDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClinicalUseDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Communication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CommunicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CompartmentDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">CompartmentDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ConceptMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">ConceptMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contract</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DetectedIssue">
        <xs:annotation>
          <xs:documentation xml:lang="en">DetectedIssue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAlert">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAlert</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAssociation">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAssociation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceMetric">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceMetric</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DomainResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">DomainResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encounter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Endpoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">Endpoint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation xml:lang="en">EpisodeOfCare</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EventDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">EventDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Evidence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Evidence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EvidenceVariable">
        <xs:annotation>
          <xs:documentation xml:lang="en">EvidenceVariable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExampleScenario">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExampleScenario</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExplanationOfBenefit</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyMemberHistory">
        <xs:annotation>
          <xs:documentation xml:lang="en">FamilyMemberHistory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Flag">
        <xs:annotation>
          <xs:documentation xml:lang="en">Flag</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Goal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Goal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GuidanceResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">GuidanceResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Immunization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImplementationGuide">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImplementationGuide</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ingredient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ingredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsurancePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsurancePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsuranceProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsuranceProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Invoice">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Library">
        <xs:annotation>
          <xs:documentation xml:lang="en">Library</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="List">
        <xs:annotation>
          <xs:documentation xml:lang="en">List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ManufacturedItemDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ManufacturedItemDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Measure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Measure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MeasureReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">MeasureReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Medication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationAdministration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationDispense</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageHeader</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MetadataResource">
        <xs:annotation>
          <xs:documentation xml:lang="en">MetadataResource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NamingSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">NamingSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionIntake">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionIntake</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Observation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ObservationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ObservationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationOutcome">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationOutcome</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrganizationAffiliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">OrganizationAffiliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PackagedProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PackagedProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Parameters">
        <xs:annotation>
          <xs:documentation xml:lang="en">Parameters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentNotice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentReconciliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation xml:lang="en">Person</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PlanDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PlanDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PractitionerRole">
        <xs:annotation>
          <xs:documentation xml:lang="en">PractitionerRole</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Procedure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Provenance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation xml:lang="en">Questionnaire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">QuestionnaireResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RegulatedAuthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">RegulatedAuthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestOrchestration">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestOrchestration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchSubject">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchSubject</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Resource">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Schedule">
        <xs:annotation>
          <xs:documentation xml:lang="en">Schedule</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SearchParameter">
        <xs:annotation>
          <xs:documentation xml:lang="en">SearchParameter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Slot">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slot</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specimen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SpecimenDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SpecimenDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Subscription">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subscription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionStatus">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionStatus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionTopic">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionTopic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Substance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubstanceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Task">
        <xs:annotation>
          <xs:documentation xml:lang="en">Task</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TerminologyCapabilities">
        <xs:annotation>
          <xs:documentation xml:lang="en">TerminologyCapabilities</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ValueSet">
        <xs:annotation>
          <xs:documentation xml:lang="en">ValueSet</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation xml:lang="en">VisionPrescription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BodySite">
        <xs:annotation>
          <xs:documentation xml:lang="en">BodySite</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CatalogEntry">
        <xs:annotation>
          <xs:documentation xml:lang="en">CatalogEntry</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Conformance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Conformance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DataElement">
        <xs:annotation>
          <xs:documentation xml:lang="en">DataElement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceComponent">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceComponent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceUseRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceUseRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceUseStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceUseStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentManifest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentManifest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EffectEvidenceSynthesis">
        <xs:annotation>
          <xs:documentation xml:lang="en">EffectEvidenceSynthesis</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExpansionProfile">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExpansionProfile</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingManifest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingManifest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingObjectSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingObjectSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Media">
        <xs:annotation>
          <xs:documentation xml:lang="en">Media</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationUsage">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationUsage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductAuthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductAuthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductContraindication">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductContraindication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductIndication">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductIndication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductIngredient">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductIngredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductInteraction">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductInteraction</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductManufactured">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductManufactured</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductPackaged">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductPackaged</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductPharmaceutical">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductPharmaceutical</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductUndesirableEffect">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductUndesirableEffect</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrderResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">OrderResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProcedureRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ProcedureRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProcessRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ProcessRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProcessResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ProcessResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ReferralRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ReferralRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestGroup">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestGroup</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchElementDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchElementDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskEvidenceSynthesis">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskEvidenceSynthesis</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sequence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sequence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubstanceSpecification">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceSpecification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="VersionIndependentResourceTypesAll">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="VersionIndependentResourceTypesAllEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="OperationParameterScopeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="instance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Instance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="system">
        <xs:annotation>
          <xs:documentation xml:lang="en">System</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="OperationParameterScope">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="OperationParameterScopeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="OperationKindEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="operation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Operation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="query">
        <xs:annotation>
          <xs:documentation xml:lang="en">Query</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="OperationKind">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="OperationKindEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="OperationSynchronicityControlEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="synchronous">
        <xs:annotation>
          <xs:documentation xml:lang="en">Synchronous</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="asynchronous">
        <xs:annotation>
          <xs:documentation xml:lang="en">Asynchronous</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="either">
        <xs:annotation>
          <xs:documentation xml:lang="en">System</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="OperationSynchronicityControl">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="OperationSynchronicityControlEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="OperationOutcome" type="OperationOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en">A collection of error, warning, or information messages that result from a system action.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="OperationOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en">A collection of error, warning, or information messages that result from a system action.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="issue" type="OperationOutcome.Issue" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An error, warning, or information message that results from a system action.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OperationOutcome.Issue">
    <xs:annotation>
      <xs:documentation xml:lang="en">A collection of error, warning, or information messages that result from a system action.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="severity" minOccurs="1" maxOccurs="1" type="IssueSeverity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the issue indicates a variation from successful processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="IssueType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="details" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional details about the error. This may be a text description of the error or a system code that identifies the error.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnostics" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional diagnostic information about the issue.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. 

For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be &quot;http.&quot; + the parameter name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="IssueTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="invalid">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invalid Content</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="structure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Structural Issue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Required element missing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="value">
        <xs:annotation>
          <xs:documentation xml:lang="en">Element value invalid</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="invariant">
        <xs:annotation>
          <xs:documentation xml:lang="en">Validation rule failed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="security">
        <xs:annotation>
          <xs:documentation xml:lang="en">Security Problem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="login">
        <xs:annotation>
          <xs:documentation xml:lang="en">Login Required</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown User</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="expired">
        <xs:annotation>
          <xs:documentation xml:lang="en">Session Expired</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="forbidden">
        <xs:annotation>
          <xs:documentation xml:lang="en">Forbidden</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="suppressed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Information  Suppressed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="processing">
        <xs:annotation>
          <xs:documentation xml:lang="en">Processing Failure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-supported">
        <xs:annotation>
          <xs:documentation xml:lang="en">Content not supported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="duplicate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Duplicate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="multiple-matches">
        <xs:annotation>
          <xs:documentation xml:lang="en">Multiple Matches</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-found">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Found</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="deleted">
        <xs:annotation>
          <xs:documentation xml:lang="en">Deleted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="too-long">
        <xs:annotation>
          <xs:documentation xml:lang="en">Content Too Long</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code-invalid">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invalid Code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="extension">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unacceptable Extension</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="too-costly">
        <xs:annotation>
          <xs:documentation xml:lang="en">Operation Too Costly</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="business-rule">
        <xs:annotation>
          <xs:documentation xml:lang="en">Business Rule Violation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="conflict">
        <xs:annotation>
          <xs:documentation xml:lang="en">Edit Version Conflict</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="limited-filter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Limited Filter Application</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="transient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Transient Issue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="lock-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Lock Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="no-store">
        <xs:annotation>
          <xs:documentation xml:lang="en">No Store Available</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="exception">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exception</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="timeout">
        <xs:annotation>
          <xs:documentation xml:lang="en">Timeout</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="incomplete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Incomplete Results</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="throttled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Throttled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="informational">
        <xs:annotation>
          <xs:documentation xml:lang="en">Informational Note</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="success">
        <xs:annotation>
          <xs:documentation xml:lang="en">Operation Successful</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="IssueType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="IssueTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="IssueSeverityEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="fatal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fatal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="warning">
        <xs:annotation>
          <xs:documentation xml:lang="en">Warning</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="information">
        <xs:annotation>
          <xs:documentation xml:lang="en">Information</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="success">
        <xs:annotation>
          <xs:documentation xml:lang="en">Operation Successful</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="IssueSeverity">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="IssueSeverityEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Organization" type="Organization">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Organization">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for the organization that is used to identify the organization across multiple disparate systems.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the organization's record is still in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind(s) of organization that this is.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name associated with the organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="alias" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A list of alternate names that the organization is known as, or was known as in the past.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the organization, which helps provide additional general context on the organization to ensure that the correct organization is selected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ExtendedContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contact details of communication devices available relevant to the specific Organization. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization of which this organization forms a part.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Technical endpoints providing access to services operated for the organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualification" type="Organization.Qualification" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The official certifications, accreditations, training, designations and licenses that authorize and/or otherwise endorse the provision of care by the organization.

For example, an approval to provide a type of services issued by a certifying body (such as the US Joint Commission) to an organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Organization.Qualification">
    <xs:annotation>
      <xs:documentation xml:lang="en">A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier allocated to this qualification for this organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded representation of the qualification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Qualifications often take time to attain and might be tracked during this time, and completed qualifications might not always be valid. This status concept has some overlap with period and both should be considered together. Refer to the descriptions of the codes for how the period should be interpreted.

If a qualification is revoked or otherwise cancelled, then the period is likely to be ignored, and might be related to when it was active.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Period during which the qualification is valid.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issuer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Organization that regulates and issues the qualification.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="OrganizationAffiliation" type="OrganizationAffiliation">
    <xs:annotation>
      <xs:documentation xml:lang="en">Defines an affiliation/association/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="OrganizationAffiliation">
    <xs:annotation>
      <xs:documentation xml:lang="en">Defines an affiliation/association/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers that are specific to this role.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this organization affiliation record is in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the participatingOrganization is affiliated with the primary organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Organization where the role is available (primary organization/has members).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participatingOrganization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Definition of the role the participatingOrganization plays in the association.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialty" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific specialty of the participatingOrganization in the context of the role.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location(s) at which the role occurs.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="healthcareService" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Healthcare services provided through the role.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ExtendedContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contact details of communication devices available at the participatingOrganization relevant to this Affiliation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Technical endpoints providing access to services operated for this role.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="PackagedProductDefinition" type="PackagedProductDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medically related item or items, in a container or package.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="PackagedProductDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medically related item or items, in a container or package.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier for this package as whole - not the content of the package. Unique instance identifiers assigned to a package by manufacturers, regulators, drug catalogue custodians or other organizations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A high level category e.g. medicinal product, raw material, shipping/transport container, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packageFor" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product this package model relates to, not the contents of the package (for which see package.containedItem).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date at which the given status became applicable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="containedItemQuantity" minOccurs="0" maxOccurs="unbounded" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size. This attribute differs from containedItem.amount in that it can give a single aggregated count of all tablet types in a pack, even when these are different manufactured items. For example a pill pack of 21 tablets plus 7 sugar tablets, can be denoted here as '28 tablets'. This attribute is repeatable so that the different item types in one pack type can be counted (e.g. a count of vials and count of syringes). Each repeat must have different units, so that it is clear what the different sets of counted items are, and it is not intended to allow different counts of similar items (e.g. not '2 tubes and 3 tubes'). Repeats are not to be used to represent different pack sizes (e.g. 20 pack vs. 50 pack) - which would be different instances of this resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual description. Note that this is not the name of the package or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="legalStatusOfSupply" type="PackagedProductDefinition.LegalStatusOfSupply" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The legal status of supply of the packaged item as classified by the regulator.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="marketingStatus" minOccurs="0" maxOccurs="unbounded" type="MarketingStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copackagedIndicator" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Manufacturer of this package type. When there are multiple it means these are all possible manufacturers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="attachedDocument" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information or supporting documentation about the packaged product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packaging" type="PackagedProductDefinition.Packaging" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characteristic" type="PackagedProductDefinition.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows the key features to be recorded, such as &quot;hospital pack&quot;, &quot;nurse prescribable&quot;, &quot;calendar pack&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PackagedProductDefinition.LegalStatusOfSupply">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medically related item or items, in a container or package.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual status of supply. Conveys in what situation this package type may be supplied for use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The place where the legal status of supply applies. When not specified, this indicates it is unknown in this context.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PackagedProductDefinition.Packaging">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medically related item or items, in a container or package.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A business identifier that is specific to this particular part of the packaging, often assigned by the manufacturer. Including possibly Data Carrier Identifier (a GS1 barcode).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The physical type of the container of the items.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="componentPart" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="material" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Material type of the package item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="alternateMaterial" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="shelfLifeStorage" minOccurs="0" maxOccurs="unbounded" type="ProductShelfLife">
            <xs:annotation>
              <xs:documentation xml:lang="en">Shelf Life and storage information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Manufacturer of this packaging item. When there are multiple values each one is a potential manufacturer of this packaging item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="PackagedProductDefinition.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">General characteristics of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="containedItem" type="PackagedProductDefinition.ContainedItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The item(s) within the packaging.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="packaging" type="PackagedProductDefinition.Packaging" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows containers (and parts of containers) within containers, still as a part of a single packaged product. See also PackagedProductDefinition.packaging.containedItem.item(PackagedProductDefinition).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PackagedProductDefinition.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medically related item or items, in a container or package.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code expressing the type of characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A value for the characteristic.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PackagedProductDefinition.ContainedItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">A medically related item or items, in a container or package.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="item" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual item(s) of medication, as manufactured, or a device (typically, but not necessarily, a co-packaged one), or other medically related item (such as food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package. This also allows another whole packaged product to be included, which is solely for the case where a package of other entire packages is wanted - such as a wholesale or distribution pack (for layers within one package, use PackagedProductDefinition.packaging.packaging).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Parameters" type="Parameters">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource is used to pass information into and back from an operation (whether invoked directly from REST or within a messaging environment).  It is not persisted or allowed to be referenced by other resources.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Parameters">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource is used to pass information into and back from an operation (whether invoked directly from REST or within a messaging environment).  It is not persisted or allowed to be referenced by other resources.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Resource">
        <xs:sequence>
          <xs:element name="parameter" type="Parameters.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">This resource is used to pass information into and back from an operation (whether invoked directly from REST or within a messaging environment).  It is not persisted or allowed to be referenced by other resources.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">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 xml:lang="en">Conveys the content if the parameter is a data type.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueCanonical" type="canonical"/>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueId" type="id"/>
            <xs:element name="valueInstant" type="instant"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueInteger64" type="integer64"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueOid" type="oid"/>
            <xs:element name="valuePositiveInt" type="positiveInt"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueUnsignedInt" type="unsignedInt"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueUrl" type="url"/>
            <xs:element name="valueUuid" type="uuid"/>
            <xs:element name="valueAddress" type="Address"/>
            <xs:element name="valueAge" type="Age"/>
            <xs:element name="valueAnnotation" type="Annotation"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueCodeableReference" type="CodeableReference"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueContactPoint" type="ContactPoint"/>
            <xs:element name="valueCount" type="Count"/>
            <xs:element name="valueDistance" type="Distance"/>
            <xs:element name="valueDuration" type="Duration"/>
            <xs:element name="valueHumanName" type="HumanName"/>
            <xs:element name="valueIdentifier" type="Identifier"/>
            <xs:element name="valueMoney" type="Money"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueRatioRange" type="RatioRange"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueSignature" type="Signature"/>
            <xs:element name="valueTiming" type="Timing"/>
            <xs:element name="valueContactDetail" type="ContactDetail"/>
            <xs:element name="valueDataRequirement" type="DataRequirement"/>
            <xs:element name="valueExpression" type="Expression"/>
            <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
            <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
            <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
            <xs:element name="valueUsageContext" type="UsageContext"/>
            <xs:element name="valueAvailability" type="Availability"/>
            <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
            <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
            <xs:element name="valueDosage" type="Dosage"/>
            <xs:element name="valueMeta" type="Meta"/>
          </xs:choice>
          <xs:element name="resource" minOccurs="0" maxOccurs="1" type="ResourceContainer">
            <xs:annotation>
              <xs:documentation xml:lang="en">Conveys the content if the parameter is a whole resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="part" type="Parameters.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A named part of a multi-part parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Patient" type="Patient">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and other administrative information about an individual or animal that is the subject of potential, past, current, or future health-related care, services, or processes.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Patient">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and other administrative information about an individual or animal that is the subject of potential, past, current, or future health-related care, services, or processes.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier for this patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this patient record is in active use. 
Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.

It is often used to filter patient lists to exclude inactive patients

Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="unbounded" type="HumanName">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name associated with the individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="telecom" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gender" minOccurs="0" maxOccurs="1" type="AdministrativeGender">
            <xs:annotation>
              <xs:documentation xml:lang="en">Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.

See the [Patient Gender and Sex section](patient.html#gender) for additional information about communicating patient gender and sex.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="birthDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date of birth for the individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the date when the individual died, or, if the date is not known or cannot be estimated, a flag indicating the patient is known to be deceased.</xs:documentation>
            </xs:annotation>
            <xs:element name="deceasedBoolean" type="boolean"/>
            <xs:element name="deceasedDateTime" type="dateTime"/>
          </xs:choice>
          <xs:element name="address" minOccurs="0" maxOccurs="unbounded" type="Address">
            <xs:annotation>
              <xs:documentation xml:lang="en">An address for the individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maritalStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This field contains a patient's most recent marital (civil) status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).  This count is relative to the total of live births and fetal losses, which MAY be tracked in the `patient-multipleBirthTotal` extension.

The boolean option for this property can also be used to track that there are known to be multiple fetuses prior to birth.</xs:documentation>
            </xs:annotation>
            <xs:element name="multipleBirthBoolean" type="boolean"/>
            <xs:element name="multipleBirthInteger" type="integer"/>
          </xs:choice>
          <xs:element name="photo" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">Image of the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" type="Patient.Contact" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A contact party (e.g. guardian, partner, friend) for the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communication" type="Patient.Communication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A language which may be used to communicate with the patient about his or her health.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="generalPractitioner" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Patient's nominated care provider.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingOrganization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Organization that is the custodian of the patient record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="link" type="Patient.Link" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Link to a Patient or RelatedPerson resource that concerns the same actual individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Patient.Contact">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and other administrative information about an individual or animal that is the subject of potential, past, current, or future health-related care, services, or processes.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="relationship" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nature of the personal relationship between the patient and the contact person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nature of the functional role between the patient and the contact person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="HumanName">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name associated with the contact person. Alternate/additional names for this contact can be found in the `additionalName` property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additionalName" minOccurs="0" maxOccurs="unbounded" type="HumanName">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional names for the contact person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="telecom" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">A contact detail for the person, e.g. a telephone number or an email address.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="address" minOccurs="0" maxOccurs="1" type="Address">
            <xs:annotation>
              <xs:documentation xml:lang="en">Address for the contact person. Alternate/additional addresses for this contact can be found in the `additionalAddress` property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additionalAddress" minOccurs="0" maxOccurs="unbounded" type="Address">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional addresses for the contact person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gender" minOccurs="0" maxOccurs="1" type="AdministrativeGender">
            <xs:annotation>
              <xs:documentation xml:lang="en">Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Organization on behalf of which the contact is acting or for which the contact is working.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which this contact person or organization is valid to be contacted relating to this patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Patient.Communication">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and other administrative information about an individual or animal that is the subject of potential, past, current, or future health-related care, services, or processes.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="language" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The language which may be used to communicate with the individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preferred" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Patient.Link">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and other administrative information about an individual or animal that is the subject of potential, past, current, or future health-related care, services, or processes.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="other" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Link to a Patient or RelatedPerson resource that concerns the same actual individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="LinkType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of link between this patient resource and another patient resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="LinkTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="replaced-by">
        <xs:annotation>
          <xs:documentation xml:lang="en">Replaced-by</xs:documentation>
          <xs:documentation xml:lang="nl">Vervangen door</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="replaces">
        <xs:annotation>
          <xs:documentation xml:lang="en">Replaces</xs:documentation>
          <xs:documentation xml:lang="nl">Vervangt</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="refer">
        <xs:annotation>
          <xs:documentation xml:lang="en">Refer</xs:documentation>
          <xs:documentation xml:lang="nl">Verwijzing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="seealso">
        <xs:annotation>
          <xs:documentation xml:lang="en">See also</xs:documentation>
          <xs:documentation xml:lang="nl">Zie ook</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="LinkType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="LinkTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="PaymentNotice" type="PaymentNotice">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:element>
  <xs:complexType name="PaymentNotice">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the status of the payment for goods and services rendered, and the request and response resource references.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this payment notice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference of resource for which payment is being made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="response" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference of response to resource for which payment is being made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reporter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who reports the payment notice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payment" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the payment which is the subject of this notice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when the above payment action occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payee" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who will receive or has received payment that is the subject of this notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recipient" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who is notified of the payment status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount sent to the payee.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code indicating whether payment has been sent or cleared.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="PaymentReconciliation" type="PaymentReconciliation">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the details including amount of a payment and allocates the payment items being paid.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="PaymentReconciliation">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the details including amount of a payment and allocates the payment items being paid.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this payment reconciliation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to indicate the nature of the payment such as payment, adjustment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="kind" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time for which payments have been gathered into this bulk payment for settlement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when the resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enterer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Payment enterer if not the actual payment issuer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issuerType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the source such as patient or insurance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentIssuer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who generated the payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Original request resource reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner who is responsible for the services rendered to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="1" type="PaymentOutcome">
            <xs:annotation>
              <xs:documentation xml:lang="en">The outcome of a request for a reconciliation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disposition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human readable description of the status of the request for the reconciliation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="1" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date of payment as indicated on the financial instrument.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location of the site or device for electronic transfers or physical location for cash payments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The means of payment such as check, card cash, or electronic funds transfer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cardBrand" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="accountNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A portion of the account number, often the last 4 digits, used for verification not charging purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expirationDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The year and month (YYYY-MM) when the instrument, typically card, expires.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processor" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the card processor, etf processor, bank for checks.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referenceNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The check number, eft reference, car processor reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorization" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An alphanumeric issued by the processor to confirm the successful issuance of payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tenderedAmount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="returnedAmount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Total payment amount as indicated on the financial instrument.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Issuer's unique identifier for the payment instrument.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="allocation" type="PaymentReconciliation.Allocation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distribution of the payment amount for a previously acknowledged payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="formCode" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code for the form to be used for printing the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processNote" type="PaymentReconciliation.ProcessNote" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A note that describes or explains the processing in a human readable form.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PaymentReconciliation.Allocation">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the details including amount of a payment and allocates the payment items being paid.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for the current payment item for the referenced payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="predecessor" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for the prior payment item for the referenced payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific resource to which the payment/adjustment/advance applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en"> Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetItemString" type="string"/>
            <xs:element name="targetItemIdentifier" type="Identifier"/>
            <xs:element name="targetItemPositiveInt" type="positiveInt"/>
          </xs:choice>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter to which this payment applies, may be completed by the receiver, used for search.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="account" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Account to which this payment applies, may be completed by the receiver, used for search.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to indicate the nature of the payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="submitter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party which submitted the claim or financial transaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="response" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A resource, such as a ClaimResponse, which contains a commitment to payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date from the response resource containing a commitment to pay.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="responsible" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the individual who is responsible for inquiries regarding the response and its payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payee" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party which is receiving the payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The monetary amount allocated from the total payment to the payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PaymentReconciliation.ProcessNote">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the details including amount of a payment and allocates the payment items being paid.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="class" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the business purpose of the note.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="number" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify a note entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="NoteType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business purpose of the note text.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The explanation or description associated with the processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="PaymentOutcomeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="queued">
        <xs:annotation>
          <xs:documentation xml:lang="en">Queued</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Processing Complete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial Processing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="PaymentOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="PaymentOutcomeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Person" type="Person">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and administrative information about a person independent of a specific health-related context.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Person">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and administrative information about a person independent of a specific health-related context.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for a person within a particular scope.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this person's record is in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="unbounded" type="HumanName">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name associated with the person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="telecom" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">A contact detail for the person, e.g. a telephone number or an email address.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gender" minOccurs="0" maxOccurs="1" type="AdministrativeGender">
            <xs:annotation>
              <xs:documentation xml:lang="en">Administrative Gender.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="birthDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The birth date for the person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if the individual is deceased or not.</xs:documentation>
            </xs:annotation>
            <xs:element name="deceasedBoolean" type="boolean"/>
            <xs:element name="deceasedDateTime" type="dateTime"/>
          </xs:choice>
          <xs:element name="address" minOccurs="0" maxOccurs="unbounded" type="Address">
            <xs:annotation>
              <xs:documentation xml:lang="en">One or more addresses for the person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maritalStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This field contains a person's most recent marital (civil) status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="photo" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communication" type="Person.Communication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A language which may be used to communicate with the person about his or her health.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingOrganization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that is the custodian of the person record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="link" type="Person.Link" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Link to a resource that concerns the same actual person.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Person.Communication">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and administrative information about a person independent of a specific health-related context.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="language" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The language which may be used to communicate with the individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preferred" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether or not the person prefers this language (over other languages he masters up a certain level).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Person.Link">
    <xs:annotation>
      <xs:documentation xml:lang="en">Demographics and administrative information about a person independent of a specific health-related context.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="target" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The resource to which this actual person is associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="assurance" minOccurs="0" maxOccurs="1" type="IdentityAssuranceLevel">
            <xs:annotation>
              <xs:documentation xml:lang="en">Level of assurance that this link is associated with the target resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="IdentityAssuranceLevelEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="level1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Level 1</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="level2">
        <xs:annotation>
          <xs:documentation xml:lang="en">Level 2</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="level3">
        <xs:annotation>
          <xs:documentation xml:lang="en">Level 3</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="level4">
        <xs:annotation>
          <xs:documentation xml:lang="en">Level 4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="IdentityAssuranceLevel">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="IdentityAssuranceLevelEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="PlanDefinition" type="PlanDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="PlanDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the plan definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subtitle" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanatory or alternate title for the plan definition giving additional information about its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this plan definition. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A code, group definition, or canonical reference that describes  or identifies the intended subject of the plan definition. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.</xs:documentation>
            </xs:annotation>
            <xs:element name="subjectCodeableConcept" type="CodeableConcept"/>
            <xs:element name="subjectReference" type="Reference"/>
            <xs:element name="subjectCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the plan definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the plan definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the plan definition from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this plan definition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="usage" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A detailed description of how the plan definition is used from a clinical perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the plan definition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the plan definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the plan definition content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, or bibliographic references.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="library" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a Library resource containing any formal logic used by the plan definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="goal" type="PlanDefinition.Goal" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A goal describes an expected outcome that activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, meeting the acceptance criteria for a test as specified by a quality specification, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" type="PlanDefinition.Actor" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Actors represent the individuals or groups involved in the execution of the defined set of activities.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="action" type="PlanDefinition.Action" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An action or group of actions to be taken as part of the plan. For example, in clinical care, an action would be to prescribe a particular indicated medication, or perform a particular test as appropriate. In pharmaceutical quality, an action would be the test that needs to be performed on a drug product as defined in the quality specification or the steps that are planned in a manufacturing process of a drug product or a drug substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example &quot;pain&quot;, &quot;on flare-up&quot;, etc.</xs:documentation>
            </xs:annotation>
            <xs:element name="asNeededBoolean" type="boolean"/>
            <xs:element name="asNeededCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Goal">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a category the goal falls within.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human-readable and/or coded description of a specific desired objective of care, such as &quot;control blood pressure&quot; or &quot;negotiate an obstacle course&quot; or &quot;dance with child at wedding&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the expected level of importance associated with reaching/sustaining the defined goal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="start" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The event after which the goal should begin being pursued.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="addresses" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies problems, conditions, issues, or concerns the goal is intended to address.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" type="PlanDefinition.Target" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates what should be done and within what timeframe.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Target">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="measure" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.</xs:documentation>
            </xs:annotation>
            <xs:element name="detailQuantity" type="Quantity"/>
            <xs:element name="detailRange" type="Range"/>
            <xs:element name="detailCodeableConcept" type="CodeableConcept"/>
            <xs:element name="detailString" type="string"/>
            <xs:element name="detailBoolean" type="boolean"/>
            <xs:element name="detailInteger" type="integer"/>
            <xs:element name="detailRatio" type="Ratio"/>
          </xs:choice>
          <xs:element name="due" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the timeframe after the start of the goal in which the goal should be met.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Actor">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A descriptive label for the actor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of how the actor fits into the overall actions of the plan definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="option" type="PlanDefinition.Option" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The characteristics of the candidates that could serve as the actor.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Option">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="ActionParticipantType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeCanonical" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeReference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The role the participant should play in performing the described action.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Action">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that is unique within the PlanDefinition to allow linkage within the realized CarePlan and/or RequestOrchestration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prefix" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A user-visible prefix for the action. For example a section or item numbering such as 1. or A.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The textual description of the action displayed to a user. For example, when the action is a test to be performed, the title would be the title of the test such as Assay by HPLC.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A brief description of the action used to provide a summary to display to the user.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="textEquivalent" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the action should be addressed with respect to other actions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that provides a meaning, grouping, or classification for the action or action group. For example, a section may have a LOINC code for the section of a documentation template. In pharmaceutical quality, an action (Test) such as pH could be classified as a physical property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of why this action is necessary or appropriate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="goalId" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition. In pharmaceutical quality, a goal represents acceptance criteria (Goal) for a given action (Test), so the goalId would be the unique id of a defined goal element establishing the acceptance criteria for the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A code, group definition, or canonical reference that describes the intended subject of the action and its children, if any. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.</xs:documentation>
            </xs:annotation>
            <xs:element name="subjectCodeableConcept" type="CodeableConcept"/>
            <xs:element name="subjectReference" type="Reference"/>
            <xs:element name="subjectCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="trigger" minOccurs="0" maxOccurs="unbounded" type="TriggerDefinition">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of when the action should be triggered. When multiple triggers are specified on an action, any triggering event invokes the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" type="PlanDefinition.Condition" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that describes applicability criteria or start/stop conditions for the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="input" type="PlanDefinition.Input" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines input data requirements for the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="output" type="PlanDefinition.Output" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the outputs of the action, if any.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedAction" type="PlanDefinition.RelatedAction" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A relationship to another action such as &quot;before&quot; or &quot;30-60 minutes after start of&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">An optional value describing when the action should be performed.</xs:documentation>
            </xs:annotation>
            <xs:element name="timingAge" type="Age"/>
            <xs:element name="timingDuration" type="Duration"/>
            <xs:element name="timingRange" type="Range"/>
            <xs:element name="timingTiming" type="Timing"/>
            <xs:element name="timingRelativeTime" type="RelativeTime"/>
          </xs:choice>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the facility where the action will occur; e.g. home, hospital, specific clinic, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="PlanDefinition.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who should participate in performing the action described.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of action to perform (create, update, remove).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="applicabilityBehavior" minOccurs="0" maxOccurs="1" type="ActionApplicabilityBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">All - meaning the applicability of each child action is evaluated independently; if a child action is applicable according to the applicability criteria, it is applied. Any - meaning that each child action is evaluated in order, and the first action that returns an applicability of true will be applied, and processing of the parent action will stop. If not specified, the default behavior of All is used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupingBehavior" minOccurs="0" maxOccurs="1" type="ActionGroupingBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the grouping behavior for the action and its children.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="selectionBehavior" minOccurs="0" maxOccurs="1" type="ActionSelectionBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the selection behavior for the action and its children.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requiredBehavior" minOccurs="0" maxOccurs="1" type="ActionRequiredBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the required behavior for the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="precheckBehavior" minOccurs="0" maxOccurs="1" type="ActionPrecheckBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines whether the action should usually be preselected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cardinalityBehavior" minOccurs="0" maxOccurs="1" type="ActionCardinalityBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines whether the action can be selected multiple times.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to an ActivityDefinition that describes the action to be taken in detail, a Measure defining a measure to be evaluated, a MessageDefinition describing a message to be sent, a PlanDefinition that describes a series of actions to be taken, a Questionnaire that should be filled out, a SpecimenDefinition describing a specimen to be collected, an ObservationDefinition that specifies what observation should be captured, or an OperationDefinition that specifies what operation should be invoked. When the value is a uri, it is intended to be a reference to non-FHIR content that characterizes the action to be performed. This option is allowed to enable the PlanDefinition to be used to provide semi-structured representation, when the guidance is not computable, but there is still value in elaborating the overall structure with a PlanDefinition. The intended behavior when a definitionUri is realized as part of an apply is that it is copied to the resulting RequestOrchestration so that it is available to the consuming system. How that system interprets that uri is not specified.</xs:documentation>
            </xs:annotation>
            <xs:element name="definitionCanonical" type="canonical"/>
            <xs:element name="definitionUri" type="uri"/>
          </xs:choice>
          <xs:element name="transform" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dynamicValue" type="PlanDefinition.DynamicValue" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="action" type="PlanDefinition.Action" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Condition">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="kind" minOccurs="1" maxOccurs="1" type="ActionConditionKind">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that returns true or false, indicating whether the condition is satisfied.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Input">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requirement" minOccurs="0" maxOccurs="1" type="DataRequirement">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the data that is to be provided as input to the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedData" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to an existing input or output element that provides data to this input.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Output">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requirement" minOccurs="0" maxOccurs="1" type="DataRequirement">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the data that results as output from the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedData" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to an existing input or output element that is results as output from the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.RelatedAction">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="targetId" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The element id of the target related action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="1" maxOccurs="1" type="ActionRelationshipType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relationship of the start of this action to the related action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endRelationship" minOccurs="0" maxOccurs="1" type="ActionRelationshipType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relationship of the end of this action to the related action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.</xs:documentation>
            </xs:annotation>
            <xs:element name="offsetDuration" type="Duration"/>
            <xs:element name="offsetRange" type="Range"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="actorId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the id element of the actor who will participate in this action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="ActionParticipantType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeCanonical" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeReference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The role the participant should play in performing the described action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how the actor will be involved in the action - author, reviewer, witness, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PlanDefinition.DynamicValue">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="path" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolvable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression specifying the value of the customized element.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionRequiredBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="must">
        <xs:annotation>
          <xs:documentation xml:lang="en">Must</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="could">
        <xs:annotation>
          <xs:documentation xml:lang="en">Could</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="must-unless-documented">
        <xs:annotation>
          <xs:documentation xml:lang="en">Must Unless Documented</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionRequiredBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionRequiredBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionRelationshipTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="before">
        <xs:annotation>
          <xs:documentation xml:lang="en">Before</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="before-start">
        <xs:annotation>
          <xs:documentation xml:lang="en">Before Start</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="before-end">
        <xs:annotation>
          <xs:documentation xml:lang="en">Before End</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="concurrent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Concurrent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="concurrent-with-start">
        <xs:annotation>
          <xs:documentation xml:lang="en">Concurrent With Start</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="concurrent-with-end">
        <xs:annotation>
          <xs:documentation xml:lang="en">Concurrent With End</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="after">
        <xs:annotation>
          <xs:documentation xml:lang="en">After</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="after-start">
        <xs:annotation>
          <xs:documentation xml:lang="en">After Start</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="after-end">
        <xs:annotation>
          <xs:documentation xml:lang="en">After End</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionRelationshipType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionRelationshipTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionGroupingBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="visual-group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Visual Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="logical-group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Logical Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="sentence-group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sentence Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionGroupingBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionGroupingBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionSelectionBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="any">
        <xs:annotation>
          <xs:documentation xml:lang="en">Any</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="all">
        <xs:annotation>
          <xs:documentation xml:lang="en">All</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="all-or-none">
        <xs:annotation>
          <xs:documentation xml:lang="en">All Or None</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="exactly-one">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exactly One</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="at-most-one">
        <xs:annotation>
          <xs:documentation xml:lang="en">At Most One</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="one-or-more">
        <xs:annotation>
          <xs:documentation xml:lang="en">One Or More</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionSelectionBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionSelectionBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionCardinalityBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="single">
        <xs:annotation>
          <xs:documentation xml:lang="en">Single</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="multiple">
        <xs:annotation>
          <xs:documentation xml:lang="en">Multiple</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionCardinalityBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionCardinalityBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionPrecheckBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="yes">
        <xs:annotation>
          <xs:documentation xml:lang="en">Yes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="no">
        <xs:annotation>
          <xs:documentation xml:lang="en">No</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionPrecheckBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionPrecheckBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionConditionKindEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="applicability">
        <xs:annotation>
          <xs:documentation xml:lang="en">Applicability</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="start">
        <xs:annotation>
          <xs:documentation xml:lang="en">Start</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="stop">
        <xs:annotation>
          <xs:documentation xml:lang="en">Stop</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionConditionKind">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionConditionKindEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ActionApplicabilityBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="all">
        <xs:annotation>
          <xs:documentation xml:lang="en">All</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="any">
        <xs:annotation>
          <xs:documentation xml:lang="en">Any</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ActionApplicabilityBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ActionApplicabilityBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Practitioner" type="Practitioner">
    <xs:annotation>
      <xs:documentation xml:lang="en">A person who is directly or indirectly involved in the provisioning of healthcare or related services.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Practitioner">
    <xs:annotation>
      <xs:documentation xml:lang="en">A person who is directly or indirectly involved in the provisioning of healthcare or related services.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that applies to this person in this role.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this practitioner's record is in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="unbounded" type="HumanName">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name(s) associated with the practitioner.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="telecom" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">A contact detail for the practitioner, e.g. a telephone number or an email address.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gender" minOccurs="0" maxOccurs="1" type="AdministrativeGender">
            <xs:annotation>
              <xs:documentation xml:lang="en">Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="birthDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date of birth for the practitioner.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if the practitioner is deceased or not.</xs:documentation>
            </xs:annotation>
            <xs:element name="deceasedBoolean" type="boolean"/>
            <xs:element name="deceasedDateTime" type="dateTime"/>
          </xs:choice>
          <xs:element name="address" minOccurs="0" maxOccurs="unbounded" type="Address">
            <xs:annotation>
              <xs:documentation xml:lang="en">Address(es) of the practitioner that are not role specific (typically home address). 
Work addresses are not typically entered in this property as they are usually role dependent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="photo" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">Image of the person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualification" type="Practitioner.Qualification" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The official qualifications, certifications, accreditations, training, licenses (and other types of educations/skills/capabilities) that authorize or otherwise pertain to the provision of care by the practitioner.

For example, a medical license issued by a medical board of licensure authorizing the practitioner to practice medicine within a certain locality.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communication" type="Practitioner.Communication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A language which may be used to communicate with the practitioner, often for correspondence/administrative purposes.

The `PractitionerRole.communication` property should be used for publishing the languages that a practitioner is able to communicate with patients (on a per Organization/Role basis).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Practitioner.Qualification">
    <xs:annotation>
      <xs:documentation xml:lang="en">A person who is directly or indirectly involved in the provisioning of healthcare or related services.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that applies to this person's qualification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded representation of the qualification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Qualifications often take time to attain and might be tracked during this time, and completed qualifications might not always be valid. This status concept has some overlap with period and both should be considered together. Refer to the descriptions of the codes for how the period should be interpreted.

If a qualification is revoked or otherwise cancelled, then the period is likely to be ignored, and m be related to when it was active.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Period during which the qualification is valid.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issuer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Organization that regulates and issues the qualification.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Practitioner.Communication">
    <xs:annotation>
      <xs:documentation xml:lang="en">A person who is directly or indirectly involved in the provisioning of healthcare or related services.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="language" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The language which may be used to communicate with the individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preferred" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether or not the person prefers this language (over other languages he masters up a certain level).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="PractitionerRole" type="PractitionerRole">
    <xs:annotation>
      <xs:documentation xml:lang="en">A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="PractitionerRole">
    <xs:annotation>
      <xs:documentation xml:lang="en">A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business Identifiers that are specific to a role/location.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en"> Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the person is authorized to act as a practitioner in these role(s) for the organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="practitioner" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Practitioner that is able to provide the defined services for the organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization where this role is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="network" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The network in which the PractitionerRole provides the role's services (if defined) at the indicated locations (if defined).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Roles which this practitioner is authorized to perform for the organization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value that describes the intersection of the practitioner, organization, and the role of the practitioner within the organization.  This is not the human name of the practitioner, though the textual representation of that human name may be a part of this property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialty" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specialty of a practitioner that describes the functional role they are practicing at a given organization or location.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location(s) at which this practitioner provides care.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="healthcareService" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The list of healthcare services that this worker provides for this role's Organization/Location(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ExtendedContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contact details of communication devices available relevant to the specific PractitionerRole. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characteristic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Collection of characteristics (attributes).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communication" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A language the practitioner can use in patient communication. The practitioner may know several languages (listed in practitioner.communication), however these are the languages that could be advertised in a directory for a patient to search.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="availability" minOccurs="0" maxOccurs="1" type="Availability">
            <xs:annotation>
              <xs:documentation xml:lang="en">A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en"> Technical endpoints providing access to services operated for the practitioner with this role. Commonly used for locating scheduling services, or identifying where to send referrals electronically.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Procedure" type="Procedure">
    <xs:annotation>
      <xs:documentation xml:lang="en">An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Procedure">
    <xs:annotation>
      <xs:documentation xml:lang="en">An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a resource that contains details of the request for this procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A larger event of which this particular procedure is a component or step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="EventStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code specifying the state of the procedure. Generally, this will be the in-progress or completed state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures the reason for the current state of the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that classifies the procedure for searching, sorting and display purposes (e.g. &quot;Surgical Procedure&quot;).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. &quot;Laparoscopic Appendectomy&quot;).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">On whom or on what the procedure was performed. This is usually an individual human, but can also be performed on animals, groups of humans or animals, organizations or practitioners (for licensing), locations or devices (for safety inspections or regulatory authorizations).  If the actual focus of the procedure is different from the subject, the focus element specifies the actual focus of the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who is the target of the procedure when it is not the subject of record only.  If focus is not present, then subject is the focus.  If focus is present and the subject is one of the targets of the procedure, include subject as a focus as well. If focus is present and the subject is not included in focus, it implies that the procedure was only targeted on the focus. For example, when a caregiver is given education for a patient, the caregiver would be the focus and the procedure record is associated with the subject (e.g. patient).  For example, use focus when recording the target of the education, training, or counseling is the parent or relative of a patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated or actual date, date-time, period, or age when the procedure did occur or is occurring.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
            <xs:element name="occurrenceString" type="string"/>
            <xs:element name="occurrenceAge" type="Age"/>
            <xs:element name="occurrenceRange" type="Range"/>
            <xs:element name="occurrenceTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="recorded" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date the occurrence of the procedure was first captured in the record regardless of Procedure.status (potentially after the occurrence of the event).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual who recorded the record and takes responsibility for its content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report.</xs:documentation>
            </xs:annotation>
            <xs:element name="reportedBoolean" type="boolean"/>
            <xs:element name="reportedReference" type="Reference"/>
          </xs:choice>
          <xs:element name="performer" type="Procedure.Performer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed the procedure and how they were involved.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location where the procedure actually happened.  E.g. a newborn at home, a tracheostomy at a restaurant.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The coded reason or reference why the procedure was performed. This may be a coded entity of some type, be present as text, or be a reference to one of several resources that justify the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyStructure" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the body structure on the subject's body where the procedure was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The short term outcome of the procedure assessed during the procedure, at the conclusion of the procedure, during the immediate post-performance period, or at discharge. The outcome is usually expected to be within the encounter during which the procedure was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="report" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This could be a histology result, pathology report, surgical report, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="complication" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="followUp" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the procedure required specific follow up - e.g. removal of sutures. The follow up may be represented as a simple note or could potentially be more complex, in which case the CarePlan resource can be used. CarePlan can reference the Procedure via CarePlan.addresses.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any other notes and comments about the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focalDevice" type="Procedure.FocalDevice" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="used" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies medications, devices and any other substance used as part of the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other resources from the patient record that may be relevant to the procedure.  The information from these resources was either used to create the instance or is provided to help with its interpretation. This extension should not be used if more specific inline elements or extensions are available.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Procedure.Performer">
    <xs:annotation>
      <xs:documentation xml:lang="en">An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="onBehalfOf" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Organization the Patient, RelatedPerson, Device, CareTeam, and HealthcareService was acting on behalf of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Time period during which the performer performed the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Procedure.FocalDevice">
    <xs:annotation>
      <xs:documentation xml:lang="en">An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="action" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of change that happened to the device during the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manipulated" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The device that was manipulated (changed) during the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Provenance" type="Provenance">
    <xs:annotation>
      <xs:documentation xml:lang="en">Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which MAY impact security, privacy, and trust policies.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Provenance">
    <xs:annotation>
      <xs:documentation xml:lang="en">Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which MAY impact security, privacy, and trust policies.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="target" minOccurs="1" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Reference(s) that were generated or updated by  the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the activity occurred.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurredPeriod" type="Period"/>
            <xs:element name="occurredDateTime" type="dateTime"/>
          </xs:choice>
          <xs:element name="recorded" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time at which the provenance information was recorded / updated, whether in the FHIR Provenance resource or in some other form that is later communicated in the FHIR Provenance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="policy" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Policy or plan the activity was defined by. Typically, a single activity MAY have multiple applicable policy documents, such as patient consent, guarantor funding, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the activity occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorization" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The authorization (e.g., PurposeOfUse) that was used during the event being recorded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="why" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes why the event recorded in this provenenace occurred in textual form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="activity" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An activity is something that occurs over a period of time and acts upon or with entities; it MAY include consuming, processing, transforming, modifying, relocating, using, or generating entities.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan, proposal or order that is fulfilled in whole or in part by this provenance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient element is available to enable deterministic tracking of activities that involve the patient as the subject of the data used in an activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This will typically be the encounter the event occurred, but some events MAY be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission lab tests).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="agent" type="Provenance.Agent" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An actor taking a role in an activity  for which it can be assigned some degree of responsibility for the activity taking place.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entity" type="Provenance.Entity" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An entity used in this activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="signature" minOccurs="0" maxOccurs="unbounded" type="Signature">
            <xs:annotation>
              <xs:documentation xml:lang="en">A digital signature on the target Reference(s). The signer SHOULD match a Provenance.agent. The purpose of the signature is indicated.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Provenance.Agent">
    <xs:annotation>
      <xs:documentation xml:lang="en">Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which MAY impact security, privacy, and trust policies.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Functional Role of the agent with respect to the activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The structural roles of the agent indicating the agent's competency. The security role enabling the agent with respect to the activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="who" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what performed in the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="onBehalfOf" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The agent that delegated authority to perform the activity performed by the agent.who element.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Provenance.Entity">
    <xs:annotation>
      <xs:documentation xml:lang="en">Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which MAY impact security, privacy, and trust policies.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="role" minOccurs="1" maxOccurs="1" type="ProvenanceEntityRole">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the entity was used during the activity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="what" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identity of the  Entity used. May be a logical or physical uri and maybe absolute or relative.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="agent" type="Provenance.Agent" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which used the entity.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ProvenanceEntityRoleEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="revision">
        <xs:annotation>
          <xs:documentation xml:lang="en">Revision</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="quotation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quotation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="source">
        <xs:annotation>
          <xs:documentation xml:lang="en">Source</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="instantiates">
        <xs:annotation>
          <xs:documentation xml:lang="en">Instantiates</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="removal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Removal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ProvenanceEntityRole">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ProvenanceEntityRoleEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Questionnaire" type="Questionnaire">
    <xs:annotation>
      <xs:documentation xml:lang="en">A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Questionnaire">
    <xs:annotation>
      <xs:documentation xml:lang="en">A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The URL of a Questionnaire that this Questionnaire is based on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of this questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectType" minOccurs="0" maxOccurs="unbounded" type="ResourceType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The types of subjects that can be the subject of responses created for the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the questionnaire was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the questionnaire from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate questionnaires.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this questionnaire is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the questionnaire and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the questionnaire content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier for this collection of questions in a particular terminology such as LOINC.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="Questionnaire.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A particular question, question grouping or display text that is part of the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Questionnaire.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element is a URI that refers to an [ElementDefinition](elementdefinition.html) or to an [ObservationDefinition](observationdefinition.html) that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in [Comments](questionnaire.html#definition), below.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prefix" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of a section, the text of a question or text content for a display item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="QuestionnaireItemTypeUsable">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, Coding, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enableWhen" type="Questionnaire.EnableWhen" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enableBehavior" minOccurs="0" maxOccurs="1" type="EnableWhenBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Controls how multiple enableWhen values are interpreted -  whether all or any must be true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disabledDisplay" minOccurs="0" maxOccurs="1" type="QuestionnaireItemDisabledDisplay">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates if and how items that are disabled (because enableWhen evaluates to 'false') should be displayed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="required" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication, if true, that the item must be present in a &quot;completed&quot; QuestionnaireResponse.  If false, the item may be skipped when answering the questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="repeats" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication, if true, that a QuestionnaireResponse for this item may include multiple answers associated with a single instance of this item (for question-type items) or multiple repetitions of the item (for group-type items).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="readOnly" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxLength" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum number of characters that are permitted in the answer to be considered a &quot;valid&quot; QuestionnaireResponse.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answerConstraint" minOccurs="0" maxOccurs="1" type="QuestionnaireAnswerConstraint">
            <xs:annotation>
              <xs:documentation xml:lang="en">For items that have a defined set of allowed answers (via answerOption or answerValueSet), indicates whether values *other* than those specified can be selected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answerValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a value set containing a list of values representing permitted answers for a question.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answerOption" type="Questionnaire.AnswerOption" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">One of the permitted answers for the question.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="initial" type="Questionnaire.Initial" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="Questionnaire.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text, questions and other groups to be nested beneath a question or group.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Questionnaire.EnableWhen">
    <xs:annotation>
      <xs:documentation xml:lang="en">A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="question" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="operator" minOccurs="1" maxOccurs="1" type="QuestionnaireItemOperator">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the criteria by which the question is enabled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.</xs:documentation>
            </xs:annotation>
            <xs:element name="answerBoolean" type="boolean"/>
            <xs:element name="answerDecimal" type="decimal"/>
            <xs:element name="answerInteger" type="integer"/>
            <xs:element name="answerDate" type="date"/>
            <xs:element name="answerDateTime" type="dateTime"/>
            <xs:element name="answerTime" type="time"/>
            <xs:element name="answerString" type="string"/>
            <xs:element name="answerCoding" type="Coding"/>
            <xs:element name="answerQuantity" type="Quantity"/>
            <xs:element name="answerReference" type="Reference"/>
            <xs:element name="answerUri" type="uri"/>
            <xs:element name="answerAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Questionnaire.AnswerOption">
    <xs:annotation>
      <xs:documentation xml:lang="en">A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A potential answer that's allowed as the answer to this question.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
          <xs:element name="initialSelected" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether the answer value is selected when the list of possible answers is initially shown.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Questionnaire.Initial">
    <xs:annotation>
      <xs:documentation xml:lang="en">A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual value to for an initial answer.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EnableWhenBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="all">
        <xs:annotation>
          <xs:documentation xml:lang="en">All</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="any">
        <xs:annotation>
          <xs:documentation xml:lang="en">Any</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EnableWhenBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="EnableWhenBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireItemOperatorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="exists">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exists</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="!=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&gt;">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greater Than</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&lt;">
        <xs:annotation>
          <xs:documentation xml:lang="en">Less Than</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&gt;=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greater or Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&lt;=">
        <xs:annotation>
          <xs:documentation xml:lang="en">Less or Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireItemOperator">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireItemOperatorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireAnswerConstraintEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="optionsOnly">
        <xs:annotation>
          <xs:documentation xml:lang="en">Options only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="optionsOrType">
        <xs:annotation>
          <xs:documentation xml:lang="en">Options or 'type'</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="optionsOrString">
        <xs:annotation>
          <xs:documentation xml:lang="en">Options or string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireAnswerConstraint">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireAnswerConstraintEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireItemDisabledDisplayEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="hidden">
        <xs:annotation>
          <xs:documentation xml:lang="en">Hidden</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="protected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Protected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireItemDisabledDisplay">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireItemDisabledDisplayEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireItemTypeUsableEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="display">
        <xs:annotation>
          <xs:documentation xml:lang="en">Display</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">Boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Decimal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">Integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="date">
        <xs:annotation>
          <xs:documentation xml:lang="en">Date</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">Date Time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="time">
        <xs:annotation>
          <xs:documentation xml:lang="en">Time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">String</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="text">
        <xs:annotation>
          <xs:documentation xml:lang="en">Text</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="url">
        <xs:annotation>
          <xs:documentation xml:lang="en">Url</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="attachment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Attachment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reference">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireItemTypeUsable">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireItemTypeUsableEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="QuestionnaireResponse" type="QuestionnaireResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 questionnaire being responded to.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="QuestionnaireResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 questionnaire being responded to.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this questionnaire response by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan, proposal or order that is fulfilled in whole or in part by this questionnaire response.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="questionnaire" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Questionnaire that defines and organizes the questions for which answers are being provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="QuestionnaireResponseStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the questionnaire response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authored" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or device that received the answers to the questions in the QuestionnaireResponse and recorded them in the system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual or device that answered the questions about the subject.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="QuestionnaireResponse.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A group or question item from the original questionnaire for which answers are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="QuestionnaireResponse.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 questionnaire being responded to.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="definition" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text that is displayed above the contents of the group or as the text of the question being answered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="answer" type="QuestionnaireResponse.Answer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The respondent's answer(s) to the question.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="QuestionnaireResponse.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sub-questions, sub-groups or display items nested beneath a group.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="QuestionnaireResponse.Answer">
    <xs:annotation>
      <xs:documentation xml:lang="en">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 questionnaire being responded to.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The answer (or one of the answers) provided by the respondent to the question.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueReference" type="Reference"/>
          </xs:choice>
          <xs:element name="item" type="QuestionnaireResponse.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Nested groups and/or questions found within this particular answer.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="QuestionnaireResponseStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="amended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="stopped">
        <xs:annotation>
          <xs:documentation xml:lang="en">Stopped</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="QuestionnaireResponseStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="QuestionnaireResponseStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="RegulatedAuthorization" type="RegulatedAuthorization">
    <xs:annotation>
      <xs:documentation xml:lang="en">Regulatory approval, clearance or licensing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="RegulatedAuthorization">
    <xs:annotation>
      <xs:documentation xml:lang="en">Regulatory approval, clearance or licensing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifier for the authorization, typically assigned by the authorizing body.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The product type, treatment, facility or activity that is being authorized.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Overall type of this authorization, for example drug marketing approval, orphan drug designation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">General textual supporting information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="region" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The territory (e.g., country, jurisdiction etc.) in which the authorization has been granted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status that is authorised e.g. approved. Intermediate states and actions can be tracked with cases and applications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date at which the current status was assigned.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="validityPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time period in which the regulatory approval, clearance or licensing is in effect. As an example, a Marketing Authorization includes the date of authorization and/or an expiration date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="indication" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Condition for which the use of the regulated product applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intendedUse" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The intended use of the product, e.g. prevention, treatment, diagnosis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basis" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The legal or regulatory framework against which this authorization is granted, or other reasons for it.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="holder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that has been granted this authorization, by some authoritative body (the 'regulator').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="regulator" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The regulatory authority or authorizing body granting the authorization. For example, European Medicines Agency (EMA), Food and Drug Administration (FDA), Health Canada (HC), etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="attachedDocument" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information or supporting documentation about the authorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="case" type="RegulatedAuthorization.Case" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The case or regulatory procedure for granting or amending a regulated authorization. An authorization is granted in response to submissions/applications by those seeking authorization. A case is the administrative process that deals with the application(s) that relate to this and assesses them. Note: This area is subject to ongoing review and the workgroup is seeking implementer feedback on its use (see link at bottom of page).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RegulatedAuthorization.Case">
    <xs:annotation>
      <xs:documentation xml:lang="en">Regulatory approval, clearance or licensing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier by which this case can be referenced.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The defining type of case.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status associated with the case.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Relevant date for this case.</xs:documentation>
            </xs:annotation>
            <xs:element name="datePeriod" type="Period"/>
            <xs:element name="dateDateTime" type="dateTime"/>
          </xs:choice>
          <xs:element name="application" type="RegulatedAuthorization.Case" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A regulatory submission from an organization to a regulator, as part of an assessing case. Multiple applications may occur over time, with more or different information to support or modify the submission or the authorization. The applications can be considered as steps within the longer running case or procedure for this authorization process.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="RelatedPerson" type="RelatedPerson">
    <xs:annotation>
      <xs:documentation xml:lang="en">Information about a person that is involved in a patient's health or the care for a patient, but who is not the primary target of healthcare.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="RelatedPerson">
    <xs:annotation>
      <xs:documentation xml:lang="en">Information about a person that is involved in a patient's health or the care for a patient, but who is not the primary target of healthcare.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for a person within a particular scope.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this related person record is in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient this person is related to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nature of the personal relationship between the related person and the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nature of the functional relationship between the patient and the related person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="unbounded" type="HumanName">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name associated with the person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="telecom" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">A contact detail for the person, e.g. a telephone number or an email address.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gender" minOccurs="0" maxOccurs="1" type="AdministrativeGender">
            <xs:annotation>
              <xs:documentation xml:lang="en">Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="birthDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the related person was born.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="address" minOccurs="0" maxOccurs="unbounded" type="Address">
            <xs:annotation>
              <xs:documentation xml:lang="en">Address where the related person can be contacted or visited.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="photo" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">Image of the person.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communication" type="RelatedPerson.Communication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A language which may be used to communicate with the related person about the patient's health.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RelatedPerson.Communication">
    <xs:annotation>
      <xs:documentation xml:lang="en">Information about a person that is involved in a patient's health or the care for a patient, but who is not the primary target of healthcare.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="language" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The language which may be used to communicate with the individual.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preferred" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates whether or not the related person prefers this language (over other languages he or she masters up a certain level).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="RequestOrchestration" type="RequestOrchestration">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="RequestOrchestration">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows a service to provide a unique, business identifier for the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instantiatesCanonical" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instantiatesUri" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A plan, proposal or order that is fulfilled in whole or in part by this request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="replaces" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Completed or terminated request(s) whose function is taken by this new request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="RequestStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the request. For request orchestrations, the status reflects the status of all the requests in the orchestration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="RequestIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the request should be addressed with respect to other requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that identifies what the overall request orchestration is.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The subject for which the request orchestration was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the context of the request orchestration, if any.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authoredOn" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates when the request orchestration was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a reference to the author of the request orchestration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the reason for the request orchestration in coded or textual form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="goal" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Goals that are intended to be achieved by following the requests in this RequestOrchestration.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides a mechanism to communicate additional information about the response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="action" type="RequestOrchestration.Action" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actions, if any, produced by the evaluation of the artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RequestOrchestration.Action">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="linkId" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The linkId of the action from the PlanDefinition that corresponds to this action in the RequestOrchestration resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prefix" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A user-visible prefix for the action. For example a section or item numbering such as 1. or A.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The title of the action displayed to a user.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short description of the action used to provide a summary to display to the user.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="textEquivalent" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the action should be addressed with respect to other actions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="goal" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Goals that are intended to be achieved by following the requests in this action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" type="RequestOrchestration.Condition" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that describes applicability criteria, or start/stop conditions for the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="input" type="RequestOrchestration.Input" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines input data requirements for the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="output" type="RequestOrchestration.Output" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the outputs of the action, if any.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedAction" type="RequestOrchestration.RelatedAction" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A relationship to another action such as &quot;before&quot; or &quot;30-60 minutes after start of&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">An optional value describing when the action should be performed.</xs:documentation>
            </xs:annotation>
            <xs:element name="timingDateTime" type="dateTime"/>
            <xs:element name="timingAge" type="Age"/>
            <xs:element name="timingPeriod" type="Period"/>
            <xs:element name="timingDuration" type="Duration"/>
            <xs:element name="timingRange" type="Range"/>
            <xs:element name="timingTiming" type="Timing"/>
            <xs:element name="timingRelativeTime" type="RelativeTime"/>
          </xs:choice>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the facility where the action will occur; e.g. home, hospital, specific clinic, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="RequestOrchestration.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The participant that should perform or be responsible for this action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of action to perform (create, update, remove).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="applicabilityBehavior" minOccurs="0" maxOccurs="1" type="ActionApplicabilityBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">All - meaning the applicability of each child action is evaluated independently; if a child action is applicable according to the applicability criteria, it is applied. Any - meaning that each child action is evaluated in order, and the first action that returns an applicability of true will be applied, and processing of the parent action will stop. If not specified, the default behavior of All is used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupingBehavior" minOccurs="0" maxOccurs="1" type="ActionGroupingBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the grouping behavior for the action and its children.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="selectionBehavior" minOccurs="0" maxOccurs="1" type="ActionSelectionBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the selection behavior for the action and its children.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requiredBehavior" minOccurs="0" maxOccurs="1" type="ActionRequiredBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines expectations around whether an action is required.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="precheckBehavior" minOccurs="0" maxOccurs="1" type="ActionPrecheckBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines whether the action should usually be preselected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cardinalityBehavior" minOccurs="0" maxOccurs="1" type="ActionCardinalityBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines whether the action can be selected multiple times.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The resource that is the target of the action (e.g. CommunicationRequest).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to an ActivityDefinition that describes the action to be taken in detail, a Measure that specifies a measure to be evaluated, a MessageDefinition that specifies a message to be sent, a PlanDefinition that describes a series of actions to be taken, a Questionnaire that should be filled out, a SpecimenDefinition describing a specimen to be collected, an ObservationDefinition that specifies what observation should be captured, or an OperationDefinition that specifies what operation should be invoked. When the value is a uri, it is intended to be a reference to non-FHIR content that characterizes the action to be performed. This option is allowed to enable the PlanDefinition to be used to provide semi-structured representation, when the guidance is not computable, but there is still value in elaborating the overall structure with a PlanDefinition. The intended behavior when a definitionUri is realized as part of an apply is that it is copied to the resulting RequestOrchestration so that it is available to the consuming system. How that system interprets that uri is not specified.</xs:documentation>
            </xs:annotation>
            <xs:element name="definitionCanonical" type="canonical"/>
            <xs:element name="definitionUri" type="uri"/>
          </xs:choice>
          <xs:element name="transform" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dynamicValue" type="RequestOrchestration.DynamicValue" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="action" type="RequestOrchestration.Action" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sub actions.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RequestOrchestration.Condition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="kind" minOccurs="1" maxOccurs="1" type="ActionConditionKind">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of condition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that returns true or false, indicating whether or not the condition is satisfied.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RequestOrchestration.Input">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requirement" minOccurs="0" maxOccurs="1" type="DataRequirement">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the data that is to be provided as input to the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedData" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to an existing input or output element that provides data to this input.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RequestOrchestration.Output">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requirement" minOccurs="0" maxOccurs="1" type="DataRequirement">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the data that results as output from the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedData" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to an existing input or output element that is results as output from the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RequestOrchestration.RelatedAction">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="targetId" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The element id of the target related action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="1" maxOccurs="1" type="ActionRelationshipType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relationship of this action to the related action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endRelationship" minOccurs="0" maxOccurs="1" type="ActionRelationshipType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relationship of the end of this action to the related action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.</xs:documentation>
            </xs:annotation>
            <xs:element name="offsetDuration" type="Duration"/>
            <xs:element name="offsetRange" type="Range"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RequestOrchestration.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="ActionParticipantType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeCanonical" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeReference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of participant in the action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The role the participant should play in performing the described action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how the actor will be involved in the action - author, reviewer, witness, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the actual participant.</xs:documentation>
            </xs:annotation>
            <xs:element name="actorCanonical" type="canonical"/>
            <xs:element name="actorReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RequestOrchestration.DynamicValue">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of related requests that can be used to capture intended activities that have inter-dependencies such as &quot;give this medication after that one&quot;.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="path" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolvable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="1" type="Expression">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression specifying the value of the customized element.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Requirements" type="Requirements">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of requirements - a list of features or behaviors of designed systems that are necessary to achieve organizational or regulatory goals.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Requirements">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of requirements - a list of features or behaviors of designed systems that are necessary to achieve organizational or regulatory goals.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this Requirements when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Requirements is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Requirements is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this Requirements when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the Requirements when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Requirements author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the Requirements. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the Requirements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this Requirements. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this Requirements is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the Requirements was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the Requirements changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the Requirements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the requirements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Requirements instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this Requirements is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the Requirements and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the Requirements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Another set of Requirements that this set of Requirements builds on and updates.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="imports" type="Requirements.Imports" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Points to requirements defined elsewhere that have the same force as if they were defined in this instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="0" maxOccurs="unbounded" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to another artifact that created this set of requirements. This could be a profile, etc., or external regulation, or business requirements expressed elsewhere. This URI is intended to point to a specific web page for an artifact, not a canonical URL.  If pointing to HL7 specifications, it is best to point to the version-specific URL.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" type="Requirements.Actor" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An actor these requirements are in regard to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statement" type="Requirements.Statement" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual statement of conformance requirement.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Requirements.Imports">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of requirements - a list of features or behaviors of designed systems that are necessary to achieve organizational or regulatory goals.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical for the Requirements resource to import statements from.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="key" minOccurs="0" maxOccurs="unbounded" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The key of a statement to treat as part of the set of requirements defined in this instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Requirements.Actor">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of requirements - a list of features or behaviors of designed systems that are necessary to achieve organizational or regulatory goals.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical for an actor relevant to some of the requirements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="key" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique string used to reference the actor from specific requirements.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Requirements.Statement">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of requirements - a list of features or behaviors of designed systems that are necessary to achieve organizational or regulatory goals.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="key" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Key that identifies this statement (unique within this resource).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="label" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short human usable label for this statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conformance" minOccurs="0" maxOccurs="unbounded" type="ConformanceExpectation">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short human usable label for this statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="conditionality" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This boolean flag is set to true of the text of the requirement is conditional on something e.g. it includes language like 'if x then y'. This conditionality flag is introduced for purposes of filtering and colour highlighting etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requirement" minOccurs="1" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual requirement for human consumption.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Categorization might be done automatically (inferred by code) or manually by user assertion. The absence of a category may limit the ability to determine when the element should be handled, so strong consideration should be given to how systems will be able to determine category values for legacy data and how data that cannot be categorized will be handled. As well, some categories might not be mutually exclusive, so systems should prepare for multiple declared categories - even within a single category 'axis'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" type="Requirements.DerivedFrom" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that this statement is refining, tightening, or establishing more context for the referenced requirement/statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" type="Requirements.PartOf" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a higher-level requirement or statement which this referencing statement is a logical sub-requirement of.  I.e. This statement is a necessary step to achieving the referenced requirement/statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="satisfiedBy" minOccurs="0" maxOccurs="unbounded" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to another artifact that satisfies this requirement. This could be a profile, extension, or an element in one of those, or a CapabilityStatement, OperationDefinition, SearchParameter, CodeSystem(/code), ValueSet, Library etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reference" minOccurs="0" maxOccurs="unbounded" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to another artifact that created this requirement. This could be a profile, etc., or external regulation, or business requirements expressed elsewhere. This URI is intended to point to a specific web page for an artifact, not a canonical URL.  If pointing to HL7 specifications, it is best to point to the version-specific URL.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Who asked for this statement to be a requirement. By default, it's assumed that the publisher knows who it is if it matters.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="0" maxOccurs="unbounded" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the key of an actor listed in Requirements.actor that is relevant to this requirement statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Requirements.DerivedFrom">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of requirements - a list of features or behaviors of designed systems that are necessary to achieve organizational or regulatory goals.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical of the Requirements instance this statement is derivedFrom.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="key" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The key, either within this resource or the specified Requirements resource this statement is derivedFrom.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Requirements.PartOf">
    <xs:annotation>
      <xs:documentation xml:lang="en">A set of requirements - a list of features or behaviors of designed systems that are necessary to achieve organizational or regulatory goals.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="reference" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical of the Requirements instance this statement is a part of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="key" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">The key, either within this resource or the specified Requirements resource this statement is a part of.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConformanceExpectationEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="SHALL">
        <xs:annotation>
          <xs:documentation xml:lang="en">SHALL</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SHOULD">
        <xs:annotation>
          <xs:documentation xml:lang="en">SHOULD</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MAY">
        <xs:annotation>
          <xs:documentation xml:lang="en">MAY</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SHOULD-NOT">
        <xs:annotation>
          <xs:documentation xml:lang="en">SHOULD-NOT</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SHALL-NOT">
        <xs:annotation>
          <xs:documentation xml:lang="en">SHALL-NOT</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConformanceExpectation">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConformanceExpectationEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ResearchStudy" type="ResearchStudy">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ResearchStudy">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Canonical identifier for this study resource, represented as a globally unique URI.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers assigned to this research study by the sponsor or other systems.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business version for the study record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name for this study (computer friendly).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable name of the research study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="label" type="ResearchStudy.Label" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional names for the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="protocol" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of steps expected to be performed as part of the execution of the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A larger research study of which this particular study is a component or step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="citeAs" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Display of the bibliographic citation of this ResearchStudy.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatesTo" type="ResearchStudy.RelatesTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relationships that this ResearchStudy has with other FHIR or non-FHIR resources that already exist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and optionally time) when the ResearchStudy Resource was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the ResearchStudy Resource changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The publication state of the resource (not of the study).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="primaryPurposeType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of study based upon the intent of the study activities. A classification of the intent of the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="phase" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="studyDesign" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The condition that is the focus of the study. For example, In a study to examine risk factors for Lupus, might have as an inclusion criterion &quot;healthy volunteer&quot;, but the target condition code would be a Lupus SNOMED code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="keyword" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Key terms to aid in searching for or filtering the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="region" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A country, state or other area where the study is taking place rather than its precise geographic location or address.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="descriptionSummary" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A brief text for explaining the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A detailed and human-readable narrative of the study. E.g., study abstract.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the start date and the expected (or actual, depending on status) end date for the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="site" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A facility in which study activities are conducted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the study by the performer, subject or other participants.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional grouping mechanism or categorization of a research study. Example: FDA regulated device, FDA regulated drug, MPG Paragraph 23b (a German legal requirement), IRB-exempt, etc. Implementation Note: do not use the classifier element to support existing semantics that are already supported thru explicit elements in the resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="associatedParty" type="ResearchStudy.AssociatedParty" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Sponsors, collaborators, and other parties.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="progressStatus" type="ResearchStudy.ProgressStatus" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Status of study with time for that status.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="whyStopped" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description and/or code explaining the premature termination of the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recruitment" type="ResearchStudy.Recruitment" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Target or actual group of participants enrolled in study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparisonGroup" type="ResearchStudy.ComparisonGroup" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes an expected event or sequence of events for one of the subjects of a study. E.g. for a living subject: exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up. E.g. for a stability study: {store sample from lot A at 25 degrees for 1 month}, {store sample from lot A at 40 degrees for 1 month}.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="objective" type="ResearchStudy.Objective" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A goal that the study is aiming to achieve in terms of a scientific question to be answered by the analysis of data collected during the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="result" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Link to one or more sets of results generated by the study. Could also link to a research registry holding the results such as ClinicalTrials.gov.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.Label">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Kind of name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="language" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to express the specific language of the title.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.RelatesTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship to the related artifact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The artifact that is related to this ResearchStudy Resource.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetUri" type="uri"/>
            <xs:element name="targetAttachment" type="Attachment"/>
            <xs:element name="targetCanonical" type="canonical"/>
            <xs:element name="targetReference" type="Reference"/>
            <xs:element name="targetMarkdown" type="markdown"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.AssociatedParty">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name of associated party.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of association.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="unbounded" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the start date and the end date of the associated party in the role.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A categorization other than role for the associated party.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="party" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Individual or organization associated with study (use practitionerRole to specify their organisation).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.ProgressStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="state" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Label for status or state (e.g. recruitment status).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actual" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">An indication of whether or not the date is a known date when the state changed or will change. A value of true indicates a known date. A value of false indicates an estimated date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date range.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.Recruitment">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="targetNumber" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated total number of participants to be enrolled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actualNumber" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Actual total number of participants enrolled in study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eligibility" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Inclusion and exclusion criteria. The referenced Group Resource should have a membership element value of either 'definitional' or 'conceptual'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actualGroup" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Group of participants who were enrolled in study. The referenced Group Resource should have a membership element value of 'enumerated'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free text description of the recruitment of the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.ComparisonGroup">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="targetNumber" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated total number of participants to be enrolled in the comparison group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actualNumber" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Actual total number of participants enrolled in the comparison group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eligibility" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Inclusion and exclusion criteria for the comparison group as a subset of the eligibility for the overall study. The referenced Group Resource should have a membership element value of either 'definitional' or 'conceptual'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="observedGroup" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Group of participants who were enrolled in the comparison group as a subset of those enrolled in the overall study. The referenced Group Resource should have a membership element value of 'enumerated'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the comparison Group.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.Objective">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique, human-readable label for this objective of the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of study objective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free text description of the objective of the study. This is what the study is trying to achieve rather than how it is going to achieve it (see ResearchStudy.description).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcomeMeasure" type="ResearchStudy.OutcomeMeasure" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An &quot;outcome measure&quot;, &quot;endpoint&quot;, &quot;effect measure&quot; or &quot;measure of effect&quot; is a specific measurement or observation used to quantify the effect of experimental variables on the participants in a study, or for observational studies, to describe patterns of diseases or traits or associations with exposures, risk factors or treatment.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.OutcomeMeasure">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Label for the outcome measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of outcome measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the outcome measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Definition of the outcome measure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="population" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Population for this estimand.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intervention" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comparison group of interest.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparator" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comparison group for comparison.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="summaryMeasure" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Statistical measure for treatment effect estimate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpointAnalysisPlan" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The planned statistical model for analysis of a single endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eventHandling" type="ResearchStudy.EventHandling" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Handling of intercurrent event.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchStudy.EventHandling">
    <xs:annotation>
      <xs:documentation xml:lang="en">A research study is a scientific investigation designed to generate health-related knowledge. This can include clinical trials involving human participants (or animals in the case of veterinary clinical trials). These studies may be related to new ways to screen, prevent, diagnose, and treat disease. Research studies may also analyze data collected from individuals in the past (retrospective studies) or future (prospective studies) to understand specific outcomes or trends in particular populations.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="event" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="group" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The group that is affected by this event handling.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="handling" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the data is handled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Text summary of event handling.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ResearchSubject" type="ResearchSubject">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ResearchSubject">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers assigned to this research subject for a study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The publication state of the resource (not of the subject).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The dates the subject began and ended their participation in the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="study" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the study the subject is participating in.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The record of the person, animal or other entity involved in the study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectState" type="ResearchSubject.SubjectState" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A duration in the lifecycle of the ResearchSubject within a ResearchStudy.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subjectMilestone" type="ResearchSubject.SubjectMilestone" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A significant event in the progress of a ResearchSubject.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparisonGroup" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A group to which the subject is assigned. This group assignment is used for administration or analysis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="consent" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Agreement to participate in a study as well as other research agreements, e.g. to acknowledge additional risks, to agree to a protocol deviation, or to agree to more invasive validation subsidies.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchSubject.SubjectState">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the aspect of the subject's journey that the state refers to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="startDate" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date a research subject entered the given state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date a research subject exited or left the given state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reason for the state change. If coded it should follow the formal subject state model.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ResearchSubject.SubjectMilestone">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="milestone" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A specific event in the research subject's journey through a research study.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date/time when this milestone event was completed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A rationale that provides additional clarification for the milestone that was captured or documented.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="RiskAssessment" type="RiskAssessment">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:element>
  <xs:complexType name="RiskAssessment">
    <xs:annotation>
      <xs:documentation xml:lang="en">An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifier assigned to the risk assessment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the request that is fulfilled by this risk assessment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parent" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a resource that this risk assessment is part of, such as a Procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="ObservationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the RiskAssessment, using the same statuses as an Observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The algorithm, process or mechanism used to evaluate the risk.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the risk assessment performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The patient or group the risk assessment applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The encounter where the assessment was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and possibly time) the risk assessment was performed.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
          </xs:choice>
          <xs:element name="condition" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">For assessments or prognosis specific to a particular condition, indicates the condition being assessed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider, patient, related person, or software application that performed the assessment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reason the risk assessment was performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basis" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prediction" type="RiskAssessment.Prediction" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the expected outcome for the subject.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mitigation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the steps that might be taken to reduce the identified risk(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional comments about the risk assessment.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RiskAssessment.Prediction">
    <xs:annotation>
      <xs:documentation xml:lang="en">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:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="outcome" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">One of the potential outcomes for the patient (e.g. remission, death,  a particular condition).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how likely the outcome is (in the specified timeframe). Range SHOULD be expressed as a Quantity (with a unit of '%'), rather than as a decimal value to make sure the percentage semantics are clear.</xs:documentation>
            </xs:annotation>
            <xs:element name="probabilityDecimal" type="decimal"/>
            <xs:element name="probabilityQuantity" type="Quantity"/>
            <xs:element name="probabilityRange" type="Range"/>
          </xs:choice>
          <xs:element name="qualitativeRisk" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relativeRisk" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general.  (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the period of time or age range of the subject to which the specified probability applies.</xs:documentation>
            </xs:annotation>
            <xs:element name="whenPeriod" type="Period"/>
            <xs:element name="whenRange" type="Range"/>
          </xs:choice>
          <xs:element name="rationale" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information explaining the basis for the prediction.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Schedule" type="Schedule">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for slots of time that may be available for booking appointments.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Schedule">
    <xs:annotation>
      <xs:documentation xml:lang="en">A container for slots of time that may be available for booking appointments.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">External Ids for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="active" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this schedule record is in active use or should not be used (such as was entered in error).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceCategory" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A broad categorization of the service that is to be performed during this appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceType" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific service that is to be performed during this appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialty" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specialty of a practitioner that would be required to perform the service requested in this appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Further description of the schedule as it would be presented to a consumer while searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Slots that reference this schedule resource provide the availability details to these referenced resource(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="planningHorizon" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time that the slots that reference this Schedule resource cover (even if none exist). These  cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a &quot;template&quot; for planning outside these dates.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="SearchParameter" type="SearchParameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A search parameter that defines a named search item that can be used to search/filter on a resource.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SearchParameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A search parameter that defines a named search item that can be used to search/filter on a resource.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this search parameter when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the search parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this search parameter. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the search parameter was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the search parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="1" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">And how it used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate search parameter instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this search parameter is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the search parameter and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the search parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The label that is recommended to be used in the URL or the parameter name in a parameters resource for this search parameter.  In some cases, servers may need to use a different CapabilityStatement searchParam.name to differentiate between multiple SearchParameters that happen to have the same code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="aliasCode" minOccurs="0" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional label that are recommended to be used in the URL or the parameter name in a parameters resource for this search parameter. Typically used to provide backwards-compatibility for renamed search parameters and translations into localized languages.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="base" minOccurs="1" maxOccurs="unbounded" type="VersionIndependentResourceTypesAll">
            <xs:annotation>
              <xs:documentation xml:lang="en">The base resource type(s) that this search parameter can be used against.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="SearchParamType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of value that a search parameter may contain, and how the content is interpreted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A FHIRPath expression that returns a set of elements for the search parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processingMode" minOccurs="0" maxOccurs="1" type="SearchProcessingModeType">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the search parameter relates to the set of elements returned by evaluating the expression query.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="constraint" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">FHIRPath expression that defines/sets a complex constraint for when this SearchParameter is applicable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" minOccurs="0" maxOccurs="unbounded" type="VersionIndependentResourceTypesAll">
            <xs:annotation>
              <xs:documentation xml:lang="en">Types of resource (if a resource is referenced).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="multipleOr" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="multipleAnd" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparator" minOccurs="0" maxOccurs="unbounded" type="SearchComparator">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comparators supported for the search parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="SearchModifierAllCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">A modifier supported for the search parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="chain" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="SearchParameter.Component" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to define the parts of a composite search parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SearchParameter.Component">
    <xs:annotation>
      <xs:documentation xml:lang="en">A search parameter that defines a named search item that can be used to search/filter on a resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="definition" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The definition of the search parameter that describes this part.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SearchComparatorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="eq">
        <xs:annotation>
          <xs:documentation xml:lang="en">Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ne">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="gt">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greater Than</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="lt">
        <xs:annotation>
          <xs:documentation xml:lang="en">Less Than</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ge">
        <xs:annotation>
          <xs:documentation xml:lang="en">Greater or Equals</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="le">
        <xs:annotation>
          <xs:documentation xml:lang="en">Less of Equal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="sa">
        <xs:annotation>
          <xs:documentation xml:lang="en">Starts After</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="eb">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ends Before</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ap">
        <xs:annotation>
          <xs:documentation xml:lang="en">Approximately</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SearchComparator">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SearchComparatorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SearchProcessingModeTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="normal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Normal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="phonetic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Phonetic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other">
        <xs:annotation>
          <xs:documentation xml:lang="en">Other</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SearchProcessingModeType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SearchProcessingModeTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SearchModifierAllCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="missing">
        <xs:annotation>
          <xs:documentation xml:lang="en">Missing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="exact">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exact</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="contains">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contains</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="text">
        <xs:annotation>
          <xs:documentation xml:lang="en">Text</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in">
        <xs:annotation>
          <xs:documentation xml:lang="en">In</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-in">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not In</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="below">
        <xs:annotation>
          <xs:documentation xml:lang="en">Below</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="above">
        <xs:annotation>
          <xs:documentation xml:lang="en">Above</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="identifier">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifier</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="of-type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Of Type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code-text">
        <xs:annotation>
          <xs:documentation xml:lang="en">Code Text</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="text-advanced">
        <xs:annotation>
          <xs:documentation xml:lang="en">Text Advanced</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="iterate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iterate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Account">
        <xs:annotation>
          <xs:documentation xml:lang="en">Account</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActivityDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActivityDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ActorDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ActorDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdministrableProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdministrableProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AdverseEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AdverseEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AllergyIntolerance">
        <xs:annotation>
          <xs:documentation xml:lang="en">AllergyIntolerance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appointment">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appointment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AppointmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">AppointmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ArtifactAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">ArtifactAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AuditEvent">
        <xs:annotation>
          <xs:documentation xml:lang="en">AuditEvent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Basic">
        <xs:annotation>
          <xs:documentation xml:lang="en">Basic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Binary">
        <xs:annotation>
          <xs:documentation xml:lang="en">Binary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BiologicallyDerivedProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">BiologicallyDerivedProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BodyStructure">
        <xs:annotation>
          <xs:documentation xml:lang="en">BodyStructure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bundle">
        <xs:annotation>
          <xs:documentation xml:lang="en">Bundle</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CapabilityStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">CapabilityStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CarePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">CarePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CareTeam">
        <xs:annotation>
          <xs:documentation xml:lang="en">CareTeam</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Claim">
        <xs:annotation>
          <xs:documentation xml:lang="en">Claim</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClaimResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClaimResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ClinicalUseDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ClinicalUseDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Communication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Communication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CommunicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CommunicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CompartmentDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">CompartmentDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Composition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Composition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ConceptMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">ConceptMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condition">
        <xs:annotation>
          <xs:documentation xml:lang="en">Condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent">
        <xs:annotation>
          <xs:documentation xml:lang="en">Consent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contract</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coverage">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coverage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CoverageEligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">CoverageEligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DetectedIssue">
        <xs:annotation>
          <xs:documentation xml:lang="en">DetectedIssue</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation xml:lang="en">Device</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAlert">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAlert</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceAssociation">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceAssociation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceMetric">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceMetric</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentReference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Encounter">
        <xs:annotation>
          <xs:documentation xml:lang="en">Encounter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Endpoint">
        <xs:annotation>
          <xs:documentation xml:lang="en">Endpoint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EnrollmentResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EnrollmentResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EpisodeOfCare">
        <xs:annotation>
          <xs:documentation xml:lang="en">EpisodeOfCare</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EventDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">EventDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Evidence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Evidence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EvidenceVariable">
        <xs:annotation>
          <xs:documentation xml:lang="en">EvidenceVariable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExampleScenario">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExampleScenario</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExplanationOfBenefit">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExplanationOfBenefit</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FamilyMemberHistory">
        <xs:annotation>
          <xs:documentation xml:lang="en">FamilyMemberHistory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Flag">
        <xs:annotation>
          <xs:documentation xml:lang="en">Flag</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Goal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Goal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation xml:lang="en">Group</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GuidanceResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">GuidanceResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HealthcareService">
        <xs:annotation>
          <xs:documentation xml:lang="en">HealthcareService</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Immunization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Immunization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImplementationGuide">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImplementationGuide</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ingredient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ingredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsurancePlan">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsurancePlan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InsuranceProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">InsuranceProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Invoice">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Library">
        <xs:annotation>
          <xs:documentation xml:lang="en">Library</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="List">
        <xs:annotation>
          <xs:documentation xml:lang="en">List</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Location">
        <xs:annotation>
          <xs:documentation xml:lang="en">Location</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ManufacturedItemDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ManufacturedItemDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Measure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Measure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MeasureReport">
        <xs:annotation>
          <xs:documentation xml:lang="en">MeasureReport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Medication">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationAdministration">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationAdministration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationDispense">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationDispense</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageHeader">
        <xs:annotation>
          <xs:documentation xml:lang="en">MessageHeader</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NamingSystem">
        <xs:annotation>
          <xs:documentation xml:lang="en">NamingSystem</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionIntake">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionIntake</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NutritionProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">NutritionProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Observation">
        <xs:annotation>
          <xs:documentation xml:lang="en">Observation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ObservationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ObservationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OperationOutcome">
        <xs:annotation>
          <xs:documentation xml:lang="en">OperationOutcome</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Organization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrganizationAffiliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">OrganizationAffiliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PackagedProductDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PackagedProductDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Parameters">
        <xs:annotation>
          <xs:documentation xml:lang="en">Parameters</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation xml:lang="en">Patient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentNotice">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentNotice</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PaymentReconciliation">
        <xs:annotation>
          <xs:documentation xml:lang="en">PaymentReconciliation</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation xml:lang="en">Person</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PlanDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">PlanDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Practitioner">
        <xs:annotation>
          <xs:documentation xml:lang="en">Practitioner</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PractitionerRole">
        <xs:annotation>
          <xs:documentation xml:lang="en">PractitionerRole</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Procedure">
        <xs:annotation>
          <xs:documentation xml:lang="en">Procedure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Provenance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Provenance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Questionnaire">
        <xs:annotation>
          <xs:documentation xml:lang="en">Questionnaire</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="QuestionnaireResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">QuestionnaireResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RegulatedAuthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">RegulatedAuthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RelatedPerson">
        <xs:annotation>
          <xs:documentation xml:lang="en">RelatedPerson</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestOrchestration">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestOrchestration</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Requirements">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requirements</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchStudy">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchStudy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchSubject">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchSubject</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskAssessment">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskAssessment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Schedule">
        <xs:annotation>
          <xs:documentation xml:lang="en">Schedule</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SearchParameter">
        <xs:annotation>
          <xs:documentation xml:lang="en">SearchParameter</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Slot">
        <xs:annotation>
          <xs:documentation xml:lang="en">Slot</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specimen</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SpecimenDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SpecimenDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="StructureMap">
        <xs:annotation>
          <xs:documentation xml:lang="en">StructureMap</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Subscription">
        <xs:annotation>
          <xs:documentation xml:lang="en">Subscription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionStatus">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionStatus</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubscriptionTopic">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubscriptionTopic</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Substance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubstanceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Task">
        <xs:annotation>
          <xs:documentation xml:lang="en">Task</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TerminologyCapabilities">
        <xs:annotation>
          <xs:documentation xml:lang="en">TerminologyCapabilities</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ValueSet">
        <xs:annotation>
          <xs:documentation xml:lang="en">ValueSet</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VisionPrescription">
        <xs:annotation>
          <xs:documentation xml:lang="en">VisionPrescription</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BodySite">
        <xs:annotation>
          <xs:documentation xml:lang="en">BodySite</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CatalogEntry">
        <xs:annotation>
          <xs:documentation xml:lang="en">CatalogEntry</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Conformance">
        <xs:annotation>
          <xs:documentation xml:lang="en">Conformance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DataElement">
        <xs:annotation>
          <xs:documentation xml:lang="en">DataElement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceComponent">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceComponent</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceUseRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceUseRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DeviceUseStatement">
        <xs:annotation>
          <xs:documentation xml:lang="en">DeviceUseStatement</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DiagnosticOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">DiagnosticOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentManifest">
        <xs:annotation>
          <xs:documentation xml:lang="en">DocumentManifest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EffectEvidenceSynthesis">
        <xs:annotation>
          <xs:documentation xml:lang="en">EffectEvidenceSynthesis</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EligibilityRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">EligibilityRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EligibilityResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">EligibilityResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ExpansionProfile">
        <xs:annotation>
          <xs:documentation xml:lang="en">ExpansionProfile</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingManifest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingManifest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ImagingObjectSelection">
        <xs:annotation>
          <xs:documentation xml:lang="en">ImagingObjectSelection</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Media">
        <xs:annotation>
          <xs:documentation xml:lang="en">Media</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationOrder">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationOrder</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicationUsage">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicationUsage</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProduct">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProduct</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductAuthorization">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductAuthorization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductContraindication">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductContraindication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductIndication">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductIndication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductIngredient">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductIngredient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductInteraction">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductInteraction</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductManufactured">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductManufactured</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductPackaged">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductPackaged</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductPharmaceutical">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductPharmaceutical</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MedicinalProductUndesirableEffect">
        <xs:annotation>
          <xs:documentation xml:lang="en">MedicinalProductUndesirableEffect</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="OrderResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">OrderResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProcedureRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ProcedureRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProcessRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ProcessRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ProcessResponse">
        <xs:annotation>
          <xs:documentation xml:lang="en">ProcessResponse</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ReferralRequest">
        <xs:annotation>
          <xs:documentation xml:lang="en">ReferralRequest</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RequestGroup">
        <xs:annotation>
          <xs:documentation xml:lang="en">RequestGroup</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResearchElementDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ResearchElementDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RiskEvidenceSynthesis">
        <xs:annotation>
          <xs:documentation xml:lang="en">RiskEvidenceSynthesis</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sequence">
        <xs:annotation>
          <xs:documentation xml:lang="en">Sequence</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ServiceDefinition">
        <xs:annotation>
          <xs:documentation xml:lang="en">ServiceDefinition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SubstanceSpecification">
        <xs:annotation>
          <xs:documentation xml:lang="en">SubstanceSpecification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="TestScript">
        <xs:annotation>
          <xs:documentation xml:lang="en">TestScript</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SearchModifierAllCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SearchModifierAllCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ServiceRequest" type="ServiceRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. When the ServiceRequest is active, it represents an authorization to perform the service.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ServiceRequest">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. When the ServiceRequest is active, it represents an authorization to perform the service.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Plan/proposal/order fulfilled by this request.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="replaces" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The request takes the place of the referenced completed or terminated request(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requisition" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="RequestStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides reason why the service request status is what it is. The statusReason can be used to explain why a service request is suspended, cancelled, or on hold, including administrative and clinical reasons.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="RequestIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the request is a proposal, plan, an original order or a reflex order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that classifies the service for searching, sorting and display purposes (e.g. &quot;Surgical Procedure&quot;).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the ServiceRequest should be addressed with respect to other requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doNotPerform" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Set this to true if the record is saying that the service/procedure should NOT be performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or reference that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that has been requested.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="orderDetail" type="ServiceRequest.OrderDetail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional details and instructions about how the services are to be delivered. For example, an order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied. Questions or additional information to be gathered from a patient may be included here.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">An amount of service being requested.</xs:documentation>
            </xs:annotation>
            <xs:element name="quantityQuantity" type="Quantity"/>
            <xs:element name="quantityRatio" type="Ratio"/>
            <xs:element name="quantityRange" type="Range"/>
          </xs:choice>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual focus of a service request when it is not the subject of record representing something or someone associated with the subject such as a spouse, parent, fetus, or donor. The focus of a service request could also be an existing condition,  an intervention, the subject's diet,  another service request on the subject,  or a body structure such as tumor or implanted device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An encounter that provides additional information about the healthcare context in which this request is made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date/time at which the requested service should occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
            <xs:element name="occurrenceTiming" type="Timing"/>
          </xs:choice>
          <xs:element name="asNeeded" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates that the service (e.g., procedure, lab test) should be performed when needed (Boolean option).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="asNeededFor" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates specific criteria that need to be met to perform the service (e.g., lab results or symptoms).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authoredOn" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the request transitioned to being actionable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requester" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The individual who initiated the request and has responsibility for its activation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performerType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Desired type of performer for doing the requested service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The desired performer for doing the requested service.  For example, the surgeon, dermatopathologist, endoscopist, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reason or the indication for requesting the service (e.g., procedure, lab test).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional clinical information about the patient or specimen that may influence the services or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs).' This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyStructure" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Anatomic location where the procedure should be performed. This is the target site.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any other notes and comments made about the service request. For example, internal billing notes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientInstruction" type="ServiceRequest.PatientInstruction" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Instructions in terms that are understood by the patient or consumer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relevantHistory" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Key events in the history of the request.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ServiceRequest.OrderDetail">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. When the ServiceRequest is active, it represents an authorization to perform the service.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the context of the order details by reference.</xs:documentation>
            </xs:annotation>
            <xs:element name="parameterFocusCodeableConcept" type="CodeableConcept"/>
            <xs:element name="parameterFocusReference" type="Reference"/>
            <xs:element name="parameterFocusCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="parameter" type="ServiceRequest.Parameter" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The parameter details for the service being requested.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ServiceRequest.Parameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. When the ServiceRequest is active, it represents an authorization to perform the service.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value representing the additional detail or instructions for the order (e.g., catheter insertion, body elevation, descriptive device configuration and/or setting instructions).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates a value for the order detail.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valuePeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ServiceRequest.PatientInstruction">
    <xs:annotation>
      <xs:documentation xml:lang="en">A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. When the ServiceRequest is active, it represents an authorization to perform the service.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Instructions in terms that are understood by the patient or consumer.</xs:documentation>
            </xs:annotation>
            <xs:element name="instructionMarkdown" type="markdown"/>
            <xs:element name="instructionReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Slot" type="Slot">
    <xs:annotation>
      <xs:documentation xml:lang="en">A slot of time on a schedule that may be available for booking appointments.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Slot">
    <xs:annotation>
      <xs:documentation xml:lang="en">A slot of time on a schedule that may be available for booking appointments.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">External Ids for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceCategory" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A broad categorization of the service that is to be performed during this appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="serviceType" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the Schedule resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specialty" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specialty of a practitioner that would be required to perform the service requested in this appointment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appointmentType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The style of appointment or patient that may be booked in the slot (not service type).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="schedule" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The schedule resource that this slot defines an interval of status information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="SlotStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">busy | free | busy-unavailable | busy-tentative | entered-in-error.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="start" minOccurs="1" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date/Time that the slot is to begin.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="end" minOccurs="1" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date/Time that the slot is to conclude.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="overbooked" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">This slot has already been overbooked, appointments are unlikely to be accepted for this time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments on the slot to describe any extended information. Such as custom constraints on the slot.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SlotStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="busy">
        <xs:annotation>
          <xs:documentation xml:lang="en">Busy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="free">
        <xs:annotation>
          <xs:documentation xml:lang="en">Free</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="busy-unavailable">
        <xs:annotation>
          <xs:documentation xml:lang="en">Busy (Unavailable)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="busy-tentative">
        <xs:annotation>
          <xs:documentation xml:lang="en">Busy (Tentative)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SlotStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SlotStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Specimen" type="Specimen">
    <xs:annotation>
      <xs:documentation xml:lang="en">A sample to be used for analysis.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Specimen">
    <xs:annotation>
      <xs:documentation xml:lang="en">A sample to be used for analysis.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifiers used for specimen identification. These could include but are not limited to identifiers generated upon collection, accessioning, or other reasons for labeling a specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="SpecimenStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The availability of the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of material that forms the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance, a biologically-derived product, or a device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="receivedTime" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Time when specimen is received by the testing laboratory for processing or testing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parent" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details concerning a service request that required a specimen to be collected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="combined" minOccurs="0" maxOccurs="1" type="SpecimenCombined">
            <xs:annotation>
              <xs:documentation xml:lang="en">This element signifies if the specimen is part of a group or pooled.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="role" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The role or reason for the specimen in the testing workflow.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="feature" type="Specimen.Feature" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A physical feature or landmark on a specimen, highlighted for context by the collector of the specimen (e.g. surgeon), that identifies the type of feature as well as its meaning (e.g. the red ink indicating the resection margin of the right lobe of the excised prostate tissue or wire loop at radiologically suspected tumor location).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="collection" type="Specimen.Collection" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details concerning the specimen collection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processing" type="Specimen.Processing" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details concerning processing and processing steps for the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="container" type="Specimen.Container" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The container holding the specimen.  The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A mode or state of being that describes the nature of the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Specimen.Feature">
    <xs:annotation>
      <xs:documentation xml:lang="en">A sample to be used for analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The landmark or feature being highlighted.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the feature of the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Specimen.Collection">
    <xs:annotation>
      <xs:documentation xml:lang="en">A sample to be used for analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="collector" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Person who collected the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Time when specimen was collected from subject - the physiologically relevant time.</xs:documentation>
            </xs:annotation>
            <xs:element name="collectedDateTime" type="dateTime"/>
            <xs:element name="collectedPeriod" type="Period"/>
          </xs:choice>
          <xs:element name="duration" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">The span of time over which the collection of a specimen occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded value specifying the technique that is used to perform the procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded value specifying the device that is used to perform the procedure.</xs:documentation>
            </xs:annotation>
            <xs:element name="deviceCodeableConcept" type="CodeableConcept"/>
            <xs:element name="deviceReference" type="Reference"/>
            <xs:element name="deviceCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="procedure" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The procedure event during which the specimen was collected (e.g. the surgery leading to the collection of a pathology sample).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Anatomical location from which the specimen was collected (if subject is a patient). This is the target site.  This element is not used for environmental specimens.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.</xs:documentation>
            </xs:annotation>
            <xs:element name="fastingStatusCodeableConcept" type="CodeableConcept"/>
            <xs:element name="fastingStatusDuration" type="Duration"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Specimen.Processing">
    <xs:annotation>
      <xs:documentation xml:lang="en">A sample to be used for analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual description of procedure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded value specifying the method used to process the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The performer of the processing of the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The device used in the processing of the specimen.</xs:documentation>
            </xs:annotation>
            <xs:element name="deviceCodeableConcept" type="CodeableConcept"/>
            <xs:element name="deviceReference" type="Reference"/>
            <xs:element name="deviceCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="additive" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Material used in the processing step.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A record of the time or period when the specimen processing occurred.  For example the time of sample fixation or the period of time the sample was in formalin.</xs:documentation>
            </xs:annotation>
            <xs:element name="timeDateTime" type="dateTime"/>
            <xs:element name="timePeriod" type="Period"/>
            <xs:element name="timeDuration" type="Duration"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Specimen.Container">
    <xs:annotation>
      <xs:documentation xml:lang="en">A sample to be used for analysis.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The device resource for the the container holding the specimen. If the container is in a holder then the referenced device will point to a parent device.</xs:documentation>
            </xs:annotation>
            <xs:element name="deviceCodeableConcept" type="CodeableConcept"/>
            <xs:element name="deviceReference" type="Reference"/>
            <xs:element name="deviceCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="specimenQuantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SpecimenStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="available">
        <xs:annotation>
          <xs:documentation xml:lang="en">Available</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unavailable">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unavailable</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unsatisfactory">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unsatisfactory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SpecimenStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SpecimenStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="SpecimenDefinition" type="SpecimenDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A kind of specimen with associated set of requirements.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SpecimenDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A kind of specimen with associated set of requirements.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URL that is used to identify this SpecimenDefinition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this SpecimenDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the {{title}}. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the SpecimenDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFromCanonical" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFromUri" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of theSpecimenDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.</xs:documentation>
            </xs:annotation>
            <xs:element name="subjectCodeableConcept" type="CodeableConcept"/>
            <xs:element name="subjectReference" type="Reference"/>
          </xs:choice>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Helps establish the &quot;authority/credibility&quot; of the SpecimenDefinition. May also allow for contact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the SpecimenDefinition from the consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of specimen definitions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A jurisdiction in which the SpecimenDefinition is intended to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explains why this SpecimeDefinition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the SpecimenDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the SpecimenDefinition content was or is planned to be effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeCollected" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of material to be collected.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patientPreparation" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Preparation of the patient for specimen collection.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="timeAspect" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Time aspect of specimen collection (duration or offset).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="collection" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The action to be performed for collecting the specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeTested" type="SpecimenDefinition.TypeTested" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specimen conditioned in a container as expected by the testing laboratory.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SpecimenDefinition.TypeTested">
    <xs:annotation>
      <xs:documentation xml:lang="en">A kind of specimen with associated set of requirements.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="isDerived" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Primary of secondary specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of specimen conditioned for testing expected by lab.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preference" minOccurs="1" maxOccurs="1" type="SpecimenContainedPreference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The preference for this type of conditioned specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="container" type="SpecimenDefinition.Container" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specimen's container.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requirement" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Requirements for delivery and special handling of this kind of conditioned specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="retentionTime" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="singleUse" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specimen can be used by only one test or panel if the value is &quot;true&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rejectionCriterion" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Criterion for rejection of the specimen in its container by the laboratory.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="handling" type="SpecimenDefinition.Handling" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="testingDestination" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the specimen will be tested: e.g., lab, sector, device or any combination of these.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SpecimenDefinition.Container">
    <xs:annotation>
      <xs:documentation xml:lang="en">A kind of specimen with associated set of requirements.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="material" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of material of the container.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of container used to contain this kind of specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cap" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Color of container cap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The textual description of the kind of container.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="capacity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The capacity (volume or other measure) of this kind of container.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The minimum volume to be conditioned in the container.</xs:documentation>
            </xs:annotation>
            <xs:element name="minimumVolumeQuantity" type="Quantity"/>
            <xs:element name="minimumVolumeString" type="string"/>
          </xs:choice>
          <xs:element name="additive" type="SpecimenDefinition.Additive" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preparation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Special processing that should be applied to the container for this kind of specimen.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SpecimenDefinition.Additive">
    <xs:annotation>
      <xs:documentation xml:lang="en">A kind of specimen with associated set of requirements.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.</xs:documentation>
            </xs:annotation>
            <xs:element name="additiveCodeableConcept" type="CodeableConcept"/>
            <xs:element name="additiveReference" type="Reference"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SpecimenDefinition.Handling">
    <xs:annotation>
      <xs:documentation xml:lang="en">A kind of specimen with associated set of requirements.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="temperatureQualifier" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="temperatureRange" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The temperature interval for this set of handling instructions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxDuration" minOccurs="0" maxOccurs="1" type="Duration">
            <xs:annotation>
              <xs:documentation xml:lang="en">The maximum time interval of preservation of the specimen with these conditions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="instruction" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SpecimenContainedPreferenceEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="preferred">
        <xs:annotation>
          <xs:documentation xml:lang="en">Preferred</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="alternate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Alternate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SpecimenContainedPreference">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SpecimenContainedPreferenceEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="StructureDefinition" type="StructureDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="StructureDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. There is no expectation that versions can be placed in a lexicographical sequence, so authors are encouraged to populate the StructureDefinition.versionAlgorithm[x] element to enable comparisons. If there is no managed version available, authors can consider using ISO date/time syntax (e.g., '2023-01-01').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the structure definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this structure definition. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the structure definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the structure definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the structure definition from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this structure definition is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the structure definition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the structure definition.  The short copyright declaration (e.g. (c) '2015+ xyz organization') should be sent in the copyrightLabel element without the copyright prefix (i.e., do not include '(c)' or the symbol).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="keyword" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">(DEPRECATED) A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates by describing the use of this structure definition, or the content it describes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fhirVersion" minOccurs="0" maxOccurs="1" type="FHIRVersion">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.6.0. for this version.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mapping" type="StructureDefinition.Mapping" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An external specification that the content is mapped to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="kind" minOccurs="1" maxOccurs="1" type="StructureDefinitionKind">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines the kind of structure that this definition is describing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="abstract" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether structure this definition describes is abstract or not  - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged  between systems.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="context" type="StructureDefinition.Context" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the types of resource or data type elements to which the extension can be applied. For more guidance on using the 'context' element, see the [defining extensions page](defining-extensions.html#context).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contextInvariant" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).  References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. &quot;string&quot; is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models, where they are required.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="baseDefinition" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivation" minOccurs="0" maxOccurs="1" type="TypeDerivationRule">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the type relates to the baseDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="snapshot" type="StructureDefinition.Snapshot" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="differential" type="StructureDefinition.Differential" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureDefinition.Mapping">
    <xs:annotation>
      <xs:documentation xml:lang="en">A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identity" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">An Internal id that is used to identify this mapping set when specific mappings are made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that identifies the specification that this mapping is expressed to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name for the specification that is being mapped to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureDefinition.Context">
    <xs:annotation>
      <xs:documentation xml:lang="en">A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="ExtensionContextType">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines how to interpret the expression that defines what the context of the extension is.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression that defines where an extension can be used in resources.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureDefinition.Snapshot">
    <xs:annotation>
      <xs:documentation xml:lang="en">A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="element" minOccurs="1" maxOccurs="unbounded" type="ElementDefinition">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures constraints on each element within the resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureDefinition.Differential">
    <xs:annotation>
      <xs:documentation xml:lang="en">A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="element" minOccurs="1" maxOccurs="unbounded" type="ElementDefinition">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures constraints on each element within the resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="StructureDefinitionKindEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="primitive-type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Primitive Data Type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="complex-type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Complex Data Type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="resource">
        <xs:annotation>
          <xs:documentation xml:lang="en">Resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="logical">
        <xs:annotation>
          <xs:documentation xml:lang="en">Logical</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StructureDefinitionKind">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="StructureDefinitionKindEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="TypeDerivationRuleEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="specialization">
        <xs:annotation>
          <xs:documentation xml:lang="en">Specialization</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="constraint">
        <xs:annotation>
          <xs:documentation xml:lang="en">Constraint</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="TypeDerivationRule">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="TypeDerivationRuleEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ExtensionContextTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="fhirpath">
        <xs:annotation>
          <xs:documentation xml:lang="en">FHIRPath</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="element">
        <xs:annotation>
          <xs:documentation xml:lang="en">Element ID</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="extension">
        <xs:annotation>
          <xs:documentation xml:lang="en">Extension URL</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ExtensionContextType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ExtensionContextTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="StructureMap" type="StructureMap">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="StructureMap">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the structure map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this structure map. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the structure map was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the structure map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the structure map from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure map instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this structure map is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the structure map and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the structure map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="structure" type="StructureMap.Structure" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="import" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other maps used by this map (canonical URLs).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="const" type="StructureMap.Const" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Definition of a constant value used in the map rules.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="group" type="StructureMap.Group" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Organizes the mapping into managable chunks for human review/ease of maintenance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Structure">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical reference to the structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="StructureMapModelMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the referenced structure is used in this mapping.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="alias" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name used for this type in the map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Documentation that describes how the structure is used in the mapping.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Const">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other maps used by this map (canonical URLs).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A FHIRPath expression that is the value of this variable.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Group">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique name for the group for the convenience of human readers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="extends" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Another group that this group adds rules to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="typeMode" minOccurs="0" maxOccurs="1" type="StructureMapGroupTypeMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this is the default rule set to apply for the source type or this combination of types.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional supporting documentation that explains the purpose of the group and the types of mappings within it.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="input" type="StructureMap.Input" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name assigned to an instance of data. The instance must be provided when the mapping is invoked.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rule" type="StructureMap.Rule" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Transform Rule from source to target.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Input">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name for this instance of data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type for this instance of data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="StructureMapInputMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Mode for this instance of data.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Documentation for this instance of data.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Rule">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name of the rule for internal references.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" type="StructureMap.Source" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Source inputs to the mapping.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" type="StructureMap.Target" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Content to create because of this mapping rule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rule" type="StructureMap.Rule" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Rules contained in this rule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dependent" type="StructureMap.Dependent" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Which other rules to apply in the context of this rule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Documentation for this instance of data.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Source">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="context" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type or variable this rule applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="min" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="max" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specified maximum cardinality for the element - a number or a &quot;*&quot;. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="defaultValue" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value to use if there is no existing value in the source object.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="element" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optional field for this source.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="listMode" minOccurs="0" maxOccurs="1" type="StructureMapSourceListMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">How to handle the list mode for this element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="variable" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Named context for field, if a field is specified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">FHIRPath expression  - must be true or the rule does not apply.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="check" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">FHIRPath expression  - must be true or the mapping engine throws an error instead of completing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="logMessage" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Target">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="context" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Variable this rule applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="element" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Field to create in the context.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="variable" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Named context for field, if desired, and a field is specified.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="listMode" minOccurs="0" maxOccurs="unbounded" type="StructureMapTargetListMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">If field is a list, how to manage the list.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="listRuleId" minOccurs="0" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Internal rule reference for shared list items.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="transform" minOccurs="0" maxOccurs="1" type="StructureMapTransform">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the data is copied / created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" type="StructureMap.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Parameters to the transform.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Parameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Parameter value - variable or literal.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueId" type="id"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueDateTime" type="dateTime"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StructureMap.Dependent">
    <xs:annotation>
      <xs:documentation xml:lang="en">A Map of relationships between 2 structures that can be used to transform data.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="id">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name of a rule or group to apply.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" type="StructureMap.Parameter" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Parameter to pass to the rule or group.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="StructureMapInputModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="source">
        <xs:annotation>
          <xs:documentation xml:lang="en">Source Instance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="target">
        <xs:annotation>
          <xs:documentation xml:lang="en">Target Instance</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StructureMapInputMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="StructureMapInputModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="StructureMapTargetListModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="first">
        <xs:annotation>
          <xs:documentation xml:lang="en">First</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="share">
        <xs:annotation>
          <xs:documentation xml:lang="en">Share</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="last">
        <xs:annotation>
          <xs:documentation xml:lang="en">Last</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="single">
        <xs:annotation>
          <xs:documentation xml:lang="en">single</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StructureMapTargetListMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="StructureMapTargetListModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="StructureMapTransformEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="create">
        <xs:annotation>
          <xs:documentation xml:lang="en">create</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="copy">
        <xs:annotation>
          <xs:documentation xml:lang="en">copy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="truncate">
        <xs:annotation>
          <xs:documentation xml:lang="en">truncate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="escape">
        <xs:annotation>
          <xs:documentation xml:lang="en">escape</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cast">
        <xs:annotation>
          <xs:documentation xml:lang="en">cast</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="append">
        <xs:annotation>
          <xs:documentation xml:lang="en">append</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="translate">
        <xs:annotation>
          <xs:documentation xml:lang="en">translate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reference">
        <xs:annotation>
          <xs:documentation xml:lang="en">reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateOp">
        <xs:annotation>
          <xs:documentation xml:lang="en">dateOp</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="uuid">
        <xs:annotation>
          <xs:documentation xml:lang="en">uuid</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="pointer">
        <xs:annotation>
          <xs:documentation xml:lang="en">pointer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="evaluate">
        <xs:annotation>
          <xs:documentation xml:lang="en">evaluate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cc">
        <xs:annotation>
          <xs:documentation xml:lang="en">cc</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="c">
        <xs:annotation>
          <xs:documentation xml:lang="en">c</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="qty">
        <xs:annotation>
          <xs:documentation xml:lang="en">qty</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="id">
        <xs:annotation>
          <xs:documentation xml:lang="en">id</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cp">
        <xs:annotation>
          <xs:documentation xml:lang="en">cp</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StructureMapTransform">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="StructureMapTransformEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="StructureMapSourceListModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="first">
        <xs:annotation>
          <xs:documentation xml:lang="en">First</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not_first">
        <xs:annotation>
          <xs:documentation xml:lang="en">All but the first</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="last">
        <xs:annotation>
          <xs:documentation xml:lang="en">Last</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not_last">
        <xs:annotation>
          <xs:documentation xml:lang="en">All but the last</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="only_one">
        <xs:annotation>
          <xs:documentation xml:lang="en">Enforce only one</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StructureMapSourceListMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="StructureMapSourceListModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="StructureMapGroupTypeModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="types">
        <xs:annotation>
          <xs:documentation xml:lang="en">Default for Type Combination</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="type-and-types">
        <xs:annotation>
          <xs:documentation xml:lang="en">Default for type + combination</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StructureMapGroupTypeMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="StructureMapGroupTypeModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="StructureMapModelModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="source">
        <xs:annotation>
          <xs:documentation xml:lang="en">Source Structure Definition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="queried">
        <xs:annotation>
          <xs:documentation xml:lang="en">Queried Structure Definition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="target">
        <xs:annotation>
          <xs:documentation xml:lang="en">Target Structure Definition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="produced">
        <xs:annotation>
          <xs:documentation xml:lang="en">Produced Structure Definition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StructureMapModelMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="StructureMapModelModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Subscription" type="Subscription">
    <xs:annotation>
      <xs:documentation xml:lang="en">The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Subscription">
    <xs:annotation>
      <xs:documentation xml:lang="en">The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the subscription.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="SubscriptionStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the subscription, which marks the server state for managing the subscription.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="1" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reference to the subscription topic to be notified about.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="end" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time for the server to turn the subscription off.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingEntity" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Entity with authorization to communicate with the server about this Subscription, such as requesting changes (e.g., updating an endpoint URL).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of why this subscription is defined.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="filterBy" type="Subscription.FilterBy" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The filter properties to be applied to narrow the subscription topic stream.  When multiple filters are applied, evaluates to true if all the conditions applicable to that resource are met; otherwise it returns false (i.e., logical AND).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="channelType" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of channel to send notifications on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endpoint" minOccurs="0" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">Channel-specific URL that describes where notifications are sent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" type="Subscription.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Channel-dependent information to send as part of the notification (e.g., HTTP Headers).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="heartbeatPeriod" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, a 'heartbeat' notification (keep-alive) is sent via this channel with an interval period equal to this elements integer value in seconds.  If not present, a heartbeat notification is not sent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="timeout" minOccurs="0" maxOccurs="1" type="unsignedInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, the maximum amount of time a server will allow before failing a notification attempt.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contentType" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that:

* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`.

* additional MIME types can be allowed by channels - e.g., `text/plain` and `text/html` are defined by the Email channel.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="content" minOccurs="0" maxOccurs="1" type="SubscriptionPayloadContent">
            <xs:annotation>
              <xs:documentation xml:lang="en">How much resource content to deliver in the notification payloads. The choices are an empty payload, only the resource id, or the full resource content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="maxCount" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, the maximum number of events that will be included in a notification bundle. Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Subscription.FilterBy">
    <xs:annotation>
      <xs:documentation xml:lang="en">The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="resource" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">A resource listed in the `SubscriptionTopic` this `Subscription` references (`SubscriptionTopic.canFilterBy.resource`). This element can be used to differentiate filters for topics that include more than one resource type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="filterParameter" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The filter as defined in the `SubscriptionTopic.canFilterBy.filterParameter` element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparator" minOccurs="0" maxOccurs="1" type="SearchComparator">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comparator applied to this filter parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="1" type="SearchModifierCode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Modifier applied to this filter parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The literal value or resource path as is legal in search - for example, `Patient/123` or `le1950`.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An event filter to be applied to the topic - e.g., if a topic defined multiple event triggers, this can be used to specify a single one.  Multiple values are or-joined, multiple codings within a value are and-joined.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Subscription.Parameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Parameter name for information passed to the channel for notifications, for example in the case of a REST hook wanting to pass through an authorization header, the name would be Authorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Parameter value for information passed to the channel for notifications, for example in the case of a REST hook wanting to pass through an authorization header, the value would be `Bearer 0193...`.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SubscriptionPayloadContentEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="empty">
        <xs:annotation>
          <xs:documentation xml:lang="en">Empty</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="id-only">
        <xs:annotation>
          <xs:documentation xml:lang="en">Id-only</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="full-resource">
        <xs:annotation>
          <xs:documentation xml:lang="en">Full-resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SubscriptionPayloadContent">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SubscriptionPayloadContentEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SubscriptionStatusCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="requested">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requested</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="off">
        <xs:annotation>
          <xs:documentation xml:lang="en">Off</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SubscriptionStatusCodes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SubscriptionStatusCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SearchModifierCodeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="missing">
        <xs:annotation>
          <xs:documentation xml:lang="en">Missing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="exact">
        <xs:annotation>
          <xs:documentation xml:lang="en">Exact</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="contains">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contains</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="text">
        <xs:annotation>
          <xs:documentation xml:lang="en">Text</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in">
        <xs:annotation>
          <xs:documentation xml:lang="en">In</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="not-in">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not In</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="below">
        <xs:annotation>
          <xs:documentation xml:lang="en">Below</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="above">
        <xs:annotation>
          <xs:documentation xml:lang="en">Above</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="identifier">
        <xs:annotation>
          <xs:documentation xml:lang="en">Identifier</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="of-type">
        <xs:annotation>
          <xs:documentation xml:lang="en">Of Type</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code-text">
        <xs:annotation>
          <xs:documentation xml:lang="en">Code Text</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="text-advanced">
        <xs:annotation>
          <xs:documentation xml:lang="en">Text Advanced</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="iterate">
        <xs:annotation>
          <xs:documentation xml:lang="en">Iterate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SearchModifierCode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SearchModifierCodeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="SubscriptionStatus" type="SubscriptionStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en">The SubscriptionStatus resource describes the state of a Subscription during notifications.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SubscriptionStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en">The SubscriptionStatus resource describes the state of a Subscription during notifications.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="SubscriptionStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the subscription, which marks the server state for managing the subscription.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="SubscriptionNotificationType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of event being conveyed with this notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eventsSinceSubscriptionStart" minOccurs="0" maxOccurs="1" type="integer64">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total number of actual events which have been generated since the Subscription was created (inclusive of this notification) - regardless of how many have been successfully communicated.  This number is NOT incremented for handshake and heartbeat notifications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="notificationEvent" type="SubscriptionStatus.NotificationEvent" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Detailed information about events relevant to this subscription notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subscription" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reference to the Subscription which generated this notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reference to the SubscriptionTopic for the Subscription which generated this notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="error" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A record of errors that occurred when the server processed a notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubscriptionStatus.NotificationEvent">
    <xs:annotation>
      <xs:documentation xml:lang="en">The SubscriptionStatus resource describes the state of a Subscription during notifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="eventNumber" minOccurs="1" maxOccurs="1" type="integer64">
            <xs:annotation>
              <xs:documentation xml:lang="en">Either the sequential number of this event in this subscription context or a relative event number for this notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="triggerEvent" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">If present, one or more event codes specifying the events which triggered this notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="timestamp" minOccurs="0" maxOccurs="1" type="instant">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual time this event occurred on the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The focus of this event. While this will usually be a reference to the focus resource of the event, it MAY contain a reference to a non-FHIR object.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additionalContext" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional context information for this event. Generally, this will contain references to related resources included with the event (e.g., the Patient relevant to an Encounter), however it MAY refer to non-FHIR objects.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedQuery" type="SubscriptionStatus.RelatedQuery" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Queries and codes that could be included with notifications of this shape. Servers MAY include these queries if supported and desired in the workflow.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorizationHint" type="SubscriptionStatus.AuthorizationHint" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Authorization context information and value (e.g., token).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubscriptionStatus.RelatedQuery">
    <xs:annotation>
      <xs:documentation xml:lang="en">The SubscriptionStatus resource describes the state of a Subscription during notifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="queryType" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded value(s) used to describe the type of information that evaluating this query will provide. Subscribers can use the values to ensure the data they request are relevant and necessary for their use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="query" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Query a subscriber can use to retrieve additional information. The exact contents of the query MAY depend on the value of the `queryType`, however this SHOULD be a query suitable for use as an HTTP GET request (either fully-qualified or partial).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubscriptionStatus.AuthorizationHint">
    <xs:annotation>
      <xs:documentation xml:lang="en">The SubscriptionStatus resource describes the state of a Subscription during notifications.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="authorizationType" minOccurs="1" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used by clients to determine what kind of authorization hint is being suggested by the sender.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value related to the authorization (e.g., a token).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="SubscriptionNotificationTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="handshake">
        <xs:annotation>
          <xs:documentation xml:lang="en">Handshake</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="heartbeat">
        <xs:annotation>
          <xs:documentation xml:lang="en">Heartbeat</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="event-notification">
        <xs:annotation>
          <xs:documentation xml:lang="en">Event Notification</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="query-status">
        <xs:annotation>
          <xs:documentation xml:lang="en">Query Status</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="query-event">
        <xs:annotation>
          <xs:documentation xml:lang="en">Query Event</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="SubscriptionNotificationType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="SubscriptionNotificationTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="SubscriptionTopic" type="SubscriptionTopic">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SubscriptionTopic">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this subscription topic when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this subscription topic is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the subscription topic is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this subscription topic by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the subscription topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the subscription topic This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the subscription topic.  For example, &quot;admission&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFrom" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical URL pointing to another FHIR-defined SubscriptionTopic that is adhered to in whole or in part by this SubscriptionTopic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the SubscriptionTopic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this TopSubscriptionTopicic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and optionally time) when the subscription topic was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the subscription topic changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Helps establish the &quot;authority/credibility&quot; of the SubscriptionTopic.  May also allow for contact.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the Topic from the consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A jurisdiction in which the Topic is intended to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explains why this Topic is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the SubscriptionTopic and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the SubscriptionTopic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the SubscriptionTopic content was or is planned to be effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="trigger" type="SubscriptionTopic.Trigger" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A definition of a state change or event that triggers a notification based on the SubscriptionTopic. The criteria may be just a human readable description, or may contain a FHIRPath expression, query-based definition, or event coding. Multiple triggers are considered OR joined (e.g., an update matching ANY of the definitions will trigger a notification).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubscriptionTopic.Trigger">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The human readable description of this trigger for the SubscriptionTopic -  for example, &quot;An Encounter enters the 'in-progress' state&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">URL of the key definition that is relevant to this trigger.  Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., http://hl7.org/fhir/StructureDefinition). For example, &quot;Patient&quot; maps to http://hl7.org/fhir/StructureDefinition/Patient.  For more information, see &lt;a href=&quot;elementdefinition-definitions.html#ElementDefinition.type.code&quot;&gt;ElementDefinition.type.code&lt;/a&gt;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportedInteraction" minOccurs="0" maxOccurs="unbounded" type="InteractionTrigger">
            <xs:annotation>
              <xs:documentation xml:lang="en">The FHIR RESTful interaction which can be used to trigger a notification for the SubscriptionTopic. Multiple values are considered OR joined (e.g., CREATE or UPDATE). If not present, all supported interactions are assumed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="queryCriteria" type="SubscriptionTopic.QueryCriteria" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The FHIR query based rules that the server should use to determine when to trigger a notification for this subscription topic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fhirPathCriteria" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A well-defined event which can be used to trigger notifications from the SubscriptionTopic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="canFilterBy" type="SubscriptionTopic.CanFilterBy" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of properties by which Subscriptions can be filtered. May be defined Search Parameters (e.g., Encounter.patient) or parameters defined within this SubscriptionTopic context (e.g., hub.event).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="notificationShape" type="SubscriptionTopic.NotificationShape" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">List of properties to describe the shape (e.g., resources) included in notifications from this trigger.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubscriptionTopic.QueryCriteria">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="previous" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The FHIR query based rules are applied to the previous resource state (e.g., state before an update).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resultForCreate" minOccurs="0" maxOccurs="1" type="CriteriaNotExistsBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">For `create` interactions, should the `previous` criteria count as an automatic pass or an automatic fail. If not present, the testing behavior during `create` interactions is unspecified (server discretion).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="current" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The FHIR query based rules are applied to the current resource state (e.g., state after an update).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resultForDelete" minOccurs="0" maxOccurs="1" type="CriteriaNotExistsBehavior">
            <xs:annotation>
              <xs:documentation xml:lang="en">For 'delete' interactions, should the 'current' query criteria count as an automatic pass or an automatic fail. If not present, the testing behavior during `delete` interactions is unspecified (server discretion).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requireBoth" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If set to `true`, both the `current` and `previous` query criteria must evaluate `true` to trigger a notification for this topic.  If set to `false` or not present, a notification for this topic will be triggered if either the `current` or `previous` tests evaluate to `true`.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubscriptionTopic.CanFilterBy">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of how this filtering parameter is intended to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">URL of the Resource that is the type used in this filter. This is the &quot;focus&quot; of the topic (or one of them if there are more than one). It will be the same, a generality, or a specificity of the `SubscriptionTopic.trigger.resource` if this is present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="filterParameter" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Either the canonical URL to a search parameter (like &quot;http://hl7.org/fhir/SearchParameter/encounter-patient&quot;) or topic-defined parameter (like &quot;hub.event&quot;) which is a label for the filter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="filterDefinition" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Either the canonical URL to a search parameter (like &quot;http://hl7.org/fhir/SearchParameter/encounter-patient&quot;) or the officially-defined URI for a shared filter concept (like &quot;http://example.org/concepts/shared-common-event&quot;).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparator" minOccurs="0" maxOccurs="unbounded" type="SearchComparator">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comparators allowed for the filter parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="SearchModifierCode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Modifiers allowed for the filter parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubscriptionTopic.NotificationShape">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="resource" minOccurs="1" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">URL of the Data Type, Resource, or definition (e.g., logical model) that is the type used in this shape. This is the 'focus' resource of the topic (or one of them if there are more than one) and the root for this shape definition. It will be the same, a generality, or a specificity of `SubscriptionTopic.trigger.resource` when it is present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="include" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Search-style _include directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them.  Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revInclude" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Search-style _revinclude directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them.  Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedQuery" type="SubscriptionTopic.RelatedQuery" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Queries and codes that could be included with notifications of this shape. Servers MAY include these queries if supported and desired in the workflow.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubscriptionTopic.RelatedQuery">
    <xs:annotation>
      <xs:documentation xml:lang="en">Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="queryType" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Coded value(s) used to describe the type of information that evaluating this query will provide. Subscribers can use the values to ensure the data they request are relevant and necessary for their use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="query" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Query a subscriber can use to retrieve additional information. The exact contents of the query MAY depend on the value of the `queryType`, however this SHOULD be a query suitable for use as an HTTP GET request (either fully-qualified or partial).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="InteractionTriggerEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="create">
        <xs:annotation>
          <xs:documentation xml:lang="en">create</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="update">
        <xs:annotation>
          <xs:documentation xml:lang="en">update</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="delete">
        <xs:annotation>
          <xs:documentation xml:lang="en">delete</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="InteractionTrigger">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="InteractionTriggerEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CriteriaNotExistsBehaviorEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="test-passes">
        <xs:annotation>
          <xs:documentation xml:lang="en">Test passes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="test-fails">
        <xs:annotation>
          <xs:documentation xml:lang="en">Test fails</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CriteriaNotExistsBehavior">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CriteriaNotExistsBehaviorEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Substance" type="Substance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A homogeneous material with a definite composition.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Substance">
    <xs:annotation>
      <xs:documentation xml:lang="en">A homogeneous material with a definite composition.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for the substance, often an identifier associated with the package/container of the substance instance (usually a label affixed directly).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="FHIRSubstanceStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate if the substance is actively used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that classifies the general type of substance.  This is used  for searching, sorting and display purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code (or set of codes) that identify this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the substance - its appearance, handling requirements, and other usage notes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expiry" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount of the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="FHIRSubstanceStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="inactive">
        <xs:annotation>
          <xs:documentation xml:lang="en">Inactive</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FHIRSubstanceStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="FHIRSubstanceStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="SubstanceDefinition" type="SubstanceDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SubstanceDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier by which this substance is known.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A business level edition or revision identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Status of substance within the catalogue e.g. active, retired.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classification" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A high level categorization, e.g. polymer or nucleic acid, or food, chemical, biological, or a lower level such as the general types of polymer (linear or branch chain) or type of impurity (process related or contaminant).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="domain" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The applicable usage of the substance, as an example human or veterinary.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="grade" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quality standard, established benchmark, to which substance complies (e.g. USP/NF, Ph. Eur, JP, BP, Company Standard).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual description of the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual comment about the substance's catalogue or registry record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity that creates, makes, produces or fabricates the substance. This is a set of potential manufacturers but is not necessarily comprehensive.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplier" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An entity that is the source for the substance. It may be different from the manufacturer. Supplier is synonymous to a distributor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="moiety" type="SubstanceDefinition.Moiety" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Moiety, for structural modifications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characterization" type="SubstanceDefinition.Characterization" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">General specifications for this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="SubstanceDefinition.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">General specifications for this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularWeight" type="SubstanceDefinition.MolecularWeight" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The average mass of a molecule of a compound compared to 1/12 the mass of carbon 12 and calculated as the sum of the atomic weights of the constituent atoms.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="structure" type="SubstanceDefinition.Structure" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Structural information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" type="SubstanceDefinition.Code" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Codes associated with the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" type="SubstanceDefinition.Name" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Names applicable to this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" type="SubstanceDefinition.Relationship" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A link between this substance and another, with details of the relationship.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourceMaterial" type="SubstanceDefinition.SourceMaterial" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Material or taxonomic/anatomical source for the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Moiety">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role that the moiety is playing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier by which this moiety substance is known.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual name for this moiety substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="stereochemistry" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Stereochemistry type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="opticalActivity" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optical activity type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularFormula" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Molecular formula for this moiety of this substance, typically using the Hill system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Quantitative value for this moiety.</xs:documentation>
            </xs:annotation>
            <xs:element name="amountQuantity" type="Quantity"/>
            <xs:element name="amountString" type="string"/>
          </xs:choice>
          <xs:element name="measurementType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The measurement type of the quantitative value. In capturing the actual relative amounts of substances or molecular fragments it may be necessary to indicate whether the amount refers to, for example, a mole ratio or weight ratio.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Characterization">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="technique" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method used to elucidate the characterization of the drug substance. Example: HPLC.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="form" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the nature of the chemical entity and explains, for instance, whether this is a base or a salt form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The description or justification in support of the interpretation of the data file.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="file" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The data produced by the analytical instrument or a pictorial representation of that data. Examples: a JCAMP, JDX, or ADX file, or a chromatogram or spectrum analysis.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code expressing the type of property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A value for the property.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.MolecularWeight">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method by which the molecular weight was determined.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of molecular weight such as exact, average (also known as. number average), weight average.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Structure">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="stereochemistry" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Stereochemistry type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="opticalActivity" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optical activity type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularFormula" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression which states the number and type of atoms present in a molecule of a substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularFormulaByMoiety" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularWeight" type="SubstanceDefinition.MolecularWeight" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The molecular weight or weight range (for proteins, polymers or nucleic acids).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="technique" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method used to elucidate the structure of the drug substance. Examples: X-ray, NMR, Peptide mapping, Ligand binding assay.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourceDocument" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The source of information about the structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="representation" type="SubstanceDefinition.Representation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A depiction of the structure of the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Representation">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of structural representation (e.g. full, partial).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="representation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The structural representation as a text string in a standard format.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="format" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The format of the representation e.g. InChI, SMILES, MOLFILE, CDX, SDF, PDB, mmCIF. The logical content type rather than the physical file format of a document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="document" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An attached file with the structural representation e.g. a molecular structure graphic of the substance, a JCAMP or AnIML file.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Code">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Status of the code assignment, for example 'provisional', 'approved'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date at which the code status was changed as part of the terminology maintenance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any comment can be provided in this field, if necessary.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting literature.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Name">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name type, for example 'systematic',  'scientific, 'brand'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the name, for example 'current', 'proposed'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preferred" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this is the preferred name for this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="language" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human language that the name is written in.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="domain" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The jurisdiction where this name applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="synonym" type="SubstanceDefinition.Name" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A synonym of this particular name, by which the substance is also known.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="translation" type="SubstanceDefinition.Name" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A translation for this name into another human language.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="official" type="SubstanceDefinition.Official" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details of the official nature of this name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting literature.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Official">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="authority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Which authority uses this official name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the official name, for example 'draft', 'active', 'retired'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date of the official name change.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Relationship">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A pointer to another substance, as a resource or just a representational code.</xs:documentation>
            </xs:annotation>
            <xs:element name="substanceDefinitionReference" type="Reference"/>
            <xs:element name="substanceDefinitionCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">For example &quot;salt to parent&quot;, &quot;active moiety&quot;, &quot;starting material&quot;, &quot;polymorph&quot;, &quot;impurity of&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isDefining" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.</xs:documentation>
            </xs:annotation>
            <xs:element name="amountQuantity" type="Quantity"/>
            <xs:element name="amountRatio" type="Ratio"/>
            <xs:element name="amountString" type="string"/>
          </xs:choice>
          <xs:element name="ratioHighLimitAmount" minOccurs="0" maxOccurs="1" type="Ratio">
            <xs:annotation>
              <xs:documentation xml:lang="en">For use when the numeric has an uncertain range.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparator" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An operator for the amount, for example &quot;average&quot;, &quot;approximately&quot;, &quot;less than&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting literature.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.SourceMaterial">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A classification that provides the origin of the raw material. Example: cat hair would be an Animal source type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="genus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The genus of an organism, typically referring to the Latin epithet of the genus element of the plant/animal scientific name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="species" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The species of an organism, typically referring to the Latin epithet of the species of the plant/animal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="part" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An anatomical origin of the source material within an organism.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="countryOfOrigin" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The country or countries where the material is harvested.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Task" type="Task">
    <xs:annotation>
      <xs:documentation xml:lang="en">A task to be performed as a part of a workflow and the related informations like inputs, outputs and execution progress. While very simple workflows can be implemented with [[[Request]]] alone, most workflows would require a Task (explicit or contained) as a means to track the execution progress (i.e. inputs, outputs, status). Please refer to [Fulfillment/Execution](request.html#fulfillment).</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Task">
    <xs:annotation>
      <xs:documentation xml:lang="en">A task to be performed as a part of a workflow and the related informations like inputs, outputs and execution progress. While very simple workflows can be implemented with [[[Request]]] alone, most workflows would require a Task (explicit or contained) as a means to track the execution progress (i.e. inputs, outputs, status). Please refer to [Fulfillment/Execution](request.html#fulfillment).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business identifier for this task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a &quot;request&quot; resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the &quot;request&quot; resource the task is seeking to fulfill.  This latter resource is referenced by focus.  For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="partOf" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Task that this particular task is part of.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="TaskStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current status of the task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An explanation as to why this task is held, failed, was refused, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="businessStatus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contains business-specific nuances of the business state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="intent" minOccurs="1" maxOccurs="1" type="TaskIntent">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the &quot;level&quot; of actionability associated with the Task, i.e. this a proposed task, a planned task, an actionable task, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the Task should be addressed with respect to other requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="doNotPerform" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true indicates that the Task is asking for the specified action to *not* occur.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A name or code (or both) briefly describing what the task involves.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free-text description of what is to be performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focus" type="Task.Focus" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="for" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity who benefits from the performance of the service specified in the task (e.g., the patient).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestedPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the start and/or end of the period of time when completion of the task is desired to take place.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="executionPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authoredOn" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time this task was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastModified" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time of last modification to this task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requester" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The creator of the task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestedPerformer" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of participant or specific participant that should perform the task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="owner" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Party responsible for managing task execution.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performer" type="Task.Performer" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity who performed the requested task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Principal physical location where this task is performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description, code, or reference indicating why this task needs to be performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Free-text information about the task during its lifecycle.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relevantHistory" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="restriction" type="Task.Restriction" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="input" type="Task.Input" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information that may be needed in the execution of the task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="output" type="Task.Output" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Outputs produced by the Task.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Task.Focus">
    <xs:annotation>
      <xs:documentation xml:lang="en">A task to be performed as a part of a workflow and the related informations like inputs, outputs and execution progress. While very simple workflows can be implemented with [[[Request]]] alone, most workflows would require a Task (explicit or contained) as a means to track the execution progress (i.e. inputs, outputs, status). Please refer to [Fulfillment/Execution](request.html#fulfillment).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">What task is acting on.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueCanonical" type="canonical"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Task.Performer">
    <xs:annotation>
      <xs:documentation xml:lang="en">A task to be performed as a part of a workflow and the related informations like inputs, outputs and execution progress. While very simple workflows can be implemented with [[[Request]]] alone, most workflows would require a Task (explicit or contained) as a means to track the execution progress (i.e. inputs, outputs, status). Please refer to [Fulfillment/Execution](request.html#fulfillment).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or description of the performer of the task.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actor or entity who performed the task.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Task.Restriction">
    <xs:annotation>
      <xs:documentation xml:lang="en">A task to be performed as a part of a workflow and the related informations like inputs, outputs and execution progress. While very simple workflows can be implemented with [[[Request]]] alone, most workflows would require a Task (explicit or contained) as a means to track the execution progress (i.e. inputs, outputs, status). Please refer to [Fulfillment/Execution](request.html#fulfillment).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="repetitions" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the number of times the requested action should occur.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time-period for which fulfillment is sought. This must fall within the overall time period authorized in the referenced request.  E.g. ServiceRequest.occurance[x].</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recipient" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">For requests directed at multiple potential recipients or targets, this is used to specify the individual or entity from whom fulfillment is being sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Task.Input">
    <xs:annotation>
      <xs:documentation xml:lang="en">A task to be performed as a part of a workflow and the related informations like inputs, outputs and execution progress. While very simple workflows can be implemented with [[[Request]]] alone, most workflows would require a Task (explicit or contained) as a means to track the execution progress (i.e. inputs, outputs, status). Please refer to [Fulfillment/Execution](request.html#fulfillment).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or description to distinguish between inputs.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the input parameter as a basic type.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueCanonical" type="canonical"/>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueId" type="id"/>
            <xs:element name="valueInstant" type="instant"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueInteger64" type="integer64"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueOid" type="oid"/>
            <xs:element name="valuePositiveInt" type="positiveInt"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueUnsignedInt" type="unsignedInt"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueUrl" type="url"/>
            <xs:element name="valueUuid" type="uuid"/>
            <xs:element name="valueAddress" type="Address"/>
            <xs:element name="valueAge" type="Age"/>
            <xs:element name="valueAnnotation" type="Annotation"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueCodeableReference" type="CodeableReference"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueContactPoint" type="ContactPoint"/>
            <xs:element name="valueCount" type="Count"/>
            <xs:element name="valueDistance" type="Distance"/>
            <xs:element name="valueDuration" type="Duration"/>
            <xs:element name="valueHumanName" type="HumanName"/>
            <xs:element name="valueIdentifier" type="Identifier"/>
            <xs:element name="valueMoney" type="Money"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueRatioRange" type="RatioRange"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueSignature" type="Signature"/>
            <xs:element name="valueTiming" type="Timing"/>
            <xs:element name="valueContactDetail" type="ContactDetail"/>
            <xs:element name="valueDataRequirement" type="DataRequirement"/>
            <xs:element name="valueExpression" type="Expression"/>
            <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
            <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
            <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
            <xs:element name="valueUsageContext" type="UsageContext"/>
            <xs:element name="valueAvailability" type="Availability"/>
            <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
            <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
            <xs:element name="valueDosage" type="Dosage"/>
            <xs:element name="valueMeta" type="Meta"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Task.Output">
    <xs:annotation>
      <xs:documentation xml:lang="en">A task to be performed as a part of a workflow and the related informations like inputs, outputs and execution progress. While very simple workflows can be implemented with [[[Request]]] alone, most workflows would require a Task (explicit or contained) as a means to track the execution progress (i.e. inputs, outputs, status). Please refer to [Fulfillment/Execution](request.html#fulfillment).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code or description to distinguish between outputs.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the Output parameter as a basic type.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueCanonical" type="canonical"/>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueId" type="id"/>
            <xs:element name="valueInstant" type="instant"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueInteger64" type="integer64"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueOid" type="oid"/>
            <xs:element name="valuePositiveInt" type="positiveInt"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueUnsignedInt" type="unsignedInt"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueUrl" type="url"/>
            <xs:element name="valueUuid" type="uuid"/>
            <xs:element name="valueAddress" type="Address"/>
            <xs:element name="valueAge" type="Age"/>
            <xs:element name="valueAnnotation" type="Annotation"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueCodeableReference" type="CodeableReference"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueContactPoint" type="ContactPoint"/>
            <xs:element name="valueCount" type="Count"/>
            <xs:element name="valueDistance" type="Distance"/>
            <xs:element name="valueDuration" type="Duration"/>
            <xs:element name="valueHumanName" type="HumanName"/>
            <xs:element name="valueIdentifier" type="Identifier"/>
            <xs:element name="valueMoney" type="Money"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueRatioRange" type="RatioRange"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueSignature" type="Signature"/>
            <xs:element name="valueTiming" type="Timing"/>
            <xs:element name="valueContactDetail" type="ContactDetail"/>
            <xs:element name="valueDataRequirement" type="DataRequirement"/>
            <xs:element name="valueExpression" type="Expression"/>
            <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
            <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
            <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
            <xs:element name="valueUsageContext" type="UsageContext"/>
            <xs:element name="valueAvailability" type="Availability"/>
            <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
            <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
            <xs:element name="valueDosage" type="Dosage"/>
            <xs:element name="valueMeta" type="Meta"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="TaskStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="draft">
        <xs:annotation>
          <xs:documentation xml:lang="en">Draft</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="requested">
        <xs:annotation>
          <xs:documentation xml:lang="en">Requested</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="received">
        <xs:annotation>
          <xs:documentation xml:lang="en">Received</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="accepted">
        <xs:annotation>
          <xs:documentation xml:lang="en">Accepted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="rejected">
        <xs:annotation>
          <xs:documentation xml:lang="en">Rejected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ready">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ready</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="cancelled">
        <xs:annotation>
          <xs:documentation xml:lang="en">Cancelled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="on-hold">
        <xs:annotation>
          <xs:documentation xml:lang="en">On Hold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="failed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Failed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="TaskStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="TaskStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="TaskIntentEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="proposal">
        <xs:annotation>
          <xs:documentation xml:lang="en">Proposal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="plan">
        <xs:annotation>
          <xs:documentation xml:lang="en">Plan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="original-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Original Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="reflex-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reflex Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="filler-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Filler Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="instance-order">
        <xs:annotation>
          <xs:documentation xml:lang="en">Instance Order</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="option">
        <xs:annotation>
          <xs:documentation xml:lang="en">Option</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="TaskIntent">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="TaskIntentEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="TerminologyCapabilities" type="TerminologyCapabilities">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="TerminologyCapabilities">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CanonicalResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this terminology capabilities when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the terminology capabilities.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this terminology capabilities. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the terminology capabilities was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the terminology capabilities.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate terminology capabilities instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this terminology capabilities is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the terminology capabilities.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="kind" minOccurs="1" maxOccurs="1" type="CapabilityStatementKind">
            <xs:annotation>
              <xs:documentation xml:lang="en">The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="software" type="TerminologyCapabilities.Software" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Software that is covered by this terminology capability statement.  It is used when the statement describes the capabilities of a particular software version, independent of an installation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="implementation" type="TerminologyCapabilities.Implementation" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a specific implementation instance that is described by the terminology capability statement - i.e. a particular installation, rather than the capabilities of a software program.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lockedDate" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the server supports lockedDate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="codeSystem" type="TerminologyCapabilities.CodeSystem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies a code system that is supported by the server. If there is a no code system URL, then this declares the general assumptions a client can make about support for any CodeSystem resource.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplements" type="TerminologyCapabilities.Supplements" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about how the system supports CodeSystem supplements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expansion" type="TerminologyCapabilities.Expansion" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the [ValueSet/$expand](valueset-operation-expand.html) operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="codeSearch" minOccurs="0" maxOccurs="1" type="CodeSearchSupport">
            <xs:annotation>
              <xs:documentation xml:lang="en">The degree to which the server supports the code search parameter on ValueSet, if it is supported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="validateCode" type="TerminologyCapabilities.ValidateCode" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="translation" type="TerminologyCapabilities.Translation" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.Software">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name the software is known by.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version identifier for the software covered by this statement.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.Implementation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="description" minOccurs="1" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the specific installation that this terminology capability statement relates to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute base URL for the implementation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.CodeSystem">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Canonical identifier for the code system, represented as a URI. This cannot have a version in the canonical URL.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplement" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Canonical identifier for a supported supplement to this code system. Supplements listed here supplement all versions of the code system. This reference SHOULD be version specific.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" type="TerminologyCapabilities.Version" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">For the code system, a list of versions that are supported by the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="content" minOccurs="1" maxOccurs="1" type="CodeSystemContentMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subsumption" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">True if subsumption is supported for this version of the code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.Version">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">For version-less code systems, there should be a single version with no identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isDefault" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this is the default version for this code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplement" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Canonical identifier for a supported supplement to this code system. Supplements listed here supplement this specific version of the code system (and by implication, not all of the supported versions). This reference SHOULD be version specific.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="compositional" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the compositional grammar defined by the code system is supported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="language" minOccurs="0" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Language Displays supported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="filter" type="TerminologyCapabilities.Filter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Filter Properties supported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Properties supported for $lookup.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.Filter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code of the property supported.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="op" minOccurs="1" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Operations supported for the property.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.Supplements">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="globals" minOccurs="0" maxOccurs="1" type="GlobalLangPackSupportVS">
            <xs:annotation>
              <xs:documentation xml:lang="en">Codes that describes how the server implements global language packs - that is, supplements that contain only designations for a single language that are marked as intended by the extension http://hl7.org/fhir/StructureDefinition/codesystem-globalLangPack for use with all value sets and codesystem without explicit reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.Expansion">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="hierarchical" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the server can return nested value sets.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paging" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the server supports paging on expansion.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="incomplete" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">True if requests for incomplete expansions are allowed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" type="TerminologyCapabilities.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supported expansion parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="textFilter" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Documentation about text searching works.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.Parameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name of the supported expansion parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="documentation" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of support for parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.ValidateCode">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="translations" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether translations are validated.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TerminologyCapabilities.Translation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="needsMap" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the client must identify the map.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="CodeSearchSupportEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="in-compose">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Compose</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in-expansion">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Expansion</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in-compose-or-expansion">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Compose Or Expansion</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CodeSearchSupport">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="CodeSearchSupportEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="GlobalLangPackSupportVSEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="not-supported">
        <xs:annotation>
          <xs:documentation xml:lang="en">Not Supported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="explicit">
        <xs:annotation>
          <xs:documentation xml:lang="en">Language Packs Supported by request</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="implicit">
        <xs:annotation>
          <xs:documentation xml:lang="en">Global Language Packs Supported</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="GlobalLangPackSupportVS">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="GlobalLangPackSupportVSEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ValueSet" type="ValueSet">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ValueSet">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which ValueSet is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and optionally time) when the value set metadata or content logical definition (.compose) was created or revised.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="immutable" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this value set is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the value set and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the ValueSet content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptions related to the content of the ValueSet. Topics provide a high-level categorization as well as keywords for the ValueSet that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the ValueSet.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the ValueSet.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the ValueSet.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the ValueSet for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="compose" type="ValueSet.Compose" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expansion" type="ValueSet.Expansion" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">A value set can also be &quot;expanded&quot;, where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Compose">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="lockedDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="inactive" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="include" type="ValueSet.Include" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Include one or more codes from a code system or other value set(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="exclude" type="ValueSet.Include" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exclude one or more codes from the value set based on code system filters and/or other value sets.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Include">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="system" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI which is the code system from which the selected codes come from.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version of the code system that the codes are selected from, or the special version '*' for all versions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="concept" type="ValueSet.Concept" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies a concept to be included or excluded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="filter" type="ValueSet.Filter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Select concepts by specifying a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified within the include, they SHALL all be true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the intersection of the contents of all of the referenced value sets.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement for the specific code system asserted by the containing ValueSet.compose.include element's system value (if the associated ValueSet.compose.include.version element is not present); or the code system and version combination (if the associated ValueSet.compose.include.version element is present).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Concept">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies a code for the concept to be included or excluded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="designation" type="ValueSet.Designation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Designation">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="language" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The language this designation is defined for.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="0" maxOccurs="1" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that represents types of uses of designations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additionalUse" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional codes that detail how this designation would be used, if there is more than one use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The text value for this designation.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Filter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="property" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that identifies a property or a filter defined in the code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="op" minOccurs="1" maxOccurs="1" type="FilterOperator">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of operation to perform as a part of the filter criteria.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="value" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">ValueSet.compose.include.filter.value is represented as a string, and the string value must be [as described](valueset.html#filter-values).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Expansion">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="next" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">As per paging Search results, the next URLs are opaque to the client, have no dictated structure, and only the server understands them.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="timestamp" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time at which the expansion was produced by the expanding system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="total" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="offset" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="parameter" type="ValueSet.Parameter" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="ValueSet.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property defines an additional slot through which additional information can be provided about a concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contains" type="ValueSet.Contains" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The codes that are contained in the value set expansion.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Parameter">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of the parameter.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueDateTime" type="dateTime"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Contains">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="system" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI which is the code system in which the code for this item in the expansion is defined.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="abstract" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="inactive" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether a concept is inactive (and it may depend on the context of use).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The version of the code system from this code was taken. 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" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The recommended display for this item in the expansion.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="designation" type="ValueSet.Designation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="ValueSet.Property1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property value for this concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contains" type="ValueSet.Contains" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Other codes and entries contained under this entry in the hierarchy.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.Property1">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is a reference to ValueSet.expansion.property.code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of this property.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
          </xs:choice>
          <xs:element name="subProperty" type="ValueSet.SubProperty" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A subproperty value for this concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ValueSet.SubProperty">
    <xs:annotation>
      <xs:documentation xml:lang="en">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is a reference to ValueSet.expansion.property.code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of this subproperty.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="VisionPrescription" type="VisionPrescription">
    <xs:annotation>
      <xs:documentation xml:lang="en">An authorization for the provision of glasses and/or contact lenses to a patient.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="VisionPrescription">
    <xs:annotation>
      <xs:documentation xml:lang="en">An authorization for the provision of glasses and/or contact lenses to a patient.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A unique identifier assigned to this vision prescription.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="basedOn" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Plan/proposal/order/request fulfilled by this prescription.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="groupIdentifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A shared identifier common to all Vision Prescriptions that were authorized more or less simultaneously by a single author, representing the composite or group identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="priority" minOccurs="0" maxOccurs="1" type="RequestPriority">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates how quickly the vision prescription should be addressed with respect to other requests.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="patient" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A resource reference to the person to whom the vision prescription applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dateWritten" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and perhaps time) when the prescription was written.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prescriber" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The healthcare professional responsible for authorizing the prescription.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lensSpecification" type="VisionPrescription.LensSpecification" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="VisionPrescription.LensSpecification">
    <xs:annotation>
      <xs:documentation xml:lang="en">An authorization for the provision of glasses and/or contact lenses to a patient.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="product" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the type of vision correction product which is required for the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="eye" minOccurs="1" maxOccurs="1" type="VisionEyes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The eye for which the lens specification applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sphere" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Lens power measured in dioptres (0.25 units).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cylinder" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Power adjustment for astigmatism measured in dioptres (0.25 units).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="axis" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">Adjustment for astigmatism measured in integer degrees.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="prism" type="VisionPrescription.Prism" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Allows for adjustment on two axis.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="add" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Power adjustment for multifocal lenses measured in dioptres (0.25 units).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="power" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact lens power measured in dioptres (0.25 units).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="backCurve" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Back curvature measured in millimetres.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diameter" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact lens diameter measured in millimetres.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="duration" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The recommended maximum wear period for the lens.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="color" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Special color or pattern.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="brand" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Brand recommendations or restrictions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Notes for special requirements such as coatings and lens materials.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="VisionPrescription.Prism">
    <xs:annotation>
      <xs:documentation xml:lang="en">An authorization for the provision of glasses and/or contact lenses to a patient.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">Amount of prism to compensate for eye alignment in fractional units.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="base" minOccurs="1" maxOccurs="1" type="VisionBase">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relative base, or reference lens edge, for the prism.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="VisionBaseEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="up">
        <xs:annotation>
          <xs:documentation xml:lang="en">Up</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="down">
        <xs:annotation>
          <xs:documentation xml:lang="en">Down</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="in">
        <xs:annotation>
          <xs:documentation xml:lang="en">In</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="out">
        <xs:annotation>
          <xs:documentation xml:lang="en">Out</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="VisionBase">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="VisionBaseEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="VisionEyesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="right">
        <xs:annotation>
          <xs:documentation xml:lang="en">Right Eye</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="left">
        <xs:annotation>
          <xs:documentation xml:lang="en">Left Eye</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="VisionEyes">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="VisionEyesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
