<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:core="http://schema.omg.org/spec/CTS2/1.0/Core" xmlns="http://schema.omg.org/spec/CTS2/1.0/CodeSystem" targetNamespace="http://schema.omg.org/spec/CTS2/1.0/CodeSystem"
	elementFormDefault="qualified">
	<xs:import namespace="http://schema.omg.org/spec/CTS2/1.0/Core" schemaLocation="Core.xsd"/>
	<!-- ====================================================
      CodeSystemCatalogEntry
      ======================================================-->
	<xs:element name="CodeSystemCatalogEntry" type="CodeSystemCatalogEntry">
		<xs:annotation>
			<xs:documentation>Metadata and access information about a code system.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="CodeSystemCatalogEntry">
		<xs:annotation>
			<xs:documentation>Metadata and access information about a code system.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:AbstractResourceDescription">
				<xs:sequence>
					<xs:element name="codeSystemCategory" type="core:CodeSystemCategoryReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>The category or type of resource that the code system represents.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="ontologyDomain" type="core:OntologyDomainReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>The subject domain of the ontology.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="ontologyType" type="core:OntologyTypeReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>The nature of the content of the ontology.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="designedForOntologyTask" type="core:OntologyTaskReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>The purpose for which the ontology was originally designed.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="versions" type="core:CodeSystemVersionCatalogURI" minOccurs="0">
						<xs:annotation>
							<xs:documentation>A <i>DirectoryURI</i> that references the known versions of this code system. </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="currentVersion" type="core:CodeSystemVersionReference" minOccurs="0" maxOccurs="1">
						<xs:annotation>
							<xs:documentation>A reference to the code system version marked as <i>CURRENT</i> in the service instance.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="codeSystemName" type="core:CodeSystemName" use="required">
					<xs:annotation>
						<xs:documentation>The local identifier that uniquely identifies the code system within the context of the implementing service. Note that the <i>about</i> URI is the globally unique identifier.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<!-- ====================================================
      CodeSystemCatalogEntry PSM
      ======================================================-->
	<xs:element name="CodeSystemCatalogEntryMsg">
		<xs:annotation>
			<xs:documentation>A <i>CodeSystemCatalogEntry</i> read from a service instance.</xs:documentation>
			<xs:appinfo>PSM</xs:appinfo>
		</xs:annotation>
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="core:Message">
					<xs:sequence>
						<xs:element name="codeSystemCatalogEntry" type="CodeSystemCatalogEntry"/>
					</xs:sequence>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>


	<!-- ====================================================
      CodeSystemCatalog
      ======================================================-->
	<xs:element name="CodeSystemCatalog">
		<xs:annotation>
			<xs:documentation>A directory that summarizes a set of catalog entries.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="core:Directory">
					<xs:sequence>
						<xs:element name="entry" type="CodeSystemCatalogEntrySummary" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:complexType name="CodeSystemCatalogEntrySummary">
		<xs:annotation>
			<xs:documentation>A synopsis of a CodeSystem along with information about how to access the complete resource.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:AbstractResourceDescriptionDirectoryEntry">
				<xs:sequence>
					<xs:element name="versions" type="core:CodeSystemVersionCatalogURI" minOccurs="0">
						<xs:annotation>
							<xs:documentation>A directory URI that, when resolved, returns an ordered list of code system versions associated with this code system. <i>versions</i> may only be present if the service supports the
									<b>CodeSystemVersion Query</b> profile.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="currentVersion" type="core:CodeSystemVersionReference" minOccurs="0" maxOccurs="1">
						<xs:annotation>
							<xs:documentation>A reference to the code system version marked as <i>CURRENT</i> in the service instance.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="codeSystemName" type="core:CodeSystemName" use="required">
					<xs:annotation>
						<xs:documentation>The local identifier that uniquely identifies the code system within the context of the implementing service. Note that the <i>about</i> URI is the globally unique identifier.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:element name="CodeSystemCatalogEntryList">
		<xs:annotation>
			<xs:documentation>A set of code system catalog entries.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="core:Directory">
					<xs:sequence>
						<xs:element name="entry" type="CodeSystemCatalogListEntry" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:complexType name="CodeSystemCatalogListEntry">
		<xs:annotation>
			<xs:documentation>An instance of <i>CodeSystem</i> that meets a specified filter criteria.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:DirectoryEntry">
				<xs:sequence>
					<xs:element name="entry" type="CodeSystemCatalogEntry"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

</xs:schema>
