<?xml version="1.0" standalone="yes"?>
<xs:schema xmlns:surveys="Surveys" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:basedatatypes="Basedatatypes" xmlns:common="Common" xmlns:sc="SurveysCommon" xmlns:ht="HTDataTypes" targetNamespace="Surveys" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="4.00">
	<xs:import namespace="Basedatatypes" schemaLocation="Basedatatypes.xsd"/>
	<xs:import namespace="Common" schemaLocation="Common.xsd"/>
	<xs:import namespace="SurveysCommon" schemaLocation="SurveysCommon.xsd"/>
	<xs:import namespace="HTDataTypes" schemaLocation="HTDataTypes.xsd"/>
	<!-- ================================================== -->
	<!-- =====  Complex Type Definitions  -->
	<!-- ================================================== -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  CensusSurveyResponse type -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="CommonCensusSurveyResponse">
		<xs:complexContent>
			<xs:restriction base="sc:SurveyResponse">
				<xs:sequence>
					<xs:element name="survey" type="surveys:CensusSurvey"/>
					<xs:element name="surveyPatient" type="surveys:CensusSurveyPatient"/>
					<xs:element name="enrollmentDate" type="ht:HTProgramDate"/>
					<xs:element name="disenrollmentDate" type="ht:HTProgramDate" nillable="true" minOccurs="0"/>
					<xs:element name="activationDate" type="ht:HTProgramDate"/>
					<xs:element name="inactivationDate" type="ht:HTProgramDate" nillable="true" minOccurs="0"/>
					<xs:element name="facility" type="surveys:HTFacilityLocation"/>
					<xs:element name="vendor" type="surveys:HTVendor"/>
					<xs:element name="careCoordinator" type="surveys:HTCareCoordinator"/>
					<xs:element name="programName" type="xs:string"/>
					<xs:element name="recordSource" type="basedatatypes:HL72FacilityIdentifier"/>
					<xs:element name="recordUpdateTime" type="basedatatypes:PointInTime"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="CensusSurveyResponse">
		<xs:complexContent>
			<xs:extension base="surveys:CommonCensusSurveyResponse">
				<xs:sequence>
					<xs:element name="submittedDate" type="ht:HTProgramDateTime"/>
					<xs:element name="homeDevice" type="surveys:CensusHomeDevice"/>
	<!--  HT Program Date type  Chris W. coming start date and end date cannot be less than 10/02/2005-->
					<xs:element name="reportStartDate" type="ht:HTProgramDate"/>
					<xs:element name="reportEndDate" type="ht:HTProgramDate"/>
					<xs:element name="levelOfCare" type="ht:HTCensusLevelOfCare"/>
					<xs:element name="compliance" type="ht:HTPatientCompliance"/>
					<xs:element name="responseRate" type="surveys:CensusResponseRate"/>
					<xs:element name="dataAge" type="xs:nonNegativeInteger"/>
					<!-- Use one of the below
					<xs:element name="modalities" type="surveys:CensusModalities"/>

					<xs:element name="dmp" type="ht:HTModalityNamesDMP"/>
					<xs:element name="measurement" type="surveys:NonEmptyMeasurementsString" minOccurs="0"/>
					<xs:element name="video" type="ht:HTModalityNamesVideo" minOccurs="0"/>
					<xs:element name="telecom" type="ht:HTModalityNamesTelecom"/>
					<xs:element name="image" type="ht:HTModalityNamesImage" minOccurs="0"/>
					-->
					<xs:element name="dmp" type="ht:HTModalityNamesDMP"/>
					<xs:element name="measurement" type="surveys:NonEmptyMeasurementsString" minOccurs="0"/>
					<xs:element name="video" type="ht:HTModalityNamesVideo" minOccurs="0"/>
					<xs:element name="telecom" type="ht:HTModalityNamesTelecom"/>
					<xs:element name="image" type="ht:HTModalityNamesImage" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Version type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:simpleType name="VersionType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]+([\.][0-9]+)?"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Survey type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="CensusSurvey">
		<xs:complexContent>
			<xs:restriction base="sc:Survey">
				<xs:sequence>
					<xs:element name="title" type="sc:NonEmptyString" fixed="Census"/>
					<xs:element name="version" type="surveys:VersionType"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  SurveyPersonName  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="CensusSurveyPersonName">
		<xs:complexContent>
			<xs:restriction base="sc:SurveyPersonName">
				<xs:sequence>
					<xs:element name="given" type="ht:HTFirstName" minOccurs="0"/>
					<xs:element name="middle" type="ht:HTMiddleName" minOccurs="0"/>
					<xs:element name="family" type="ht:HTLastName"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Survey Patient type -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="CensusSurveyPatient">
		<xs:complexContent>
			<xs:restriction base="sc:SurveyPatient">
				<xs:sequence>
					<xs:element name="vendorMRN" type="sc:NonEmptyString"/>
					<xs:element name="icn" type="ht:HTICN" minOccurs="0"/>
					<xs:element name="ssn" type="ht:HTSSN" minOccurs="0"/>
					<xs:element name="name" type="surveys:CensusSurveyPersonName"/>
					<xs:element name="birthdate" type="ht:HTDOB" minOccurs="0"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  VistA FacilityLocation  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="HTFacilityLocation">
		<xs:complexContent>
			<xs:restriction base="sc:Facility">
				<xs:sequence>
					<xs:element name="location" type="ht:HTVistAFacilityLocation"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Vendor type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="HTVendor">
		<xs:complexContent>
			<xs:restriction base="sc:Vendor">
				<xs:sequence>
					<xs:element name="number" type="ht:HTVendorNumber"/>
					<xs:element name="name" type="xs:string"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Care Coordinator type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="HTCareCoordinator">
		<xs:complexContent>
			<xs:restriction base="sc:CareCoordinator">
				<xs:sequence>
					<xs:element name="id" type="ht:HTDUZ"/>
					<xs:element name="facilityNumber" type="ht:HTVistAFacilityNumber"/>
					<xs:element name="name" type="surveys:CensusSurveyPersonName"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Home Device Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="CensusHomeDevice">
		<xs:sequence>
			<xs:element name="model" type="sc:NonEmptyString"/>
			<xs:element name="serial" type="sc:nonEmptyNonWSString"/>
		</xs:sequence>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Response Rate Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="CensusResponseRate">
		<xs:sequence>
			<xs:element name="actual" type="ht:HTPatientActualResponses"/>
			<xs:element name="expected" type="ht:HTPatientExpectedResponses"/>
		</xs:sequence>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!-- Non Empty Comma separated list of measurements string  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:simpleType name="NonEmptyMeasurementsString">
		<xs:annotation>
			<xs:documentation>Only alphabetic characters, must contain at least one character</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-Za-z][A-Za-z ]+([+][A-Za-z][A-Za-z ]+)*"/>
			<!--
			<xs:pattern value="\w+([ \w])*(, (\w+([ \w])*))*"/>
			<xs:pattern value="\w+([ \w])*(\+(\w+([ \w])*))*"/>
			-->
		</xs:restriction>
	</xs:simpleType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Modality Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:simpleType name="CensusModalityType">
		<xs:annotation>
			<xs:documentation>Current Modality Types</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="DMP"/>
			<xs:enumeration value="Measurement"/>
			<xs:enumeration value="Video"/>
			<xs:enumeration value="Telecom"/>
			<xs:enumeration value="Image"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census DMP Modality Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:simpleType name="DMPModalityType">
		<xs:annotation>
			<xs:documentation>Current DMP Modality Type</xs:documentation>
		</xs:annotation>
		<xs:restriction base="surveys:CensusModalityType">
			<xs:enumeration value="DMP"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Measurement Modality Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:simpleType name="MeasurementModalityType">
		<xs:annotation>
			<xs:documentation>Current Measurement Modality Type</xs:documentation>
		</xs:annotation>
		<xs:restriction base="surveys:CensusModalityType">
			<xs:enumeration value="Measurement"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Video Modality Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:simpleType name="VideoModalityType">
		<xs:annotation>
			<xs:documentation>Current Video Modality Type</xs:documentation>
		</xs:annotation>
		<xs:restriction base="surveys:CensusModalityType">
			<xs:enumeration value="Video"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Telecom Modality Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:simpleType name="TelecomModalityType">
		<xs:annotation>
			<xs:documentation>Current Telecom Modality Type</xs:documentation>
		</xs:annotation>
		<xs:restriction base="surveys:CensusModalityType">
			<xs:enumeration value="Telecom"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Image Modality Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:simpleType name="ImageModalityType">
		<xs:annotation>
			<xs:documentation>Current Image Modality Type</xs:documentation>
		</xs:annotation>
		<xs:restriction base="surveys:CensusModalityType">
			<xs:enumeration value="Image"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Modality Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="CensusModality">
		<xs:sequence>
			<xs:element name="modalityType" type="surveys:CensusModalityType"/>
			<xs:element name="modalityName" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  DMP Modality  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="DMPCensusModality">
		<xs:complexContent>
			<xs:restriction base="surveys:CensusModality">
				<xs:sequence>
					<xs:element name="modalityType" type="surveys:DMPModalityType"/>
					<xs:element name="modalityName" type="ht:HTModalityNamesDMP"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Measurement Modality  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="MeasurementCensusModality">
		<xs:complexContent>
			<xs:restriction base="surveys:CensusModality">
				<xs:sequence>
					<xs:element name="modalityType" type="surveys:MeasurementModalityType"/>
					<xs:element name="modalityName" type="ht:HTModalityNamesMeasurement"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Video Modality  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="VideoCensusModality">
		<xs:complexContent>
			<xs:restriction base="surveys:CensusModality">
				<xs:sequence>
					<xs:element name="modalityType" type="surveys:VideoModalityType"/>
					<xs:element name="modalityName" type="ht:HTModalityNamesVideo"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Telecom Modality  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="TelecomCensusModality">
		<xs:complexContent>
			<xs:restriction base="surveys:CensusModality">
				<xs:sequence>
					<xs:element name="modalityType" type="surveys:TelecomModalityType"/>
					<xs:element name="modalityName" type="ht:HTModalityNamesTelecom"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Image Modality  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="ImageCensusModality">
		<xs:complexContent>
			<xs:restriction base="surveys:CensusModality">
				<xs:sequence>
					<xs:element name="modalityType" type="surveys:ImageModalityType"/>
					<xs:element name="modalityName" type="ht:HTModalityNamesImage"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  Census Modalities Type  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xs:complexType name="CensusModalities">
		<xs:sequence>
			<xs:element name="modality" type="surveys:CensusModality" minOccurs="0" maxOccurs="11"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>
