<!-- 
  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 Wed, Apr 19, 2017 07:44+1000 for FHIR v3.0.1 

  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="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 "System" 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 "System" 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="DomainResource">
        <xs:sequence>
          <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="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="date" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the naming system was published. The date must change if and 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 individual or organization that published 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 terms 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 naming system is intended to be used.</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:element name="replacedBy" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">For naming systems that are retired, indicates the naming system that should be used in their place (if any).</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 "System" 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 "preferred" 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:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NamingSystemIdentifierType-list">
    <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="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">Identifies the style of unique identifier used to identify a namespace.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="NamingSystemIdentifierType-list" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="NamingSystemType-list">
    <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">Identifies the purpose of the naming system.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="NamingSystemType-list" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>