<!--
		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="WellbeingResponseType">
    <xs:sequence>
      <xs:element name="WellbeingResponseRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="WellbeingResponseLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="Student" type="StudentObjectReferenceType" />
      <xs:element name="Provider" type="ProviderObjectReferenceType" />
      <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="ResponseStatus" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingStatusType" />
      <xs:element name="ResponseCategory" minOccurs="0" nillable="true" type="NZCodeSetsWellbeingResponseCategoryType" />
      <xs:element name="ResponseNotes" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="PersonInvolvementList" minOccurs="0" nillable="true" type="PersonInvolvementListType" />
      <xs:element name="Suspension" minOccurs="0" nillable="true" type="SuspensionContainerType" />
      <xs:element name="Detention" minOccurs="0" nillable="true" type="DetentionContainerType" />
      <xs:element name="PlanRequiredList" minOccurs="0" nillable="true" type="PlanRequiredListType" />
      <xs:element name="Award" minOccurs="0" nillable="true" type="AwardContainerType" />
      <xs:element name="OtherResponse" minOccurs="0" nillable="true" type="OtherWellbeingResponseContainerType" />
      <xs:element name="DocumentList" minOccurs="0" nillable="true" type="DocumentListType" />
      <xs:element name="WellbeingAlert" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="WellbeingEvent" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="WellbeingAppealList" minOccurs="0" nillable="true" type="WellbeingAppealListType" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="WellbeingResponse" type="WellbeingResponseType">
    <xs:key name="WellbeingResponseKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./WellbeingResponseRefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="WellbeingResponseCollectionType">
    <xs:sequence>
      <xs:element name="WellbeingResponse" type="WellbeingResponseType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="WellbeingResponses" type="WellbeingResponseCollectionType" />

</xs:schema>