<!--
		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:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>High</privacyRating>
      </xs:appinfo>
      <xs:documentation>Core Wellbeing Characteristic that is integral to the Student. This may be a Medical
					condition, special needs or a characteristic such as a known disability or any other 
					characteristic or condition that is student specific and impacts their learning.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="WellbeingCharacteristicRefId" minOccurs="0" nillable="true" type="RefIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The universally unique identifier for the data object record that is used across systems.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="WellbeingCharacteristicLocalId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>The Id of the data object record that was provided by the system that the information 
			was originally sourced from.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Student" type="StudentObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the student to whom this WellbeingCharacteristic belongs.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecordingProvider" type="ProviderObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the provider which recorded this Wellbeing Characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StartDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Starting Date for this Characteristic to be noted.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="EndDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>End date for this Characteristic to be noted, if there is one.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ReviewDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Date at which this information should be reviewed.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CharacteristicNotes" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Text relating to the particular WellbeingCharacteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NoteList" minOccurs="0" nillable="true" type="NoteListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of notes that have been written about the wellbeing characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Classification" type="NZCodeSetsWellbeingCharacteristicClassType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Top most category of WellbeingCharacteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Category" type="NZCodeSetsWellbeingCharacteristicCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Category of WellbeingCharacteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubCategory" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingCharacteristicSubCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Sub category of the WellbeingCharacteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubSubCategory" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingCharacteristicSubSubCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>An additional layer to provide more detail around a wellbeing characteristic sub category. For examples for the learner’s 
      support need sub category, e.g. if the support need of ‘Vision’ is selected for the user, the sub needs ‘Low Vision’ and ‘Blind’ 
      are available to further define the type of vision issue the learner has. Not all support needs have sub needs.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubCategoryDetail" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Additional detail about a sub category.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CharacteristicPriority" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingCharacteristicPriorityType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>The priority of the characteristic in relation to other characteristics within the same classification.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CaseLead" minOccurs="0" nillable="true" type="NZCodeSetsLearningSupportCaseLeadType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The Agency taking the lead on the learning support need case, e.g. MOE, Police, Corrections etc.)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CaseLeadOtherDesc" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Free text describing the Case Lead Agency when a Case Lead of 'Other' is selected.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CaseLeadContactPerson" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The name of the contact person for the Case Lead Agency.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DailyManagement" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="EmergencyManagement" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="EmergencyResponsePlan" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="Trigger" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="ConfidentialFlag" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Flag indicating if the characteristic is confidential or not.  If ‘Y’ should not be shared with any other system/school.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Alert" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Create an Alert for this Characteristic?</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MedicationList" minOccurs="0" nillable="true" type="MedicationListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="DocumentList" minOccurs="0" nillable="true" type="DocumentListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Describes the Location of any associated documents kept in relation to this Characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="WellbeingEventList" minOccurs="0" nillable="true" type="WellbeingEventListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of any Wellbeing Events that have arisen as a result of this Characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="WellbeingAlertList" minOccurs="0" nillable="true" type="WellbeingAlertListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of any Wellbeing Alerts that have arison as a result of this Chracteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SpecialAssessmentConditionList" minOccurs="0" nillable="true" type="SpecialAssessmentConditionListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of the special assessment conditions that a student is entitled to have when sitting an assessment.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Status" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingCharacteristicStatusType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The staus of the Wellbeing Characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MedicalCharacteristicDesc" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Free text providing additional information about a medical need of a student. Especially when a medical need of 'Other' is selected.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OfficialDiagnosis" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Indicates whether or not the student has an official diagnosis that pertains to this Wellbeing Characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OfficialDiagnosisList" minOccurs="0" nillable="true" type="OfficialDiagnosisListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of official diagnoses that pertains to this wellbeing characteristic. At least one diagnosis is required if OfficialDiagnosis = 'Y'.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StudentVoiceList" minOccurs="0" nillable="true" type="StudentVoiceListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of the student's or their whānau's voice about their wellbeing characteristic in regards to the student 's interests, goals, and voice (comments, opinions).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The audit details for a record, e.g. Created/Last Updated DateTime and Created/Last Updated By.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearnerInterests" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Free text that describes the interests a learner has that pertains to this wellbeing Characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearnerWhanauGoal" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Free text describing any goals the student wants to achieve, or any goals their whānau want them to achieve that pertain to this wellbeing characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearnerWhanauVoice" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Free text capturing the learners and/or their whānaus opinions and point of view in regards to this wellbeing characteristic.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </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>