<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:sch="http://www.ascc.net/xml/schematron" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:hl7-org:v3" targetNamespace="urn:hl7-org:v3" elementFormDefault="qualified" version="1.0">
	<xs:annotation>
		<xs:documentation>
           Copyright (c) 2001, 2002, 2003, 2004, 2005 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.
        
           Generated by $Id: gsd2xsd.xsl,v 1.4 2005/04/17 03:20:15 lmckenzi Exp $
</xs:documentation>
	</xs:annotation>
	<xs:annotation>
		<xs:documentation>
			<p>This schema should never be used as standalone and is valid only as part of the include by datatypes.xsd</p>
		</xs:documentation>
	</xs:annotation>
	<xs:complexType name="PIVL_TS">
		<xs:annotation>
			<xs:documentation>
            Note: because this type is defined as an extension of SXCM_T,
            all of the attributes and elements accepted for T are also
            accepted by this definition.  However, they are NOT allowed
            by the normative description of this type.  Unfortunately,
            we cannot write a general purpose schematron contraints to
            provide that extra validation, thus applications must be
            aware that instance (fragments) that pass validation with
            this might might still not be legal.
         </xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="SXCM_TS">
				<xs:sequence>
					<xs:element name="phase" type="IVL_TS" minOccurs="0">
						<xs:annotation>
							<xs:documentation>
                        A prototype of the repeating interval specifying the
                        duration of each occurrence and anchors the periodic
                        interval sequence at a certain point in time.
                     </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="period" type="PQ" minOccurs="0">
						<xs:annotation>
							<xs:documentation>
                        A time duration specifying a reciprocal measure of
                        the frequency at which the periodic interval repeats.
                     </xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="alignment" type="CalendarCycle" use="optional">
					<xs:annotation>
						<xs:documentation>
                     Specifies if and how the repetitions are aligned to
                     the cycles of the underlying calendar (e.g., to
                     distinguish every 30 days from "the 5th of every
                     month".) A non-aligned periodic interval recurs
                     independently from the calendar. An aligned periodic
                     interval is synchronized with the calendar.
                  </xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="institutionSpecified" type="bl" use="optional" default="false">
					<xs:annotation>
						<xs:documentation>
                     Indicates whether the exact timing is up to the party
                     executing the schedule (e.g., to distinguish "every 8
                     hours" from "3 times a day".)
                  </xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="GLIST_TS">
		<xs:complexContent>
			<xs:extension base="ANY">
				<xs:sequence>
					<xs:element name="head" type="TS">
						<xs:annotation>
							<xs:documentation>
                     This is the start-value of the generated list. 
                  </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="increment" type="PQ">
						<xs:annotation>
							<xs:documentation>
                     The difference between one value and its previous
                     different value. For example, to generate the sequence
                     (1; 4; 7; 10; 13; ...) the increment is 3; likewise to
                     generate the sequence (1; 1; 4; 4; 7; 7; 10; 10; 13;
                     13; ...) the increment is also 3.
                  </xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="period" type="int" use="optional">
					<xs:annotation>
						<xs:documentation>
                     If non-NULL, specifies that the sequence alternates,
                     i.e., after this many increments, the sequence item
                     values roll over to start from the initial sequence
                     item value. For example, the sequence (1; 2; 3; 1; 2;
                     3; 1; 2; 3; ...) has period 3; also the sequence
                     (1; 1; 2; 2; 3; 3; 1; 1; 2; 2; 3; 3; ...) has period
                     3 too.
                  </xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="denominator" type="int" use="optional">
					<xs:annotation>
						<xs:documentation>
                     The integer by which the index for the sequence is
                     divided, effectively the number of times the sequence
                     generates the same sequence item value before
                     incrementing to the next sequence item value. For
                     example, to generate the sequence (1; 1; 1; 2; 2; 2; 3; 3;
                     3; ...)  the denominator is 3.
                  </xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="GLIST_PQ">
		<xs:complexContent>
			<xs:extension base="ANY">
				<xs:sequence>
					<xs:element name="head" type="PQ">
						<xs:annotation>
							<xs:documentation>
                     This is the start-value of the generated list. 
                  </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="increment" type="PQ">
						<xs:annotation>
							<xs:documentation>
                     The difference between one value and its previous
                     different value. For example, to generate the sequence
                     (1; 4; 7; 10; 13; ...) the increment is 3; likewise to
                     generate the sequence (1; 1; 4; 4; 7; 7; 10; 10; 13;
                     13; ...) the increment is also 3.
                  </xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="period" type="int" use="optional">
					<xs:annotation>
						<xs:documentation>
                     If non-NULL, specifies that the sequence alternates,
                     i.e., after this many increments, the sequence item
                     values roll over to start from the initial sequence
                     item value. For example, the sequence (1; 2; 3; 1; 2;
                     3; 1; 2; 3; ...) has period 3; also the sequence
                     (1; 1; 2; 2; 3; 3; 1; 1; 2; 2; 3; 3; ...) has period
                     3 too.
                  </xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="denominator" type="int" use="optional">
					<xs:annotation>
						<xs:documentation>
                     The integer by which the index for the sequence is
                     divided, effectively the number of times the sequence
                     generates the same sequence item value before
                     incrementing to the next sequence item value. For
                     example, to generate the sequence (1; 1; 1; 2; 2; 2; 3; 3;
                     3; ...)  the denominator is 3.
                  </xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="SLIST_PQ">
		<xs:complexContent>
			<xs:extension base="ANY">
				<xs:sequence>
					<xs:element name="origin" type="PQ">
						<xs:annotation>
							<xs:documentation>
                     The origin of the list item value scale, i.e., the
                     physical quantity that a zero-digit in the sequence
                     would represent.
                  </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="scale" type="PQ">
						<xs:annotation>
							<xs:documentation>
                     A ratio-scale quantity that is factored out of the
                     digit sequence.
                  </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="digits" type="list_int">
						<xs:annotation>
							<xs:documentation>
                     A sequence of raw digits for the sample values. This is
                     typically the raw output of an A/D converter.
                  </xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:simpleType name="list_int">
		<xs:list itemType="int"/>
	</xs:simpleType>
</xs:schema>
