<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:xdwc="http://tdi.texas.gov/DWCForms" 
	xmlns:jxb="http://java.sun.com/xml/ns/jaxb" 
	targetNamespace="http://tdi.texas.gov/DWCForms"
>
	<!-- *********************************************************************** -->
	<!-- *                                                                     * -->
	<!-- * DWC-005: Employer Notice of No Coverage or Termination of Coverage  * -->
	<!-- *                                                                     * -->
	<!-- *********************************************************************** -->
	<!-- *********************************************************************** -->
	<!-- Root Element                                                            -->
	<!-- *********************************************************************** -->
	<xsd:element name="BulkDWC005">
		<xsd:complexType>
			<xsd:sequence>
				<!-- III. PERSON PROVIDING INFORMATION (same for all employers in XML file)  -->
				<xsd:element name="Representative" type="xdwc:typePOC" />
				<!-- 13. Date of Signature (yyyy-mm-dd) -->
				<xsd:element name="SignatureDate" type="xsd:date" />
				<!-- one occurance per primary employer or DWC-005 form -->
				<xsd:element name="formData" type="xdwc:typeDWC005" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<!-- *********************************************************************** -->
	<!-- Form Elements for DWC-005 (each occurance represents one filing)        -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeDWC005">
		<xsd:sequence>
			<!-- I. REQUIRED STATEMENTS -->
			<xsd:element name="RequiredStatements" type="xdwc:typeRequiredStatements" />
			<!-- II. PRIMARY EMPLOYER INFORMATION -->
			<xsd:element name="Employer" type="xdwc:typeEmployer" />
			<!-- Additional Business Locations (as reported on DWC Form-205) -->
			<xsd:element name="Location" type="xdwc:typeLocation" minOccurs="0"
				maxOccurs="unbounded" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- I. REQUIRED STATEMENTS                                                  -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeRequiredStatements">
		<xsd:sequence>
			<!-- 1. Statement of No Coverage -->
			<xsd:element name="StatementNoCoverage" type="xdwc:typeStatementNoCoverage" />
			<!-- 2. Statement of Reportable Injuries or Diseases -->
			<xsd:element name="StatementReportableInjury" type="xdwc:typeStatementReportableInjury" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- 1. Statement of No Coverage                                             -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeStatementNoCoverage">
		<xsd:sequence>
			<!-- PolicyTerminationFlag = N means DOES NOT HAVE wc coverage -->
			<!-- PolicyTerminationFlag = Y means HAS TERMINATED wc coverage -->
			<xsd:element name="PolicyTerminationFlag" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[YN]{1}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- PolicyInfo required if PolicyTerminationFlag = Y -->
			<xsd:element name="PolicyInfo" type="xdwc:typePolicyInfo" minOccurs="0" />
			<!-- The election selected above is effective from (yyyy-mm-dd) to (yyyy-mm-dd). -->
			<xsd:element name="EffectiveDates" type="xdwc:typeDateRange" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- Policy Info                                                             -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typePolicyInfo">
		<xsd:sequence>
			<!-- Policy terminated effective (yyyy-mm-dd) -->
			<xsd:element name="PolicyTerminationDate" type="xsd:date" />
			<!-- Policy number -->
			<xsd:element name="Policy" type="xsd:string" />
			<!-- Insurance company name -->
			<xsd:element name="Carrier" type="xsd:string" />
			<!-- Insurer informed of termination on (yyyy-mm-dd) -->
			<xsd:element name="DateInformed" type="xsd:date" />
			<!-- Employees were (will be) notified on (yyyy-mm-dd) -->
			<xsd:element name="DateNotified" type="xsd:date" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- 2. Statement of Reportable Injuries or Diseases                         -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeStatementReportableInjury">
		<xsd:sequence>
			<!-- Any death, reportable injury or occupational disease since last notice? (Y/N) -->
			<xsd:element name="InjuryFlag" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[YN]{1}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- II. PRIMARY EMPLOYER INFORMATION                                        -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeEmployer">
		<xsd:sequence>
			<!-- 3. Employer Business Name -->
			<xsd:element name="Name" type="xsd:string" />
			<!-- 4. Federal Employer ID Number -->
			<xsd:element name="FEIN" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{9}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- 5. Employer Business Mailing Address -->
			<xsd:element name="Address" type="xdwc:typeAddress" />
			<!-- 6. Employer Business Type and 7. Six Digit NAICS Code -->
			<xsd:element name="BusinessType" type="xdwc:typeBusinessType" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- Business Type and Six-Digit NAICS Code                                  -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeBusinessType">
		<xsd:sequence>
			<!-- 6. Employer Business Type -->
			<xsd:element name="NAICSDescription" type="xsd:string" />
			<!-- 7. Six-Digit NAICS Code -->
			<xsd:element name="NAICSCode" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{6}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- Additional Business Locations (as reported on form DWC-205)             -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeLocation">
		<xsd:sequence>
			<!-- Business/Location Name -->
			<xsd:element name="Name" type="xsd:string" />
			<!-- Business/Location FEIN -->
			<xsd:element name="FEIN" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{9}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- Business/Location Address -->
			<xsd:element name="Address" type="xdwc:typeAddress" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- *                                                                     * -->
	<!-- * DWC-020SI: Self-Insured Governmental Entity Coverage Information    * -->
	<!-- *                                                                     * -->
	<!-- *********************************************************************** -->
	<!-- *********************************************************************** -->
	<!-- Root Element                                                            -->
	<!-- *********************************************************************** -->
	<xsd:element name="BulkDWC020SI">
		<xsd:complexType>
			<xsd:sequence>
				<!-- DWC-020SI specific info. Each occurance represents one filing. -->
				<xsd:element name="formData" type="xdwc:typeBulkDWC020SI" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<!-- *********************************************************************** -->
	<!-- DWC-20SI Form Elements (each occurance represents one filing)           -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeBulkDWC020SI">
		<xsd:sequence>
			<!-- I. Governmental Entity Information -->
			<!-- 1. Governmental Entity Name -->
			<xsd:element name="Name" type="xsd:string" />
			<!-- 2. Self-Insurance Effective Dates (YYYY-MM-DD) -->
			<xsd:element name="EffectiveDates" type="xdwc:typeDateRange" />
			<!-- 3. Business Mailing Address -->
			<xsd:element name="Address" type="xdwc:typeUSAddress" /> 
			<!-- 4. Federal Tax ID No. (FEIN) -->
			<xsd:element name="FEIN">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{9}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- WC Point of Contact: 5. Name, 6. Phone, and 7. Email -->
			<xsd:element name="POC" type="xdwc:type20SIPOC" />
			<!-- 8. Is the governmental entity a member of a pool/group? (Y/N) -->
			<xsd:element name="PoolGroupFlag">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[YN]{1}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- II. Self-Insurance Pool/Group Information (complete only if Q.8 is Y) -->
			<xsd:element name="PoolGroup" type="xdwc:typePoolGroup" minOccurs="0" />
			<!-- III. Claim Administration Contact Information (complete only if Q.8 is N) -->
			<xsd:element name="ClaimAdminiContactInfo" type="xdwc:typeCACI" minOccurs="0" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- II. Self-Insurance Pool/Group Information (complete only if Q.8 is Y)   -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typePoolGroup">
		<xsd:sequence>
			<!-- 09. Self-Insurance Pool/Group Name -->
			<xsd:element name="Name" type="xsd:string" />
			<!-- 10. Federal Tax Id No. (FEIN) -->
			<xsd:element name="FEIN">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{9}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- Point of Contact: 11. Name, 12. Phone Number, and 13. E-mail Address -->
			<xsd:element name="POC" type="xdwc:type20SIPOC" />
		</xsd:sequence>
	</xsd:complexType>

	<!-- *********************************************************************** -->
	<!-- III. Medical Benefits Plan Information (complete only if Q.9 is Y)      -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeHealthPlan">
		<xsd:sequence>
			<xsd:element name="HealthPlanId" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]+" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- 14. Health Plan Name -->
			<xsd:element name="Name" type="xsd:string" />
			<!-- 15. Health Plan Address -->
			<xsd:element name="Address" type="xdwc:typeAddress" />
			<!-- 16. Effective Dates (YYYY-MM-DD) -->
			<xsd:element name="EffectiveDates" type="xdwc:typeDateRange" />
			<!-- Health Plan Point of Contact: 18. Name, 19. Phone Number, and -->
			<!-- 17. E-mail Address -->
			<xsd:element name="POC" type="xdwc:typePOC" />
		</xsd:sequence>
	</xsd:complexType>

	<!-- *********************************************************************** -->
	<!-- III. Claim Administration Contact Information (complete only if Q.8 is N)      -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeCACI">
		<xsd:sequence>
			<!-- Claim Adjustment (complete only if Q.8 is N) -->
			<xsd:element name="ClaimAdjustment" type="xdwc:typeCACISection"  />
			<!-- Coverage Verification (complete only if Q.8 is N) -->
			<xsd:element name="CoverageVerification" type="xdwc:typeCACISection"  />
			<!-- Medical Billing (complete only if Q.8 is N) -->
			<xsd:element name="MedicalBilling" type="xdwc:typeCACISection"  />
			<!-- Pharmacy Billing (complete only if Q.8 is N) -->
			<xsd:element name="PharmacyBilling" type="xdwc:typeCACISection"  />
			<!-- Preauthorization (complete only if Q.8 is N) -->
			<xsd:element name="Preauthorization" type="xdwc:typeCACISection"  />
			<!-- Medical Benefits Plan (complete only if Q.8 is N)-->
			<xsd:element name="WCorHCNorMBP" type="xdwc:typeCACISection"  />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="typeCACISection">
		<xsd:sequence>
			<!-- 18. Self-Insurance Pool/Group Name -->
			<xsd:element name="BusinessName" type="xsd:string" />
			<!-- 19. Effective Dates (YYYY-MM-DD) -->
			<xsd:element name="EffectiveDate" type="xsd:date" />
			<!-- 20. Address Q: Address or Physical Address?-->
			<xsd:element name="Address" type="xdwc:typeUSAddress" />
			<!-- 21. Phone -->
			<xsd:element name="Phone" type="xdwc:typePhoneCntCd" />
			<!-- 22. Fax -->
			<xsd:element name="Fax" type="xdwc:typePhoneCntCd" minOccurs="0" />
			<!-- 23. EMail Q: Validation is needed? -->
			<xsd:element name="EMail" type="xdwc:typeEmail" />
			<!-- 24. Comments Q: Validation is needed? -->
			<xsd:element name="Comments" type="xdwc:typeComments" minOccurs="0" /> 
		</xsd:sequence>
	</xsd:complexType>

	<!-- *********************************************************************** -->
	<!-- *                                                                     * -->
	<!-- * Shared Elements                                                     * -->
	<!-- *                                                                     * -->
	<!-- *********************************************************************** -->
	<!-- *********************************************************************** -->
	<!-- Generic Contact/Representative Block                                    -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typePOC">
		<xsd:sequence>
			<xsd:element name="Name" type="xsd:string" />
			<xsd:element name="Title" type="xsd:string" minOccurs="0" />
			<xsd:element name="Phone" type="xdwc:typePhone" minOccurs="0" />
			<xsd:element name="EMail" type="xsd:string" minOccurs="0" />
		</xsd:sequence>
	</xsd:complexType>

	<!-- *********************************************************************** -->
	<!-- Generic Contact/Representative Block Email Valication                                   -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="type20SIPOC">
		<xsd:sequence>
			<xsd:element name="Name" type="xsd:string" />
			<xsd:element name="Phone" type="xdwc:typePhone" />
			<xsd:element name="EMail" type="xdwc:typeEmail"  />
		</xsd:sequence>
	</xsd:complexType>

	<!-- *********************************************************************** -->
	<!-- Generic Phone Block                                                     -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typePhone">
		<xsd:sequence>
			<!-- 3-digit area code. Required. -->
			<xsd:element name="AreaCode" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{3}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- 7-digit phone number. Required. -->
			<xsd:element name="Number" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{7}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- Optional extension. Up to 10 digits. -->
			<xsd:element name="Extension" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]*" />
						<xsd:maxLength value="10" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<!-- *********************************************************************** -->
	<!-- Generic Phone Block with Country Code                                                   -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typePhoneCntCd">
		<xsd:sequence>
			<!-- 1-digit Country code. Required. -->
			<xsd:element name="CountryCode" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[1-9]{1}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>

			<!-- 3-digit area code. Required. -->
			<xsd:element name="AreaCode" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{3}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- 7-digit phone number. Required. -->
			<xsd:element name="Number" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{7}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- Optional extension. Up to 10 digits. -->
			<xsd:element name="Extension" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]*" />
						<xsd:maxLength value="10" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<!-- *********************************************************************** -->
	<!-- Generic Date Range                                                      -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeDateRange">
		<xsd:sequence>
			<xsd:element name="StartDate" type="xsd:date" />
			<xsd:element name="EndDate" type="xsd:date" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- Generic Address Block                                                   -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeAddress">
		<xsd:sequence>
			<!-- Line1 always required -->
			<xsd:element name="Line1" type="xsd:string" />
			<!-- Line2 is optional -->
			<xsd:element name="Line2" type="xsd:string" minOccurs="0" />
			<!-- City is always required -->
			<xsd:element name="City" type="xsd:string" />
			<!-- State required for US addresses -->
			<xsd:element name="State" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[A-Z]{2}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- 5 or 9-digit ZIP required for US addresses (no punctuation) -->
			<xsd:element name="Zip" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{5}" />
						<xsd:pattern value="[0-9]{9}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- Province optional for non-US addresses -->
			<xsd:element name="Province" type="xsd:string" minOccurs="0" />
			<!-- ForeignPostalCode required for non-US addresses -->
			<xsd:element name="ForeignPostalCode" type="xsd:string" minOccurs="0" />
			<!-- ISO 3166 alpha-3 country code. Required for non-US addresses (default is USA) -->
			<xsd:element name="Country" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[A-Z]{3}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<!-- *********************************************************************** -->
	<!-- Generic US Address Block                                                  -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeUSAddress">
		<xsd:sequence>
			<!-- Line1 always required -->
			<xsd:element name="Line1" type="xsd:string" />
			<!-- Line2 is optional -->
			<xsd:element name="Line2" type="xsd:string" minOccurs="0" />
			<!-- City is always required -->
			<xsd:element name="City" type="xsd:string" />
			<!-- State required for US addresses -->
			<xsd:element name="State" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[A-Z]{2}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- 5 or 9-digit ZIP required for US addresses (no punctuation) -->
			<xsd:element name="Zip" >
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[0-9]{5}" />
						<xsd:pattern value="[0-9]{9}" />
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
	<!-- Generic Comments                                                   -->
	<!-- *********************************************************************** -->
	<xsd:simpleType name="typeComments">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="500" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="typeEmail">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,20}" />
		</xsd:restriction>
	</xsd:simpleType>

	<!-- *********************************************************************** -->
	<!-- *                                                                     * -->
	<!-- * Acknowledgment Form (for DWC use only)                              * -->
	<!-- *                                                                     * -->
	<!-- *********************************************************************** -->
	<xsd:element name="FormContentEmployerAck">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="securityId" type="xsd:string" />
				<xsd:element name="mode" type="xsd:string" />
				<xsd:element name="formName" type="xsd:string" />
				<xsd:element name="dateReceived" type="xsd:string" minOccurs="0" />
				<xsd:element name="confirmationNo" type="xsd:string" minOccurs="0" />
				<xsd:element name="message" type="xsd:string" minOccurs="0" />
				<xsd:element name="name" type="xsd:string" minOccurs="0" />
				<xsd:element name="title" type="xsd:string" minOccurs="0" />
				<xsd:element name="filingInfo" type="xdwc:typeFilingInfo" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<!-- *********************************************************************** -->
	<!-- Repeating group for acknowledgement form                                -->
	<!-- *********************************************************************** -->
	<xsd:complexType name="typeFilingInfo">
		<xsd:sequence>
			<xsd:element name="sequenceNbr" type="xsd:string" minOccurs="0" />
			<xsd:element name="filingId" type="xsd:string" minOccurs="0" />
			<xsd:element name="participantId" type="xsd:string" minOccurs="0" />
			<xsd:element name="employerName" type="xsd:string" minOccurs="0" />
			<xsd:element name="status" type="xsd:string" />
			<xsd:element name="error" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
	</xsd:complexType>
	<!-- *********************************************************************** -->
</xsd:schema>
