Skip to content
Permalink
v6.1.2
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
7235 lines (7049 sloc) 290 KB
<?xml version="1.1" encoding="UTF-8"?>
<xs:schema
targetNamespace="http://www.hudhdx.info/Resources/Vendors/6_1_2/HUD_HMIS.xsd"
xmlns="http://www.hudhdx.info/Resources/Vendors/6_1_2/HUD_HMIS.xsd"
xmlns:hmis="http://www.hudhdx.info/Resources/Vendors/6_1_2/HUD_HMIS.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
vc:minVersion = "1.1"
version="6.1.2"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<xs:defaultOpenContent mode="interleave" appliesToEmpty="true">
<xs:annotation>
<xs:documentation>Allows the schema to be extended with a different namespace. See "Open Content" in http://www.w3.org/TR/xmlschema11-1/#cvc-wildcard
http://www.w3.org/TR/xmlschema11-1/#cvc-wildcard</xs:documentation>
</xs:annotation>
<xs:any notNamespace="##targetNamespace"/>
</xs:defaultOpenContent>
<xs:element name="Sources" type="hmis:sources">
<xs:annotation>
<xs:documentation xml:lang="en">XML Root element. A description of what software provider and organization are sending this XML information. Many sources can be grouped together into one XML file.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="affiliation">
<xs:sequence>
<xs:element name="AffiliationID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the Affiliation's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ProjectID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to a Project element. ProjectType must equal "6".</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ResProjectID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.4.B. Must match a ProjectID of a Project with ProjectType =1,2, 3, 8, 10, or 13.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="client">
<xs:sequence>
<xs:element name="PersonalID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.13.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FirstName" type="hmis:nameHashingOption" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.1.1.</xs:documentation>
</xs:annotation>
<xs:alternative test="@hmis:hashStatus='1'" type="hmis:nameHashingOptionPlain"/>
<xs:alternative test="@hmis:hashStatus='2'" type="hmis:nameHashingOptionSHA1RHY"/>
<xs:alternative test="@hmis:hashStatus='3'" type="hmis:nameHashingOption"/>
</xs:element>
<xs:element name="MiddleName" type="hmis:nameHashingOption" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.1.2.</xs:documentation>
</xs:annotation>
<xs:alternative test="@hmis:hashStatus='1'" type="hmis:nameHashingOptionPlain"/>
<xs:alternative test="@hmis:hashStatus='2'" type="hmis:nameHashingOptionSHA1RHY"/>
<xs:alternative test="@hmis:hashStatus='3'" type="hmis:nameHashingOption"/>
</xs:element>
<xs:element name="LastName" type="hmis:nameHashingOption" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.1.3.</xs:documentation>
</xs:annotation>
<xs:alternative test="@hmis:hashStatus='1'" type="hmis:nameHashingOptionPlain"/>
<xs:alternative test="@hmis:hashStatus='2'" type="hmis:nameHashingOptionSHA1RHY"/>
<xs:alternative test="@hmis:hashStatus='3'" type="hmis:nameHashingOption"/>
</xs:element>
<xs:element name="NameSuffix" type="hmis:string50" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.1.4.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NameDataQuality" type="hmis:nameDataQuality">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.1.5.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SSN" type="hmis:ssnHashingOption" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.2.1.</xs:documentation>
<xs:documentation xml:lang="en">Unknown SSN digits should be indicated with a lower case "x".</xs:documentation>
</xs:annotation>
<xs:alternative test="@hmis:hashStatus='1'" type="hmis:ssnHashingOptionPlain"/>
<xs:alternative test="@hmis:hashStatus='2'" type="hmis:ssnHashingOptionSHA1RHY"/>
<xs:alternative test="@hmis:hashStatus='3'" type="hmis:ssnHashingOption"/>
<xs:alternative test="@hmis:hashStatus" type="hmis:ssnHashingOptionPlain"/>
</xs:element>
<xs:element name="SSNDataQuality" type="hmis:ssnDataQuality">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.2.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DOB" type="xs:date" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.3.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DOBDataQuality" type="hmis:dobDataQuality">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.3.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Gender" type="hmis:gender">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.6.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Ethnicity" type="hmis:ethnicity">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.5.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Race" type="hmis:race" maxOccurs="5">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.4.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VeteranStatus" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.7.1.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="clientVeteranInfo">
<xs:sequence>
<xs:element name="ClientVeteranInfoID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the ClientVeteranInfo's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PersonalID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Refers to a Client element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="YearEnteredService" type="xs:gYear" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.1</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="YearSeparated" type="xs:gYear" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.2</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WorldWarII" type="noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.3</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="KoreanWar" type="noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.4</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VietnamWar" type="noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.5</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DesertStorm" type="noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.6</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AfghanistanOEF" type="noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.7</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IraqOIF" type="noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.8</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IraqOND" type="noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.9</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherTheater" type="noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.10</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MilitaryBranch" type="militaryBranch" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.11</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DischargeStatus" type="dischargeStatus" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1.12</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="coc">
<xs:sequence>
<xs:element name="CoCCode" type="hmis:cocCode">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the CoCCode ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ProjectID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Project ID</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="connectionWithSOAR">
<xs:sequence>
<xs:element name="ConnectionWithSOARID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the connectionWithSOAR's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ConnectionWithSOAR" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section P4.1.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="dateOfEngagement">
<xs:sequence>
<xs:element name="DateOfEngagementID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the DateOfEngagement's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DateOfEngagement" type="xs:date">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.13.1.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="dateRangeCapped">
<xs:annotation>
<xs:documentation xml:lang="en">A date range, both start and end dates are required.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="StartDate" type="xs:dateTime"/>
<xs:element name="EndDate" type="xs:dateTime"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="disabilities">
<xs:sequence>
<xs:element name="DisabilitiesID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the Exit's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DisabilityType" type="hmis:disabilityType">
<xs:annotation>
<xs:documentation xml:lang="en">The permissible values correspond to the decimal values of the corresponding disability types. 4.5 Physical Disability is "5" and 4.10 Substance Abuse is "10". </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DisabilityResponse" type="hmis:disabilityResponseBase">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.5-4.10, Response #2. Permissable values vary depending on which disability type is declared. The values are contined with "Field and Response(s) 2" within 4.5 through 4.10.</xs:documentation>
<xs:documentation xml:lang="en">In the instance document, the xsi:type of this element must be declared, and the type depends on the value within the sibling hmis:DisabilityType element. See the example HUD_HMIS_Instance.xml file to see how this should appear. Either xsi:type="hmis:disabilityResponseNoYesDoesntKnowRefused" or xsi:type="hmis:disabilityResponseSubstanceAbuse"can be used.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IndefiniteAndImpairsIndependence" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.5-4.10, Response #2A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TCellCountAvailable" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section W4 #2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TCellCount" type="hmis:tCellCount" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section W4 A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TCellSource" type="hmis:tCellOrViralLoadSource" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section W4.B.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ViralLoadAvailable" type="hmis:viralLoadAvailable" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section W4.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ViralLoad" type="hmis:viralLoad" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section W4.C.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ViralLoadSource" type="hmis:tCellOrViralLoadSource" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section W4 D.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
<!--Testing if DisabilityType is 8, before allowing use of TCellCountAvailable-->
<xs:assert test="if (hmis:TCellCountAvailable) then boolean(hmis:DisabilityType/text()='8') else true()"/>
<!--Testing if DisabilityType is 10, before allowing use of hmis:DisabilityResponse/@xsi:type='hmis:disabilityResponseSubstanceAbuse'-->
<xs:assert test="if (string(hmis:DisabilityResponse/@xsi:type) eq'hmis:disabilityResponseSubstanceAbuse') then boolean(hmis:DisabilityType/text()='10') else true()"/>
<!--Testing if TCellCountAvailable is 1, before allowing use of TCellCount-->
<xs:assert test="if (hmis:TCellCountAvailable/text()='1') then boolean(hmis:TCellCount) else (if (not(hmis:TCellCountAvailable/text()='1')) then (not(boolean(hmis:TCellCount))) else false())"/>
<!--Testing if TCellCount is not null, before allowing use of TCellSource-->
<xs:assert test="if (hmis:TCellCount) then boolean(hmis:TCellSource) else (if (not(hmis:TCellCount)) then (not(boolean(hmis:TCellSource))) else false())"/>
<!--Testing if DisabilityType is 8, before allowing use of ViralLoadAvailable-->
<xs:assert test="if (hmis:ViralLoadAvailable) then boolean(hmis:DisabilityType/text()='8') else true()"/>
<!--Testing if ViralLoadAvailable is 1, before allowing use of ViralLoad-->
<xs:assert test="if (hmis:ViralLoadAvailable/text()='1') then boolean(hmis:ViralLoad) else (if (not(hmis:ViralLoadAvailable/text()='1')) then (not(boolean(hmis:ViralLoad))) else false())"/>
<!--Testing if ViralLoad is not null, before allowing use of ViralLoadSource-->
<xs:assert test="if (hmis:ViralLoad) then boolean(hmis:ViralLoadSource) else (if (not(hmis:ViralLoad)) then (not(boolean(hmis:ViralLoadSource))) else false())"/>
</xs:complexType>
<xs:complexType name="disabilityResponseBase">
<xs:simpleContent>
<xs:extension base="xs:unsignedInt">
<xs:attribute ref="xsi:type" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="disabilityResponseNoYesDoesntKnowRefused">
<xs:simpleContent>
<xs:annotation>
<xs:documentation xml:lang="en">
Applicable to:
No Yes
0 = No
1 = Yes
8 = Client doesn't know
9 = Client refused
99 = Data not collected
</xs:documentation>
</xs:annotation>
<xs:restriction base="hmis:disabilityResponseBase">
<xs:enumeration value="0">
<xs:annotation>
<xs:documentation xml:lang="en">No</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation xml:lang="en">Yes</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="8">
<xs:annotation>
<xs:documentation xml:lang="en">Client doesn't know</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="9">
<xs:annotation>
<xs:documentation xml:lang="en">Client refused</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="99">
<xs:annotation>
<xs:documentation xml:lang="en">Data not collected</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="disabilityResponseSubstanceAbuse">
<xs:simpleContent>
<xs:annotation>
<xs:documentation xml:lang="en">
Disability Response
0 No
1 Alcohol abuse
2 Drug abuse
3 Both alcohol and drug abuse
8 Client doesn’t know
9 Client refused
99 Data not collected
</xs:documentation>
</xs:annotation>
<xs:restriction base="hmis:disabilityResponseBase">
<xs:enumeration value="0">
<xs:annotation>
<xs:documentation xml:lang="en">No</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation xml:lang="en">Alcohol abuse</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="2">
<xs:annotation>
<xs:documentation xml:lang="en">Drug abuse</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="3">
<xs:annotation>
<xs:documentation xml:lang="en">Both alcohol and drug abuse</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="8">
<xs:annotation>
<xs:documentation xml:lang="en">Client doesn’t know</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="9">
<xs:annotation>
<xs:documentation xml:lang="en">Client refused</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="99">
<xs:annotation>
<xs:documentation xml:lang="en">Data not collected</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="domesticViolence">
<xs:sequence>
<xs:element name="DomesticViolenceID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the DomesticViolence's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DomesticViolenceVictim" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.11.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WhenOccurred" type="hmis:whenOccurred" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.11.A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CurrentlyFleeing" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.11.B.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
<!--Testing if DomesticViolenceVictim is 1, before allowing use of CurrentlyFleeing-->
<xs:assert test="if (hmis:DomesticViolenceVictim/text()='1') then boolean(hmis:CurrentlyFleeing) else (if (not(hmis:DomesticViolenceVictim/text()='1')) then (not(boolean(hmis:CurrentlyFleeing))) else false())"/>
</xs:complexType>
<xs:complexType name="education">
<xs:sequence>
<xs:element name="EducationID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the LastGradeCompleted's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LastGradeCompleted" type="hmis:lastGradeCompletedSimple" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R4.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SchoolStatus" type="hmis:schoolStatus" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R5.1.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="employment">
<xs:sequence>
<xs:element name="EmploymentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the Employment's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Employed" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R6.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EmploymentType" type="hmis:employmentType" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R6.2A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NotEmployedReason" type="hmis:notEmployedReason" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R6.2B.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="enrollment">
<xs:sequence>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the Enrollment's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PersonalID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Client's ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ProjectID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the associated Project's ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EntryDate" type="xs:date">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.10.1</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HouseholdID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 5.9.1</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RelationshipToHoH" type="hmis:relationshipToHoH">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.15.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LivingSituation" type="hmis:livingSituation" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.917.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LengthOfStay" type="hmis:lengthOfStay" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.917.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LOSUnderThreshold" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.917.2A/2B.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PreviousStreetESSH" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.917.2C.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DateToStreetESSH" type="xs:date" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.917.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TimesHomelessPastThreeYears" type="hmis:timesHomelessPastThreeYears" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.917.4.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MonthsHomelessPastThreeYears" type="hmis:monthsHomelessPastThreeYears" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.917.5.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DisablingCondition" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.8.</xs:documentation>
<xs:documentation xml:lang="en">Export 99 (Data not collected) for any project entry where there is no response.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
<!--Testing if TimesHomelessPastThreeYears is 1-4, before allowing use of MonthsHomelessPastThreeYears-->
<xs:assert test="if (hmis:TimesHomelessPastThreeYears/text()='1' or hmis:TimesHomelessPastThreeYears/text()='2' or hmis:TimesHomelessPastThreeYears/text()='3' or hmis:TimesHomelessPastThreeYears/text()='4') then boolean(hmis:MonthsHomelessPastThreeYears) else (if (not(hmis:TimesHomelessPastThreeYears/text()='1' or hmis:TimesHomelessPastThreeYears/text()='2' or hmis:TimesHomelessPastThreeYears/text()='3' or hmis:TimesHomelessPastThreeYears/text()='4')) then (not(boolean(hmis:MonthsHomelessPastThreeYears))) else false())"/>
</xs:complexType>
<xs:complexType name="enrollmentCoC">
<xs:sequence>
<xs:element name="EnrollmentCoCID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the EnrollmentCoC's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment's ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HouseholdID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Household ID, as a convenience</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CoCCode" type="hmis:cocCode">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the CoC's ID. See 2017 HMIS Data Dictionary v1.3, Section 3.16.1</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="entryRHSP">
<xs:sequence>
<xs:element name="EntryRHSPID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the EntryRHSP's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WorstHousingSituation" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section U1.1.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="entryRHY">
<xs:sequence>
<xs:element name="EntryRHYID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the EntryRHY' unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SexualOrientation" type="hmis:sexualOrientation">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R3.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="UnemploymentFam" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R13.9.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MentalHealthIssuesFam" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R13.11.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PhysicalDisabilityFam" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R13.15.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AlcoholDrugAbuseFam" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R13.21.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InsufficientIncome" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R13.22.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IncarceratedParent" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R13.24.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FormerWardJuvenileJustice" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R12.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="JuvenileJusticeYears" type="hmis:issuesYears" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R12.1A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="JuvenileJusticeMonths" type="xs:unsignedInt" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R12.1AB. Values 1-11 permissible.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FormerWardChildWelfare" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R11.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ChildWelfareYears" type="hmis:issuesYears" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R11.1B.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ChildWelfareMonths" type="xs:unsignedInt" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R11.1BA. Values 1-11 permissible.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ReferralSource" type="hmis:referralSource">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R1.1</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CountOutreachReferralApproaches" type="xs:unsignedInt" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R1.A.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="entrySSVF">
<xs:sequence>
<xs:element name="EntrySSVFID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the EntrySSVFID's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PercentAMI" type="hmis:percentAMISimple" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V4.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LastPermanentStreet" type="hmis:string100" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V5.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LastPermanentCity" type="hmis:string50" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V5.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LastPermanentState" type="hmis:state" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V5.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LastPermanentZIP" type="hmis:zipCode" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V5.4.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AddressDataQuality" type="hmis:addressDataQuality" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V5.5.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="UrgentReferral" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TimeToHousingLoss" type="hmis:timeToHousingLoss" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ZeroIncome" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AnnualPercentAMI" type="hmis:annualPercentAMI" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.4.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FinancialChange" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.5.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HouseholdChange" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.6.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EvictionHistory" type="hmis:evictionHistory" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.7.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SubsidyAtRisk" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.8.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LiteralHomelessHistory" type="hmis:literalHomelessHistory" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.9.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DisabledHoH" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.10.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CriminalRecord" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.11.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SexOffender" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.12.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DependentUnder6" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.13.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SingleParent" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.14.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HH5Plus" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.15.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IraqAfghanistan" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.16.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FemVet" type="hmis:noPointsYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.17.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HPScreeningScore" type="hmis:hpScreeningScore" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.20</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThresholdScore" type="xs:positiveInteger" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V7.21</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VAMCStation" type="hmis:vamcStation" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V6.1</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="exit">
<xs:sequence>
<xs:element name="ExitID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the Exit's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExitDate" type="xs:date">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.11.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Destination" type="hmis:destination">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.12.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherDestination" type="hmis:string50" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.12.1A.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
<!--Testing if Destination is 17, before allowing use of OtherDestination-->
<xs:assert test="if (hmis:Destination/text()='17') then boolean(hmis:OtherDestination) else (if (not(hmis:Destination/text()='17')) then (not(boolean(hmis:OtherDestination))) else false())"/>
</xs:complexType>
<xs:complexType name="exitHousingAssessment">
<xs:sequence>
<xs:element name="ExitHousingAssessmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the ExitHousingAssessment's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExitID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HousingAssessment" type="hmis:housingAssessmentAtExit">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section W5.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SubsidyInformation" type="hmis:subsidyInformation" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section W5.A.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="exitRHY">
<xs:sequence>
<xs:element name="ExitRHYID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the ExitRHY' unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExitID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ProjectCompletionStatus" type="hmis:projectCompletionStatus">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R17.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EarlyExitReason" type="hmis:earlyExitReason" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R17.A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExchangeForSex" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R15.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExchangeForSexPastThreeMonths" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R15.A</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CountOfExchangeForSex" type="hmis:countOfExchangeForSex" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R15.B.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AskedOrForcedToExchangeForSex" type="hmis:askedOrForcedToExchangeForSex" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R15.C.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AskedOrForcedToExchangeForSexPastThreeMonths" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R15.D.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WorkPlaceViolenceThreats" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R16.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WorkplacePromiseDifference" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R16.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CoercedToContinueWork" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R16.A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LaborExploitPastThreeMonths" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R16.B.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CounselingReceived" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R18.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IndividualCounseling" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R18.A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FamilyCounseling" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R18.A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GroupCounseling" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R18.A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SessionCountAtExit" type="xs:positiveInteger" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R18.B.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SessionsInPlan" type="xs:positiveInteger">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R18.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PostExitCounselingPlan" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R18.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DestinationSafeClient" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R19.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DestinationSafeWorker" type="hmis:noYesWorkerDoesntKnow">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R19.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PosAdultConnections" type="hmis:noYesWorkerDoesntKnow">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R19.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PosPeerConnections" type="hmis:noYesWorkerDoesntKnow" >
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R19.4.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PosCommunityConnections" type="hmis:noYesWorkerDoesntKnow">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R19.5.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
<!--Testing if ProjectCompletionStatus is 3, before allowing use of EarlyExitReason-->
<xs:assert test="if (hmis:ProjectCompletionStatus/text()='3') then boolean(hmis:EarlyExitReason) else (if (not(hmis:ProjectCompletionStatus/text()='3')) then (not(boolean(hmis:EarlyExitReason))) else false())"/>
<!--Testing if WorkPlaceViolenceThreats or WorkplacePromiseDifference is 1, before allowing use of CoercedToContinueWork-->
<xs:assert test="if (hmis:WorkPlaceViolenceThreats/text()='1' or hmis:WorkplacePromiseDifference/text()='1') then boolean(hmis:CoercedToContinueWork) else (if (not(hmis:WorkPlaceViolenceThreats/text()='1' or hmis:WorkplacePromiseDifference/text()='1')) then (not(boolean(hmis:CoercedToContinueWork))) else false())"/>
<!--Testing if WorkPlaceViolenceThreats or WorkplacePromiseDifference is 1, before allowing use of LaborExploitPastThreeMonths-->
<xs:assert test="if (hmis:WorkPlaceViolenceThreats/text()='1' or hmis:WorkplacePromiseDifference/text()='1') then boolean(hmis:LaborExploitPastThreeMonths) else (if (not(hmis:WorkPlaceViolenceThreats/text()='1' or hmis:WorkplacePromiseDifference/text()='1')) then (not(boolean(hmis:LaborExploitPastThreeMonths))) else false())"/>
<!--Testing if ExchangeForSex is 1, before allowing use of ExchangeForSexPastThreeMonths-->
<xs:assert test="if (hmis:ExchangeForSex/text()='1') then boolean(hmis:ExchangeForSexPastThreeMonths) else (if (not(hmis:ExchangeForSex/text()='1')) then (not(boolean(hmis:ExchangeForSexPastThreeMonths))) else false())"/>
<!--Testing if ExchangeForSex is 1, before allowing use of CountOfExchangeForSex-->
<xs:assert test="if (hmis:ExchangeForSex/text()='1') then boolean(hmis:CountOfExchangeForSex) else (if (not(hmis:ExchangeForSex/text()='1')) then (not(boolean(hmis:CountOfExchangeForSex))) else false())"/>
<!--Testing if ExchangeForSex is 1, before allowing use of AskedOrForcedToExchangeForSex-->
<xs:assert test="if (hmis:ExchangeForSex/text()='1') then boolean(hmis:AskedOrForcedToExchangeForSex) else (if (not(hmis:ExchangeForSex/text()='1')) then (not(boolean(hmis:AskedOrForcedToExchangeForSex))) else false())"/>
<!--Testing if AskedOrForcedToExchangeForSex is 1, before allowing use of AskedOrForcedToExchangeForSexPastThreeMonths-->
<xs:assert test="if (hmis:AskedOrForcedToExchangeForSex/text()='1') then boolean(hmis:AskedOrForcedToExchangeForSexPastThreeMonths) else (if (not(hmis:AskedOrForcedToExchangeForSex/text()='1')) then (not(boolean(hmis:AskedOrForcedToExchangeForSexPastThreeMonths))) else false())"/>
<!--Testing if CounselingReceived is 1, before allowing use of SessionCountAtExit-->
<xs:assert test="if (hmis:CounselingReceived/text()='1') then boolean(hmis:SessionCountAtExit) else (if (not(hmis:CounselingReceived/text()='1')) then (not(boolean(hmis:SessionCountAtExit))) else false())"/>
<!--Testing if CounselingReceived is 1, before allowing use of IndividualCounseling-->
<xs:assert test="if (not(hmis:CounselingReceived/text()='1')) then (not(boolean(hmis:IndividualCounseling))) else true()"/>
<!--Testing if CounselingReceived is 1, before allowing use of FamilyCounseling-->
<xs:assert test="if (not(hmis:CounselingReceived/text()='1')) then (not(boolean(hmis:FamilyCounseling))) else true()"/>
<!--Testing if CounselingReceived is 1, before allowing use of GroupCounseling-->
<xs:assert test="if (not(hmis:CounselingReceived/text()='1')) then (not(boolean(hmis:GroupCounseling))) else true()"/>
</xs:complexType>
<xs:complexType name="export">
<xs:sequence>
<xs:element name="ExportID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the Export's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExportDate" type="xs:dateTime">
<xs:annotation>
<xs:documentation xml:lang="en">Time the export was performed.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExportPeriod" type="hmis:dateRangeCapped">
<xs:annotation>
<xs:documentation xml:lang="en">The date range bounding the data set being transmitted. Used with ExportPeriodType to clarify what the date range represents.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExportPeriodType" type="hmis:exportPeriodType">
<xs:annotation>
<xs:documentation xml:lang="en">Pick one of the types to specify the definition of export period being used in ExportPeriod.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExportDirective" type="hmis:exportDirective">
<xs:annotation>
<xs:documentation xml:lang="en">Select one of the ExportDirective choices to instruct the target as to how the data being transmitted should be handled.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice maxOccurs="unbounded">
<xs:element name="Affiliation" type="hmis:affiliation"/>
<xs:element name="Client" type="hmis:client"/>
<xs:element name="ClientVeteranInfo" type="hmis:clientVeteranInfo">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V1</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ConnectionWithSOAR" type="hmis:connectionWithSOAR"/>
<xs:element name="CoC" type="hmis:coc"/>
<xs:element name="DateOfEngagement" type="hmis:dateOfEngagement"/>
<xs:element name="Disabilities" type="hmis:disabilities"/>
<xs:element name="DomesticViolence" type="hmis:domesticViolence"/>
<xs:element name="Education" type="hmis:education"/>
<xs:element name="Employment" type="hmis:employment">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R6</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Enrollment" type="hmis:enrollment"/>
<xs:element name="EnrollmentCoC" type="hmis:enrollmentCoC"/>
<xs:element name="EntryRHSP" type="hmis:entryRHSP">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section U1.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EntryRHY" type="hmis:entryRHY">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R13.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EntrySSVF" type="hmis:entrySSVF"/>
<xs:element name="Exit" type="hmis:exit"/>
<xs:element name="ExitHousingAssessment" type="hmis:exitHousingAssessment">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.19</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExitRHY" type="hmis:exitRHY"/>
<xs:element name="Funder" type="hmis:funder"/>
<xs:element name="Geography" type="hmis:geography">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.8.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HealthInsurance" type="hmis:healthInsurance">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HealthStatus" type="hmis:healthStatus">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.27</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HousingAssessmentDisposition" type="hmis:housingAssessmentDisposition">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.18</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IncomeAndSources" type="hmis:incomeAndSources">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Inventory" type="hmis:inventory">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MedicalAssistance" type="hmis:medicalAssistance">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.39</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MoveInDate" type="hmis:moveInDate">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 3.20</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NonCashBenefits" type="hmis:nonCashBenefits">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Organization" type="hmis:organization"/>
<xs:element name="PATHStatus" type="hmis:pathStatus">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.20</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Project" type="hmis:project">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RHYAftercare" type="hmis:rhyAftercare"/>
<xs:element name="RHYBCPStatus" type="hmis:rhyBCPStatus">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section R2</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ServiceFAReferral" type="hmis:serviceFAReferral">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Sections P2, R13, W2, V2, V3</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VASHExitReason" type="hmis:vashExitReason">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section V9</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:sequence>
<!--Cardinality Checking-->
<xs:assert test="every $id in hmis:Client/hmis:PersonalID satisfies (fn:count(hmis:ClientVeteranInfo[hmis:PersonalID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Client/hmis:PersonalID satisfies (fn:count(hmis:Enrollment[hmis:PersonalID = $id]) ge 1)"/>
<xs:assert test="every $id in hmis:CoC/hmis:CoCCode satisfies (fn:count(hmis:EnrollmentCoC[hmis:CoCCode = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:ConnectionWithSOAR[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:DateOfEngagement[hmis:EnrollmentID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:Disabilities[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:DomesticViolence[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:Employment[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:EnrollmentCoC[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:EntryRHY[hmis:EnrollmentID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:EntrySSVF[hmis:EnrollmentID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:Exit[hmis:EnrollmentID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:HealthInsurance[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:HealthStatus[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:IncomeAndSources[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:MedicalAssistance[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:NonCashBenefits[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:PathStatus[hmis:EnrollmentID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:EntryRHSP[hmis:EnrollmentID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:MoveInDate[hmis:EnrollmentID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:RHYBCPStatus[hmis:EnrollmentID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Enrollment/hmis:EnrollmentID satisfies (fn:count(hmis:ServiceFAReferral[hmis:EnrollmentID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Exit/hmis:ExitID satisfies (fn:count(hmis:ExitHousingAssessment[hmis:ExitID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Exit/hmis:ExitID satisfies (fn:count(hmis:ExitRHY[hmis:ExitID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Exit/hmis:ExitID satisfies (fn:count(hmis:HousingAssessmentDisposition[hmis:ExitID = $id]) le 1)"/>
<xs:assert test="every $id in hmis:Organization/hmis:OrganizationID satisfies (fn:count(hmis:Project[hmis:OrganizationID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Project/hmis:ProjectID satisfies (fn:count(hmis:Affiliation[hmis:ProjectID = $id]) ge 0)"/>
<xs:assert test="every $id in hmis:Project/hmis:ProjectID satisfies (fn:count(hmis:CoC[hmis:ProjectID = $id]) ge 1)"/>
<xs:assert test="every $id in hmis:Project/hmis:ProjectID satisfies (fn:count(hmis:Funder[hmis:ProjectID = $id]) ge 1)"/>
<xs:assert test="every $id in hmis:Exit/hmis:ExitID satisfies (fn:count(hmis:RHYAftercare[hmis:ExitID = $id]) le 1)"/>
<!-- Checking that that the Project Type = ‘Emergency shelter’ for certain 2.7 data elements to exist -->
<xs:assert test="every $inventory in hmis:Inventory satisfies (if (boolean($inventory/hmis:Availability) or boolean($inventory/hmis:BedType)) then (if (every $id in $inventory/hmis:ProjectID satisfies (hmis:Project[hmis:ProjectID = $id]/hmis:ProjectType/text()='1')) then (true()) else false()) else (true()))"/>
<!-- Checking that that the Project Type = ‘Permanent Supportive Housing’ for certain 2.7 data elements to exist -->
<xs:assert test="every $inventory in hmis:Inventory satisfies (if (boolean($inventory/hmis:CHBedInventory)) then (if (every $id in $inventory/hmis:ProjectID satisfies (hmis:Project[hmis:ProjectID = $id]/hmis:ProjectType/text()='3')) then (true()) else false()) else (true()))"/>
<!-- Checking that there is only one Head of Household per Household enrolled -->
<xs:assert test="every $id in hmis:Enrollment/hmis:HouseholdID satisfies (fn:count(hmis:Enrollment/hmis:RelationshipToHoH[text()= '1'][../hmis:HouseholdID = $id] ) eq 1)"/>
</xs:complexType>
<xs:complexType name="funder">
<xs:sequence>
<xs:element name="FunderID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the Funder's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ProjectID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to a Project element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Funder" type="hmis:federalPartnerProgramsAndComponents">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.6.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GrantID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.6.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StartDate" type="xs:date">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.6.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EndDate" type="xs:date" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.6.4.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="healthInsurance">
<xs:sequence>
<xs:element name="HealthInsuranceID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the HealthInsurance's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InsuranceFromAnySource" type="hmis:noYesDoesntKnowRefused" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Medicaid" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoMedicaidReason" type="reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.3A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Medicare" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.4.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoMedicareReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.4A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SCHIP" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.5.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoSCHIPReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.5A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VAMedicalServices" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.6.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoVAMedReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.6A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EmployerProvided" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.7.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoEmployerProvidedReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.7A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="COBRA" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.8.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoCOBRAReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.8A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PrivatePay" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.9.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoPrivatePayReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.9A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StateHealthIns" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.10.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoStateHealthInsReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.10A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IndianHealthServices" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.11.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoIndianHealthServicesReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.11A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherInsurance" type="hmis:noYes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.12.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherInsuranceIdentify" type="hmis:string50" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.4.12A.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
<!--Testing if IndianHealthServices is 0, before allowing use of NoIndianHealthServicesReason-->
<xs:assert test="if (hmis:IndianHealthServices/text()='0') then boolean(hmis:NoIndianHealthServicesReason) else (if (not(hmis:IndianHealthServices/text()='0')) then (not(boolean(hmis:NoIndianHealthServicesReason))) else false())"/>
<!--Testing if OtherInsurance is 1, before allowing use of OtherInsuranceIdentify-->
<xs:assert test="if (hmis:OtherInsurance/text()='1') then boolean(hmis:OtherInsuranceIdentify) else (if (not(hmis:OtherInsurance/text()='1')) then (not(boolean(hmis:OtherInsuranceIdentify))) else false())"/>
<!--Testing if Medicaid is 0, before allowing use of NoMedicaidReason-->
<xs:assert test="if (hmis:Medicaid/text()='0') then boolean(hmis:NoMedicaidReason) else (if (not(hmis:Medicaid/text()='0')) then (not(boolean(hmis:NoMedicaidReason))) else false())"/>
<!--Testing if Medicare is 0, before allowing use of NoMedicareReason-->
<xs:assert test="if (hmis:Medicare/text()='0') then boolean(hmis:NoMedicareReason) else (if (not(hmis:Medicare/text()='0')) then (not(boolean(hmis:NoMedicareReason))) else false())"/>
<!--Testing if SCHIP is 0, before allowing use of NoSCHIPReason-->
<xs:assert test="if (hmis:SCHIP/text()='0') then boolean(hmis:NoSCHIPReason) else (if (not(hmis:SCHIP/text()='0')) then (not(boolean(hmis:NoSCHIPReason))) else false())"/>
<!--Testing if VAMedicalServices is 0, before allowing use of NoVAMedReason-->
<xs:assert test="if (hmis:VAMedicalServices/text()='0') then boolean(hmis:NoVAMedReason) else (if (not(hmis:VAMedicalServices/text()='0')) then (not(boolean(hmis:NoVAMedReason))) else false())"/>
<!--Testing if EmployerProvided is 0, before allowing use of NoVAMedReason-->
<xs:assert test="if (hmis:EmployerProvided/text()='0') then boolean(hmis:NoEmployerProvidedReason) else (if (not(hmis:EmployerProvided/text()='0')) then (not(boolean(hmis:NoEmployerProvidedReason))) else false())"/>
<!--Testing if COBRA is 0, before allowing use of NoCOBRAReason-->
<xs:assert test="if (hmis:COBRA/text()='0') then boolean(hmis:NoCOBRAReason) else (if (not(hmis:COBRA/text()='0')) then (not(boolean(hmis:NoCOBRAReason))) else false())"/>
<!--Testing if PrivatePay is 0, before allowing use of NoPrivatePayReason-->
<xs:assert test="if (hmis:PrivatePay/text()='0') then boolean(hmis:NoPrivatePayReason) else (if (not(hmis:PrivatePay/text()='0')) then (not(boolean(hmis:NoPrivatePayReason))) else false())"/>
<!--Testing if StateHealthIns is 0, before allowing use of NoStateHealthInsReason-->
<xs:assert test="if (hmis:StateHealthIns/text()='0') then boolean(hmis:NoStateHealthInsReason) else (if (not(hmis:StateHealthIns/text()='0')) then (not(boolean(hmis:NoStateHealthInsReason))) else false())"/>
</xs:complexType>
<xs:complexType name="healthStatus">
<xs:sequence>
<xs:element name="HealthStatusID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the HealthStatus' unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HealthCategory" type="hmis:healthCategory">
<xs:annotation>
<xs:documentation xml:lang="en">The permissible values correspond to the decimal values of the corresponding health category. 4.27 General Health Status is "27" and 4.29 Mental Health Status is "29" and 4.30 Pregnancy Status is "30".</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HealthStatus" type="hmis:healthStatusType">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.27-4.30.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DueDate" type="xs:date" minOccurs = "0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.30.1A.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="housingAssessmentDisposition">
<xs:sequence>
<xs:element name="HousingAssessmentDispositionID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the HousingAssessmentDisposition's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExitID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the ExitID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AssessmentDisposition" type="hmis:assessmentDisposition">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.18.1.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherDisposition" type="hmis:string50" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.18.1A.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="nameHashingOption">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute ref="hashStatus" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="nameHashingOptionPlain">
<xs:simpleContent>
<xs:restriction base="hmis:nameHashingOption">
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="nameHashingOptionSHA1RHY">
<xs:simpleContent>
<xs:restriction base="hmis:nameHashingOption">
<xs:length value="40"/>
<xs:pattern value="([a-zA-Z0-9])*"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="incomeAndSources">
<xs:sequence>
<xs:element name="IncomeAndSourcesID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the IncomeAndSources' unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IncomeFromAnySource" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TotalMonthlyIncome" type="hmis:money">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.18.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Earned" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EarnedAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.3A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Unemployment" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.4.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="UnemploymentAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.4B.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SSI" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.5.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SSIAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.5C.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SSDI" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.6.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SSDIAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.6D.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VADisabilityService" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.7.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VADisabilityServiceAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.7E.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VADisabilityNonService" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.8.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VADisabilityNonServiceAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.8F.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PrivateDisability" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.9.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PrivateDisabilityAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.9G.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WorkersComp" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.10.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WorkersCompAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.10H.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TANF" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.11.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TANFAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.11I.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GA" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.12.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GAAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.12J.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SocSecRetirement" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.13.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SocSecRetirementAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.13K.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Pension" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.14.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PensionAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.14L.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ChildSupport" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.15.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ChildSupportAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.15M.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Alimony" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.16.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AlimonyAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.16N.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherSource" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.17.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherSourceAmount" type="hmis:money" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.17O.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherSourceIdentify" type="hmis:string50" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.2.17O.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
<!--Testing if Earned is 1, before allowing use of EarnedAmount-->
<xs:assert test="if (hmis:Earned/text()='1') then boolean(hmis:EarnedAmount) else (if (not(Earned/text()='1')) then (not(boolean(hmis:EarnedAmount))) else false())"/>
<!--Testing if Unemployment is 1, before allowing use of UnemploymentAmount-->
<xs:assert test="if (hmis:Unemployment/text()='1') then boolean(hmis:UnemploymentAmount) else (if (not(Unemployment/text()='1')) then (not(boolean(hmis:UnemploymentAmount))) else false())"/>
<!--Testing if SSI is 1, before allowing use of SSIAmount-->
<xs:assert test="if (hmis:SSI/text()='1') then boolean(hmis:SSIAmount) else (if (not(SSI/text()='1')) then (not(boolean(hmis:SSIAmount))) else false())"/>
<!--Testing if SSDI is 1, before allowing use of SSDIAmount-->
<xs:assert test="if (hmis:SSDI/text()='1') then boolean(hmis:SSDIAmount) else (if (not(SSDI/text()='1')) then (not(boolean(hmis:SSDIAmount))) else false())"/>
<!--Testing if VADisabilityService is 1, before allowing use of VADisabilityServiceAmount-->
<xs:assert test="if (hmis:VADisabilityService/text()='1') then boolean(hmis:VADisabilityServiceAmount) else (if (not(VADisabilityService/text()='1')) then (not(boolean(hmis:VADisabilityServiceAmount))) else false())"/>
<!--Testing if PrivateDisability is 1, before allowing use of PrivateDisabilityAmount-->
<xs:assert test="if (hmis:PrivateDisability/text()='1') then boolean(hmis:PrivateDisabilityAmount) else (if (not(PrivateDisability/text()='1')) then (not(boolean(hmis:PrivateDisabilityAmount))) else false())"/>
<!--Testing if WorkersComp is 1, before allowing use of WorkersCompAmount-->
<xs:assert test="if (hmis:WorkersComp/text()='1') then boolean(hmis:WorkersCompAmount) else (if (not(WorkersComp/text()='1')) then (not(boolean(hmis:WorkersCompAmount))) else false())"/>
<!--Testing if TANF is 1, before allowing use of TANFAmount-->
<xs:assert test="if (hmis:TANF/text()='1') then boolean(hmis:TANFAmount) else (if (not(TANF/text()='1')) then (not(boolean(hmis:TANFAmount))) else false())"/>
<!--Testing if GA is 1, before allowing use of GAAmount-->
<xs:assert test="if (hmis:GA/text()='1') then boolean(hmis:GAAmount) else (if (not(GA/text()='1')) then (not(boolean(hmis:GAAmount))) else false())"/>
<!--Testing if SocSecRetirement is 1, before allowing use of SocSecRetirementAmount-->
<xs:assert test="if (hmis:SocSecRetirement/text()='1') then boolean(hmis:SocSecRetirementAmount) else (if (not(SocSecRetirement/text()='1')) then (not(boolean(hmis:SocSecRetirementAmount))) else false())"/>
<!--Testing if Pension is 1, before allowing use of PensionAmount-->
<xs:assert test="if (hmis:Pension/text()='1') then boolean(hmis:PensionAmount) else (if (not(Pension/text()='1')) then (not(boolean(hmis:PensionAmount))) else false())"/>
<!--Testing if ChildSupport is 1, before allowing use of ChildSupportAmount-->
<xs:assert test="if (hmis:ChildSupport/text()='1') then boolean(hmis:ChildSupportAmount) else (if (not(ChildSupport/text()='1')) then (not(boolean(hmis:ChildSupportAmount))) else false())"/>
<!--Testing if Alimony is 1, before allowing use of AlimonyAmount-->
<xs:assert test="if (hmis:Alimony/text()='1') then boolean(hmis:AlimonyAmount) else (if (not(Alimony/text()='1')) then (not(boolean(hmis:AlimonyAmount))) else false())"/>
<!--Testing if OtherSource is 1, before allowing use of OtherSourceAmount-->
<xs:assert test="if (hmis:OtherSource/text()='1') then boolean(hmis:OtherSourceAmount) else (if (not(OtherSource/text()='1')) then (not(boolean(hmis:OtherSourceAmount))) else false())"/>
<!--Testing if OtherSource is 1, before allowing use of OtherSourceIdentify-->
<xs:assert test="if (hmis:OtherSource/text()='1') then boolean(hmis:OtherSourceIdentify) else (if (not(OtherSource/text()='1')) then (not(boolean(hmis:OtherSourceIdentify))) else false())"/>
</xs:complexType>
<xs:complexType name="inventory">
<xs:sequence>
<xs:element name="InventoryID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the Inventory's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ProjectID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Project</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CoCCode" type="hmis:cocCode">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the CoC</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HouseholdType" type="hmis:householdType">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.5.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Availability" type="hmis:availability" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.9.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="UnitInventory" type="xs:integer">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.7.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BedInventory" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.6.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CHBedInventory" type="xs:nonNegativeInteger" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.12, Chronic Homeless Bed Inventory (PSH Only).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VetBedInventory" type="xs:nonNegativeInteger" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.10.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="YouthBedInventory" type="xs:nonNegativeInteger" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.11.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BedType" type="hmis:bedType" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.8.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InventoryStartDate" type="xs:date">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InventoryEndDate" type="xs:date" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HMISParticipatingBeds" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 2.7.13.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
</xs:complexType>
<xs:complexType name="medicalAssistance">
<xs:sequence>
<xs:element name="MedicalAssistanceID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the MedicalAssistance's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HIVAIDSAssistance" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.39.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoHIVAIDSAssistanceReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.39.2A.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ADAP" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.39.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NoADAPReason" type="hmis:reasonNotInsuredOrAssisted" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.39.3B.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="hmis:dataCollectionStage" use="required"/>
<xs:attribute ref="hmis:informationDate" use="required"/>
<xs:attributeGroup ref="hmis:baseMetaData"/>
<!--Testing if HIVAIDSAssistance is 0, before allowing use of NoHIVAIDSAssistanceReason-->
<xs:assert test="if (hmis:HIVAIDSAssistance/text()='0') then boolean(hmis:NoHIVAIDSAssistanceReason) else (if (not(hmis:HIVAIDSAssistance/text()='0')) then (not(boolean(hmis:NoHIVAIDSAssistanceReason))) else false())"/>
<!--Testing if ADAP is 0, before allowing use of NoADAPReason-->
<xs:assert test="if (hmis:ADAP/text()='0') then boolean(hmis:NoADAPReason) else (if (not(hmis:ADAP/text()='0')) then (not(boolean(hmis:NoADAPReason))) else false())"/>
</xs:complexType>
<xs:complexType name="nonCashBenefits">
<xs:sequence>
<xs:element name="NonCashBenefitsID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Reference to the NonCashBenefits's unique ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EnrollmentID" type="hmis:string32">
<xs:annotation>
<xs:documentation xml:lang="en">Key reference to the Enrollment</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BenefitsFromAnySource" type="hmis:noYesDoesntKnowRefused">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3.2.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SNAP" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3.3.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WIC" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3.4.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TANFChildCare" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3.5.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TANFTransportation" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3.6.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherTANF" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3.7.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherBenefitsSource" type="hmis:noYes">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3.9.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtherBenefitsSourceIdentify" type="hmis:string50">
<xs:annotation>
<xs:documentation xml:lang="en">See 2017 HMIS Data Dictionary v1.3, Section 4.3.9A.</xs:documentation>
</xs:annotation>