<!--
		SIF Implementation Specification (New Zealand) 3.1
		(8 December, 2020
)
		
		Infrastructure Version: v3.1
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/nz/3.1" targetNamespace="http://www.sifassociation.org/datamodel/nz/3.1" elementFormDefault="qualified" version="3.1 (rc 5)">
  <xs:complexType name="SubjectAreaListType">
    <xs:sequence>
      <xs:choice maxOccurs="unbounded">
        <xs:element name="SubjectArea" minOccurs="0" nillable="true" type="NZCodeSetsSubjectAreaType" />
        <xs:element name="NCEASubjectArea" minOccurs="0" nillable="true" type="NZCodeSetsNCEASubjectAreaType" />
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StaffSubjectListType">
    <xs:sequence>
      <xs:element name="StaffSubject" maxOccurs="unbounded" type="StaffSubjectType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StaffSubjectType">
    <xs:sequence>
      <xs:element name="PreferenceNumber" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="Code" type="NZCodeSetsSubjectAreaType" />
      <xs:element name="YearLevels" minOccurs="0" nillable="true" type="YearLevelListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LanguageOfInstructionListType">
    <xs:sequence>
      <xs:element name="Language" maxOccurs="unbounded" type="LanguageOfInstructionType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LanguageOfInstructionType">
    <xs:sequence>
      <xs:element name="Code" type="NZCodeSetsLanguageType" />
      <xs:element name="Level" type="NZCodeSetsLanguageInstructionLevelType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LearningStandardListType">
    <xs:sequence>
      <xs:element name="LearningStandardRefId" maxOccurs="unbounded" type="LocalIdType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RelatedLearningStandardsListType">
    <xs:sequence>
      <xs:element name="RelatedLearningStandard" maxOccurs="unbounded" type="RelatedLearningStandardType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RelatedLearningStandardType">
    <xs:complexContent>
      <xs:extension base="ObjectReferenceType">
        <xs:sequence>
          <xs:element name="Relationship" type="NZCodeSetsLearningStandardRelationshipTypeType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="CredentialListType">
    <xs:sequence>
      <xs:element name="Credential" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CourseListType">
    <xs:sequence>
      <xs:element name="Course" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ProgressReportAuthorListType">
    <xs:sequence>
      <xs:element name="Author" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TechnologyClassListType">
    <xs:sequence>
      <xs:element name="TechnologyClass" maxOccurs="unbounded" type="TechnologyClassType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TechnologyClassType">
    <xs:sequence>
      <xs:element name="Class" type="NZCodeSetsTechnologyClassType" />
      <xs:element name="Teacher" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="BehaviourComment" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="EffortComment" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="StrandList" minOccurs="0" nillable="true" type="ClassStrandListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ClassStrandListType">
    <xs:sequence>
      <xs:element name="Strand" maxOccurs="unbounded" type="ClassStrandType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ClassStrandType">
    <xs:sequence>
      <xs:element name="LearningStrand" type="NZCodeSetsTechnologyLearningStrandType" />
      <xs:element name="AchievementObjectiveList" minOccurs="0" nillable="true" type="StrandAchievementObjectiveListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StrandAchievementObjectiveListType">
    <xs:sequence>
      <xs:element name="AchievementObjective" maxOccurs="unbounded" type="StrandAchievementObjectiveType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StrandAchievementObjectiveType">
    <xs:sequence>
      <xs:element name="AchievementObjective" type="NZCodeSetsStrandAchievementObjectiveType" />
      <xs:element name="CurriculumLevel" minOccurs="0" nillable="true" type="NZCodeSetsTechnologyCurriculumLevelType" />
      <xs:element name="ProgressLevel" minOccurs="0" nillable="true" type="NZCodeSetsStrandAchievementProgressLevelType" />
      <xs:element name="AchievementObjectiveDesc" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="OverallStudentEffortNote" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="PracticalAbilityDesc" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="PracticalAbilityProgressNote" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="DocumentList" minOccurs="0" nillable="true" type="DocumentListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StaffListType">
    <xs:sequence>
      <xs:element name="StaffMember" maxOccurs="unbounded" type="StaffListStaffMemberType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StaffListStaffMemberType">
    <xs:complexContent>
      <xs:extension base="ObjectReferenceType">
        <xs:sequence>
          <xs:element name="Role" type="NZCodeSetsStaffRoleType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="StudentListType">
    <xs:sequence>
      <xs:element name="Student" maxOccurs="unbounded" type="StudentObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RoomListType">
    <xs:sequence>
      <xs:element name="RoomId" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SchoolServiceType">
    <xs:sequence>
      <xs:element name="CoEdStatus" minOccurs="0" nillable="true" type="NZCodeSetsSchoolCoEdStatusType" />
      <xs:element name="Decile" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:integer">
            <xs:minInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="10" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="NewEntrantPolicyList" minOccurs="0" nillable="true" type="EnactedPolicyListType" />
      <xs:element name="AllowManualProvisioning" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="SchoolClassificationList" minOccurs="0" nillable="true" type="SchoolClassificationListType" />
      <xs:element name="SchoolYearList" minOccurs="0" nillable="true" type="SchoolYearLevelListType" />
      <xs:element name="TechnologyCentreName" minOccurs="0" nillable="true" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SchoolYearLevelListType">
    <xs:sequence>
      <xs:element name="SchoolYear" maxOccurs="unbounded" type="SchoolYearLevelType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SchoolYearLevelType">
    <xs:sequence>
      <xs:element name="YearLevel">
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:minInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="13" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FIRSTSchoolYearGenderId" type="xs:int" />
      <xs:element name="Gender" type="NZCodeSetsSchoolingGenderType" />
      <xs:element name="Boarding" minOccurs="0" nillable="true" type="NZCodeSetsSchoolBoardingTypeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="YearLevelListType">
    <xs:sequence>
      <xs:element name="YearLevel" maxOccurs="unbounded">
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:minInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="13" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EnactedPolicyListType">
    <xs:sequence>
      <xs:element name="EnactedPolicy" maxOccurs="unbounded" type="EnactedPolicyType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EnactedPolicyType">
    <xs:sequence>
      <xs:element name="EffectiveFrom" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="EffectiveTo" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="Policy" type="NZCodeSetsEnactedPolicyType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SchoolClassificationListType">
    <xs:sequence>
      <xs:element name="Classification" maxOccurs="unbounded" type="NZCodeSetsSchoolClassificationType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ECEServiceType">
    <xs:sequence>
      <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsECEServiceTypeType" />
      <xs:element name="PrimaryLanguage" type="NZCodeSetsLanguageType" />
      <xs:element name="PrimaryLanguageOther" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TertiaryServiceType">
    <xs:sequence>
      <xs:element name="Type" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AddressListType">
    <xs:sequence>
      <xs:element name="Address" maxOccurs="unbounded" type="AddressType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AddressType">
    <xs:sequence>
      <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsAddressTypeType" />
      <xs:element name="Role" minOccurs="0" nillable="true" type="NZCodeSetsAddressRoleType" />
      <xs:element name="Line1" type="xs:normalizedString" />
      <xs:element name="Line2" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Line3" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Line4" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Suburb" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="City" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="StateProvince" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="Country" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="PostalCode" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="GridLocation" minOccurs="0" nillable="true" type="GridLocationType" />
      <xs:element name="StatisticalAreaList" minOccurs="0" nillable="true" type="StatisticalAreaListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="GridLocationType">
    <xs:sequence>
      <xs:element name="Latitude">
        <xs:simpleType>
          <xs:restriction base="xs:decimal">
            <xs:minInclusive value="-90" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="90" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Longitude">
        <xs:simpleType>
          <xs:restriction base="xs:decimal">
            <xs:minInclusive value="-180" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="180" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CountryListType">
    <xs:sequence>
      <xs:element name="Country" maxOccurs="unbounded" type="ISO3166CountryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LocationListType">
    <xs:sequence>
      <xs:element name="Location" maxOccurs="unbounded" type="LocationType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LocationType">
    <xs:sequence>
      <xs:element name="Description" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="LocationNum" minOccurs="0" nillable="true" type="xs:int" />
      <xs:element name="Address" minOccurs="0" nillable="true" type="AddressType" />
      <xs:element name="GridLocation" minOccurs="0" nillable="true" type="GridLocationType" />
      <xs:element name="StatisticalAreaList" minOccurs="0" nillable="true" type="StatisticalAreaListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StatisticalAreaListType">
    <xs:sequence>
      <xs:element name="StatisticalArea" maxOccurs="unbounded" type="StatisticalAreaType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StatisticalAreaType">
    <xs:sequence>
      <xs:element name="SpatialUnitType" type="NZCodeSetsSpatialUnitTypeType" />
      <xs:element name="Code" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonInfoType">
    <xs:sequence>
      <xs:element name="Name" type="BaseNameType" />
      <xs:element name="OtherNameList" minOccurs="0" nillable="true" type="OtherNameListType" />
      <xs:element name="VerifiedName" minOccurs="0" nillable="true" type="VerifiedNameType" />
      <xs:element name="Demographics" minOccurs="0" nillable="true" type="DemographicsType" />
      <xs:element name="AddressList" minOccurs="0" nillable="true" type="AddressListType" />
      <xs:element name="EmailList" minOccurs="0" nillable="true" type="EmailListType" />
      <xs:element name="PhoneNumberList" minOccurs="0" nillable="true" type="PhoneNumberListType" />
      <xs:element name="HouseholdContactInfoList" minOccurs="0" nillable="true" type="HouseholdContactInfoListType" />
      <xs:element name="PersonPhoto" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="MedicalNeedList" minOccurs="0" nillable="true" type="MedicalNeedListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BaseCommunicationChannelType">
    <xs:sequence>
      <xs:element name="Notes" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="Preference" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="Usage" minOccurs="0" nillable="true" type="NZCodeSetsCommunicationUsageType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BaseNameType">
    <xs:sequence>
      <xs:element name="Title" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="FamilyName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="GivenName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="MiddleName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="FamilyNameFirst" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="PreferredFamilyName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="PreferredFamilyNameFirst" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="PreferredGivenName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Suffix" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="FullName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsNameUsageTypeType" />
      <xs:element name="IsVerified" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="VerifiedNameType">
    <xs:complexContent>
      <xs:extension base="BaseNameType">
        <xs:sequence>
          <xs:element name="Verification" minOccurs="0" nillable="true" type="VerificationEventType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="OtherNameListType">
    <xs:sequence>
      <xs:element name="Name" maxOccurs="unbounded" type="VerifiedNameType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DemographicsType">
    <xs:sequence>
      <xs:element name="BirthDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="DateOfDeath" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="PlaceOfBirth" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="CountryOfBirth" minOccurs="0" nillable="true" type="ISO3166CountryType" />
      <xs:element name="CitizenshipList" minOccurs="0" nillable="true" type="CountryListType" />
      <xs:element name="CitizenshipStatus" minOccurs="0" nillable="true" type="NZCodeSetsCitizenshipStatusType" />
      <xs:element name="CitizenshipVerification" minOccurs="0" nillable="true" type="VerificationEventType" />
      <xs:element name="Gender" minOccurs="0" nillable="true" type="NZCodeSetsGenderType" />
      <xs:element name="LanguageList" minOccurs="0" nillable="true" type="LanguageListType" />
      <xs:element name="CountryArrivalDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="EthnicityList" minOccurs="0" nillable="true" type="EthnicityListType" />
      <xs:element name="IwiAffiliationList" minOccurs="0" nillable="true" type="IwiAffiliationListType" />
      <xs:element name="ReligiousAffiliationList" minOccurs="0" nillable="true" type="ReligiousAffiliationListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LanguageListType">
    <xs:sequence>
      <xs:element name="Language" maxOccurs="unbounded" type="LanguageBaseType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LanguageBaseType">
    <xs:sequence>
      <xs:element name="Code" type="NZCodeSetsLanguageType" />
      <xs:element name="Usage" minOccurs="0" nillable="true" type="NZCodeSetsLanguageUsageType" />
      <xs:element name="Dialect" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="ProficiencyList" minOccurs="0" nillable="true" type="LanguageProficiencyListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LanguageProficiencyListType">
    <xs:sequence>
      <xs:element name="Proficiency" maxOccurs="unbounded" type="LanguageProficiencyType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LanguageProficiencyType">
    <xs:sequence>
      <xs:element name="Level" type="NZCodeSetsLanguageProficiencyLevelType" />
      <xs:element name="Type" type="NZCodeSetsLanguageProficiencyTypeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmailListType">
    <xs:sequence>
      <xs:element name="Email" maxOccurs="unbounded" type="EmailType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmailType">
    <xs:complexContent>
      <xs:extension base="BaseCommunicationChannelType">
        <xs:sequence>
          <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsEmailTypeType" />
          <xs:element name="SourceOrganisation" minOccurs="0" nillable="true" type="OrganisationObjectReferenceType" />
          <xs:element name="Address" type="xs:normalizedString" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="PhoneNumberListType">
    <xs:sequence>
      <xs:element name="PhoneNumber" maxOccurs="unbounded" type="PhoneNumberType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PhoneNumberType">
    <xs:complexContent>
      <xs:extension base="BaseCommunicationChannelType">
        <xs:sequence>
          <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsTelephoneNumberTypeType" />
          <xs:element name="Number" type="xs:normalizedString" />
          <xs:element name="Extension" minOccurs="0" nillable="true" type="xs:normalizedString" />
          <xs:element name="ListedStatus" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RelationshipType">
    <xs:sequence>
      <xs:element name="Code" type="NZCodeSetsRelationshipToStudentType" />
      <xs:element name="OtherTypeDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ContactFlagsType">
    <xs:sequence>
      <xs:element name="ParentLegalGuardian" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="LivesWith" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="AccessToRecords" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="ReceivesAssessmentReport" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="EmergencyContact" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="CivilEmergencyContact" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="CivilDefenceEmergencyContact" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="DisciplinaryContact" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="AttendanceContact" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="PrimaryCareProvider" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="FeesBilling" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="FeesAccess" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="FamilyMail" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="CourtOrder" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="HealthContact" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="HouseholdContactInfoListType">
    <xs:sequence>
      <xs:element name="HouseholdContactInfo" maxOccurs="unbounded" type="HouseholdContactInfoType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="HouseholdContactInfoType">
    <xs:sequence>
      <xs:element name="PreferenceNumber" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="HouseholdContactId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="HouseholdSalutation" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="AddressList" minOccurs="0" nillable="true" type="AddressListType" />
      <xs:element name="EmailList" minOccurs="0" nillable="true" type="EmailListType" />
      <xs:element name="PhoneNumberList" minOccurs="0" nillable="true" type="PhoneNumberListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="HouseholdListType">
    <xs:sequence>
      <xs:element name="HouseholdId" maxOccurs="unbounded" type="LocalIdType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EduOrganisationType">
    <xs:sequence>
      <xs:element name="AddressList" minOccurs="0" nillable="true" type="AddressListType" />
      <xs:element name="CommunicationChannelList" minOccurs="0" nillable="true" type="CommunicationChannelListType" />
      <xs:element name="ContactList" minOccurs="0" nillable="true" type="ContactListType" />
      <xs:element name="EducationRegion" minOccurs="0" nillable="true" type="NZCodeSetsEducationRegionType" />
      <xs:element name="SpecialEducationDistrict" minOccurs="0" nillable="true" type="NZCodeSetsSpecialEducationDistrictType" />
      <xs:element name="EmailList" minOccurs="0" nillable="true" type="EmailListType" />
      <xs:element name="EntityClose" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="EntityOpen" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="LocationList" minOccurs="0" nillable="true" type="LocationListType" />
      <xs:element name="Name" type="xs:normalizedString" />
      <xs:element name="PhoneNumberList" minOccurs="0" nillable="true" type="PhoneNumberListType" />
      <xs:element name="RelatedOrganisationList" minOccurs="0" nillable="true" type="RelatedOrganisationListType" />
      <xs:element name="OperationalStatus" minOccurs="0" nillable="true" type="NZCodeSetsOperationalStatusType" />
      <xs:element name="OperationalStatusReason" minOccurs="0" nillable="true" type="NZCodeSetsOperationalStatusReasonType" />
      <xs:element name="Type" type="NZCodeSetsOrganisationTypeType" />
      <xs:element name="SectorRole" minOccurs="0" nillable="true" type="NZCodeSetsOrganisationSectorRoleType" />
      <xs:element name="ProviderSMS" minOccurs="0" nillable="true" type="NZCodeSetsSchoolManagementSystemType" />
      <xs:element name="TeRitoConfig" minOccurs="0" nillable="true" type="TeRitoConfigurationType" />
      <xs:element name="IsLicencedECEServiceProvider" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="IsPlaygroupServiceProvider" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="ECEServiceProviderOwnershipType" minOccurs="0" nillable="true" type="NZCodeSetsECEServiceProviderOwnershipTypeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TeRitoConfigurationType">
    <xs:sequence>
      <xs:element name="DataAnalysisDashboardsInd" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="StandardisedLearningSupportRegisterInd" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="VirtualLearningEnvironmentInd" type="NZCodeSetsYesOrNoCategoryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ContactListType">
    <xs:sequence>
      <xs:element name="Contact" maxOccurs="unbounded" type="ContactType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ContactType">
    <xs:sequence>
      <xs:element name="Name" type="BaseNameType" />
      <xs:element name="PositionTitle" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Role" minOccurs="0" nillable="true" type="NZCodeSetsOrganisationContactRoleType" />
      <xs:element name="AddressList" minOccurs="0" nillable="true" type="AddressListType" />
      <xs:element name="EmailList" minOccurs="0" nillable="true" type="EmailListType" />
      <xs:element name="PhoneNumberList" minOccurs="0" nillable="true" type="PhoneNumberListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CommunicationChannelListType">
    <xs:sequence>
      <xs:element name="Channel" maxOccurs="unbounded" type="CommunicationChannelType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CommunicationChannelType">
    <xs:complexContent>
      <xs:extension base="BaseCommunicationChannelType">
        <xs:sequence>
          <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsCommunicationChannelTypeType" />
          <xs:element name="Value" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RelatedOrganisationListType">
    <xs:sequence>
      <xs:element name="RelatedOrganisation" maxOccurs="unbounded" type="RelatedOrganisationType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RelatedOrganisationType">
    <xs:complexContent>
      <xs:extension base="ObjectReferenceType">
        <xs:sequence>
          <xs:element name="StartDate" minOccurs="0" nillable="true" type="xs:date" />
          <xs:element name="EndDate" minOccurs="0" nillable="true" type="xs:date" />
          <xs:element name="Type" type="NZCodeSetsOrganisationRelationshipTypeType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="VerificationEventType">
    <xs:sequence>
      <xs:element name="Source" type="NZCodeSetsVerificationSourceType" />
      <xs:element name="DocumentSerialNumber" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="DocumentExpiryDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="IsConfirmed" type="xs:boolean" />
      <xs:element name="Timestamp" minOccurs="0" nillable="true" type="xs:dateTime" />
      <xs:element name="Provider" minOccurs="0" nillable="true" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EthnicityListType">
    <xs:sequence>
      <xs:element name="Ethnicity" maxOccurs="unbounded" type="EthnicityType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EthnicityType">
    <xs:sequence>
      <xs:element name="PreferenceOrderNumber" minOccurs="0" nillable="true" type="xs:int" />
      <xs:element name="Code" type="NZCodeSetsEthnicityType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="IwiAffiliationListType">
    <xs:sequence>
      <xs:element name="Iwi" maxOccurs="unbounded" type="IwiType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="IwiType">
    <xs:sequence>
      <xs:element name="Code" type="NZCodeSetsIwiType" />
      <xs:element name="PreferenceOrderNumber" minOccurs="0" nillable="true" type="xs:int" />
      <xs:element name="HapuAffiliationList" minOccurs="0" nillable="true" type="HapuAffiliationListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="HapuAffiliationListType">
    <xs:sequence>
      <xs:element name="Hapu" maxOccurs="unbounded" type="HapuType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="HapuType">
    <xs:sequence>
      <xs:element name="HapuName" type="xs:normalizedString" />
      <xs:element name="PreferenceOrderNumber" minOccurs="0" nillable="true" type="xs:int" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReligiousAffiliationListType">
    <xs:sequence>
      <xs:element name="ReligiousAffiliation" maxOccurs="unbounded" type="NZCodeSetsReligionType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="HealthcareServiceInfoType">
    <xs:sequence>
      <xs:element name="OrganisationName" type="xs:normalizedString" />
      <xs:element name="OrganisationPhoneNum" type="xs:normalizedString" />
      <xs:element name="Notes" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Type" type="NZCodeSetsHealthcareServiceTypeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RelatedToListType">
    <xs:sequence>
      <xs:element name="RelatedTo" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonDocumentRoleListType">
    <xs:sequence>
      <xs:element name="PersonDocumentRole" maxOccurs="unbounded" type="PersonDocumentRoleType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonDocumentRoleType">
    <xs:sequence>
      <xs:element name="Role" minOccurs="0" nillable="true" type="NZCodeSetsDocumentRoleType" />
      <xs:choice>
        <xs:element name="Person" minOccurs="0" nillable="true" type="ObjectReferenceType" />
        <xs:element name="Student" minOccurs="0" nillable="true" type="StudentObjectReferenceType" />
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MedicalNeedListType">
    <xs:sequence>
      <xs:element name="MedicalNeed" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentSubjectChoiceListType">
    <xs:sequence>
      <xs:element name="StudentSubjectChoice" maxOccurs="unbounded" type="StudentSubjectChoiceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentSubjectChoiceType">
    <xs:sequence>
      <xs:element name="PreferenceNumber" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="Code" type="NZCodeSetsSubjectAreaType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EarlyChildhoodEducationType">
    <xs:sequence>
      <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsEarlyChildhoodEducationTypeType" />
      <xs:element name="HoursAttended" minOccurs="0" nillable="true" type="xs:int" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentECEEnrolmentType">
    <xs:sequence>
      <xs:element name="ECEYearLevel" minOccurs="0" nillable="true" type="NZCodeSetsECEYearLevelType" />
      <xs:element name="Curriculum" minOccurs="0" nillable="true" type="NZCodeSetsCurriculumType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentTertiaryEnrolmentType">
    <xs:sequence>
      <xs:element name="Type" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentSchoolEnrolmentListType">
    <xs:sequence>
      <xs:element name="SchoolEnrolment" maxOccurs="unbounded" type="StudentSchoolEnrolmentType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentSchoolEnrolmentType">
    <xs:sequence>
      <xs:element name="SchoolCalendarYear" minOccurs="0" nillable="true" type="xs:gYear" />
      <xs:element name="StartDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="MembershipType" type="NZCodeSetsSchoolEnrolmentTypeType" />
      <xs:element name="YearLevel" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:minInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="13" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="EligibilityCriteria" minOccurs="0" nillable="true" type="NZCodeSetsEligibilityCriteriaType" />
      <xs:element name="EligibilityVerification" minOccurs="0" nillable="true" type="VerificationEventType" />
      <xs:element name="FTE" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:decimal">
            <xs:minInclusive value="0" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:fractionDigits value="2" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FundingType" minOccurs="0" nillable="true" type="NZCodeSetsStudentFundingTypeType" />
      <xs:element name="FundingYearLevel" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:minInclusive value="0" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="15" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Curriculum" type="NZCodeSetsCurriculumType" />
      <xs:element name="CurriculumLevel">
        <xs:simpleType>
          <xs:restriction base="xs:unsignedInt">
            <xs:minInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="5" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="LanguageOfInstructionList" minOccurs="0" nillable="true" type="LanguageOfInstructionListType" />
      <xs:element name="TimeInImmersion" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="Section9Agreement" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="NZQA" minOccurs="0" nillable="true" type="NZQAEnrolmentType" />
      <xs:element name="OngoingResourceScheme" minOccurs="0" nillable="true" type="NZCodeSetsOngoingResourceSchemeType" />
      <xs:element name="SubjectChoiceList" minOccurs="0" nillable="true" type="StudentSubjectChoiceListType" />
      <xs:element name="CourseChoiceList" minOccurs="0" nillable="true" type="StudentCourseChoiceListType" />
      <xs:element name="CoEnrolment" minOccurs="0" nillable="true" type="StudentSchoolCoEnrolmentType" />
      <xs:element name="InternationalEnrolment" minOccurs="0" nillable="true" type="InternationalSchoolEnrolmentType" />
      <xs:element name="StudentConsentList" minOccurs="0" nillable="true" type="StudentConsentListType" />
      <xs:element name="AcademicAttainmentGoalList" minOccurs="0" nillable="true" type="AcademicAttainmentGoalListType" />
      <xs:element name="PreEnrolmentCancellation" minOccurs="0" nillable="true" type="PreEnrolmentCancellationType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NZQAEnrolmentType">
    <xs:sequence>
      <xs:element name="EnrolmentId" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="FeeAmount" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="FinancialAssistance" minOccurs="0" nillable="true" type="NZCodeSetsNZQAFinancialAssistanceType" />
      <xs:element name="SortCode" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="SubmitterName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="SubmitterEmailAddress" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="WithdrawnAllAssessmentsInd" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AcademicAttainmentGoalListType">
    <xs:sequence>
      <xs:element name="AttainmentGoal" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentSchoolCoEnrolmentType">
    <xs:sequence>
      <xs:element name="OtherProvider" type="ObjectReferenceType" />
      <xs:element name="CoEnrolmentType" minOccurs="0" nillable="true" type="NZCodeSetsCoEnrolmentTypeType" />
      <xs:element name="BehaviouralKeyIssuesNote" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="ClientSchoolConfidentialNote" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="GuardianConfidentialNote" minOccurs="0" nillable="true" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="InternationalSchoolEnrolmentType">
    <xs:sequence>
      <xs:element name="NZArrivalDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="TuitionWeeklyFee" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="ExchangeScheme" minOccurs="0" nillable="true" type="NZCodeSetsExchangeSchemeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentCourseChoiceListType">
    <xs:sequence>
      <xs:element name="StudentCourseChoice" maxOccurs="unbounded" type="StudentCourseChoiceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentCourseChoiceType">
    <xs:sequence>
      <xs:element name="PreferenceNumber" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="Course" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PreEnrolmentCancellationType">
    <xs:sequence>
      <xs:element name="NotifiedDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="CancellationMethod" minOccurs="0" nillable="true" type="NZCodeSetsPreEnrolmentExitTypeType" />
      <xs:element name="CancellationReason" minOccurs="0" nillable="true" type="NZCodeSetsPreEnrolmentCancellationReasonType" />
      <xs:element name="CancellationReasonOtherDesc" minOccurs="0" nillable="true" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ProviderExitType">
    <xs:sequence>
      <xs:element name="Reason" type="NZCodeSetsEnrolmentExitTypeType" />
      <xs:element name="PostSchoolActivity" minOccurs="0" nillable="true" type="NZCodeSetsPostSchoolActivityType" />
      <xs:element name="InterventionList" minOccurs="0" nillable="true" type="InterventionListType" />
      <xs:element name="PotentialDestinationSchoolList" minOccurs="0" nillable="true" type="PotentialDestinationSchoolListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="InterventionListType">
    <xs:sequence>
      <xs:element name="Intervention" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PotentialDestinationSchoolListType">
    <xs:sequence>
      <xs:element name="School" maxOccurs="unbounded" type="OrganisationObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ECEEducationHistoryListType">
    <xs:sequence>
      <xs:element name="ECEType" maxOccurs="unbounded" type="ECEHistoryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ECEHistoryType">
    <xs:sequence>
      <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsEarlyChildhoodEducationTypeType" />
      <xs:element name="HoursPerDayAttended" minOccurs="0" nillable="true" type="xs:int" />
      <xs:element name="HoursPerWeekAttended" minOccurs="0" nillable="true" type="xs:int" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ScheduleListType">
    <xs:sequence>
      <xs:element name="Schedule" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ScheduleDayListType">
    <xs:sequence>
      <xs:element name="ScheduleDay" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BellScheduleListType">
    <xs:sequence>
      <xs:element name="BellSchedule" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PeriodListType">
    <xs:sequence>
      <xs:element name="Period" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ScheduleTermListType">
    <xs:sequence>
      <xs:element name="ScheduleTerm" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TeachingGroupEventListType">
    <xs:sequence>
      <xs:element name="Event" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AcademicDayListType">
    <xs:sequence>
      <xs:element name="AcademicDay" maxOccurs="unbounded" type="AcademicDayType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AcademicDayType">
    <xs:complexContent>
      <xs:extension base="ObjectReferenceType">
        <xs:sequence>
          <xs:element name="BellSchedule" minOccurs="0" nillable="true" type="ObjectReferenceType" />
          <xs:element name="PeriodList" type="PeriodListType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SchedulePeriodTimeListType">
    <xs:sequence>
      <xs:element name="SchedulePeriodTime" maxOccurs="unbounded" type="SchedulePeriodTimeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SchedulePeriodTimeType">
    <xs:sequence>
      <xs:element name="Period" type="ObjectReferenceType" />
      <xs:element name="StartTime" type="xs:time" />
      <xs:element name="EndTime" type="xs:time" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ScheduleCustomDayPeriodListType">
    <xs:sequence>
      <xs:element name="Period" maxOccurs="unbounded" type="ScheduleCustomDayPeriodType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ScheduleCustomDayPeriodType">
    <xs:complexContent>
      <xs:extension base="ObjectReferenceType">
        <xs:sequence>
          <xs:element name="StartTime" type="xs:time" />
          <xs:element name="EndTime" type="xs:time" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AttendanceTimeListType">
    <xs:sequence>
      <xs:element name="AttendanceTime" maxOccurs="unbounded" type="AttendanceTimeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AttendanceTimeType">
    <xs:sequence>
      <xs:element name="AttendanceTimeLocalId" type="LocalIdType" />
      <xs:element name="AttendanceType" type="NZCodeSetsAttendanceTypeType" />
      <xs:element name="AttendanceCodeGroup" minOccurs="0" nillable="true" type="NZCodeSetsAttendanceCodeGroupType" />
      <xs:element name="Code" type="NZCodeSetsAttendanceCodeType" />
      <xs:element name="AttendanceDate" type="xs:date" />
      <xs:element name="SchedulePeriod" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="StartTime" minOccurs="0" nillable="true" type="xs:time" />
      <xs:element name="EndTime" minOccurs="0" nillable="true" type="xs:time" />
      <xs:element name="SubmissionDateTime" minOccurs="0" nillable="true" type="xs:dateTime" />
      <xs:element name="Note" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NoteListType">
    <xs:sequence>
      <xs:element name="Note" maxOccurs="unbounded" type="NoteType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NoteType">
    <xs:sequence>
      <xs:element name="Note" type="xs:normalizedString" />
      <xs:element name="CreatedDateTime" type="xs:dateTime" />
      <xs:element name="LastUpdatedDateTime" minOccurs="0" nillable="true" type="xs:dateTime" />
      <xs:element name="CreatedBy" type="ObjectReferenceType" />
      <xs:element name="LastUpdatedBy" minOccurs="0" nillable="true" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MedicationListType">
    <xs:sequence>
      <xs:element name="Medication" maxOccurs="unbounded" type="MedicationType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MedicationType">
    <xs:sequence>
      <xs:element name="MedicationName" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="Dosage" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="Frequency" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="AdministrationInformation" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="Method" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="MedicationConsentList" minOccurs="0" nillable="true" type="MedicationConsentListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MedicationConsentListType">
    <xs:sequence>
      <xs:element name="MedicationConsent" maxOccurs="unbounded" type="MedicationConsentType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MedicationConsentType">
    <xs:sequence>
      <xs:element name="StartDate" type="xs:date" />
      <xs:element name="EndDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="ConsentedBy" type="ObjectReferenceType" />
      <xs:element name="ProviderApplicableTo" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="AdministeredBy" minOccurs="0" nillable="true" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingEventCategoryListType">
    <xs:sequence>
      <xs:element name="EventCategory" maxOccurs="unbounded" type="WellbeingEventCategoryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingEventCategoryType">
    <xs:sequence>
      <xs:element name="Category" type="NZCodeSetsWellbeingEventCategoryType" />
      <xs:element name="EventSubCategoryList" minOccurs="0" nillable="true" type="WellbeingEventSubCategoryListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingEventSubCategoryListType">
    <xs:sequence>
      <xs:element name="EventSubCategory" maxOccurs="unbounded" type="WellbeingEventSubCategoryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingEventSubCategoryType">
    <xs:sequence>
      <xs:element name="SubCategory" type="NZCodeSetsWellbeingEventSubCategoryType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="FollowUpActionListType">
    <xs:sequence>
      <xs:element name="FollowUpAction" maxOccurs="unbounded" type="FollowUpActionType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="FollowUpActionType">
    <xs:sequence>
      <xs:element name="WellbeingResponseRefId" minOccurs="0" nillable="true" type="IdRefType" />
      <xs:element name="FollowUpDetails" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="FollowUpActionCategory" minOccurs="0" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonInvolvementListType">
    <xs:sequence>
      <xs:element name="PersonInvolvement" maxOccurs="unbounded" type="PersonInvolvementType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonInvolvementType">
    <xs:complexContent>
      <xs:extension base="StudentObjectReferenceType">
        <xs:sequence>
          <xs:element name="HowInvolved" minOccurs="0" nillable="true" type="xs:normalizedString" />
          <xs:element name="PersonType" minOccurs="0" nillable="true" type="NZCodeSetsPersonInvolvedTypeType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RecognitionListType">
    <xs:sequence>
      <xs:element name="Recognition" maxOccurs="unbounded" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WithdrawalTimeListType">
    <xs:sequence>
      <xs:element name="Withdrawal" maxOccurs="unbounded" type="WithdrawalType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WithdrawalType">
    <xs:sequence>
      <xs:element name="WithdrawalStartDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="WithdrawalEndDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="WithdrawalStartTime" minOccurs="0" nillable="true" type="xs:time" />
      <xs:element name="WithdrawalEndTime" minOccurs="0" nillable="true" type="xs:time" />
      <xs:element name="SchoolTerm" minOccurs="0" nillable="true" type="xs:integer" />
      <xs:element name="WithdrawalFrom" minOccurs="0" nillable="true" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SuspensionContainerType">
    <xs:sequence>
      <xs:element name="SuspensionCategory" minOccurs="0" nillable="true" type="NZCodeSetsSuspensionCategoryType" />
      <xs:element name="WithdrawalTimeList" minOccurs="0" nillable="true" type="WithdrawalTimeListType" />
      <xs:element name="Duration" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="AdvisementDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="ResolutionMeetingTime" minOccurs="0" nillable="true" type="xs:dateTime" />
      <xs:element name="ResolutionNotes" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="EarlyReturnDate" minOccurs="0" nillable="true" type="xs:date" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DetentionContainerType">
    <xs:sequence>
      <xs:element name="DetentionCategory" minOccurs="0" nillable="true" type="NZCodeSetsDetentionCategoryType" />
      <xs:element name="DetentionDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="DetentionLocation" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="DetentionNotes" minOccurs="0" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PlanRequiredListType">
    <xs:sequence>
      <xs:element name="Plan" maxOccurs="unbounded" type="WellbeingPlanType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingPlanType">
    <xs:sequence>
      <xs:element name="PlanNotes" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="PlanDocument" minOccurs="0" nillable="true" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AwardContainerType">
    <xs:sequence>
      <xs:element name="AwardDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="AwardType" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingAwardTypeType" />
      <xs:element name="AwardDescription" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="AwardNotes" minOccurs="0" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OtherWellbeingResponseContainerType">
    <xs:sequence>
      <xs:element name="OtherResponseDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="OtherResponseDescription" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="OtherResponseNotes" minOccurs="0" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AcknowledgementListType">
    <xs:sequence>
      <xs:element name="Acknowledgement" maxOccurs="unbounded" type="AcknowledgementType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AcknowledgementType">
    <xs:sequence>
      <xs:element name="Acknowledged" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="AcknowledgedDate" type="xs:date" />
      <xs:element name="Provider" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="StaffMember" minOccurs="0" nillable="true" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="KeyContactListType">
    <xs:sequence>
      <xs:element name="KeyContact" maxOccurs="unbounded" type="KeyContactType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="KeyContactType">
    <xs:sequence>
      <xs:element name="Role" minOccurs="0" nillable="true" type="NZCodeSetsKeyContactRoleType" />
      <xs:element name="Contact" minOccurs="0" nillable="true" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingResponseListType">
    <xs:sequence>
      <xs:element name="WellbeingResponse" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingAppealListType">
    <xs:sequence>
      <xs:element name="WellbeingAppeal" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingCharacteristicListType">
    <xs:sequence>
      <xs:element name="WellbeingCharacteristic" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingEventListType">
    <xs:sequence>
      <xs:element name="WellbeingEvent" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WellbeingAlertListType">
    <xs:sequence>
      <xs:element name="WellbeingAlert" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RelatedWellbeingEventListType">
    <xs:sequence>
      <xs:element name="RelatedWellbeingEvent" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RestraintWitnessListType">
    <xs:sequence>
      <xs:element name="Witness" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RestraintAdministeredByListType">
    <xs:sequence>
      <xs:element name="RestraintAdministeredBy" maxOccurs="unbounded" type="RestraintAdministeredByType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RestraintAdministeredByType">
    <xs:sequence>
      <xs:element name="AdministeredBy" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="SafePhysicalRestraintTraining" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="TrainingDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Role" minOccurs="0" nillable="true" type="NZCodeSetsRestraintAdministeredByRoleType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BehaviourDirectedAtListType">
    <xs:sequence>
      <xs:element name="BehaviourDirectedAt" maxOccurs="unbounded" type="BehaviourDirectedAtType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BehaviourDirectedAtType">
    <xs:sequence>
      <xs:element name="DirectedAt" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="BehaviourDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="DirectedAtType" minOccurs="0" nillable="true" type="NZCodeSetsBehaviourDirectedAtTypeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StaffReflectionListType">
    <xs:sequence>
      <xs:element name="StaffReflection" maxOccurs="unbounded" type="StaffReflectionType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StaffReflectionType">
    <xs:sequence>
      <xs:element name="ReflectionDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="WitnessedBy" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="Staff" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="ReflectionList" minOccurs="0" nillable="true" type="ReflectionListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReflectionListType">
    <xs:sequence>
      <xs:element name="Reflection" maxOccurs="unbounded" type="ReflectionType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReflectionType">
    <xs:sequence>
      <xs:element name="ReflectionDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Type" minOccurs="0" nillable="true" type="NZCodeSetsStaffRestraintReflectionTypeType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RestraintDebriefingListType">
    <xs:sequence>
      <xs:element name="RestraintDebriefing" maxOccurs="unbounded" type="RestraintDebriefingType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RestraintDebriefingType">
    <xs:sequence>
      <xs:element name="DebriefingDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="DebriefingTime" minOccurs="0" nillable="true" type="xs:time" />
      <xs:element name="Findings" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="NextStepsActions" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="ParentCaregiverComment" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="StudentComment" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="DebriefingType" minOccurs="0" nillable="true" type="NZCodeSetsRestraintDebriefingTypeType" />
      <xs:element name="AttendeeList" minOccurs="0" nillable="true" type="AttendeeListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AttendeeListType">
    <xs:sequence>
      <xs:element name="Attendee" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RestraintQuestionListType">
    <xs:sequence>
      <xs:element name="RestraintQuestion" maxOccurs="unbounded" type="RestraintQuestionType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RestraintQuestionType">
    <xs:sequence>
      <xs:element name="Question" type="NZCodeSetsRestraintQuestionType" />
      <xs:element name="Answer" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="AnswerSupportingDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SocialGoalListType">
    <xs:sequence>
      <xs:element name="SocialGoal" maxOccurs="unbounded" type="BaseStudentGoalType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CareerGoalListType">
    <xs:sequence>
      <xs:element name="CareerGoal" maxOccurs="unbounded" type="BaseStudentGoalType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AcademicGoalListType">
    <xs:sequence>
      <xs:element name="AcademicGoal" maxOccurs="unbounded" type="AcademicGoalType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BaseStudentGoalType">
    <xs:sequence>
      <xs:element name="GoalRecordedDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="GoalAchievedDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="GoalDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="GoalName" minOccurs="0" nillable="true" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AcademicGoalType">
    <xs:complexContent>
      <xs:extension base="BaseStudentGoalType">
        <xs:sequence>
          <xs:element name="SubjectArea" minOccurs="0" nillable="true" type="NZCodeSetsSubjectAreaType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="StudentInterestListType">
    <xs:sequence>
      <xs:element name="StudentInterest" maxOccurs="unbounded" type="StudentInterestType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentInterestType">
    <xs:sequence>
      <xs:element name="InterestRecordedDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="InterestDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="InterestName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="InterestType" minOccurs="0" nillable="true" type="NZCodeSetsStudentInterestTypeType" />
      <xs:element name="SubjectArea" minOccurs="0" nillable="true" type="NZCodeSetsSubjectAreaType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EventLocationListType">
    <xs:sequence>
      <xs:element name="Location" maxOccurs="unbounded" type="NZCodeSetsWellbeingEventLocationType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ActionTakenListType">
    <xs:sequence>
      <xs:element name="ActionTaken" maxOccurs="unbounded" type="NZCodeSetsWellbeingEventActionTakenType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PossibleMotivationListType">
    <xs:sequence>
      <xs:element name="PossibleMotivation" maxOccurs="unbounded" type="NZCodeSetsWellbeingEventPossibleMotivationType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BehaviourIdentifiedListType">
    <xs:sequence>
      <xs:element name="BehaviourIdentified" maxOccurs="unbounded" type="BehaviourIdentifiedType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BehaviourIdentifiedType">
    <xs:sequence>
      <xs:element name="Severity" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingEventSeverityType" />
      <xs:choice>
        <xs:element name="MinorBehaviour" minOccurs="0" maxOccurs="unbounded" type="NZCodeSetsWellbeingEventMinorBehaviourType" />
        <xs:element name="MajorBehaviour" minOccurs="0" maxOccurs="unbounded" type="NZCodeSetsWellbeingEventMajorBehaviourType" />
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentVoiceListType">
    <xs:sequence>
      <xs:element name="StudentVoice" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SupportNeedListType">
    <xs:sequence>
      <xs:element name="SupportNeed" maxOccurs="unbounded" type="SupportNeedType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SupportNeedType">
    <xs:sequence>
      <xs:element name="Need" type="ObjectReferenceType" />
      <xs:element name="ResponseList" minOccurs="0" nillable="true" type="SupportNeedResponseListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SupportNeedResponseListType">
    <xs:sequence>
      <xs:element name="Response" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SupportNeedResponseReviewListType">
    <xs:sequence>
      <xs:element name="Review" maxOccurs="unbounded" type="SupportNeedResponseReviewType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SupportNeedResponseReviewType">
    <xs:sequence>
      <xs:element name="Reviewer" type="ObjectReferenceType" />
      <xs:element name="ReviewDate" type="xs:date" />
      <xs:element name="ReviewComments" type="xs:normalizedString" />
      <xs:element name="NextReviewDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="AttachmentList" minOccurs="0" nillable="true" type="DocumentListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SupportNeedExternalResponseType">
    <xs:sequence>
      <xs:element name="Provider" type="NZCodeSetsLearningSupportExternalProviderType" />
      <xs:element name="ProviderDetail" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Status" type="NZCodeSetsLearningSupportExtResponseStatusType" />
      <xs:element name="MOESpecialistService" minOccurs="0" nillable="true" type="NZCodeSetsMoESpecialistServiceType" />
      <xs:element name="FundedBy" minOccurs="0" nillable="true" type="NZCodeSetsLearningSupportExternalFunderType" />
      <xs:element name="FundedByDetail" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="RequestMadeDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="FundingStatus" minOccurs="0" nillable="true" type="NZCodeSetsLearningSupportFundingStatusType" />
      <xs:element name="FundingDeclinedReason" minOccurs="0" nillable="true" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SupportNeedInternalResponseType">
    <xs:sequence>
      <xs:element name="ProvidedBy" type="NZCodeSetsLearningSupportInternalProviderType" />
      <xs:element name="ProvidedByName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Status" type="NZCodeSetsLearningSupportIntResponseStatusType" />
      <xs:element name="FundedBy" type="NZCodeSetsLearningSupportInternalFunderType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OfficialDiagnosisListType">
    <xs:sequence>
      <xs:element name="OfficialDiagnosis" maxOccurs="unbounded" type="OfficialDiagnosisType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OfficialDiagnosisType">
    <xs:sequence>
      <xs:element name="DiagnosisType" type="NZCodeSetsOfficialDiagnosisTypeType" />
      <xs:element name="DiagnosisSubType" minOccurs="0" nillable="true" type="NZCodeSetsOfficialDiagnosisSubTypeType" />
      <xs:element name="OfficialDiagnosisDetail" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="DocumentList" minOccurs="0" nillable="true" type="DocumentListType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AssessmentTaskListType">
    <xs:sequence>
      <xs:element name="SubAssessmentTask" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NZQAAssessmentRegistrationType">
    <xs:sequence>
      <xs:element name="EnrolmentId" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="EntryId" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="AssessmentRequestType" minOccurs="0" nillable="true" type="NZCodeSetsAssessmentRequestTypeType" />
      <xs:element name="PaperLanguage" minOccurs="0" nillable="true" type="NZCodeSetsLanguageType" />
      <xs:element name="AnswerLanguage" minOccurs="0" nillable="true" type="NZCodeSetsLanguageType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SpecialAssessmentConditionListType">
    <xs:sequence>
      <xs:element name="SpecialAssessmentCondition" maxOccurs="unbounded" type="NZCodeSetsSpecialAssessmentConditionType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AssessmentResultScoreListType">
    <xs:sequence>
      <xs:element name="ResultScore" maxOccurs="unbounded" type="AssessmentResultScoreType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AssessmentResultScoreType">
    <xs:sequence>
      <xs:element name="ScoreType" minOccurs="0" nillable="true" type="NZCodeSetsScoreTypeType" />
      <xs:element name="Competency" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="ScoreMetric" minOccurs="0" nillable="true" type="NZCodeSetsScoreMetricType" />
      <xs:element name="ScoreValue" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="ScoreMax" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="ItemNumber" minOccurs="0" nillable="true" type="xs:int" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="JustificationListType">
    <xs:sequence>
      <xs:element name="Justification" maxOccurs="unbounded" type="JustificationType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="JustificationType">
    <xs:complexContent>
      <xs:extension base="ObjectReferenceType">
        <xs:sequence>
          <xs:element name="AssessmentType" minOccurs="0" nillable="true" type="NZCodeSetsAssessmentTypeType" />
          <xs:element name="Result" type="xs:normalizedString" />
          <xs:element name="Date" type="xs:date" />
          <xs:element name="CreditValue" minOccurs="0" nillable="true" type="xs:decimal" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ObjectReferenceType">
    <xs:sequence>
      <xs:element name="RefId" minOccurs="0" nillable="true" type="IdRefType" />
      <xs:element name="LocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="Name" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="ObjectType" minOccurs="0" nillable="true" type="NZCodeSetsReferrableDataObjectsType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ProviderObjectReferenceType">
    <xs:sequence>
      <xs:element name="RefId" type="MoEOrgIdType" />
      <xs:element name="Name" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="LocationNum" minOccurs="0" nillable="true" type="xs:int" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentObjectReferenceType">
    <xs:complexContent>
      <xs:extension base="ObjectReferenceType">
        <xs:sequence>
          <xs:element name="NationalStudentNumber" minOccurs="0" nillable="true" type="xs:positiveInteger" />
          <xs:element name="YearLevel" minOccurs="0" nillable="true">
            <xs:simpleType>
              <xs:restriction base="xs:positiveInteger">
                <xs:minInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
                <xs:maxInclusive value="13" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="OrganisationObjectReferenceType">
    <xs:complexContent>
      <xs:extension base="ProviderObjectReferenceType" />
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="LearningStandardObjectReferenceType">
    <xs:sequence>
      <xs:element name="Number" type="xs:int" />
      <xs:element name="VersionNo" type="xs:decimal" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PrerequisiteListType">
    <xs:sequence>
      <xs:element name="Prerequisite" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ProviderInvolvedListType">
    <xs:sequence>
      <xs:element name="ProviderInvolved" maxOccurs="unbounded" type="ProviderInvolvedType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ProviderInvolvedType">
    <xs:complexContent>
      <xs:extension base="ProviderObjectReferenceType">
        <xs:sequence>
          <xs:element name="ProviderRole" type="NZCodeSetsAssessmentProviderRoleType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="StaffInvolvedListType">
    <xs:sequence>
      <xs:element name="StaffInvolved" maxOccurs="unbounded" type="StaffInvolvedType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StaffInvolvedType">
    <xs:complexContent>
      <xs:extension base="ObjectReferenceType">
        <xs:sequence>
          <xs:element name="StaffRole" type="NZCodeSetsAssessmentStaffRoleType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DocumentListType">
    <xs:sequence>
      <xs:element name="Document" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StudentConsentListType">
    <xs:sequence>
      <xs:element name="StudentConsent" maxOccurs="unbounded" type="ObjectReferenceType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RecordAuditType">
    <xs:sequence>
      <xs:element name="CreatedDateTime" minOccurs="0" nillable="true" type="xs:dateTime" />
      <xs:element name="LastUpdatedDateTime" minOccurs="0" nillable="true" type="xs:dateTime" />
      <xs:element name="DeletedDateTime" minOccurs="0" nillable="true" type="xs:dateTime" />
      <xs:element name="CreatedBy" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="LastUpdatedBy" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="DeletedBy" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="DeletedReason" minOccurs="0" nillable="true" type="NZCodeSetsDeletedReasonType" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="GUIDType">
    <xs:restriction>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:pattern value="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
        </xs:restriction>
      </xs:simpleType>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MoEOrgIdType">
    <xs:restriction>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:pattern value="[1-9][0-9]{0,4}" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
        </xs:restriction>
      </xs:simpleType>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RefIdType">
    <xs:restriction base="GUIDType" />
  </xs:simpleType>

  <xs:simpleType name="IdRefType">
    <xs:restriction base="RefIdType" />
  </xs:simpleType>

  <xs:simpleType name="LocalIdType">
    <xs:restriction base="xs:normalizedString" />
  </xs:simpleType>

</xs:schema>