<!--
		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="StudentVoiceType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Medium</privacyRating>
      </xs:appinfo>
      <xs:documentation>A record of a student's interests as well as their social, academic and 
		academic goals.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="StudentVoiceRefId" minOccurs="0" nillable="true" type="RefIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</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="StudentVoiceLocalId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</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" minOccurs="0" type="StudentObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to The GUID for the student's StudentPersonal record.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Provider" minOccurs="0" type="ProviderObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the school that collected this StudentVoice entry.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="VoiceType" minOccurs="0" nillable="true" type="NZCodeSetsStudentVoiceTypeType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>Code set denoting the type of student voice being heard, e.g. their interests, goals, voice (comments, opinions).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StudentVoiceNote" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>Extra notes about the student, and their voice</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StudentInterestList" minOccurs="0" nillable="true" type="StudentInterestListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of the diffent interests the student has expressed.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SocialGoalList" minOccurs="0" nillable="true" type="SocialGoalListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of the diffent social goals the student has expressed.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AcademicGoalList" minOccurs="0" nillable="true" type="AcademicGoalListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of the diffent academic goals the student has expressed.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CareerGoalList" minOccurs="0" nillable="true" type="CareerGoalListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of the diffent career goals the student has expressed.</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:sequence>
  </xs:complexType>

  <xs:element name="StudentVoice" type="StudentVoiceType">
    <xs:unique name="StudentVoiceKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./StudentVoiceRefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="StudentVoiceCollectionType">
    <xs:sequence>
      <xs:element name="StudentVoice" type="StudentVoiceType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StudentVoices" type="StudentVoiceCollectionType" />

</xs:schema>