<?xml version = "1.0" encoding = "UTF-8"?>
<!--Generated by Turbo XML 2.4.0.100. Conforms to w3c http://www.w3.org/2001/XMLSchema-->
<xsd:schema xmlns = "http://ns.medbiq.org/dataavailabilitymodel/v1/"
	 targetNamespace = "http://ns.medbiq.org/dataavailabilitymodel/v1/"
	 xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
	 elementFormDefault = "qualified"
	 attributeFormDefault = "unqualified">
	<!--Copyright 2009, MedBiquitous Consortium. All rights reserved. http://www.medbiq.org-->
	
	
	<!-- Users are bound by the terms of the MedBiquitous Consortium XML Public License and Terms of Use  -->
	
	
	<!--Modified 13 January 2009-->
	
	<xsd:element name = "DataAvailabilityModel" type = "DataAvailabilityModelType"/>
	<xsd:simpleType name = "NonNullString">
		<xsd:restriction base = "xsd:string">
			<xsd:minLength value = "1"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name = "DisplayType">
		<xsd:restriction base = "xsd:string">
			<xsd:enumeration value = "immediately"/>
			<xsd:enumeration value = "ontrigger"/>
			<xsd:enumeration value = "delayed"/>
			<xsd:enumeration value = "ifrequested"/>
		</xsd:restriction>
	</xsd:simpleType>
   	 <xsd:simpleType name="ItemPathType">
        	<xsd:restriction base="xsd:string">
           		 <xsd:pattern value="\s*(/VirtualPatientData/.*|/manifest/resources/resource\[@identifier\s?=\s?'[^']+'\]\s*)"/>
        	</xsd:restriction>
   	 </xsd:simpleType>
	<xsd:simpleType name = "DAMNodePathType">
		<xsd:restriction base = "xsd:string">
			<xsd:pattern value = "\s*/DataAvailabilityModel/DAMNode\[@id\s?=\s?'[^']+'\]\s*"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name = "DataAvailabilityModelType">
		<xsd:sequence>
			<xsd:element name = "DAMNode" type = "DAMNodeType" maxOccurs = "unbounded"/>
			<xsd:element name = "XtensibleInfo" type = "XtensibleInfoType" minOccurs = "0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name = "DAMNodeType">
		<xsd:sequence>
			<xsd:element name = "DAMNodeLabel" type = "NonNullString" minOccurs = "0"/>
			<xsd:element name = "DAMNodeItem" type = "DAMNodeItemType" maxOccurs = "unbounded"/>
		</xsd:sequence>
		<xsd:attribute name = "id" use = "required" type = "xsd:string"/>
	</xsd:complexType>
	<xsd:complexType name = "XtensibleInfoType">
		<xsd:sequence>
			<xsd:any namespace = "##other" processContents = "lax" minOccurs = "0" maxOccurs = "unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name = "DAMNodeItemType">
		<xsd:sequence>
			<xsd:element name = "ItemPath" type = "ItemPathType"/>
			<xsd:element name = "AlternativePath" type = "ItemPathType" minOccurs = "0"/>
			<xsd:element name = "ItemComment" type = "DAMNodePathType" minOccurs = "0"/>
			<xsd:element name = "DAMNodePath" type = "DAMNodePathType" minOccurs = "0" maxOccurs = "unbounded"/>
			<xsd:element name = "ItemOrder" type = "xsd:integer" minOccurs = "0"/>
		</xsd:sequence>
		<xsd:attribute name = "display" default = "immediately" type = "DisplayType"/>
	</xsd:complexType>
</xsd:schema>