<!--
		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="WellbeingCharacteristicType">
    <xs:sequence>
      <xs:element name="WellbeingCharacteristicRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="WellbeingCharacteristicLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="Student" type="StudentObjectReferenceType" />
      <xs:element name="RecordingProvider" type="ProviderObjectReferenceType" />
      <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="ReviewDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="CharacteristicNotes" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="NoteList" minOccurs="0" nillable="true" type="NoteListType" />
      <xs:element name="Classification" type="NZCodeSetsWellbeingCharacteristicClassType" />
      <xs:element name="Category" type="NZCodeSetsWellbeingCharacteristicCategoryType" />
      <xs:element name="SubCategory" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingCharacteristicSubCategoryType" />
      <xs:element name="SubSubCategory" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingCharacteristicSubSubCategoryType" />
      <xs:element name="SubCategoryDetail" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="CharacteristicPriority" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingCharacteristicPriorityType" />
      <xs:element name="CaseLead" minOccurs="0" nillable="true" type="NZCodeSetsLearningSupportCaseLeadType" />
      <xs:element name="CaseLeadOtherDesc" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="CaseLeadContactPerson" type="xs:normalizedString" />
      <xs:element name="DailyManagement" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="EmergencyManagement" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="EmergencyResponsePlan" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="Trigger" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="ConfidentialFlag" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="Alert" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="MedicationList" minOccurs="0" nillable="true" type="MedicationListType" />
      <xs:element name="DocumentList" minOccurs="0" nillable="true" type="DocumentListType" />
      <xs:element name="WellbeingEventList" minOccurs="0" nillable="true" type="WellbeingEventListType" />
      <xs:element name="WellbeingAlertList" minOccurs="0" nillable="true" type="WellbeingAlertListType" />
      <xs:element name="SpecialAssessmentConditionList" minOccurs="0" nillable="true" type="SpecialAssessmentConditionListType" />
      <xs:element name="Status" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingCharacteristicStatusType" />
      <xs:element name="MedicalCharacteristicDesc" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="OfficialDiagnosis" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="OfficialDiagnosisList" minOccurs="0" nillable="true" type="OfficialDiagnosisListType" />
      <xs:element name="StudentVoiceList" minOccurs="0" nillable="true" type="StudentVoiceListType" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
      <xs:element name="LearnerInterests" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="LearnerWhanauGoal" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="LearnerWhanauVoice" minOccurs="0" nillable="true" type="xs:normalizedString" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="WellbeingCharacteristic" type="WellbeingCharacteristicType">
    <xs:key name="WellbeingCharacteristicKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./WellbeingCharacteristicRefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="WellbeingCharacteristicCollectionType">
    <xs:sequence>
      <xs:element name="WellbeingCharacteristic" type="WellbeingCharacteristicType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="WellbeingCharacteristics" type="WellbeingCharacteristicCollectionType" />

</xs:schema>