<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Ken Walker (FL Agency Health Care Admin) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<!--
The Ambulatory Patient Data XML Schema is incorporated by reference in the Ambulatory Patient Data Reporting Instructions, 59B-9.015, F.A.C. adopted April 18,2004. 
This file is currently posted at http://ahca.myflorida.com/xmlschemas/asc.xsd.  
The content and structure of this file is maintained by the Agency for Health Care Information - State of Florida
HISTORY:
	Created:  3/23/2009	KDW
	Modified: 09/02/2010 Suresh Kethireddy and Patrick Kennedy
			  RECORD_ID should allow only alpha-numeric, dot(.), dash(-) and underscore(_)

-->
	<xs:element name="HC_DATA">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="HEADER" type="HEADERType"/>
				<xs:element name="RECORDS">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="RECORD" type="RECORDType" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
					<xs:key name="RECORD_ID">
						<xs:selector xpath="RECORD"/>
						<xs:field xpath="@id"/>
					</xs:key>
				</xs:element>
				<xs:element name="TRAILER" type="TRAILERType"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="RECORDType">
		<xs:sequence>
			<xs:element name="AHCA_NUM">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:minLength value="8"/>
						<xs:maxLength value="12"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="PATIENT_SSN" type="SSNType"/>
			<xs:element name="PATIENT_RACE" type="PREType"/>
			<xs:element name="PATIENT_BIRTHDATE">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="^\d{4}-\d{2}-\d{2}$"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="PATIENT_SEX" type="PSEXType"/>
			<xs:element name="PATIENT_ZIP">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="\d{5}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="SERVICE_CODE">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[12]"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="PRINC_PAYER_CODE" type="PPCType"/>
			<xs:element name="PRINC_DIAG_CODE" type="ICD9DiagType" minOccurs="0"/>
			<xs:element name="OTHER_DIAG_CODE" type="ICD9DiagType" minOccurs="0" maxOccurs="9"/>
			<xs:element name="PRINC_CPT_HCPCS_CODE" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="^[A-Za-z0-9]{5}$"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="OTHER_CPT_HCPCS_CODE" minOccurs="0" maxOccurs="9">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="^[A-Za-z0-9]{5}$"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="ATTENDING_PHYS_ID">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="11"/>
						<xs:pattern value="[A-Z0-9a-z]{1,20}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="OPERATING_PHYS_ID" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="11"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="OTHER_PHYS_ID" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="11"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="PHARMACY_CHARGES" type="ChargeType"/>
			<xs:element name="MED_SURG_SUPPLY_CHARGES" type="ChargeType"/>
			<xs:element name="LAB_CHARGES" type="ChargeType"/>
			<xs:element name="RADIOLOGY_IMAGING_CHARGES" type="ChargeType"/>
			<xs:element name="CARDIOLOGY_CHARGES" type="ChargeType"/>
			<xs:element name="OPER_ROOM_CHARGES" type="ChargeType"/>
			<xs:element name="ANESTHESIA_CHARGES" type="ChargeType"/>
			<xs:element name="RECOVERY_ROOM_CHARGES" type="ChargeType"/>
			<xs:element name="ER_ROOM_CHARGES" type="ChargeType"/>
			<xs:element name="TREATMENT_OBSERVATION_ROOM_CHARGES" type="ChargeType"/>
			<xs:element name="OTHER_CHARGES" type="ChargeType"/>
			<xs:element name="TOTAL_CHARGES" type="GrossChargeType"/>
			<xs:element name="VISIT_BEGIN_DATE">
				<xs:simpleType>
					<xs:restriction base="xs:date"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="VISIT_END_DATE">
				<xs:simpleType>
					<xs:restriction base="xs:date"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="ARRIVAL_HOUR">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="\d{2}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="PATIENT_REASON" type="ICD9DiagType" minOccurs="0"/>
			<xs:element name="PRIN_PROC_CODE" type="ICD9ProcType" minOccurs="0"/>
			<xs:element name="OTHER_PROC_CODE" type="ICD9ProcType" minOccurs="0" maxOccurs="4"/>
			<xs:element name="EXTERNAL_CAUSE" type="ICD9ECodeType" minOccurs="0" maxOccurs="3"/>
			<xs:element name="PATIENT_STATUS">
				<xs:simpleType>
					<xs:restriction base="xs:positiveInteger">
						<xs:pattern value="\d{2}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="^[A-Za-z0-9_.-]{1,17}$"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="TRAILERType">
		<xs:sequence>
			<xs:element name="NUMBER_OF_RECORDS">
				<xs:simpleType>
					<xs:restriction base="xs:positiveInteger"/>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="HEADERType">
		<xs:sequence>
			<xs:element name="TRANS_CODE">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[QS]"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="RPT_YEAR">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[2][0][0][5-9]"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="RPT_QTR">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[1-4]"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="DATA_TYPE">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="AS10"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="SUBMISSION_TYPE">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[IRC]"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="PROC_DATE">
				<xs:simpleType>
					<xs:restriction base="xs:date"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="AHCA_NUM">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:minLength value="8"/>
						<xs:maxLength value="12"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="ORG_NAME">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="40"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="CONTACT_PERSON" type="ContactType"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="SSNType">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{9}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PREType">
		<xs:restriction base="xs:positiveInteger">
			<xs:pattern value="[1-8]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PSEXType">
		<xs:restriction base="xs:positiveInteger">
			<xs:pattern value="[1-3]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PPCType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-P]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="ContactType">
		<xs:sequence>
			<xs:element name="NAME">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="25"/>
						<xs:whiteSpace value="preserve"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="PHONE">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="\(\d{3}\)\d{3}[-.]\d{4}([-.]\d{1,5})?"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="STREET">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="40"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="CITY">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="25"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="STATE">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="2"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="ZIP">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="\d{5}([-.]\d{4})?"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="EMAIL" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="100"/>
						<xs:pattern value="\w+([-+._]\w+)*@\w+([-._]\w+)*\.\w+([-._]\w+)*"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="ICD9DiagType">
		<xs:restriction base="xs:string">
			<xs:pattern value="^\d{3}\.\d{0,2}$|^\d{3}$|^V\d{2}\.\d{0,2}$|^V\d{2}$"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ICD9ECodeType">
		<xs:restriction base="xs:string">
			<xs:pattern value="^E\d{3}\.?$|^E\d{3}\.\d{1}$"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ICD9ProcType">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{2}[.](\d{1,2})?"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ChargeType">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{1,15}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="GrossChargeType">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{1,20}"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>

