<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (c) 2001, Health Level Seven. All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:
  1. Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
  2. 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.
  3. All advertising materials mentioning features or use of this software
     must display the following acknowledgement:
       This product includes software developed by Health Level Seven.
 
  THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
  -->
<!--
    This schema is generated from a Generic Schema Definition (GSD)
    by gsd2xsl. Better not edit this file.
  -->
<!-- C&M 31/10/2006 changed ED.NPfIT.Text.XHTML mixed attribute from true to false. To prevent mixed content within the flavor.-->
<!-- CM 16/09/04 replaced namespace declarations for MSXML and .Net -->
<!-- CM 28/08/04 Version modified for NPfIT - pattern for OID changed to allow 0s as nodes -->
<!-- namespace declaration added to support MSXML 4.0 and .Net 1.1 tools -->
<xsd:schema elementFormDefault="qualified"
            targetNamespace="urn:hl7-org:v3"
            version="1.0"
            xmlns="urn:hl7-org:v3"
            xmlns:gsd="http://aurora.regenstrief.org/GenericXMLSchema"
            xmlns:hl7="urn:hl7-org:v3"
            xmlns:sch="http://www.ascc.net/xml/schematron"
            xmlns:xhtml="xhtml:NPfIT:PresentationText"
            xmlns:xlink="http://www.w3.org/TR/WD-xlink"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <xsd:include schemaLocation="NarrativeBlock.xsd" />
  <xsd:import namespace="xhtml:NPfIT:PresentationText"
              schemaLocation="xhtmlNPfITPresentationText.xsd" />
  <xsd:include schemaLocation="../voc/voc.xsd" />
  <xsd:include schemaLocation="commonInclude.xsd" />
  <xsd:complexType abstract="true"
                   name="ANY">
    <xsd:annotation>
      <xsd:documentation>Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:attribute name="nullFlavor"
                   type="cs_NullFlavor"
                   use="optional">
      <xsd:annotation>
        <xsd:documentation>An exceptional value expressing missing information and possibly the reason why the information is missing.</xsd:documentation>
        <xsd:appinfo />
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="updateMode"
                   type="cs_UpdateMode"
                   use="optional" />
  </xsd:complexType>
  <xsd:simpleType name="cs_NullFlavor">
    <xsd:restriction base="cs">
      <xsd:enumeration value="NI" />
      <xsd:enumeration value="NA" />
      <xsd:enumeration value="UNK" />
      <xsd:enumeration value="NASK" />
      <xsd:enumeration value="ASKU" />
      <xsd:enumeration value="NAV" />
      <xsd:enumeration value="OTH" />
      <xsd:enumeration value="PINF" />
      <xsd:enumeration value="NINF" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="bl">
    <xsd:annotation>
      <xsd:documentation>The Boolean type stands for the values of two-valued logic. A Boolean value can be either true or false, or, as any other value may be NULL.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:boolean">
      <xsd:pattern value="true|false" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="BL">
    <xsd:annotation>
      <xsd:documentation>The Boolean type stands for the values of two-valued logic. A Boolean value can be either true or false, or, as any other value may be NULL.</xsd:documentation>
      <xsd:appinfo>
        <sch:pattern name="validate BL">
          <sch:rule abstract="true"
                    id="rule-BL">
            <sch:report test="(@nullFlavor or @value) and not(@nullFlavor and @value)">
              <p>Although the use of the value is optional, this constraint (expressed as an XPath predicate), specifies that there must be either an value or the attribute, but not both.</p>
            </sch:report>
          </sch:rule>
        </sch:pattern>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ANY">
        <xsd:attribute name="value"
                       type="bl"
                       use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="BN">
    <xsd:annotation>
      <xsd:documentation>The Boolean type stands for the values of two-valued logic. A Boolean value can be either true or false, or, as any other value may be NULL.</xsd:documentation>
      <xsd:appinfo>
        <sch:pattern name="validate BL">
          <sch:rule abstract="true"
                    id="rule-BL">
            <sch:report test="(@nullFlavor or @value) and not(@nullFlavor and @value)">
              <p>Although the use of the value is optional, this constraint (expressed as an XPath predicate), specifies that there must be either an value or the attribute, but not both.</p>
            </sch:report>
          </sch:rule>
        </sch:pattern>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ANY">
        <xsd:attribute name="value"
                       type="bl"
                       use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="bn">
    <xsd:annotation>
      <xsd:documentation>The BooleanNonNull type is used where a Boolean cannot have a null value. A Boolean value can be either true or false.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="bl" />
  </xsd:simpleType>
  <xsd:simpleType name="bin">
    <xsd:annotation>
      <xsd:documentation>Binary data is a raw block of bits. Binary data is a protected type that should not be declared outside the data type specification.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:base64Binary" />
  </xsd:simpleType>
  <xsd:simpleType name="cs_BinaryDataEncoding">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="B64" />
      <xsd:enumeration value="TXT" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType abstract="true"
                   mixed="true"
                   name="BIN">
    <xsd:annotation>
      <xsd:documentation>Binary data is a raw block of bits. Binary data is a protected type that should not be declared outside the data type specification.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:extension base="ANY">
        <xsd:attribute default="TXT"
                       name="representation"
                       type="cs_BinaryDataEncoding"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies the representation of the binary data that is the content of the binary data complex XML schema data type.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_CompressionAlgorithm">
    <xsd:restriction base="cs">
      <xsd:enumeration value="DF" />
      <xsd:enumeration value="GZ" />
      <xsd:enumeration value="ZL" />
      <xsd:enumeration value="Z" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="cs_IntegrityCheckAlgorithm">
    <xsd:restriction base="cs">
      <xsd:enumeration value="SHA-1" />
      <xsd:enumeration value="SHA-256" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType mixed="true"
                   name="ED">
    <xsd:annotation>
      <xsd:documentation>Data that is primarily intended for human interpretation or for further machine processing is outside the scope of HL7. This includes unformatted or formatted written language, multimedia data, or structured information as defined by a different standard (e.g., XML-signatures.) Instead of the data itself, an ED may contain only a reference (see TEL.) Note that the ST data type is a specialization of the ED data type when the ED media type is text/plain.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:extension base="BIN">
        <xsd:sequence>
          <xsd:element minOccurs="0"
                       name="reference"
                       type="TEL">
            <xsd:annotation>
              <xsd:documentation>A telecommunication address (TEL), such as a URL for HTTP or FTP, which will resolve to precisely the same binary data that could as well have been provided as inline data.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:element minOccurs="0"
                       name="thumbnail"
                       type="thumbnail" />
          <xsd:any maxOccurs="unbounded"
                   minOccurs="0"
                   namespace="##other"
                   processContents="skip" />
        </xsd:sequence>
        <xsd:attribute default="text/plain"
                       name="mediaType"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Identifies the type of the encapsulated data and identifies a method to interpret or render the data.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="language"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>For character based information the language property specifies the human language of the text.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="compression"
                       type="cs_CompressionAlgorithm"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Indicates whether the raw byte data is compressed, and what compression algorithm was used.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="integrityCheck"
                       type="bin"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The integrity check is a short binary value representing a cryptographically strong checksum that is calculated over the binary data. The purpose of this property, when communicated with a reference is for anyone to validate later whether the reference still resolved to the same data that the reference resolved to when the encapsulated data value with reference was created.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute default="SHA-1"
                       name="integrityCheckAlgorithm"
                       type="cs_IntegrityCheckAlgorithm"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies the algorithm used to compute the integrityCheck value.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="false"
                   name="ED.NPfIT.Text.XHTML">
    <xsd:annotation>
      <xsd:documentation>This is falvour ED data type to restrict only XHTML TEXT as content within the ED data. This falvour would be used in POC and GP2GP summart messages.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="false">
      <xsd:restriction base="ED">
        <xsd:group ref="xhtml:htmlRoot" />
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="thumbnail">
    <xsd:annotation>
      <xsd:documentation>A thumbnail is an abbreviated rendition of the full data. A thumbnail requires significantly fewer resources than the full data, while still maintaining some distinctive similarity with the full data. A thumbnail is typically used with by-reference encapsulated data. It allows a user to select data more efficiently before actually downloading through the reference.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:restriction base="ED">
        <xsd:sequence>
          <xsd:element minOccurs="0"
                       name="reference"
                       type="TEL" />
          <xsd:element maxOccurs="0"
                       minOccurs="0"
                       name="thumbnail"
                       type="thumbnail" />
          <xsd:any maxOccurs="unbounded"
                   minOccurs="0"
                   namespace="##other"
                   processContents="skip" />
        </xsd:sequence>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="st">
    <xsd:annotation>
      <xsd:documentation>The character string data type stands for text data, primarily intended for machine processing (e.g., sorting, querying, indexing, etc.) Used for names, symbols, and formal expressions.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType mixed="true"
                   name="ST">
    <xsd:annotation>
      <xsd:documentation>Data that is primarily intended for human interpretation or for further machine processing is outside the scope of HL7. This includes unformatted or formatted written language, multimedia data, or structured information as defined by a different standard (e.g., XML-signatures.) Instead of the data itself, an ED may contain only a reference (see TEL.) Note that the ST data type is a specialization of the ED data type when the ED media type is text/plain.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:restriction base="ED">
        <xsd:sequence>
          <xsd:element minOccurs="0"
                       name="reference"
                       type="TEL">
            <xsd:annotation>
              <xsd:documentation>A telecommunication address (TEL), such as a URL for HTTP or FTP, which will resolve to precisely the same binary data that could as well have been provided as inline data.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:element minOccurs="0"
                       name="thumbnail"
                       type="thumbnail" />
          <xsd:any maxOccurs="unbounded"
                   minOccurs="0"
                   namespace="##other"
                   processContents="skip" />
        </xsd:sequence>
        <xsd:attribute default="text/plain"
                       name="mediaType"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Identifies the type of the encapsulated data and identifies a method to interpret or render the data.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="language"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>For character based information the language property specifies the human language of the text.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="compression"
                       type="cs_CompressionAlgorithm"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Indicates whether the raw byte data is compressed, and what compression algorithm was used.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="integrityCheck"
                       type="bin"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The integrity check is a short binary value representing a cryptographically strong checksum that is calculated over the binary data. The purpose of this property, when communicated with a reference is for anyone to validate later whether the reference still resolved to the same data that the reference resolved to when the encapsulated data value with reference was created.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute default="SHA-1"
                       name="integrityCheckAlgorithm"
                       type="cs_IntegrityCheckAlgorithm"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies the algorithm used to compute the integrityCheck value.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <!--   <xsd:complexType name="ST" mixed="true">
	       <xsd:annotation>
	               <xsd:documentation>
The character string data type stands for text data, primarily
intended for machine processing (e.g., sorting, querying, indexing,
etc.) Used for names, symbols, and formal expressions.
</xsd:documentation>
	               <xsd:appinfo>
	                       <sch:pattern name="validate ST">
	                               <sch:rule abstract="true" id="rule-ST">
	                                       <sch:report test="(@nullFlavor or text()) and not(@nullFlavor and text())">
	                                               <p>Text content is only allowed in non-NULL values.</p>
	                                       </sch:report>
	                               </sch:rule>
	                       </sch:pattern>
	               </xsd:appinfo>
	       </xsd:annotation>
	       <xsd:complexContent mixed="true">
	               <xsd:restriction base="ED">
	                       <xsd:sequence>
	                               <xsd:element name="reference" type="TEL" minOccurs="0" maxOccurs="0"/>
	                               <xsd:element name="thumbnail" type="ED" minOccurs="0" maxOccurs="0"/>
	                       </xsd:sequence>
	                       <xsd:attribute name="representation" type="cs_BinaryDataEncoding" fixed="TXT"/>
	                       <xsd:attribute name="mediaType" type="cs" fixed="text/plain"/>
	                       <xsd:attribute name="language" type="cs" use="optional"/>
	                       <xsd:attribute name="compression" type="cs_CompressionAlgorithm" use="prohibited"/>
	                       <xsd:attribute name="integrityCheck" type="bin" use="prohibited"/>
	                       <xsd:attribute name="integrityCheckAlgorithm" type="cs_IntegrityCheckAlgorithm" use="prohibited"/> 
	               </xsd:restriction>
	       </xsd:complexContent>
	</xsd:complexType> -->
  <xsd:simpleType name="cs">
    <xsd:annotation>
      <xsd:documentation>Coded data in its simplest form, consists of a code and original text. The code system and code system version is fixed by the context in which the CS value occurs. CS is used for coded attributes that have a single HL7-defined value set.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:token">
      <xsd:pattern value="[^\s]*" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="CD">
    <xsd:annotation>
      <xsd:documentation>A concept descriptor represents any kind of concept usually by giving a code defined in a code system. A concept descriptor can contain the original text or phrase that served as the basis of the coding and one or more translations into different coding systems. A concept descriptor can also contain qualifiers to describe, e.g., the concept of a &quot;left foot&quot; as a postcoordinated term built from the primary code &quot;FOOT&quot; and the qualifier &quot;LEFT&quot;. In exceptional cases, the concept descriptor need not contain a code but only the original text describing that concept.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ANY">
        <xsd:sequence>
          <xsd:element minOccurs="0"
                       name="originalText"
                       type="ED">
            <xsd:annotation>
              <xsd:documentation>The text or phrase used as the basis for the coding.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:element maxOccurs="unbounded"
                       minOccurs="0"
                       name="qualifier"
                       type="CR">
            <xsd:annotation>
              <xsd:documentation>Specifies additional codes that increase the specificity of the primary code.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:element maxOccurs="unbounded"
                       minOccurs="0"
                       name="group">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element maxOccurs="unbounded"
                             name="qualifier"
                             type="CR" />
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <xsd:element maxOccurs="unbounded"
                       minOccurs="0"
                       name="translation"
                       type="CD">
            <xsd:annotation>
              <xsd:documentation>A set of other concept descriptors that translate this concept descriptor into other code systems.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="code"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The plain code symbol defined by the code system. For example, &quot;784.0&quot; is the code symbol of the ICD-9 code &quot;784.0&quot; for headache.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystem"
                       type="uid"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies the code system that defines the code.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystemName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A common name of the coding system.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystemVersion"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>If applicable, a version descriptor defined specifically for the given code system.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="displayName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A name or title for the code, under which the sending system shows the code value to its users.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- requires ref='schema-CV'/>
       FIXME: This dependency is cyclic, but it shouldn't hurt.
       Make sure it doesn't hurt. -->
  <xsd:complexType name="CE">
    <xsd:annotation>
      <xsd:documentation>Coded data, consists of a coded value (CV) and, optionally, coded value(s) from other coding systems that identify the same concept. Used when alternative codes may exist.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:restriction base="CD">
        <xsd:sequence>
          <xsd:element maxOccurs="0"
                       minOccurs="0"
                       name="qualifier"
                       type="CR" />
          <xsd:element minOccurs="0"
                       name="originalText"
                       type="ED">
            <xsd:annotation>
              <xsd:documentation>The text or phrase used as the basis for the coding.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:element maxOccurs="unbounded"
                       minOccurs="0"
                       name="translation"
                       type="CD">
            <xsd:annotation>
              <xsd:documentation>A set of other concept descriptors that translate this concept descriptor into other code systems.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="code"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The plain code symbol defined by the code system. For example, &quot;784.0&quot; is the code symbol of the ICD-9 code &quot;784.0&quot; for headache.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystem"
                       type="uid"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies the code system that defines the code.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystemName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A common name of the coding system.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystemVersion"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>If applicable, a version descriptor defined specifically for the given code system.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="displayName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A name or title for the code, under which the sending system shows the code value to its users.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="CV">
    <xsd:annotation>
      <xsd:documentation>Coded data, consists of a code, display name, code system, and original text. Used when a single code value must be sent.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:restriction base="CE">
        <xsd:sequence>
          <xsd:element minOccurs="0"
                       name="originalText"
                       type="ED">
            <xsd:annotation>
              <xsd:documentation>The text or phrase used as the basis for the coding.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:element maxOccurs="0"
                       minOccurs="0"
                       name="translation"
                       type="CD" />
        </xsd:sequence>
        <xsd:attribute name="code"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The plain code symbol defined by the code system. For example, &quot;784.0&quot; is the code symbol of the ICD-9 code &quot;784.0&quot; for headache.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystem"
                       type="uid"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies the code system that defines the code.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystemName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A common name of the coding system.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystemVersion"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>If applicable, a version descriptor defined specifically for the given code system.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="displayName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A name or title for the code, under which the sending system shows the code value to its users.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="CS">
    <xsd:annotation>
      <xsd:documentation>Coded data, consists of a code, display name, code system, and original text. Used when a single code value must be sent.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:restriction base="CV">
        <xsd:sequence />
        <xsd:attribute name="code"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The plain code symbol defined by the code system. For example, &quot;784.0&quot; is the code symbol of the ICD-9 code &quot;784.0&quot; for headache.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystem"
                       type="uid" />
        <xsd:attribute name="codeSystemName"
                       type="st" />
        <xsd:attribute name="codeSystemVersion"
                       type="st" />
        <xsd:attribute name="displayName"
                       type="st"
                       use="prohibited" />
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="CO">
    <xsd:annotation>
      <xsd:documentation>Coded data, where the domain from which the codeset comes is ordered. The Coded Ordinal data type adds semantics related to ordering so that models that make use of such domains may introduce model elements that involve statements about the order of the terms in a domain. The representation is exactly the same as CV, but the type still needs to be defined.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="CV" />
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="CR">
    <xsd:annotation>
      <xsd:documentation>A concept qualifier code with optionally named role. Both qualifier role and value codes must be defined by the coding system. For example, if SNOMED RT defines a concept &quot;leg&quot;, a role relation &quot;has-laterality&quot;, and another concept &quot;left&quot;, the concept role relation allows to add the qualifier &quot;has-laterality: left&quot; to a primary code &quot;leg&quot; to construct the meaning &quot;left leg&quot;.</xsd:documentation>
      <xsd:appinfo>
        <sch:pattern name="validate CR">
          <sch:rule abstract="true"
                    id="rule-CR">
            <sch:report test="(value or @nullFlavor) and not(@nullFlavor and node())">
              <p>A value component is required or else the code role is NULL.</p>
            </sch:report>
          </sch:rule>
        </sch:pattern>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="CD">
        <xsd:sequence>
          <xsd:element minOccurs="0"
                       name="name"
                       type="CV">
            <xsd:annotation>
              <xsd:documentation>Specifies the manner in which the concept role value contributes to the meaning of a code phrase. For example, if SNOMED RT defines a concept &quot;leg&quot;, a role relation &quot;has-laterality&quot;, and another concept &quot;left&quot;, the concept role relation allows to add the qualifier &quot;has-laterality: left&quot; to a primary code &quot;leg&quot; to construct the meaning &quot;left leg&quot;. In this example &quot;has-laterality&quot; is the CR.name.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:element minOccurs="0"
                       name="value"
                       type="CD">
            <xsd:annotation>
              <xsd:documentation>The concept that modifies the primary code of a code phrase through the role relation. For example, if SNOMED RT defines a concept &quot;leg&quot;, a role relation &quot;has-laterality&quot;, and another concept &quot;left&quot;, the concept role relation allows adding the qualifier &quot;has-laterality: left&quot; to a primary code &quot;leg&quot; to construct the meaning &quot;left leg&quot;. In this example &quot;left&quot; is the CR.value.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute default="false"
                       name="inverted"
                       type="bl"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Indicates if the sense of the role name is inverted. This can be used in cases where the underlying code system defines inversion but does not provide reciprocal pairs of role names. By default, inverted is false.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="SC">
    <xsd:annotation>
      <xsd:documentation>A Character String that optionally may have a code attached. The text must always be present if a code is present. The code is often a local code.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:extension base="ST">
        <xsd:attribute name="code"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The plain code symbol defined by the code system. For example, &quot;784.0&quot; is the code symbol of the ICD-9 code &quot;784.0&quot; for headache.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystem"
                       type="uid"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies the code system that defines the code.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystemName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A common name of the coding system.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="codeSystemVersion"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>If applicable, a version descriptor defined specifically for the given code system.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="displayName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A name or title for the code, under which the sending system shows the code value to its users.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="uid">
    <xsd:annotation>
      <xsd:documentation />
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:union memberTypes="oid uuid ruid" />
  </xsd:simpleType>
  <xsd:simpleType name="oid">
    <xsd:annotation>
      <xsd:documentation />
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="([0-9][0-9]*)(\.[0-9][0-9]*)*" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="uuid">
    <xsd:annotation>
      <xsd:documentation />
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}" />
      <!--<xsd:pattern value="[0-9A-Z]{8}-[0-9A-Z]{4}-[0-9A-Z]{4}-[0-9A-Z]{4}-[0-9A-Z]{12}"/>
	                       The above pattern would allow G-Z that are not HEX and do not qualify for UUID def.
	               -->
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ruid">
    <xsd:annotation>
      <xsd:documentation />
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="[A-Za-z][A-Za-z0-9\-]*" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="II">
    <xsd:annotation>
      <xsd:documentation>An identifier that uniquely identifies a thing or object. Examples are object identifier for HL7 RIM objects, medical record number, order id, service catalog item id, Vehicle Identification Number (VIN), etc. Instance identifiers are defined based on ISO object identifiers.</xsd:documentation>
      <xsd:appinfo>
        <sch:pattern name="validate II">
          <sch:rule abstract="true"
                    id="rule-II">
            <sch:report test="(@root or @nullFlavor) and not(@root and @nullFlavor)">A root component is required or else the II value is NULL.</sch:report>
          </sch:rule>
        </sch:pattern>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ANY">
        <xsd:attribute name="root"
                       type="uid"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A unique identifier that guarantees the global uniqueness of the instance identifier. The root alone may be the entire instance identifier.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="extension"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A character string as a unique identifier within the scope of the identifier root.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="assigningAuthorityName"
                       type="st"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A human readable name or mnemonic for the assigning authority. This name may be provided solely for the convenience of unaided humans interpreting an II value and can have no computational meaning. Note: no automated processing must depend on the assigning authority name to be present in any form.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="displayable"
                       type="bl"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies if the identifier is intended for human display and data entry (displayable = true) as opposed to pure machine interoperation (displayable = false).</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="url">
    <xsd:annotation>
      <xsd:documentation>A telecommunications address specified according to Internet standard RFC 1738 [http://www.ietf.org/rfc/rfc1738.txt]. The URL specifies the protocol and the contact point defined by that protocol for the resource. Notable uses of the telecommunication address data type are for telephone and telefax numbers, e-mail addresses, Hypertext references, FTP references, etc.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:anyURI">
      <xsd:pattern value="[\-a-z0-9+]+:.*" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="URL">
    <xsd:annotation>
      <xsd:documentation>A telecommunications address specified according to Internet standard RFC 1738 [http://www.ietf.org/rfc/rfc1738.txt]. The URL specifies the protocol and the contact point defined by that protocol for the resource. Notable uses of the telecommunication address data type are for telephone and telefax numbers, e-mail addresses, Hypertext references, FTP references, etc.</xsd:documentation>
      <xsd:appinfo>
        <sch:pattern name="validate URL">
          <sch:rule abstract="true"
                    id="rule-URL">
            <sch:report test="(@nullFlavor or @value) and not(@nullFlavor and @value)">
              <p>Although the use of the value is optional, the constraint (expressed as an XPath predicate), specifies that there must be either an value or the attribute, but not both.</p>
            </sch:report>
          </sch:rule>
        </sch:pattern>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ANY">
        <xsd:attribute name="value"
                       type="url"
                       use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="ts">
    <xsd:annotation>
      <xsd:documentation>A quantity specifying a point on the axis of natural time. A point in time is most often represented as a calendar expression.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]{1,8}|([0-9]{9,14}|[0-9]{14,14}\.[0-9]+)([+\-][0-9]{1,4})?" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="TS">
    <xsd:annotation>
      <xsd:documentation>A quantity specifying a point on the axis of natural time. A point in time is most often represented as a calendar expression.</xsd:documentation>
      <xsd:appinfo>
        <diff>PQ</diff>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="QTY">
        <xsd:attribute name="value"
                       type="ts"
                       use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_TelecommunicationAddressUse">
    <xsd:restriction base="cs">
      <xsd:enumeration value="H" />
      <xsd:enumeration value="HP" />
      <xsd:enumeration value="HV" />
      <xsd:enumeration value="WP" />
      <xsd:enumeration value="AS" />
      <xsd:enumeration value="EC" />
      <xsd:enumeration value="PG" />
      <xsd:enumeration value="MC" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="TEL">
    <xsd:annotation>
      <xsd:documentation>A telephone number (voice or fax), e-mail address, or other locator for a resource (information or service) mediated by telecommunication equipment. The address is specified as a Universal Resource Locator (URL) qualified by time specification and use codes that help in deciding which address to use for a given time and purpose.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="URL">
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded"
                       minOccurs="0"
                       name="useablePeriod"
                       type="IVL_TS">
            <xsd:annotation>
              <xsd:documentation>Specifies the periods of time during which the telecommunication address can be used. For a telephone number, this can indicate the time of day in which the party can be reached on that telephone. For a web address, it may specify a time range in which the web content is promised to be available under the given address.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
            <!-- FIXME: one would expect the name "GTS" here but it's not
          SXCM does ALL the right things, it's just not the right NAME. -->
          </xsd:element>
          <xsd:element minOccurs="0"
                       name="id"
                       type="II" />
        </xsd:sequence>
        <xsd:attribute name="use"
                       type="set_cs_TelecommunicationAddressUse"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>One or more codes advising a system or user which telecommunication address in a set of like addresses to select for a given telecommunication need.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_AddressPartType">
    <xsd:restriction base="cs">
      <xsd:enumeration value="DEL" />
      <xsd:enumeration value="CNT" />
      <xsd:enumeration value="STA" />
      <xsd:enumeration value="CPA" />
      <xsd:enumeration value="CTY" />
      <xsd:enumeration value="ZIP" />
      <xsd:enumeration value="SAL" />
      <xsd:enumeration value="BNR" />
      <xsd:enumeration value="BNN" />
      <xsd:enumeration value="DIR" />
      <xsd:enumeration value="STR" />
      <xsd:enumeration value="STB" />
      <xsd:enumeration value="STTYP" />
      <xsd:enumeration value="ADL" />
      <xsd:enumeration value="UNID" />
      <xsd:enumeration value="UNIT" />
      <xsd:enumeration value="CAR" />
      <xsd:enumeration value="CEN" />
      <xsd:enumeration value="DESC" />
      <xsd:enumeration value="ADDRK" />
      <xsd:enumeration value="PRE" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType mixed="true"
                   name="ADXP">
    <xsd:annotation>
      <xsd:documentation>A character string that may have a type-tag signifying its role in the address. Typical parts that exist in about every address are street, house number, or post box, postal code, city, country but other roles may be defined regionally, nationally, or on an enterprise level (e.g. in military addresses). Addresses are usually broken up into lines, which are indicated by special line-breaking delimiter elements (e.g., DEL).</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:extension base="ST">
        <xsd:attribute name="partType"
                       type="cs_AddressPartType">
          <xsd:annotation>
            <xsd:documentation>Specifies whether an address part names the street, city, country, postal code, post box, etc. If the type is NULL the address part is unclassified and would simply appear on an address label as is.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_PostalAddressUse">
    <xsd:restriction base="cs">
      <xsd:enumeration value="PHYS" />
      <xsd:enumeration value="PST" />
      <xsd:enumeration value="TMP" />
      <xsd:enumeration value="BAD" />
      <xsd:enumeration value="H" />
      <xsd:enumeration value="HP" />
      <xsd:enumeration value="HV" />
      <xsd:enumeration value="WP" />
      <xsd:enumeration value="ABC" />
      <xsd:enumeration value="SYL" />
      <xsd:enumeration value="IDE" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType mixed="true"
                   name="AD">
    <xsd:annotation>
      <xsd:documentation>Mailing and home or office addresses. A sequence of address parts, such as street or post office Box, city, postal code, country, etc.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:extension base="ANY">
        <xsd:sequence>
          <xsd:choice maxOccurs="unbounded"
                      minOccurs="0">
            <xsd:element name="delimiter">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="DEL"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="country">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="CNT"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="state">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="STA"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="county">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="CPA"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="city">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="CTY"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="postalCode">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="ZIP"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="precinct">
              <xsd:complexType mixed="true">
                <xsd:complexContent>
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="PRE"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="streetAddressLine">
              <xsd:complexType mixed="true">
                <xsd:complexContent>
                  <xsd:restriction base="ADXP">
                    <xsd:attribute name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="houseNumber">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="BNR"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="houseNumberNumeric">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="BNN"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="direction">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="DIR"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="streetName">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="STR"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="streetNameBase">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="STB"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="streetNameType">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="STTYP"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="additionalLocator">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="ADL"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="unitID">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="UNID"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="unitType">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="UNIT"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="carrier">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="CAR"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="censusTract">
              <xsd:complexType mixed="true">
                <xsd:complexContent mixed="true">
                  <xsd:restriction base="ADXP">
                    <xsd:attribute fixed="CEN"
                                   name="partType"
                                   type="cs_AddressPartType" />
                  </xsd:restriction>
                </xsd:complexContent>
              </xsd:complexType>
              <!-- VOTE: negativ minor: this will not be interoperable because
  there are many census tract definitions. Needs to be coded. This
  should be a location specification (Place class). -->
            </xsd:element>
            <xsd:element name="addressKey">
              <xsd:complexType mixed="true">
                <xsd:attribute fixed="ADDRK"
                               name="partType"
                               type="cs_AddressPartType" />
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="desc">
              <xsd:complexType mixed="true">
                <xsd:attribute fixed="DESC"
                               name="partType"
                               type="cs_AddressPartType" />
              </xsd:complexType>
            </xsd:element>
            <!-- This was supposed to be the generic part. The formally
               correct schema way of doing that would involve defining
               all the special part elements as substitution group
               members for part. But that entails global elements
               is unsafe scoping. So, we don't get into that here.
               
               xsd:element name='part' type='ADXP'/ -->
            <!--
                jaxb implementors note: the jaxb code generator (v1.0.?) will fail to
                append "Type" to streetNameType so that there will be duplicate
                definitions in the java source for streetNameType.  You will have
                to fix this manually.
              -->
          </xsd:choice>
          <xsd:element maxOccurs="unbounded"
                       minOccurs="0"
                       name="useablePeriod"
                       type="IVL_TS">
            <xsd:annotation>
              <xsd:documentation>A General Timing Specification (GTS) specifying the periods of time during which the address can be used. This is used to specify different addresses for different times of the year or to refer to historical addresses.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
            <!-- FIXME: one would expect the name "GTS" here but it's not
          SXCM does ALL the right things, it's just not the right NAME. -->
          </xsd:element>
          <xsd:element minOccurs="0"
                       name="id"
                       type="II" />
        </xsd:sequence>
        <xsd:attribute name="use"
                       type="set_cs_PostalAddressUse"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A set of codes advising a system or user which address in a set of like addresses to select for a given purpose.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="isNotOrdered"
                       type="bl"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A boolean value specifying whether the order of the address parts is known or not. While the address parts are always a Sequence, the order in which they are presented may or may not be known. Where this matters, the isNotOrdered property can be used to convey this information.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_EntityNamePartQualifier">
    <xsd:restriction base="cs">
      <xsd:enumeration value="BR" />
      <xsd:enumeration value="SP" />
      <xsd:enumeration value="VV" />
      <xsd:enumeration value="AC" />
      <xsd:enumeration value="PR" />
      <xsd:enumeration value="NB" />
      <xsd:enumeration value="LS" />
      <xsd:enumeration value="CL" />
      <xsd:enumeration value="IN" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType mixed="true"
                   name="ENXP">
    <xsd:annotation>
      <xsd:documentation>A character string token representing a part of a name. May have a type code signifying the role of the part in the whole entity name, and a qualifier code for more detail about the name part type. Typical name parts for person names are given names, and family names, titles, etc.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:extension base="ST">
        <xsd:attribute name="partType"
                       type="cs_EntityNamePartType">
          <xsd:annotation>
            <xsd:documentation>Indicates whether the name part is a given name, family name, prefix, suffix, etc.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="qualifier"
                       type="set_cs_EntityNamePartQualifier"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The qualifier is a set of codes each of which specifies a certain subcategory of the name part in addition to the main name part type. For example, a given name may be flagged as a nickname, a family name may be a pseudonym or a name of public records.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_EntityNamePartType">
    <xsd:restriction base="cs">
      <xsd:enumeration value="FAM" />
      <xsd:enumeration value="GIV" />
      <xsd:enumeration value="PFX" />
      <xsd:enumeration value="SFX" />
      <xsd:enumeration value="DEL" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType mixed="true"
                   name="en.delimiter">
    <xsd:complexContent mixed="true">
      <xsd:restriction base="ENXP">
        <xsd:attribute fixed="DEL"
                       name="partType"
                       type="cs_EntityNamePartType" />
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="en.family">
    <xsd:complexContent mixed="true">
      <xsd:restriction base="ENXP">
        <xsd:attribute fixed="FAM"
                       name="partType"
                       type="cs_EntityNamePartType" />
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="en.given">
    <xsd:complexContent mixed="true">
      <xsd:restriction base="ENXP">
        <xsd:attribute fixed="GIV"
                       name="partType"
                       type="cs_EntityNamePartType" />
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="en.prefix">
    <xsd:complexContent mixed="true">
      <xsd:restriction base="ENXP">
        <xsd:attribute fixed="PFX"
                       name="partType"
                       type="cs_EntityNamePartType" />
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="en.suffix">
    <xsd:complexContent mixed="true">
      <xsd:restriction base="ENXP">
        <xsd:attribute fixed="SFX"
                       name="partType"
                       type="cs_EntityNamePartType" />
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_EntityNameUse">
    <xsd:restriction base="cs">
      <xsd:enumeration value="L" />
      <xsd:enumeration value="A" />
      <xsd:enumeration value="I" />
      <xsd:enumeration value="R" />
      <xsd:enumeration value="ABC" />
      <xsd:enumeration value="SYL" />
      <xsd:enumeration value="IDE" />
      <xsd:enumeration value="PREVIOUS-BIRTH" />
      <xsd:enumeration value="PREVIOUS-MAIDEN" />
      <xsd:enumeration value="PREVIOUS-BACHELOR" />
      <xsd:enumeration value="PREVIOUS" />
      <xsd:enumeration value="PREFERRED" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType mixed="true"
                   name="EN">
    <xsd:annotation>
      <xsd:documentation>A name for a person, organization, place or thing. A sequence of name parts, such as given name or family name, prefix, suffix, etc. Examples for entity name values are &quot;Jim Bob Walton, Jr.&quot;, &quot;Health Level Seven, Inc.&quot;, &quot;Lake Tahoe&quot;, etc. An entity name may be as simple as a character string or may consist of several entity name parts, such as, &quot;Jim&quot;, &quot;Bob&quot;, &quot;Walton&quot;, and &quot;Jr.&quot;, &quot;Health Level Seven&quot; and &quot;Inc.&quot;, &quot;Lake&quot; and &quot;Tahoe&quot;.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:extension base="ANY">
        <xsd:sequence>
          <xsd:choice maxOccurs="unbounded"
                      minOccurs="0">
            <xsd:element name="delimiter"
                         type="en.delimiter" />
            <xsd:element name="family"
                         type="en.family" />
            <xsd:element name="given"
                         type="en.given" />
            <xsd:element name="prefix"
                         type="en.prefix" />
            <xsd:element name="suffix"
                         type="en.suffix" />
          </xsd:choice>
          <xsd:element minOccurs="0"
                       name="validTime"
                       type="IVL_TS">
            <xsd:annotation>
              <xsd:documentation>An interval of time specifying the time during which the name is or was used for the entity. This accomodates the fact that people change names for people, places and things.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:element minOccurs="0"
                       name="id"
                       type="II" />
        </xsd:sequence>
        <xsd:attribute name="use"
                       type="set_cs_EntityNameUse"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A set of codes advising a system or user which name in a set of like names to select for a given purpose. A name without specific use code might be a default name useful for any purpose, but a name with a specific use code would be preferred for that respective purpose.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="PN">
    <xsd:annotation>
      <xsd:documentation>A name for a person. A sequence of name parts, such as given name or family name, prefix, suffix, etc. PN differs from EN because the qualifier type cannot include LS (Legal Status).</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:extension base="EN" />
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="ON">
    <xsd:annotation>
      <xsd:documentation>A name for an organization. A sequence of name parts.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:restriction base="EN">
        <xsd:sequence>
          <xsd:choice maxOccurs="unbounded"
                      minOccurs="0">
            <xsd:element name="delimiter"
                         type="en.delimiter" />
            <xsd:element name="prefix"
                         type="en.prefix" />
            <xsd:element name="suffix"
                         type="en.suffix" />
          </xsd:choice>
          <xsd:element minOccurs="0"
                       name="validTime"
                       type="IVL_TS">
            <xsd:annotation>
              <xsd:documentation>An interval of time specifying the time during which the name is or was used for the entity. This accomodates the fact that people change names for people, places and things.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="use"
                       type="set_cs_EntityNameUse"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A set of codes advising a system or user which name in a set of like names to select for a given purpose. A name without specific use code might be a default name useful for any purpose, but a name with a specific use code would be preferred for that respective purpose.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="TN">
    <xsd:annotation>
      <xsd:documentation>A restriction of entity name that is effectively a simple string used for a simple name for things and places.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent mixed="true">
      <xsd:restriction base="EN">
        <xsd:sequence>
          <xsd:element minOccurs="0"
                       name="validTime"
                       type="IVL_TS">
            <xsd:annotation>
              <xsd:documentation>An interval of time specifying the time during which the name is or was used for the entity. This accomodates the fact that people change names for people, places and things.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <!--    see note in schema-ED's part element, that's commented
               out for now.

              xsd:choice minOccurs='0' maxOccurs='0'>
                <xsd:element name='part' type='ENXP'/>
              </xsd:choice -->
        </xsd:sequence>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType abstract="true"
                   name="QTY">
    <xsd:annotation>
      <xsd:documentation>The quantity data type is an abstract generalization for all data types (1) whose value set has an order relation (less-or-equal) and (2) where difference is defined in all of the data type&#39;s totally ordered value subsets. The quantity type abstraction is needed in defining certain other types, such as the interval and the probability distribution.</xsd:documentation>
      <xsd:appinfo>
        <diff>QTY</diff>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ANY" />
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="int">
    <xsd:annotation>
      <xsd:documentation>Integer numbers (-1,0,1,2, 100, 3398129, etc.) are precise numbers that are results of counting and enumerating. Integer numbers are discrete, the set of integers is infinite but countable. No arbitrary limit is imposed on the range of integer numbers. Two NULL flavors are defined for the positive and negative infinity.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:restriction base="xsd:integer" />
  </xsd:simpleType>
  <xsd:complexType name="INT">
    <xsd:annotation>
      <xsd:documentation>Integer numbers (-1,0,1,2, 100, 3398129, etc.) are precise numbers that are results of counting and enumerating. Integer numbers are discrete, the set of integers is infinite but countable. No arbitrary limit is imposed on the range of integer numbers. Two NULL flavors are defined for the positive and negative infinity.</xsd:documentation>
      <xsd:appinfo>
        <diff>INT</diff>
        <sch:pattern name="validate INT">
          <sch:rule abstract="true"
                    id="rule-INT">
            <sch:report test="(@value or @nullFlavor) and not(@value and @nullFlavor)">
              <p>Although the use of the value is optional, the constraint (expressed as an XPath predicate), specifies that there must be either an value or the , but not both.</p>
            </sch:report>
          </sch:rule>
        </sch:pattern>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="QTY">
        <xsd:attribute name="value"
                       type="int"
                       use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="real">
    <xsd:annotation>
      <xsd:documentation>Fractional numbers. Typically used whenever quantities are measured, estimated, or computed from other real numbers. The typical representation is decimal, where the number of significant decimal digits is known as the precision. Real numbers are needed beyond integers whenever quantities of the real world are measured, estimated, or computed from other real numbers. The term &quot;Real number&quot; in this specification is used to mean that fractional values are covered without necessarily implying the full set of the mathematical real numbers.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:union memberTypes="xsd:decimal xsd:double" />
  </xsd:simpleType>
  <xsd:complexType name="REAL">
    <xsd:annotation>
      <xsd:documentation>Fractional numbers. Typically used whenever quantities are measured, estimated, or computed from other real numbers. The typical representation is decimal, where the number of significant decimal digits is known as the precision. Real numbers are needed beyond integers whenever quantities of the real world are measured, estimated, or computed from other real numbers. The term &quot;Real number&quot; in this specification is used to mean that fractional values are covered without necessarily implying the full set of the mathematical real numbers.</xsd:documentation>
      <xsd:appinfo>
        <diff>REAL</diff>
        <sch:pattern name="validate REAL">
          <sch:rule abstract="true"
                    id="rule-REAL">
            <sch:report test="(@nullFlavor or @value) and not(@nullFlavor and @value)">
              <p>Although the use of the value is optional, the constraint (expressed as an XPath predicate), specifies that there must be either a value or the , but not both.</p>
            </sch:report>
          </sch:rule>
        </sch:pattern>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="QTY">
        <xsd:attribute name="value"
                       type="real"
                       use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="PQR">
    <xsd:annotation>
      <xsd:documentation>A representation of a physical quantity in a unit from any code system. Used to show alternative representation for a physical quantity.</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="CV">
        <xsd:attribute name="value"
                       type="real"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The magnitude of the measurement value in terms of the unit specified in the code.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="PQ">
    <xsd:annotation>
      <xsd:documentation>A dimensioned quantity expressing the result of a measurement act.</xsd:documentation>
      <xsd:appinfo>
        <diff>PQ</diff>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="QTY">
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded"
                       minOccurs="0"
                       name="translation"
                       type="PQR">
            <xsd:annotation>
              <xsd:documentation>An alternative representation of the same physical quantity expressed in a different unit, of a different unit code system and possibly with a different value.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="value"
                       type="real"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The magnitude of the quantity measured in terms of the unit.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute default="1"
                       name="unit"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The unit of measure specified in the Unified Code for Units of Measure (UCUM) [http://aurora.rg.iupui.edu/UCUM].</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="MO">
    <xsd:annotation>
      <xsd:documentation>A monetary amount is a quantity expressing the amount of money in some currency. Currencies are the units in which monetary amounts are denominated in different economic regions. While the monetary amount is a single kind of quantity (money) the exchange rates between the different units are variable. This is the principle difference between physical quantity and monetary amounts, and the reason why currency units are not physical units.</xsd:documentation>
      <xsd:appinfo>
        <diff>MO</diff>
        <sch:pattern name="validate MO">
          <sch:rule abstract="true"
                    id="rule-MO">
            <sch:report test="not(@nullFlavor and (@value or @currency))" />
          </sch:rule>
        </sch:pattern>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="QTY">
        <xsd:attribute name="value"
                       type="real"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The magnitude of the monetary amount in terms of the currency unit.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="currency"
                       type="cs"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>The currency unit as defined in ISO 4217.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="RTO">
    <xsd:annotation>
      <xsd:documentation>A quantity constructed as the quotient of a numerator quantity divided by a denominator quantity. Common factors in the numerator and denominator are not automatically cancelled out. The data type supports titers (e.g., &quot;1:128&quot;) and other quantities produced by laboratories that truly represent ratios. Ratios are not simply &quot;structured numerics&quot;, particularly blood pressure measurements (e.g. &quot;120/60&quot;) are not ratios. In many cases the REAL should be used instead of the .</xsd:documentation>
      <xsd:appinfo />
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="RTO_QTY_QTY" />
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_SetOperator">
    <xsd:restriction base="cs">
      <xsd:enumeration value="I" />
      <xsd:enumeration value="E" />
      <xsd:enumeration value="A" />
      <xsd:enumeration value="H" />
      <xsd:enumeration value="P" />
    </xsd:restriction>
  </xsd:simpleType>
  <!--            <xsd:annotation>
              <xsd:appinfo>
                <sch:pattern name="validate IVL_TS">
                  <sch:rule abstract="true" id="rule-IVL_TS">
                    <sch:report test="count(child::low|child::high|child::mid|child::width)&gt;2">
                      <p>No more than two of the four components (low, high, mid, width) may be popluated at one time</p>
                    </sch:report>
                  </sch:rule>
                </sch:pattern>
              </xsd:appinfo>
            </xsd:annotation> -->
  <xsd:simpleType name="cs_CalendarCycle">
    <xsd:restriction base="cs">
      <xsd:enumeration value="CY" />
      <xsd:enumeration value="MY" />
      <xsd:enumeration value="CM" />
      <xsd:enumeration value="CW" />
      <xsd:enumeration value="WY" />
      <xsd:enumeration value="DM" />
      <xsd:enumeration value="CD" />
      <xsd:enumeration value="DY" />
      <xsd:enumeration value="DW" />
      <xsd:enumeration value="HD" />
      <xsd:enumeration value="CH" />
      <xsd:enumeration value="NH" />
      <xsd:enumeration value="CN" />
      <xsd:enumeration value="SN" />
      <xsd:enumeration value="CS" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="cs_TimingEvent">
    <xsd:restriction base="cs">
      <xsd:enumeration value="AC" />
      <xsd:enumeration value="ACD" />
      <xsd:enumeration value="ACM" />
      <xsd:enumeration value="ACV" />
      <xsd:enumeration value="HS" />
      <xsd:enumeration value="IC" />
      <xsd:enumeration value="ICD" />
      <xsd:enumeration value="ICM" />
      <xsd:enumeration value="ICV" />
      <xsd:enumeration value="PC" />
      <xsd:enumeration value="PCD" />
      <xsd:enumeration value="PCM" />
      <xsd:enumeration value="PCV" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="cs_ProbabilityDistributionType">
    <xsd:restriction base="cs">
      <xsd:enumeration value="U" />
      <xsd:enumeration value="N" />
      <xsd:enumeration value="LN" />
      <xsd:enumeration value="G" />
      <xsd:enumeration value="E" />
      <xsd:enumeration value="X2" />
      <xsd:enumeration value="T" />
      <xsd:enumeration value="F" />
      <xsd:enumeration value="B" />
    </xsd:restriction>
  </xsd:simpleType>
  <!--
      Instantiated templates
    -->
  <xsd:complexType name="SXCM_TS">
    <xsd:complexContent>
      <xsd:extension base="TS">
        <xsd:attribute default="I"
                       name="operator"
                       type="cs_SetOperator"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>A code specifying whether the set component is included (union) or excluded (set-difference) from the set, or other set operations with the current set component and the set as constructed from the representation stream up to the current point.</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="set_cs_TelecommunicationAddressUse">
    <xsd:list itemType="cs_TelecommunicationAddressUse" />
  </xsd:simpleType>
  <xsd:simpleType name="set_cs_PostalAddressUse">
    <xsd:list itemType="cs_PostalAddressUse" />
  </xsd:simpleType>
  <xsd:simpleType name="set_cs_EntityNamePartQualifier">
    <xsd:list itemType="cs_EntityNamePartQualifier" />
  </xsd:simpleType>
  <xsd:complexType name="IVL_TS">
    <xsd:complexContent>
      <xsd:extension base="SXCM_TS">
        <xsd:choice minOccurs="0">
          <xsd:sequence>
            <xsd:element name="low"
                         type="IVXB_TS">
              <xsd:annotation>
                <xsd:documentation>The low limit of the interval.</xsd:documentation>
                <xsd:appinfo />
              </xsd:annotation>
            </xsd:element>
            <xsd:choice minOccurs="0">
              <xsd:element minOccurs="0"
                           name="width"
                           type="PQ">
                <xsd:annotation>
                  <xsd:documentation>The difference between high and low boundary. The purpose of distinguishing a width property is to handle all cases of incomplete information symmetrically. In any interval representation only two of the three properties high, low, and width need to be stated and the third can be derived.</xsd:documentation>
                  <xsd:appinfo />
                </xsd:annotation>
              </xsd:element>
              <xsd:element minOccurs="0"
                           name="high"
                           type="IVXB_TS">
                <xsd:annotation>
                  <xsd:documentation>The high limit of the interval.</xsd:documentation>
                  <xsd:appinfo />
                </xsd:annotation>
              </xsd:element>
            </xsd:choice>
          </xsd:sequence>
          <xsd:element name="high"
                       type="IVXB_TS">
            <xsd:annotation>
              <xsd:documentation />
              <xsd:appinfo />
            </xsd:annotation>
          </xsd:element>
          <xsd:sequence>
            <xsd:element name="width"
                         type="PQ">
              <xsd:annotation>
                <xsd:documentation>The difference between high and low boundary. The purpose of distinguishing a width property is to handle all cases of incomplete information symmetrically. In any interval representation only two of the three properties high, low, and width need to be stated and the third can be derived.</xsd:documentation>
                <xsd:appinfo />
              </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0"
                         name="high"
                         type="IVXB_TS">
              <xsd:annotation>
                <xsd:documentation>The high limit of the interval.</xsd:documentation>
                <xsd:appinfo />
              </xsd:annotation>
            </xsd:element>
          </xsd:sequence>
          <xsd:sequence>
            <xsd:element name="center"
                         type="TS">
              <xsd:annotation>
                <xsd:documentation>The arithmetic mean of the interval (low plus high divided by 2). The purpose of distinguishing the center as a semantic property is for conversions of intervals from and to point values.</xsd:documentation>
                <xsd:appinfo />
              </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0"
                         name="width"
                         type="PQ">
              <xsd:annotation>
                <xsd:documentation>The difference between high and low boundary. The purpose of distinguishing a width property is to handle all cases of incomplete information symmetrically. In any interval representation only two of the three properties high, low, and width need to be stated and the third can be derived.</xsd:documentation>
                <xsd:appinfo />
              </xsd:annotation>
            </xsd:element>
          </xsd:sequence>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="PQ_inc">
    <xsd:sequence>
      <xsd:element maxOccurs="unbounded"
                   minOccurs="0"
                   name="translation"
                   type="PQR" />
    </xsd:sequence>
    <xsd:attribute name="value"
                   type="real"
                   use="optional" />
    <xsd:attribute default="1"
                   name="unit"
                   type="cs"
                   use="optional" />
    <xsd:attribute name="originalValue"
                   use="optional" />
    <xsd:attribute name="originalUnit"
                   use="optional" />
    <xsd:attribute name="nullFlavor"
                   type="cs_NullFlavor"
                   use="optional" />
    <xsd:attribute default="true"
                   name="inclusive"
                   type="bl"
                   use="optional" />
    <xsd:attribute name="updateMode"
                   type="cs_UpdateMode"
                   use="optional" />
  </xsd:complexType>
  <xsd:complexType name="IVL_PQ">
    <xsd:complexContent>
      <xsd:extension base="ANY">
        <xsd:choice minOccurs="0">
          <xsd:sequence>
            <xsd:element name="low"
                         type="PQ_inc" />
            <xsd:choice minOccurs="0">
              <xsd:element name="width"
                           type="PQ" />
              <xsd:element name="high"
                           type="PQ_inc" />
            </xsd:choice>
          </xsd:sequence>
          <xsd:element name="high"
                       type="PQ_inc" />
          <xsd:sequence>
            <xsd:element name="width"
                         type="PQ" />
            <xsd:element minOccurs="0"
                         name="high"
                         type="PQ_inc" />
          </xsd:sequence>
          <xsd:sequence>
            <xsd:element name="center"
                         type="PQ" />
            <xsd:element minOccurs="0"
                         name="width"
                         type="PQ" />
          </xsd:sequence>
        </xsd:choice>
        <xsd:attribute default="I"
                       name="operator"
                       type="cs_SetOperator"
                       use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="IVXB_TS">
    <xsd:complexContent>
      <xsd:extension base="TS">
        <xsd:attribute default="true"
                       name="inclusive"
                       type="bl"
                       use="optional">
          <xsd:annotation>
            <xsd:documentation>Specifies whether the limit is included in the interval (interval is closed) or excluded from the interval (interval is open).</xsd:documentation>
            <xsd:appinfo />
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType mixed="true"
                   name="IVL_INT">
    <xsd:complexContent mixed="true">
      <xsd:extension base="ANY">
        <xsd:sequence>
          <xsd:element name="low">
            <xsd:complexType>
              <xsd:complexContent>
                <xsd:extension base="INT">
                  <xsd:attribute default="true"
                                 name="inclusive"
                                 type="bl"
                                 use="optional" />
                </xsd:extension>
              </xsd:complexContent>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="high">
            <xsd:complexType>
              <xsd:complexContent>
                <xsd:extension base="INT">
                  <xsd:attribute default="true"
                                 name="inclusive"
                                 type="bl"
                                 use="optional" />
                </xsd:extension>
              </xsd:complexContent>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="value"
                       type="int"
                       use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="set_cs_EntityNameUse">
    <xsd:list itemType="cs_EntityNameUse" />
  </xsd:simpleType>
  <xsd:complexType name="RTO_QTY_QTY">
    <xsd:annotation>
      <xsd:appinfo>
        <diff>RTO_QTY_QTY</diff>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="QTY">
        <xsd:sequence>
          <xsd:element name="numerator">
            <xsd:annotation>
              <xsd:documentation>The quantity that is being divided in the ratio. The default is the integer number 1 (one.)</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
            <xsd:complexType>
              <xsd:complexContent>
                <xsd:extension base="QTY">
                  <xsd:attribute default="1"
                                 name="value" />
                </xsd:extension>
              </xsd:complexContent>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="denominator">
            <xsd:annotation>
              <xsd:documentation>The quantity that devides the numerator in the ratio. The default is the integer number 1 (one.) The denominator must not be zero.</xsd:documentation>
              <xsd:appinfo />
            </xsd:annotation>
            <xsd:complexType>
              <xsd:complexContent>
                <xsd:extension base="QTY">
                  <xsd:attribute default="1"
                                 name="value" />
                </xsd:extension>
              </xsd:complexContent>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:simpleType name="cs_UpdateMode">
    <xsd:restriction base="cs">
      <xsd:enumeration value="added" />
      <xsd:enumeration value="altered" />
      <xsd:enumeration value="removed" />
      <xsd:enumeration value="unchanged" />
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>
