<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://www.vetxml.org/schemas/WellnessPlanRegistration" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.vetxml.org/schemas/WellnessPlanRegistration" elementFormDefault="qualified" version="1.0" id="WellnessPlanRegistration">
	<xs:element name="WellnessPlanRegistration">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="PracticeDetails">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="PracticeMembershipNo" type="xs:string"/>
							<xs:element name="PracticeName" type="xs:string"/>
							<xs:element name="Branch" type="xs:string" minOccurs="0"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="JoiningDetails">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="JoinedBy" type="xs:string"/>
							<xs:element name="JoiningDate" type="xs:date"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="OwnerDetails">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ExistingClient" type="xs:boolean"/>
							<xs:element name="Title" type="xs:string"/>
							<xs:element name="Firstname" type="xs:string"/>
							<xs:element name="Surname" type="xs:string"/>
							<xs:element name="Address">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="AddressLine" type="xs:string" maxOccurs="4"/>
										<xs:element name="City" type="xs:string"/>
										<xs:element name="County" type="xs:string" minOccurs="0"/>
										<xs:element name="Country" type="xs:string" default="UK"/>
										<xs:element name="Postcode" type="xs:string"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="DaytimePhone" type="xs:string"/>
							<xs:element name="EveningPhone" type="xs:string" minOccurs="0"/>
							<xs:element name="EmailAddress" type="xs:string" minOccurs="0"/>
							<xs:element name="DateOfBirth" type="xs:date"/>
							<xs:element name="Gender" minOccurs="0">
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:enumeration value="M"/>
										<xs:enumeration value="F"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="DataProtection">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="DoNotContactRegardingPets" type="xs:boolean"/>
										<xs:element name="DoNotContactRegardingOwner" type="xs:boolean"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="Pets">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="PetDetails">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="Name" type="xs:string"/>
										<xs:element name="Species" type="xs:string"/>
										<xs:element name="Breed" type="xs:string" minOccurs="0"/>
										<xs:element name="DateOfBirth" type="xs:date"/>
										<xs:element name="Gender">
											<xs:simpleType>
												<xs:restriction base="xs:string">
													<xs:enumeration value="M"/>
													<xs:enumeration value="F"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:element>
										<xs:element name="Weight" type="xs:decimal"/>
										<xs:element name="PlanType" type="xs:string"/>
										<xs:element name="PlanStartDate" type="xs:date"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="Payment">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="PaymentMethod">
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:enumeration value="DirectDebit"/>
										<xs:enumeration value="Invoice"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="PaymentFrequency">
								<xs:annotation>
									<xs:documentation>If PaymentMethod ='Invoice' then this value can only be set to 'Annually'.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:enumeration value="Monthly"/>
										<xs:enumeration value="Annually"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="PracticeProvidedDirectDebitMandate" type="xs:boolean">
								<xs:annotation>
									<xs:documentation>If PaymentMethod='DirectDebit' then this flag should be set so that it is clear whether or not a DD mandate was provided to the owner by the practice.</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
