﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.vetxml.org/schemas/NotificationAction" xmlns="http://www.vetxml.org/schemas/NotificationAction"
           xmlns:ord="http://www.vetxml.org/schemas/Order" version="1.0">
  <xs:import namespace="http://www.vetxml.org/schemas/Order" schemaLocation="OrderItem.xsd" />
  <xs:element name="NotificationAction">
    <xs:complexType>
      <xs:all>
        <xs:element name="PracticeOrderNumber" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="SupplierOrderNumber" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="Details" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:choice>
              <xs:element name="PartialFulfillment">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Action" minOccurs="1" maxOccurs="1">
                      <xs:complexType>
                        <xs:choice>
                          <xs:element name="CancelAll" type="xs:boolean" />
                          <xs:element name="CancelOutstanding" type="xs:boolean" />
                          <xs:element name="BackOrder" type="xs:boolean" />
                          <xs:element name="SubstitutionItem" type="ord:OrderItem" />
                        </xs:choice>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
              <xs:element name="PriceIncrease">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Action" minOccurs="1" maxOccurs="1">
                      <xs:complexType>
                        <xs:choice>
                          <xs:element name="Cancel" type="xs:boolean" />
                          <xs:element name="AcceptNewPrice" type="xs:boolean" />
                          <xs:element name="SubstitutionItem" type="ord:OrderItem" />
                        </xs:choice>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
              <xs:element name="Substitution">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Action" minOccurs="1" maxOccurs="1">
                      <xs:complexType>
                        <xs:choice>
                          <xs:element name="Cancel" type="xs:boolean" />
                          <xs:element name="SubstitutionItem" type="ord:OrderItem" />
                        </xs:choice>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>
      </xs:all>
      <xs:attribute name="version" type="xs:string" />
    </xs:complexType>
  </xs:element>
</xs:schema>