<!--
		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="WellbeingAlertType">
    <xs:sequence>
      <xs:element name="WellbeingAlertRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="WellbeingAlertLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="Student" minOccurs="0" type="StudentObjectReferenceType" />
      <xs:element name="Provider" minOccurs="0" type="ProviderObjectReferenceType" />
      <xs:element name="StaffMember" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="PublishedDate" minOccurs="0" nillable="true" type="xs:date" />
      <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="AlertCategory" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingAlertCategoryType" />
      <xs:element name="AlertDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="AcknowledgementList" minOccurs="0" nillable="true" type="AcknowledgementListType" />
      <xs:element name="KeyContactList" minOccurs="0" nillable="true" type="KeyContactListType" />
      <xs:element name="WellbeingResponseList" minOccurs="0" nillable="true" type="WellbeingResponseListType" />
      <xs:element name="WellbeingAppealList" minOccurs="0" nillable="true" type="WellbeingAppealListType" />
      <xs:element name="WellbeingCharacteristicList" minOccurs="0" nillable="true" type="WellbeingCharacteristicListType" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="WellbeingAlert" type="WellbeingAlertType">
    <xs:unique name="WellbeingAlertKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./WellbeingAlertRefId" />
    </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>