<?xml version="1.0" encoding="utf-8" ?>
<!--TFS  4689 - 2014-05-06 - Vineet Sinha - Changed to add new field Parent/Guardian Hearing Status. -->
<!--TFS  8339 - 2014-07-30 - Vineet Sinha - Update Batch Batch_PreEncounterStageLoad to accept the CPS Status Report and Save to CIMOR -->
<!--TFS  9683 - 2014-10-17 - Billy Cox	 - added PresentOnAdmission to Diagnosis -->
<!--TFS 10690 - 2014-12-12 - Billy Cox	 - added SmokeTobacco30Days to TEDS-->
<!--TFS 17581 - 2015-11-17 - Julie Haslag- Added DLA Assessment -->
<!--TFS 20932 - 2016-05-23 - Nicolle Sweeten - Added Referral Location and DateOfFirstReferralToEREorCMHL-->
<!--TFS 14133 - 2016-07-12 - Nicolle Sweeten - Added TotalBehaviorScore -->
<!--TFS 24197 - 2017-03-06   Sindhuja Gudi    - Made changes to Allow nulls for modified gaf score. -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" id="Preencounter_Trans_20140319">
	<xs:element name="PreEncounter">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="SenderData">
					<xs:complexType>
						<xs:attribute name="ProviderName" use="required">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:maxLength value="256" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="ProviderETIN" use="required">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:maxLength value="11" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="BatchNumber" use="required">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:maxLength value="128" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="DocumentFunction" maxOccurs="unbounded">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ConsumerData" minOccurs="0">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="Name" minOccurs="0">
											<xs:complexType>
												<xs:attribute name="LastName" use="required">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="64" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="FirstName" use="required">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="64" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="MiddleName" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="64" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="Prefix" type="codeList" use="optional" />
												<xs:attribute name="Suffix" type="codeList" use="optional" />
												<xs:attribute name="Credential" type="codeList" use="optional" />
											</xs:complexType>
										</xs:element>
										<xs:element name="Demographics" minOccurs="0">
											<xs:complexType>
												<xs:attribute name="Gender" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="16" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="DateOfBirth" type="date" use="optional" />
												<xs:attribute name="SSN" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="11" />
															<xs:pattern value="\d{3}\-\d{2}\-\d{4}" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="HearingStatus" type="codeList" use="optional" />
												<xs:attribute name="PreferredLanguage" type="codeList" use="optional" />
												<xs:attribute name="MaritalStatus" type="codeList" use="optional" />
												<xs:attribute name="EmploymentStatus" type="codeList" use="optional" />
												<xs:attribute name="Occupation" type="codeList" use="optional" />
												<xs:attribute name="HomePhone" type="phone" use="optional" />
												<xs:attribute name="WorkPhone" type="phone" use="optional" />
                        <xs:attribute name="PGHearingStatus" type="codeList" use="optional" />
											</xs:complexType>
										</xs:element>
										<xs:element name="Address" minOccurs="0">
											<xs:complexType>
												<xs:attribute name="Street1" use="required">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="256" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="Street2" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="256" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="City" use="required">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="40" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="State" type="codeList" use="required" />
												<xs:attribute name="County" type="codeList" use="required" />
												<xs:attribute name="Zip" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="10" />
															<xs:pattern value="(\d{5})|(\d{5}\-\d{4})" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="Country" type="codeList" use="required" />
											</xs:complexType>
										</xs:element>
										<xs:element name="Race" minOccurs="0">
											<xs:complexType>
												<xs:attribute name="White" type="yesno" use="required" />
												<xs:attribute name="Black_AfricanAmerican" type="yesno" use="required" />
												<xs:attribute name="Asian" type="yesno" use="required" />
												<xs:attribute name="NativeHawiian_PacificIslander" type="yesno" use="required" />
												<xs:attribute name="AmIndian_NativeAlaskan" type="yesno" use="required" />
												<xs:attribute name="OtherRace" type="yesno" use="required" />
												<xs:attribute name="OtherRaceDesc" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="256" />
															<xs:minLength value="1" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="NotOfHispanicOrigin" type="yesno" use="required" />
												<xs:attribute name="Hispanic_Mexican" type="yesno" use="required" />
												<xs:attribute name="Hispanic_Cuban" type="yesno" use="required" />
												<xs:attribute name="Hispanic_PuertoRican" type="yesno" use="required" />
												<xs:attribute name="OtherHispanic" type="yesno" use="required" />
												<xs:attribute name="OtherHispanicDesc" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="256" />
															<xs:minLength value="1" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
											</xs:complexType>
										</xs:element>
										<xs:element name="StandardMeansTest" minOccurs="0">
											<xs:complexType>
												<xs:attribute name="FromDate" type="date" use="required" />
												<xs:attribute name="MonthlyAbilityToPayAmt" type="xs:decimal" use="required" />
												<xs:attribute name="PreparedBy" use="required">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="64" />
															<xs:minLength value="1" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="EpisodeCare" minOccurs="0">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="Diagnosis" minOccurs="0" maxOccurs="unbounded">
											<xs:complexType>
												<xs:attribute name="Axis" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:int">
															<xs:enumeration value="1" />
															<xs:enumeration value="2" />
															<xs:enumeration value="3" />
															<xs:enumeration value="4" />
															<xs:enumeration value="5" />
															<xs:enumeration value="6" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="DiagnosisDateTime" type="dateTimeString" use="required" />
												<xs:attribute name="DiagnosticianName" use="required">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="64" />
															<xs:minLength value="1" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="DiagnosisCodeSet" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="6" />
															<xs:enumeration value="DSM-IV" />
															<xs:enumeration value="ICD-9" />
															<xs:enumeration value="ICD-10" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="DiagnosisCode" use="optional">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="16" />
															<xs:minLength value="1" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="Status" type="codeList" use="optional" />
												<xs:attribute name="Severity" type="codeList" use="optional" />
												<xs:attribute name="Principal" type="yesno" use="optional" />
												<xs:attribute name="Primary" type="yesno" use="optional" />
												<xs:attribute name="StressorCategory" type="codeList" use="optional" />
												<xs:attribute name="Chronicity" type="codeList" use="optional" />
												<xs:attribute name="CurrentGAF" type="xs:int" use="optional" />
                        <xs:attribute name="TotalBehaviorScore" type="xs:int" use="optional" />
												<xs:attribute name="PresentOnAdmission" type="codeList" use="optional" />
											</xs:complexType>
										</xs:element>
										<xs:element name="Commitments" minOccurs="0" maxOccurs="unbounded">
											<xs:complexType>
												<xs:attribute name="CommitmentType" type="codeList" use="required" />
												<xs:attribute name="CommitmentFromDate" type="date" use="required" />
												<xs:attribute name="CommitmentToDate" type="date" use="optional" />
												<xs:attribute name="CommitmentCounty" type="codeList" use="required" />
												<xs:attribute name="PrimaryIndicator" type="yesno" use="required" />
											</xs:complexType>
										</xs:element>
										<xs:element name="ProgramAssignment" minOccurs="0">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="TEDSProgAssign" minOccurs="0">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="TEDSProgAssignPubAsst" minOccurs="0" maxOccurs="unbounded">
																	<xs:complexType>
																		<xs:attribute name="PublicAssistance" type="codeList" use="required" />
																	</xs:complexType>
																</xs:element>
																<xs:element name="TEDSProgAssignMeds" minOccurs="0" maxOccurs="unbounded">
																	<xs:complexType>
																		<xs:attribute name="MedicationPrescribed" type="codeList" use="required" />
																	</xs:complexType>
																</xs:element>
															</xs:sequence>
															<xs:attribute name="ProviderSiteID" use="required">
																<xs:simpleType>
																	<xs:restriction base="xs:string">
																		<xs:maxLength value="64" />
																		<xs:minLength value="1" />
																	</xs:restriction>
																</xs:simpleType>
															</xs:attribute>
															<xs:attribute name="DateInfoReceivedfromConsumer" type="date" use="required" />
															<xs:attribute name="PrimarySubstanceAbused" type="codeList" use="required" />
															<xs:attribute name="PrimarySAFrequency" type="codeList" use="required" />
															<xs:attribute name="PrimarySARoute" type="codeList" use="required" />
															<xs:attribute name="PrimarySAAgeFirstUsed" type="codeList" use="required" />
															<xs:attribute name="SecondarySubstanceAbused" type="codeList" use="required" />
															<xs:attribute name="SecondarySAFrequency" type="codeList" use="required" />
															<xs:attribute name="SecondarySARoute" type="codeList" use="required" />
															<xs:attribute name="SecondarySAAgeFirstUsed" type="codeList" use="required" />
															<xs:attribute name="TertiarySubstanceAbused" type="codeList" use="required" />
															<xs:attribute name="TertiarySAFrequency" type="codeList" use="required" />
															<xs:attribute name="TertiarySARoute" type="codeList" use="required" />
															<xs:attribute name="TertiarySAAgeFirstUsed" type="codeList" use="required" />
															<xs:attribute name="TreatmentCounty" type="codeList" use="required" />
															<xs:attribute name="PsychologicalProblemIndicator" type="yesno" use="required" />
															<xs:attribute name="DevelopmentProblemIndicator" type="yesno" use="required" />
															<xs:attribute name="CurrentPregnant" type="codeList" use="optional" />
															<xs:attribute name="VeteranStatusIndicator" type="yesno" use="required" />
															<xs:attribute name="EnrolledInSchool" type="yesNoUnknown" use="required" />
															<xs:attribute name="PriorDetox" type="codeList" use="required" />
															<xs:attribute name="PriorResidential" type="codeList" use="required" />
															<xs:attribute name="PriorOutpatient" type="codeList" use="required" />
															<xs:attribute name="NumberofArrests" type="codeList" use="required" />
															<xs:attribute name="NumberofDUIArrests" type="codeList" use="required" />
															<xs:attribute name="IncomeSource" type="codeList" use="required" />
															<xs:attribute name="PrimarySourcePayment" type="codeList" use="required" />
															<xs:attribute name="WeeklyIncomeCode" type="codeList" use="required" />
															<xs:attribute name="MonthlyIncomeAmt" type="xs:decimal" use="required" />
															<xs:attribute name="LegalStatus" type="codeList" use="required" />
															<xs:attribute name="LivingArrangement" type="codeList" use="required" />
															<xs:attribute name="Education" type="codeList" use="required" />
															<xs:attribute name="SpecialEducation" type="codeList" use="required" />
															<xs:attribute name="GradePointAverage" type="codeList" use="optional" />
															<xs:attribute name="PrimaryHealthInsurance" type="codeList" use="required" />
															<xs:attribute name="MaritalStatus" type="codeList" use="required" />
															<xs:attribute name="EmploymentStatus" type="codeList" use="required" />
															<xs:attribute name="Occupation" type="codeList" use="required" />
															<xs:attribute name="SelfHelpFrequency" type="codeList" use="required" />
															<xs:attribute name="NumberOfChildrenInYourCare" type="codeList" use="required" />
															<xs:attribute name="ChildrenRemovedFromCustody" type="codeList" use="required" />
															<xs:attribute name="Comment" type="xs:string" use="optional" />
															<xs:attribute name="HIVTest" type="codeList" use="optional" />
															<xs:attribute name="NumberOfLiveBirths" type="codeList" use="optional" />
															<xs:attribute name="NumberOfDrugFreeBirths" type="codeList" use="optional" />
															<xs:attribute name="ReasonForDrugExposure" type="codeList" use="optional" />
															<xs:attribute name="NumberOfChildrenReturned" type="codeList" use="optional" />
															<xs:attribute name="ReferredForTBTesting" type="yesno" use="required" />
															<xs:attribute name="TBTestDate" type="date" use="optional" />
															<xs:attribute name="ReceivedTBCounseling" type="yesno" use="optional" />
															<xs:attribute name="TBTestPositive" type="yesNoUnknown" use="optional" />
                              <xs:attribute name="SmokeTobacco30Days" type="yesNoUnknown" use="required" />
                            </xs:complexType>
													</xs:element>
												</xs:sequence>
												<xs:attribute name="Program" use="required">
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:minLength value="1" />
															<xs:maxLength value="30" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="ProgramFromDate" type="date" use="required" />
												<xs:attribute name="ProgramFromTime" type="time" use="required" />
												<xs:attribute name="Status" type="codeList" use="required" />
												<xs:attribute name="LivingArrangement" type="codeList" use="optional" />
												<xs:attribute name="ProgramToDate" type="date" use="optional" />
												<xs:attribute name="ProgramToTime" type="time" use="optional" />
												<xs:attribute name="ProgramLevel" type="codeList" use="optional" />
												<xs:attribute name="ProgramLevelFromDate" type="date" use="optional" />
												<xs:attribute name="ProgramLevelFromTime" type="time" use="optional" />
												<xs:attribute name="CurrentlyPregnant" type="codeList" use="optional" />
												<xs:attribute name="IVDrugUser" type="codeList" use="optional" />
											</xs:complexType>
										</xs:element>

                    <xs:element name="Assessments" minOccurs="0">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="AssessmentCPSStatusReport" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                  <xs:attribute name="ReportingDate" type="date" use="required">
                                  </xs:attribute>
                                  <xs:attribute name="ModifiedGAFScore" type="xs:int" use="optional">
                                  </xs:attribute>
                                  <xs:attribute name="CPSAssessmentType" type="codeList" use="required">
                                  </xs:attribute>
                                  <xs:attribute name="CPSResidentialStatus" type="codeList"  use="required">
                                  </xs:attribute>
                                  <xs:attribute name="CPSEducationAttendanceStatus" type="codeList"  use="required">
                                  </xs:attribute>
                                  <xs:attribute name="CPSEducationLevel" type="codeList"  use="required">
                                  </xs:attribute>
                                  <xs:attribute name="CPSEmploymentStatus" type="codeList"  use="required">
                                  </xs:attribute>
                                  <xs:attribute name="PartTimeEstWeeklyHours" type="xs:int"  use="optional">
                                  </xs:attribute>
                                  <xs:attribute name="NumberOfArrestsLast30Days" type="codeList"  use="optional">
                                  </xs:attribute>
                                  <xs:attribute name="TobaccoUse" type="yesNoUnknown" use="required">
                                  </xs:attribute>
                                  <xs:attribute name="MoreThanStandardDrinks" type="yesNoUnknown" use="required">
                                  </xs:attribute>
                                  <xs:attribute name="DrinkingMoreThanMeant" type="yesNoUnknown" use="required">
                                  </xs:attribute>
                                  <xs:attribute name="DrinkingThinkShouldCutBack" type="yesNoUnknown" use="required">
                                  </xs:attribute>
                                  <xs:attribute name="DrugUsage" type="yesNoUnknown" use="required">
                                  </xs:attribute>
                                </xs:complexType>
                              </xs:element>
                              <xs:element name="AssessmentASI" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                  <!--<xs:attribute name="ASIType" type="xs:int" use="required" />-->
                                  <!-- Field "ASIType" is not needed for batch input as it is stored as (1: Add)with in stored procedure -->
                                  <xs:attribute name="AssessmentScreeningStatus" type="codeList" use="required" />
                                  <!-- (codeList: AssessmentScreeningStatus) -->

                                  <!--<xs:attribute name="AssessmentTimer" type="" use="optional" /> This Field is not needed for batch input as it is not being used anywhere as Email conversation with Christy -->
                                  <!-- <xs:attribute name="AssessmentVersion" type="" use="optional" /> This Field is not needed for batch input as currently it is being stored as NULL from CIMOR screens. -->

                                  <xs:attribute name="Completed" type="xs:int" use="optional" />
                                  <!--0:Refused, 1:Unable to respond, 2:Terminated, 3:Completed  -->
                                  <xs:attribute name="YearsResidence" type="xs:int" use="optional" />
                                  <!-- How long have you lived at your current address? (between 1 amd 100) -->
                                  <xs:attribute name="MonthsResidence" type="xs:int" use="optional" />
                                  <!--(between 1 & 11) -->
                                  <xs:attribute name="ResOwned" type="yesno" use="optional" />
                                  <xs:attribute name="ControlEnv" type="xs:int" use="optional" />
                                  <!-- ((between 0 amd 5) 0:No, 1:Jail, 2:Alcohol/Drug Treatment, 3:Medical Treatment, 4:Psychiatric Treatment, 5:Other) Have you been in a controlled environment in the past 30 days? -->
                                  <xs:attribute name="SpecifyControl" type="xs:string" use="optional" />
                                  <!-- (maxLength: 50) -->
                                  <xs:attribute name="DaysControlled" type="xs:int" use="optional" />
                                  <!-- How many days were you in a controlled environment in the past 30?  (between 0 amd 30) -->


                                  <xs:attribute name="TimesHospital" type="xs:int" use="optional" />
                                  <!-- How many times in your life have you been hospitalized for medical problems? (Include od's, dt's, but exclude detox.)-->
                                  <xs:attribute name="YearsHospital" type="xs:int" use="optional" />
                                  <!-- How long ago was your last hospitalization for a physical problem? -->
                                  <xs:attribute name="MosHospital" type="xs:int" use="optional" />
                                  <!-- (between 1 & 11) -->
                                  <xs:attribute name="ChronicMed" type="yesno" use="optional" />
                                  <!-- Do you have any chronic medical problems which continue to interfere with your life?-->
                                  <xs:attribute name="SpecifyChronicMed" type="xs:string" use="optional" />
                                  <!-- (maxLength: 50) -->
                                  <xs:attribute name="Medication" type="yesno" use="optional" />
                                  <!-- Are you taking any prescribed medication on a regular basis for a physical problem?-->
                                  <xs:attribute name="Pension" type="yesno" use="optional" />
                                  <xs:attribute name="PensionSpecify" type="xs:string" use="optional" />
                                  <!-- (maxLength: 50) Do you receive a pension for a physical disability? (Exclude psychiatric disability.)-->
                                  <xs:attribute name="DaysMedical" type="xs:int" use="optional" />
                                  <!-- (between 0 & 30) How many days have you experienced medical problems in the past 30?-->
                                  <xs:attribute name="BotheredMedical" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) How troubled or bothered have you been by these medical problems in the past 30 days-->
                                  <!-- AssessmentBothered: 
                                    0	Not at all, 1	Slightly, 2	Moderately, 3	Considerably, 4	Extremely   
                                  -->
                                  <xs:attribute name="ImportantMedical" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) How important to you now is treatment for these medical problems? -->
                                  <xs:attribute name="SevRangeMedical" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentSeverityRange) -->
                                  <!--<xs:attribute name="SeverityRatingMedical" type="xs:string" use="optional" /> -->
                                  <!-- (maxLength: 50) Interviewer severity rating: -->
                                  <xs:attribute name="MisMedical" type="yesno" use="optional" />
                                  <!-- Patient's misrepresentation? -->
                                  <xs:attribute name="UnderstandMedical" type="yesno" use="optional" />
                                  <!-- Patient's inability to understand?-->
                                  <!--<xs:attribute name="CompositeMedical" type="xs:decimal" use="optional" /> Not needed for batch input as this field is being calculated inside code -->
                                  <!-- AssessmentSeverityRange: 
                                    0	  0-2 no-slt prblm, TX none-prb none
                                    1	  1-3 no-slt prblm, TX none-prb none
                                    2	  2-4 slt-mod prblm, TX prb none-prb necss
                                    3	  3-5 slt-mod prblm, TX prb none-prb necss
                                    4	  4-6 mod-consid prblm, TX prb necss-necss
                                    5	  5-7 mod-consid prblm, TX prb necss-necss
                                    6	  6-8 consid-extr prblm, TX necss-abs necss
                                    7	  7-9 consid-extr prblm, TX necss-abs necss
                                  -->

                                  <xs:attribute name="EducationYrs" type="xs:int" use="optional" />
                                  <!-- Education completed -->
                                  <xs:attribute name="EducationMos" type="xs:int" use="optional" />
                                  <!-- (between 1 & 11)-->
                                  <xs:attribute name="Training" type="xs:int" use="optional" />
                                  <!-- Training or technical education completed-->
                                  <xs:attribute name="Profession" type="yesno" use="optional" />
                                  <!-- Do you have a profession, trade or skill?-->
                                  <xs:attribute name="ProfessionSpecify" type="xs:string" use="optional" />
                                  <xs:attribute name="DriversLicense" type="yesno" use="optional" />
                                  <!-- Do you have a valid driver's license?-->
                                  <xs:attribute name="Automobile" type="yesno" use="optional" />
                                  <!-- Do you have an automobile available for your use? -->
                                  <xs:attribute name="JobYrs" type="xs:int" use="optional" />
                                  <!-- Length of your longest fulltime job in Years  -->
                                  <xs:attribute name="JobMos" type="xs:int" use="optional" />
                                  <!--(between 1 & 11) and Months -->
                                  <xs:attribute name="Occupation" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentOccupation) Usual (or last) occupation -->
                                  <!-- AssessmentOccupation:
                                    1	  1 - Bus. mgr, prop'tr med-size concern, lesser prof'l
                                    2	  2 - Admin personnel, sm business prop'tr, minor prof'l
                                    3	  3 - Clerical, sales worker, technician
                                    4	  4 - Skilled manual laborer
                                    5	  5 - Machine operator, semi-skilled worker
                                    6	  6 - Unskilled
                                    9	  0 - Higher exec, major prop'tr (CEO), major prof'l 
                                  -->
                                  <xs:attribute name="SomeoneSupport" type="yesno" use="optional" />
                                  <!-- Does someone contribute to your support in any way?-->
                                  <xs:attribute name="MajoritySupport" type="yesno" use="optional" />
                                  <!-- Does this constitute the majority of your support?-->
                                  <xs:attribute name="UsualEmployment" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentEmploymentPattern) Usual employment pattern, past 3 years-->
                                  <!-- 
                                  AssessmentEmploymentPattern:
                                    1	  Part Time (reg. hrs)
                                    2	  Part Time (irregular, daywork)
                                    3	  Student
                                    4	  Military Service
                                    5	  Retired/Disability
                                    6	  Unemployed
                                    7	  In Controlled Environment
                                    9	  Full Time (40 hrs/wk) 
                                  -->

                                  <xs:attribute name="PaidForWorking" type="xs:int" use="optional" />
                                  <!-- How many days were you paid for working in the past 30? (between 0 and 30) -->
                                  <xs:attribute name="IncomeEmployment" type="decimalZeroPrec" use="optional" />
                                  <!-- decimalZeroPrec is a Simple Type with Zero precision on decimal places.  How much money did you receive from the following sources in the past 30 days?-->
                                  <xs:attribute name="IncomeUnemployment" type="xs:decimal" use="optional" />
                                  <!-- Unemployment compensation -->
                                  <xs:attribute name="IncomeDPA" type="xs:decimal" use="optional" />
                                  <xs:attribute name="IncomePension" type="xs:decimal" use="optional" />
                                  <xs:attribute name="IncomeFriends" type="xs:decimal" use="optional" />
                                  <xs:attribute name="IncomeIllegal" type="decimalZeroPrec" use="optional" />
                                  <xs:attribute name="NumPeopleDepend" type="xs:int" use="optional" />
                                  <!-- How many people depend on you for the majority of their food, shelter, etc?-->
                                  <xs:attribute name="DaysEmpProblems" type="xs:int" use="optional" />
                                  <!-- How many days have you experienced employment problems in the past 30? (between 0 and 30)-->
                                  <xs:attribute name="BotheredEmployment" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered)  How troubled or bothered have you been by these employment problems in the past 30 days? (between 0 and 30)-->
                                  <xs:attribute name="HowImportantEmployment" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) How important to you now is counseling for these employment problems?-->
                                  <xs:attribute name="SeverityRangeEmployment" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentSeverityRange) -->
                                  <!--<xs:attribute name="SeverityRatingEmployment" type="xs:string" use="optional" />-->
                                  <!--  -->
                                  <xs:attribute name="MisEmployment" type="yesno" use="optional" />
                                  <!-- Patient's misrepresentation? -->
                                  <xs:attribute name="UnderstandEmployment" type="yesno" use="optional" />
                                  <!-- Patient's inability to understand? -->
                                  <!--<xs:attribute name="CompositeEmployment" type="xs:decimal" use="optional" /> Not needed for batch input as this field is being calculated inside code (Float) -->


                                  <xs:attribute name="AlcoholAnyPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Alcohol - any use at all -->
                                  <xs:attribute name="AlcoholAnyLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="AlcoholAnyRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminAlcohol) -->
                                  <!-- 
                                  AssessmentRouteAdminAlcohol: 
                                    9	      Oral
                                    Sniff	  Sniff
                                  -->
                                  <xs:attribute name="AlcoholIntoxPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Alcohol - to intoxication -->
                                  <xs:attribute name="AlcoholIntoxLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="AlcoholIntoxRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminAlcohol) -->
                                  <xs:attribute name="HeroinPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Heroin -->
                                  <xs:attribute name="HeroinLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="HeroinRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminDrugs) -->
                                  <!-- 
                                  AssessmentRouteAdminDrugs:
                                    1	  Nasal
                                    2	  Smoking
                                    3	  Non IV Inj
                                    4	  IV Inj
                                    9	  Oral  
                                  -->
                                  <xs:attribute name="MethadonePast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Methadone -->
                                  <xs:attribute name="MethadoneLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="MethadoneRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminDrugs) -->
                                  <xs:attribute name="OpiatesPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Other opiat/analges -->
                                  <xs:attribute name="OpiatesLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="OpiatesRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminDrugs) -->
                                  <xs:attribute name="BarbituratesPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Barbiturates -->
                                  <xs:attribute name="BarbituratesLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="BarbituratesRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminDrugs) -->
                                  <xs:attribute name="SedPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Other sed/hyp/tranq -->
                                  <xs:attribute name="SedLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="SedRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminDrugs) -->
                                  <xs:attribute name="CocainePast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Cocaine -->
                                  <xs:attribute name="CocaineLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="CocaineRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminDrugs) -->
                                  <xs:attribute name="AmphetaminesPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Amphetamines -->
                                  <xs:attribute name="AmphetaminesLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="AmphetaminesRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminDrugs) -->
                                  <xs:attribute name="CannabisPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Cannabis -->
                                  <xs:attribute name="CannabisLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="CannabisRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminCannabis) -->
                                  <xs:attribute name="HallucinogensPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Hallucinogens -->
                                  <xs:attribute name="HallucinogensLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="HallucinogensRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminDrugs) -->
                                  <xs:attribute name="InhalantsPast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) Inhalants -->
                                  <xs:attribute name="InhalantsLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="InhalantsRtAdmin" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentRouteAdminInhalants) -->
                                  <xs:attribute name="MoreThanOnePast30" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) More than one substance per day (including alcohol)-->
                                  <xs:attribute name="MoreThanOneLifetime" type="xs:int" use="optional" />
                                  <xs:attribute name="MajorProblem" type="codeList" use="optional" />
                                  <!-- (Note: Only certain values are loaded in dropdown based on the criteria as defined below.  codeList: AssessmentMajorProblem ) Which substance is the major problem? -->
                                  <!--
                                  if (AlcoholAnyLifetime > 0 || AlcoholAnyPast30 > 0) txtMajorProblemAdd("1: Alcohol - Any use at all");
                                  if (AlcoholIntoxLifetime > 0 || AlcoholIntoxPast30 > 0) txtMajorProblemAdd("2: Alcohol - To intoxication");	
                                  if (HeroinLifetime > 0 || HeroinPast30 > 0) txtMajorProblemAdd("3: Heroin");
                                  if (MethadoneLifetime > 0 || MethadonePast30) txtMajorProblemAdd("4: Methadone");	
                                  if (OpiatesLifetime > 0 || OpiatesPast30) txtMajorProblemAdd("5: Other opiates/analgesics"); 
                                  if (BarbituratesLifetime > 0 || BarbituratesPast30 > 0) txtMajorProblemAdd("6: Barbiturates");
                                  if (SedLifetime > 0 || SedPast30) txtMajorProblemAdd("7: Other sed/hyp/tranq");
                                  if (CocaineLifetime > 0 || CocainePast30 > 0) txtMajorProblemAdd("8: Cocaine");
                                  if (AmphetaminesLifetime > 0 || AmphetaminesPast30) txtMajorProblemAdd("9: Amphetamines");
                                  if (CannabisLifetime > 0 || CannabisPast30) txtMajorProblemAdd("10: Cannabis");
                                  if (HallucinogensLifetime > 0 || HallucinogensPast30) txtMajorProblemAdd("11: Hallucinogens");
                                  if (InhalantsLifetime > 0 || InhalantsPast30) txtMajorProblemAdd("12: Inhalants");
                                  if (MoreThanOneLifetime > 0 || MoreThanOnePast30) txtMajorProblemAdd("15: Alcohol & Drug"); txtMajorProblemAdd("16: Polydrug");
                                  -->
                                  <xs:attribute name="Abstinence" type="xs:int" use="optional" />
                                  <!-- How long was your last period of voluntary abstinence from this major substance? (00-never abstinent)-->
                                  <xs:attribute name="AbstinenceEnded" type="xs:int" use="optional" />
                                  <!-- How many months ago did this abstinence end? (00-still abstinent)-->

                                  <xs:attribute name="TimesAlcoholDTs" type="xs:int" use="optional" />
                                  <!-- How many times have you Had alcohol DT's-->
                                  <xs:attribute name="TimesDrugOD" type="xs:int" use="optional" />
                                  <!-- OD'd on drugs-->
                                  <xs:attribute name="TimesTreatedAlcohol" type="xs:int" use="optional" />
                                  <!-- How many times have you been treated for Alcohol abuse -->
                                  <xs:attribute name="TimesTreatedDrug" type="xs:int" use="optional" />
                                  <!-- Drug abuse-->
                                  <xs:attribute name="TimesDetoxAlcohol" type="xs:int" use="optional" />
                                  <!-- How many of these were for detox only? -->
                                  <xs:attribute name="TimesDetoxDrug" type="xs:int" use="optional" />
                                  <xs:attribute name="SpentAlcohol" type="decimalZeroPrec" use="optional" />
                                  <!-- decimalZeroPrec is a Simple Type with Zero precision on decimal places.  How much would you say you spent during the past 30 days on-->
                                  <xs:attribute name="SpentDrug" type="xs:decimal" use="optional" />
                                  <!--<xs:attribute name="Outpatient" type="xs:int" use="optional" />  Following Field is not allowed for batch input because field "OutpatientDays" is stored in bothe the table fields AD_OUTPATIENT_DAYS (smallint) and PSYCH_OUT_PATIENT (varchar(2))-->
                                  <xs:attribute name="OutpatientDays" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) How many days have you been treated in an outpatient setting for alcohol or drugs in the past 30 days? (Include NA, AA)-->
                                  <xs:attribute name="DaysIn30Alcohol" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) How many days in the past 30 have you experienced-->
                                  <xs:attribute name="DaysIn30Drug" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) -->
                                  <xs:attribute name="BotheredAlcohol" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) How troubled or bothered have you been in the past 30 days by these:-->
                                  <xs:attribute name="BotheredDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered)  -->
                                  <xs:attribute name="HowImportantAlcohol" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) How important to you now is treatment for these -->
                                  <xs:attribute name="IntSeverityRangeAlcohol" type="codeList" use="optional" />
                                  <!--  (codeList: AssessmentSeverityRange) Interviewer severity range -->
                                  <!--<xs:attribute name="SeverityRatingAlcohol" type="xs:string" use="optional" /> -->
                                  <!-- (maxLength: 50) Interviewer severity rating-->
                                  <xs:attribute name="HowImportantDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) -->
                                  <xs:attribute name="IntSeverityRangeDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentSeverityRange) Interviewer severity range -->
                                  <!--<xs:attribute name="SeverityRatingDrug" type="xs:string" use="optional" />-->
                                  <!-- (maxLength: 50) Interviewer severity rating-->
                                  <xs:attribute name="MisSubstance" type="yesno" use="optional" />
                                  <!-- Patient's misrepresentation?-->
                                  <xs:attribute name="UnderstandSubstance" type="yesno" use="optional" />
                                  <!-- Patient's inability to understand?-->
                                  <!-- <xs:attribute name="CompositeAlcohol" type="xs:decimal" use="optional" /> Not needed for batch input as this field is being calculated inside code (Float) -->
                                  <!-- <xs:attribute name="CompositeDrug" type="xs:decimal" use="optional" /> Not needed for batch input as this field is being calculated inside code (Float) -->


                                  <xs:attribute name="AdmissionPrompted" type="yesno" use="optional" />
                                  <!-- Was this admission prompted or suggested by the criminal justice system?-->
                                  <xs:attribute name="Probation" type="yesno" use="optional" />
                                  <!-- Are you on probation or parole? -->
                                  <!-- >How many times in your life have you been arrested and charged with the following-->
                                  <xs:attribute name="Arrest" type="xs:int" use="optional" />
                                  <!-- Shoplifting/vandalism -->
                                  <xs:attribute name="Arrest0" type="xs:int" use="optional" />
                                  <!-- Parole/probation violations-->
                                  <xs:attribute name="Arrest1" type="xs:int" use="optional" />
                                  <!-- Drug offenses -->
                                  <xs:attribute name="Arrest2" type="xs:int" use="optional" />
                                  <!-- Forgery -->
                                  <xs:attribute name="Arrest3" type="xs:int" use="optional" />
                                  <!-- Weapons offense-->
                                  <xs:attribute name="Arrest4" type="xs:int" use="optional" />
                                  <!-- Burglary, larceny, B&E-->
                                  <xs:attribute name="Arrest5" type="xs:int" use="optional" />
                                  <!-- Robbery-->
                                  <xs:attribute name="Arrest6" type="xs:int" use="optional" />
                                  <!-- Assault-->
                                  <xs:attribute name="Arrest7" type="xs:int" use="optional" />
                                  <!-- Arson-->
                                  <xs:attribute name="Arrest8" type="xs:int" use="optional" />
                                  <!-- Rape-->
                                  <xs:attribute name="Arrest9" type="xs:int" use="optional" />
                                  <!-- Homicide, manslaughter-->
                                  <xs:attribute name="ArrestA" type="xs:int" use="optional" />
                                  <!-- Prostitution-->
                                  <xs:attribute name="ArrestB" type="xs:int" use="optional" />
                                  <!-- Contempt of court-->
                                  <xs:attribute name="ArrestC" type="xs:int" use="optional" />
                                  <!-- Other-->
                                  <xs:attribute name="Convictions" type="xs:int" use="optional" />
                                  <!-- How many of these charges resulted in convictions?-->



                                  <!-- How many times in your life have you been charged with the following:-->
                                  <xs:attribute name="Charged" type="xs:int" use="optional" />
                                  <!-- Disorderly conduct, vagrancy, public intoxication -->
                                  <xs:attribute name="Charged0" type="xs:int" use="optional" />
                                  <!-- DWI: Driving while intoxicated -->
                                  <xs:attribute name="ChargedDriving" type="xs:int" use="optional" />
                                  <!-- Major driving violations (reckless driving, speeding, no license, etc) -->
                                  <xs:attribute name="MosIncarcerated" type="xs:int" use="optional" />
                                  <!-- How many months were you incarcerated in your life?-->
                                  <xs:attribute name="MosLastIncarceration" type="xs:int" use="optional" />
                                  <!-- How long was your last incarceration?-->
                                  <xs:attribute name="ReasonLastIncarceration" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentLegalReason) What was it for? (If multiple, then most serious)-->
                                  <!-- 
                                  AssessmentLegalReason:
                                    03	  Shoplifting/vandalism
                                    04	  Parole/probation violations
                                    05	  Drug charges
                                    06	  Forgery
                                    07	  Weapons offense
                                    08	  Burglary, larceny, B & E
                                    09	  Robbery
                                    10	  Assault
                                    11	  Arson
                                    12	  Rape
                                    13	  Homicide, manslaughter
                                    14A	  Prostitution
                                    14B	  Contempt of court
                                    16	  Dis. conduct, vagrancy, pub. intox.
                                    17	  Driving while intoxicated
                                    18	  Major driving violations
                                    14C	  Other 
                                  -->
                                  <xs:attribute name="Awaiting" type="yesno" use="optional" />
                                  <!-- Are you presently awaiting charges, trial or sentence?-->
                                  <xs:attribute name="ReasonAwaiting" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentLegalReason) What for? (If multiple, then most serious)-->

                                  <xs:attribute name="DaysIncarcerated" type="xs:int" use="optional" />
                                  <!-- (between 0 & 30) How many days in the past 30 were you detained or incarcerated?-->
                                  <xs:attribute name="DaysEngagedIllegal" type="xs:int" use="optional" />
                                  <!-- (between 0 & 30) How many days in the past 30 were you engaged in illegal activities for profit?-->
                                  <xs:attribute name="BotheredLegal" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) How serious do you feel your present legal problems are? (Exclude civil problems)-->
                                  <xs:attribute name="HowImportantLegal" type="codeList" use="optional" />
                                  <!--  (codeList: AssessmentBothered) How important to you now is counseling or referral for these legal problems?-->
                                  <!--<xs:attribute name="SeverityRatingLegal" type="xs:string" use="optional" /> -->
                                  <!-- (maxLength: 50) Interviewer severity rating-->
                                  <xs:attribute name="IntSeverityRangeLegal" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentSeverityRange) Interviewer severity range -->
                                  <xs:attribute name="MisLegal" type="yesno" use="optional" />
                                  <!-- Patient's misrepresentation? -->
                                  <xs:attribute name="UnderstandLegal" type="yesno" use="optional" />
                                  <!-- Patient's inability to understand? -->
                                  <!-- <xs:attribute name="CompositeLegal" type="xs:decimal" use="optional" /> Not needed for batch input as this field is being calculated inside code (Float) -->


                                  <!-- Have any of your relatives had what you would call a significant drinking, drug use or psych problem - one that did or should have led to treatment?-->
                                  <!-- Mother's side: -->
                                  <xs:attribute name="MatGMAlc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Maternal Grandmother -->
                                  <!-- 
                                  AssessmentFamilyHistory:
                                    No	        No
                                    NoRelatives	No relatives in this category
                                    Yes	        Yes
                                    Unknown	    Unknown                                  
                                  -->
                                  <xs:attribute name="MatGMDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MatGMPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MatGFAlc" type="codeList" use="optional" />
                                  <!-- Maternal Grandfather-->
                                  <xs:attribute name="MatGFDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MatGFPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MotherAlc" type="codeList" use="optional" />
                                  <!-- Mother-->
                                  <xs:attribute name="MotherDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MotherPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MatAuntAlc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Maternal Aunt -->
                                  <xs:attribute name="MatAuntDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MatAuntPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MatUncleAlc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Maternal Uncle-->
                                  <xs:attribute name="MatUncleDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="MatUnclePsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Father's side-->
                                  <xs:attribute name="PatGMAlc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Paternal Grandmother -->
                                  <xs:attribute name="PatGMDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="PatGMPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="PatGFAlc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Paternal Grandfather-->
                                  <xs:attribute name="PatGFDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="PatGFPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="FatherAlc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Father -->
                                  <xs:attribute name="FatherDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="FatherPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="PatAuntAlc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Paternal Aunt-->
                                  <xs:attribute name="PatAuntDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="PatAuntPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="PatUncleAlc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Paternal Uncle-->
                                  <xs:attribute name="PatUncleDrug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="PatUnclePsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Siblings -->
                                  <xs:attribute name="Bro1Alc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Brother #1-->
                                  <xs:attribute name="Bro1Drug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="Bro1Psych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="Bro2Alc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Brother #2-->
                                  <xs:attribute name="Bro2Drug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="Bro2Psych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="Sis1Alc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Sister #1-->
                                  <xs:attribute name="Sis1Drug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="Sis1Psych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="Sis2Alc" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <!-- Sister #2-->
                                  <xs:attribute name="Sis2Drug" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="Sis2Psych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory)-->
                                  <xs:attribute name="EffectOnFamily" type="xs:string" use="optional" />
                                  <!-- (Text) Effect on other family members-->



                                  <xs:attribute name="MaritalStatus" type="codeList" use="optional" />
                                  <!-- (codeList: "Marital Status") Marital status -->
                                  <!-- 
                                  Marital Status:
                                    1	  Never Married
                                    2	  Married
                                    3	  Widowed
                                    4	  Divorced
                                    5	  Separated
                                    6	  Remarried
                                    CL	Common Law
                                    LAM	Living as married
                                    LT	Living Together
                                    U2	Unknown (not valid for ADA) 
                                  -->
                                  <xs:attribute name="MaritalYrs" type="xs:int" use="optional" />
                                  <!-- How long have you been in this marital status? -->
                                  <xs:attribute name="MaritalMos" type="xs:int" use="optional" />
                                  <!-- (between 1 & 11) -->
                                  <xs:attribute name="MaritalSatis" type="yesNoIndiff" use="optional" />
                                  <!-- (between 0 & 2) Are you satisfied with this situation? 1: Indifferent, 2: Yes, 0: No -->
                                  <xs:attribute name="LivingArrangement" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentLivingArrangement) Usual living arrangement (past 3 yrs) -->
                                  <!-- 
                                  AssessmentLivingArrangement:
                                    1	  With sexual partner alone
                                    2	  With children alone
                                    3	  With parents
                                    4	  With family
                                    5	  With friends
                                    6	  Alone
                                    7	  Controlled environment
                                    8	  No stable arrangements
                                    9	  With sexual partner and children 
                                  -->
                                  <xs:attribute name="LivingYrs" type="xs:int" use="optional" />
                                  <!-- How long have you lived in these arrangements? (If with parents or family since age 18)-->
                                  <xs:attribute name="LivingMos" type="xs:int" use="optional" />
                                  <!-- (between 1 & 11) -->
                                  <xs:attribute name="LivingSatis" type="yesNoIndiff" use="optional" />
                                  <!-- (between 0 & 2) Are you satisfied with these living arrangements? 1: Indifferent, 2: Yes, 0: No -->
                                  <xs:attribute name="LiveWithAlcohol" type="yesno" use="optional" />
                                  <!-- Do you live with anyone who has a current alcohol problem?-->
                                  <xs:attribute name="LiveWithDrugs" type="yesno" use="optional" />
                                  <!-- Do you live with anyone who uses non-prescribed drugs?-->
                                  <xs:attribute name="FreeTime" type="xs:int" use="optional" />
                                  <!-- (bteween 0 & 2) With whom do you spend most of your free time? 1: Friends, 0: Family, 2: Alone-->
                                  <xs:attribute name="SatisFreeTime" type="yesNoIndiff" use="optional" />
                                  <!-- (between 0 & 2) Are you satisfied with spending your free time this way? 1: Indifferent, 2: Yes, 0: No -->
                                  <xs:attribute name="NumFriends" type="xs:int" use="optional" />
                                  <!-- How many close friends do you have?-->
                                  <!-- Would you say you have had close, long-lasting personal relationships with any of the following people in your life?-->
                                  <xs:attribute name="CloseMother" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory) -->
                                  <xs:attribute name="CloseFather" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory) -->
                                  <xs:attribute name="CloseSiblings" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory) -->
                                  <xs:attribute name="CloseSpouse" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory) -->
                                  <xs:attribute name="CloseChildren" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory) -->
                                  <xs:attribute name="CloseFriends" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentFamilyHistory) -->
                                  <!-- Have you had significant periods in which you have experienced serious problems with?-->
                                  <xs:attribute name="ProblemMother" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) Past 30 days-->
                                  <xs:attribute name="ProblemMotherLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <xs:attribute name="ProblemFather" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) Past 30 days-->
                                  <xs:attribute name="ProblemFatherLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <xs:attribute name="ProblemSiblings" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) Past 30 days-->
                                  <xs:attribute name="ProblemSiblingsLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <xs:attribute name="ProblemSpouse" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) Past 30 days-->
                                  <xs:attribute name="ProblemSpouseLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <xs:attribute name="ProblemChildren" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No ) Past 30 days-->
                                  <xs:attribute name="ProblemChildrenLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <xs:attribute name="ProblemOther" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) Past 30 days  Other significant family-->
                                  <xs:attribute name="ProblemOtherLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <xs:attribute name="ProblemFriends" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) Past 30 days-->
                                  <xs:attribute name="ProblemFriendsLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <xs:attribute name="ProblemNeighbors" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) Past 30 days-->
                                  <xs:attribute name="ProblemNeighborsLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <xs:attribute name="ProblemCoWorkers" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) Past 30 days-->
                                  <xs:attribute name="ProblemCoWorkersLife" type="xs:boolean" use="required" />
                                  <!-- (1: Yes, 0: No) In your life-->
                                  <!-- Did any of these people (10-18) abuse you? -->
                                  <xs:attribute name="AbuseEmotional30" type="xs:boolean" use="required" />
                                  <xs:attribute name="AbuseEmotionalLife" type="xs:boolean" use="required" />
                                  <xs:attribute name="AbusePhysical30" type="xs:boolean" use="required" />
                                  <xs:attribute name="AbusePhysicalLife" type="xs:boolean" use="required" />
                                  <xs:attribute name="AbuseSexual30" type="xs:boolean" use="required" />
                                  <xs:attribute name="AbuseSexualLife" type="xs:boolean" use="required" />
                                  <!-- How many days in the past 30 have you had serious conflicts? -->
                                  <xs:attribute name="ConflictsFamily" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) -->
                                  <xs:attribute name="ConflictsOther" type="xs:int" use="optional" />
                                  <!-- (between 0 and 30) -->
                                  <!-- How troubled or bothered have you been in the past 30 days by these?-->
                                  <xs:attribute name="BotheredFamily" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered)  Family problems -->
                                  <xs:attribute name="BotheredSocial" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered)  Social problems -->
                                  <!-- How important to you is treatment or counseling for these? -->
                                  <xs:attribute name="HowImportantFamily" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) Family problems -->
                                  <xs:attribute name="HowImportantSocial" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) Social problems -->
                                  <xs:attribute name="IntSeverityRangeFS" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentSeverityRange) Interviewer severity range -->
                                  <!--<xs:attribute name="SeverityRatingFS" type="xs:string" use="optional" />  -->
                                  <!-- (maxLength:50)  Interviewer severity rating -->
                                  <xs:attribute name="MisFS" type="yesno" use="optional" />
                                  <!-- Patient's misrepresentation? -->
                                  <xs:attribute name="UnderstandFS" type="yesno" use="optional" />
                                  <!-- Patient's inability to understand?-->
                                  <!-- <xs:attribute name="CompositeSocial" type="xs:decimal" use="optional" /> Not needed for batch input as this field is being calculated inside code (Float) -->



                                  <!-- How many times have you been treated for any psychological or emotional problems?-->
                                  <xs:attribute name="TreatedHospital" type="xs:int" use="optional" />
                                  <!-- In a hospital-->
                                  <xs:attribute name="TreatedPriv" type="xs:int" use="optional" />
                                  <!-- As an Opt or Priv patient-->
                                  <xs:attribute name="PensionPsych" type="yesno" use="optional" />
                                  <!-- Do you receive a pension for a psychiatric disability?-->
                                  <!-- Have you had a significant period (that was not a direct result of drug/alcohol use), in which you have experienced-->
                                  <xs:attribute name="Depression" type="xs:boolean" use="optional" />
                                  <!-- Past 30 days -->
                                  <xs:attribute name="DepressionLife" type="xs:boolean" use="optional" />
                                  <!-- In your life-->
                                  <xs:attribute name="Anxiety" type="xs:boolean" use="required" />
                                  <!-- Past 30 days -->
                                  <xs:attribute name="AnxietyLife" type="xs:boolean" use="required" />
                                  <!-- In your life-->
                                  <xs:attribute name="HalPsych" type="xs:boolean" use="required" />
                                  <!-- Past 30 days -->
                                  <xs:attribute name="HalPsychLife" type="xs:boolean" use="required" />
                                  <!-- In your life-->
                                  <xs:attribute name="TroubleUnderstand" type="xs:boolean" use="required" />
                                  <!-- Past 30 days -->
                                  <xs:attribute name="TroubleUnderLife" type="xs:boolean" use="required" />
                                  <!-- In your life-->
                                  <xs:attribute name="ViolentBehaviour" type="xs:boolean" use="required" />
                                  <!-- Past 30 days -->
                                  <xs:attribute name="ViolentBehaviourLife" type="xs:boolean" use="required" />
                                  <!-- In your life-->
                                  <xs:attribute name="Suicide" type="xs:boolean" use="required" />
                                  <!-- Past 30 days -->
                                  <xs:attribute name="SuicideLife" type="xs:boolean" use="required" />
                                  <!-- In your life-->
                                  <xs:attribute name="AttemptedSuicide" type="xs:boolean" use="required" />
                                  <!-- Past 30 days -->
                                  <xs:attribute name="AttemptedSuicideLife" type="xs:boolean" use="required" />
                                  <!-- In your life-->
                                  <xs:attribute name="PrescribedPsych" type="xs:boolean" use="required" />
                                  <!-- Past 30 days -->
                                  <xs:attribute name="PrescribedPsychLife" type="xs:boolean" use="required" />
                                  <!-- In your life-->

                                  <xs:attribute name="ExperiencedPsych" type="xs:int" use="optional" />
                                  <!-- How many days in the past 30 have you experienced these psychological problems?-->
                                  <xs:attribute name="BotheredPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered)  How much have you been troubled by these psychological or emotional problems in the past 30 days?-->
                                  <xs:attribute name="HowImportantPsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentBothered) How important to you now is treatment for these psychological problems?-->
                                  <!-- At the time of the interview, is the patient:-->
                                  <xs:attribute name="PatientDepressed" type="xs:boolean" use="required" />
                                  <!-- Obviously depressed/withdrawn-->
                                  <xs:attribute name="PatientHostile" type="xs:boolean" use="required" />
                                  <!-- Obviously hostile-->
                                  <xs:attribute name="PatientAnxious" type="xs:boolean" use="required" />
                                  <!-- Obviously anxious/nervous-->
                                  <xs:attribute name="PatientReality" type="xs:boolean" use="required" />
                                  <!-- Having trouble with reality testing, thought disorders, paranoid thinking-->
                                  <xs:attribute name="PatientComprehend" type="xs:boolean" use="required" />
                                  <!-- Having trouble comprehending, concentrating, remembering-->
                                  <xs:attribute name="PatientSuicidal" type="xs:boolean" use="required" />
                                  <!-- Having suicidal thoughts-->
                                  <xs:attribute name="SeverityRangePsych" type="codeList" use="optional" />
                                  <!-- (codeList: AssessmentSeverityRange) Interviewer severity range: -->
                                  <!--<xs:attribute name="SeverityRatingPsych" type="xs:string" use="optional" /> -->
                                  <!-- (maxLength: 50) Interviewer severity rating-->
                                  <xs:attribute name="MisPsych" type="yesno" use="optional" />
                                  <!-- Patient's misrepresentation?-->
                                  <xs:attribute name="UnderstandPsych" type="yesno" use="optional" />
                                  <!-- Patient's inability to understand?-->
                                  <!--<xs:attribute name="CompositePsych" type="xs:decimal" use="optional" />  Not needed for batch input as this field is being calculated inside code (Float)-->

                                  <xs:attribute name="Notes" type="xs:string" use="optional" />
                                  <!-- (maxLength: less than 8000 chars) Assessment Notes-->

                                </xs:complexType>
                              </xs:element>
                              <xs:element name="AssessmentDLA" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element name="AssessmentDLAAnswer" minOccurs="20" maxOccurs="20">
                                      <xs:complexType>
                                        <xs:attribute name="Question" type="codeList" use="required" />
                                        <xs:attribute name="Score" type="codeList" use="required"/>
                                      </xs:complexType>
                                    </xs:element>
                                  </xs:sequence>
                                  <xs:attribute name="AssessmentDLAType" type="codeList" use="required"/>
                                  <xs:attribute name="AssessmentDate" type="date" use="required"/>
                                  <xs:attribute name="MGAFScore" type="xs:int" use="optional"/>
                                  <xs:attribute name="RaterLastName" type="xs:string" use="required"/>
                                  <xs:attribute name="RaterFirstName" type="xs:string" use="required"/>
                                </xs:complexType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>

                      </xs:sequence>
                  <xs:attribute name="Division" use="required">
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="4" />
												<xs:enumeration value="CPS" />
												<xs:enumeration value="ADA" />
												<xs:enumeration value="MRDD" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="EnrollingProviderSiteName" use="required">
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="64" />
												<xs:minLength value="1" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="EnrollingProviderSiteID" use="required">
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="64" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="AdmissionDateTime" type="dateTimeString" use="required" />
									<xs:attribute name="AdmissionReason" type="codeList" use="optional" />
									<xs:attribute name="ReferralSource" type="codeList" use="optional" />
                  <xs:attribute name="ReferralLocation" type="codeList" use="optional" />
                  <xs:attribute name="DateOfFirstReferralToEREorCMHL" type="date" use="optional" />
									<xs:attribute name="ReferralOffice" type="codeList" use="optional" />
									<xs:attribute name="LocalChartNumber" use="optional">
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="40" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="FamilySize" use="optional">
										<xs:simpleType>
											<xs:restriction base="xs:int" />
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="NumberOfChildrenInCare" use="optional">
										<xs:simpleType>
											<xs:restriction base="xs:int" />
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="DischargeReason" type="codeList" use="optional" />
									<xs:attribute name="DischargeDateTime" type="dateTimeString" use="optional" />
									<xs:attribute name="DischargeDiagnosisCode" use="optional">
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="16" />
												<xs:minLength value="1" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="TypeofFollowUp" type="codeList" use="optional" />
									<xs:attribute name="DOCID" use="optional">
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:minLength value="7" />
												<xs:maxLength value="7" />
												<xs:pattern value="\d{7}" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="InitialContactDate" type="date" use="optional" />
									<xs:attribute name="DOCHighRisk" type="yesno" use="optional" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="DocumentNumber" use="required">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:maxLength value="128" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="DocumentFunction" use="required">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:maxLength value="1" />
									<xs:minLength value="1" />
									<xs:enumeration value="0" />
									<xs:enumeration value="1" />
									<xs:enumeration value="2" />
									<xs:enumeration value="3" />
									<xs:enumeration value="4" />
									<xs:enumeration value="5" />
									<xs:enumeration value="6" />
									<xs:enumeration value="7" />
									<xs:enumeration value="8" />
                  <xs:enumeration value="A" />
                  <xs:enumeration value="T" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="DMHID" use="optional">
							<xs:simpleType>
								<xs:restriction base="xs:int">
									<xs:minInclusive value="1" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="date">
		<xs:restriction base="xs:date">
			<xs:pattern value="\d{4}-\d{2}-\d{2}" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="time">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d\d:\d\d(( *AM| *PM))?" />
		</xs:restriction>
	</xs:simpleType>
  <xs:simpleType name="decimalZeroPrec">
    <xs:restriction base="xs:decimal">
        <xs:fractionDigits value="0" />
    </xs:restriction>
  </xs:simpleType>
	<xs:simpleType name="yesno">
		<xs:restriction base="xs:string">
			<xs:minLength value="1" />
			<xs:maxLength value="1" />
			<xs:enumeration value="0" />
			<xs:enumeration value="1" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="dateTimeString">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{4}-\d{2}-\d{2} *\d\d:\d\d(( *AM| *PM))?" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="yesNoUnknown">
		<xs:restriction base="xs:string">
			<xs:minLength value="1" />  
			<xs:maxLength value="1" />
			<xs:enumeration value="0" />  <!-- No -->
			<xs:enumeration value="1" />  <!-- Yes -->
			<xs:enumeration value="2" />  <!-- Unknown -->
		</xs:restriction>
	</xs:simpleType>
  <xs:simpleType name="yesNoIndiff">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="1" />
      <xs:enumeration value="0" /> <!-- No -->
      <xs:enumeration value="1" /> <!-- Indifferent -->
      <xs:enumeration value="2" /> <!-- Yes -->
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="codeList">
		<xs:restriction base="xs:string">
			<xs:minLength value="1" />
			<xs:maxLength value="16" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="phone">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{10}" />
		</xs:restriction>
	</xs:simpleType>
</xs:schema>