<!--
		SIF Implementation Specification (Australia) 3.4.3


		(April 5, 2018)
		
		Infrastructure Version: v3
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/au/3.4" targetNamespace="http://www.sifassociation.org/datamodel/au/3.4" elementFormDefault="qualified" version="3.4.3">
  <xs:complexType name="WellbeingAlertType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>High</privacyRating>
      </xs:appinfo>
      <xs:documentation>Alert indicating further intervention or knowledge required with regard to a student, which could be Medical, Legal or other. Can reflect both long-term attributes of a student (Characteristics) and short-term attributes (e.g. resulting from Events). They fulfil the need for something that can be sent, associated with the student to transfer information that carries basic, important information.  Lightweight, it needs to alert teachers and systems that this student has a ‘concern’ that needs to be known for ‘duty of care’.  Currently in the SIF Model there exists the concept of ‘medical alerts’ and ‘alerts’, but these are lists of events that are carried with StudentPersonal: if anything is changed then for it to be recognised by consuming systems, they would need to re-consume StudentPersonal and ALL of the lists of alerts.  It was noted that this information needs to travel as the result of an event or a concern, not necessarily as a by-product of a change in StudentPersonal.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="StudentPersonalRefId" minOccurs="0" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>The ID (GUID) of the student to whom this WellbeingAlert belongs.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolInfoRefId" minOccurs="0" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The ID (GUID) of the school for which this WellbeingAlert is being reported.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Date" minOccurs="0" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The calendar date on which this wellbeing alert was published.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="WellbeingAlertStartDate" minOccurs="0" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date the wellbeing alert period commenced.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="WellbeingAlertEndDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date the wellbeing alert is due to finish.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="WellbeingAlertCategory" minOccurs="0" nillable="true" type="AUCodeSetsWellbeingAlertCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>C</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Category of WellbeingAlert.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="WellbeingAlertDescription" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Description of this particular wellbeing alert.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="EnrolmentRestricted" minOccurs="0" nillable="true" type="AUCodeSetsYesOrNoCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>Is this Alert Restricted to a particular enrolment at a school?</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AlertAudience" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>Audience for this particular wellbeing alert.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AlertSeverity" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Severity of this wellbeing alert.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AlertKeyContact" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>Key Contact to get information about this wellbeing alert from.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="SIF_MetadataType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="SIF_ExtendedElementsType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="RefIdType">
      <xs:annotation>
        <xs:appinfo>
          <sifChar>M</sifChar>
          <privacyRating>Low</privacyRating>
        </xs:appinfo>
        <xs:documentation>The ID (GUID) assigned to uniquely identify this WellbeingAlert.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="WellbeingAlert" type="WellbeingAlertType">
    <xs:unique name="WellbeingAlertKey1">
      <xs:selector xpath="./WellbeingAlert" />
      <xs:field xpath="@RefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="WellbeingAlertCollectionType">
    <xs:sequence>
      <xs:element name="WellbeingAlert" type="WellbeingAlertType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="WellbeingAlerts" type="WellbeingAlertCollectionType" />

</xs:schema>