<!--
		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="StudentPhysicalRestraintType">
    <xs:sequence>
      <xs:element name="StudentPhysicalRestraintRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="StudentPhysicalRestraintLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="Provider" minOccurs="0" type="ProviderObjectReferenceType" />
      <xs:element name="Student" minOccurs="0" type="StudentObjectReferenceType" />
      <xs:element name="PrincipalOrDelegate" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="WellbeingEvent" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="ConsideredNecessaryReason" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="FirstTimeStudentRestrained" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="IncidentDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="LocationDescription" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="OtherComment" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="ReportedDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="RestraintEndedTime" minOccurs="0" nillable="true" type="xs:time" />
      <xs:element name="RestraintStartedTime" minOccurs="0" nillable="true" type="xs:time" />
      <xs:element name="RestraintReason" minOccurs="0" nillable="true" type="NZCodeSetsRestraintReasonType" />
      <xs:element name="DocumentList" minOccurs="0" nillable="true" type="DocumentListType" />
      <xs:element name="RestraintWitnessList" minOccurs="0" nillable="true" type="RestraintWitnessListType" />
      <xs:element name="RestraintAdministeredByList" minOccurs="0" nillable="true" type="RestraintAdministeredByListType" />
      <xs:element name="BehaviourDirectedAtList" minOccurs="0" nillable="true" type="BehaviourDirectedAtListType" />
      <xs:element name="StaffReflectionList" minOccurs="0" nillable="true" type="StaffReflectionListType" />
      <xs:element name="RestraintDebriefingList" minOccurs="0" nillable="true" type="RestraintDebriefingListType" />
      <xs:element name="RestraintQuestionList" minOccurs="0" nillable="true" type="RestraintQuestionListType" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="StudentPhysicalRestraint" type="StudentPhysicalRestraintType">
    <xs:unique name="StudentPhysicalRestraintKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./StudentPhysicalRestraintRefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="StudentPhysicalRestraintCollectionType">
    <xs:sequence>
      <xs:element name="StudentPhysicalRestraint" type="StudentPhysicalRestraintType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StudentPhysicalRestraints" type="StudentPhysicalRestraintCollectionType" />

</xs:schema>