<?xml version="1.0" encoding="UTF-8" ?>
<!--
    $Log: sp.xsd,v $
    Revision 1.1.1.1  2003/07/22 14:26:28  richard
    initial import

    Revision 1.11  2002/11/12 13:21:42  richard
    Updated install directions, addedd deprecated notice for the permision_release field.

    Revision 1.10  2002/09/12 18:19:43  richard
    Added the schema_revision attribute to the records element.

    Revision 1.9  2002/07/08 18:46:01  richard
    Modified the medical assessment so that the "self_reprrted_ilness" and "documented_ilness" are now tok50Type(s).
    Added the "drug abuse" option to the disabilites picklist.
    Added CVS LOG keyword to all template files.

-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<!-- Includes -->
	<xsd:include schemaLocation="sp_complex_types.xsd" />
	<!-- Enforce unique IDs for all records -->
	<xsd:element name="records">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="providers" minOccurs="0" maxOccurs="1" />
				<xsd:element ref="clients" minOccurs="0" maxOccurs="1" />
				<xsd:element ref="households" minOccurs="0" maxOccurs="1" />
				<xsd:element ref="entry_exits" minOccurs="0" maxOccurs="1" />
			</xsd:sequence>
			<xsd:attribute name="schema_revision" type="xsd:string" use="required" />
		</xsd:complexType>
		<xsd:key name="idKey">
			<xsd:selector xpath="*/*" />
			<xsd:field xpath="@record_id" />
		</xsd:key>
	</xsd:element>
	<xsd:element name="providers">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="provider" type="serviceProviderBaseType" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="clients">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="client" type="clientType" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="households">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="household" type="householdType" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="entry_exits">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="entry_exit" type="entryExitType" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>