<?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 Sun, Mar 26, 2023 15:21+1100 for FHIR v5.0.0 

  Note: the schemas &amp; schematrons do not contain all of the rules about what makes resources
  valid. Implementers will still need to be familiar with the content of the specification and with
  any profiles that apply to the resources in order to make a conformant implementation.

-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://hl7.org/fhir" elementFormDefault="qualified" version="1.0">
  <xs:include schemaLocation="fhir-base.xsd"/>
  <xs:element name="EvidenceReport" type="EvidenceReport">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="EvidenceReport">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.</xs:documentation>
      <xs:documentation xml:lang="en">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 EvidenceReport 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="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="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 report instances.</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 EvidenceReport 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="relatedIdentifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify things closely related to this EvidenceReport.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Citation Resource or display of suggested citation for this report.</xs:documentation>
            </xs:annotation>
            <xs:element name="citeAsReference" type="Reference"/>
            <xs:element name="citeAsMarkdown" type="markdown"/>
          </xs:choice>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the kind of report, such as grouping of classifiers, search results, or human-compiled expression.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used for footnotes and annotations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Link, description or reference to artifact associated with the report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" type="EvidenceReport.Subject" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies the subject or focus of the report. Answers &quot;What is this report about?&quot;.</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 report.</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="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="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="relatesTo" type="EvidenceReport.RelatesTo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relationships that this composition has with other compositions or documents that already exist.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="section" type="EvidenceReport.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="EvidenceReport.Subject">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="characteristic" type="EvidenceReport.Characteristic" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used for general notes and annotations not coded elsewhere.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceReport.Characteristic">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.</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">Characteristic code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Characteristic value.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueReference" type="Reference"/>
            <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:choice>
          <xs:element name="exclude" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Is used to express not the characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">Timeframe for the characteristic.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceReport.RelatesTo">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="ReportRelationshipType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of relationship that this composition has with anther composition or document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" type="EvidenceReport.Target" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The target composition/document of this relationship.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceReport.Target">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Target of the relationship URL.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Target of the relationship Identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Target of the relationship Display.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resource" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Target of the relationship Resource reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="EvidenceReport.Section">
    <xs:annotation>
      <xs:documentation xml:lang="en">The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.</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="focus" 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 should be consistent with the section title.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focusReference" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A definitional Resource identifying the kind of content contained within the section. This should 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.</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 peferred to contain sufficient detail to make it acceptable for a human to just read the narrative.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mode" minOccurs="0" maxOccurs="1" type="ListMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the entry 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="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="entryClassifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies any type of classification of the evidence report.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entryReference" 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="entryQuantity" minOccurs="0" maxOccurs="unbounded" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Quantity as content.</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="EvidenceReport.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="ReportRelationshipTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="replaces">
        <xs:annotation>
          <xs:documentation xml:lang="en">Replaces</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="amends">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amends</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appends">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appends</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="transforms">
        <xs:annotation>
          <xs:documentation xml:lang="en">Transforms</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="replacedWith">
        <xs:annotation>
          <xs:documentation xml:lang="en">Replaced With</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="amendedWith">
        <xs:annotation>
          <xs:documentation xml:lang="en">Amended With</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="appendedWith">
        <xs:annotation>
          <xs:documentation xml:lang="en">Appended With</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="transformedWith">
        <xs:annotation>
          <xs:documentation xml:lang="en">Transformed With</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ReportRelationshipType">
    <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="ReportRelationshipTypeEnum" 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:schema>
