<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE spec SYSTEM "v3m.dtd">
<spec>
	<header>
		<title>HL7 Common Terminology Services</title>
		<version>1.2</version>
		<date>28 November 2004</date>
		<shortcut source="cts.gif"/>
		<authlist>
			<author>
				<role>Editor/Principal Contributor</role>
				<name key="Solbrig, Harold">Harold Solbrig</name>
				<affiliation>Mayo Clinic/Foundation</affiliation>
				<email href="solbrig@mayo.edu">solbrig@mayo.edu</email>
			</author>
			<author>
				<role>Principal Contributor</role>
				<name key="Weida, Tony">Tony Weida</name>
				<affiliation>Apelon, Inc.</affiliation>
				<email href="tweida@apelon.com">tweida@apelon.com</email>
			</author>
			<author>
				<role>Principal Contributor</role>
				<name key="Streepy, Larry">Larry Streepy</name>
				<affiliation>Health Language, Inc.</affiliation>
				<email href="streepy@healthlanguage.com">streepy@healthlanguage.com</email>
			</author>
			<author>
				<role>Contributor</role>
				<name key="Markwell, David">David Markwell</name>
				<affiliation>Clinical Information Consultancy</affiliation>
				<email href="david@clincial-info.co.uk">david@clincial-info.co.uk</email>
			</author>
			<author>
				<role>Contributor</role>
				<name key="Campbell, Keith">Keith Campbell</name>
			</author>
			<author>
				<role>Vocabulary Co-Chair/Contributor</role>
				<name key="Huff, Stanley">Stanley Huff, M.D.</name>
				<affiliation>Intermountain Health Care</affiliation>
				<email href="stan.huff@ihc.com">stan.huff@ihc.com</email>
			</author>
			<author>
				<role>Vocabulary Co-Chair</role>
				<name key="Chute, Christopher">Christopher Chute, M.D., Dr P.H.</name>
				<affiliation>Mayo Clinic/Foundation</affiliation>
				<email href="chute@mayo.edu">chute@mayo.edu</email>
			</author>
			<author>
				<role>Vocabulary Co-Chair</role>
				<name key="Klein, Ted">Ted Klein</name>
				<affiliation>Klein Consulting, Inc.</affiliation>
				<email href="kci@tklein.com">kci@tklein.com</email>
			</author>
			<author>
				<role>Vocabulary Co-Chair</role>
				<name key="Frosdick, Paul">Paul Frosdick</name>
				<affiliation>NHS Information Authority</affiliation>
				<email href="paul.frosdick@nhsia.nhs.uk">paul.frosdick@nhsia.nhs.uk</email>
			</author>
		</authlist>
	</header>
	<body>
		<div1 id="CTSIntro" ballotStatus="CommitteeNormativeBallot" ballotNumber="1">
			<head>Introduction</head>
			<p>
                                The Health Level Seven (HL7) Version 3 standards are based on a Reference Information Model (RIM) which is flexible and general in structure. Representation of information within this model is dependent on the availability of terminological resources which can be used to populate the properties of the model with appropriate semantic content.  Whenever possible, the HL7 Version 3 standard references existing terminological resources instead of attempting to create a new resource within the standard itself.
</p>
			<p>
These external terminological resources can vary considerably in both content and structure. The HL7 standard needs to be able to identify a minimum set of characteristics that any terminological resource must posses if it is to be used in a HL7 messaging environment.  One approach to this task would be to specify a common data structure which all terminological resources would have to fit.  This approach, however, is not without drawbacks.  First, a common data structure would have to represent a ‘least common denominator’, which could mask more advanced content and functional characteristics that might be particular to a specific terminology.  Another drawback is that this approach puts much of the responsibility for maintaining and updating the content on the HL7 standards body rather than the individual terminology developers.</p>
			<p>
The Common Terminology Services (CTS) specification was developed as an alternative to a common data structure.  Instead of specifying what an external terminology must look like, HL7 has chosen to identify the common functional characteristics that an external terminology must be able to provide.  As an example, an HL7 compliant terminology service will need to be able to determine whether a given concept code is valid within the particular resource.  Instead of describing a table keyed by the resource identifier and concept code, the CTS specification describes an Application Programming Interface (API) call that takes a resource identifier and concept code as input and returns a true/false value.  Each terminology developer is free to implement this API call in whatever way is most appropriate for them.</p>
			<p>
This document describes a set of API calls that represent the core functionality that will be needed by basic HL7 Version 3 applications.
</p>
                <div2 id="CTSIntroRevisions">
                        <head>Revision History</head>
                        <list role="unordered">
                        	<item><emph role="strong">06/20/2005</emph> - Added note that first supportedLanguage is the default</item>
                        	<item><emph role="strong">06/20/2005</emph> - Added description of default behavior for lookupDesignation if language is blank or null </item>
                        		<item><emph role="strong">04/12/2005</emph> - Minor typo corrections </item>
                                <item><emph role="strong">11/28/2004</emph> - Incorporated results of San Antonio ballot (Spring, 2004)</item>
                                <item><emph role="strong">11/26/2004</emph> - Minor typos, etc. as submitted by Tony Weida (Apelon)</item>
                                <item><emph role="strong">03/12/2004</emph>- Incorporated results of San Diego ballot (Winter, 2003)</item>
                                <item><emph role="strong">11/01/2003</emph> - Final committee draft - released for ballot.</item>
                                </list>
                                </div2>
			
		</div1>
		<div1 id="CTSScope">
			<head>Scope and Design of the HL7 Common Terminology Server</head>
			<div2 id="CTSOutline">
				<head>Outline</head>
				<p>
                                The HL7 Common Terminology Services (HL7 CTS) defines an Application Programming Interface (API) that can be used by HL7 Version 3 software when accessing terminological content.  Before proceeding, we need to first state some things that the CTS specification is not designed to do.</p>
				<list role="unordered">
					<item>The current version of CTS is not intended to be a complete terminology service. The scope of CTS is restricted to the functionality needed to design, implement and deploy an HL7 Version 3 compliant software package.  In much the same spirit as the XML/SGML relationship, the HL7 CTS is meant to represent a proper subset of functionality that may be provided by more sophisticated APIs such as that represented by the OMG TQS specification.
</item>
					<item>CTS is not intended to be a general purpose query language.  It is intended to specify only the specific services needed in the HL7 implementation.
</item>
					<item>  CTS does not specify how the service is to be implemented.  It is intentionally silent when it comes to service advertising and discovery, establishing and maintaining connections, and the delivery and routing of messages.  It is presumed that a CTS implementation will use the underlying architecture that is most appropriate for the given implementation circumstances.</item>
					
				</list>
			</div2>
			<div2 id="CTSDesignPrincipals">
				<head>Design Principals</head>
				<p>The following general principles were used while developing the HL7 CTS specification:</p>
				<list role="ordered">
					<item>It shall be easy to write programs that use HL7 CTS.</item>
					<item>
The intent of the HL7 CTS is to specify core services only.</item>
					<item>
The design of HL7 CTS shall be formal and concise.</item>
					<item>
The initial implementation technology for HL7 CTS will include XML. </item>
					<item>
HL7 CTS shall be compatible with the nomenclature, model and approach expressed in the HL7 Vocabulary document, the Version 3 RIM and its derivative structures.</item>
					<item>
Whenever possible, the HL7 CTS shall remain a consistent subset of the Object Management Group (OMG) Terminology Query Services (TQS) provided that the TQS terminology model does not conflict with other HL7 CTS design principles.   If it is discovered that the TQS model is conflicting with HL7 CTS design principles or is incomplete, or incorrect, good faith efforts should be made to notify the appropriate revision task force.</item>
					<item>
HL7 CTS should limit the assumptions about the form and structure of a terminology to those necessary to support HL7 implementations.</item>
				</list>
			</div2>
			<div2 id="CTSOther">
				<head>Other Relevant Work</head>
				<p>
                        There is no generally accepted standard for terminology services but there are several sources of material on this topic.</p>
				<list role="unordered">
					<item>
						<loc href="http://www.omg.org/technology/documents/formal/lexicon_query_service.htm">
							<emph role="strong">The OMG Terminology Query Services (TQS)  specification</emph>
						</loc>
						<br/>
                               TQS specifies a full terminology service, but is not widely implemented and vendor support is minimal. The specification is considered by some to be too "heavyweight" and also assumes a particular technical solution (CORBA). Since reliance on the TQS standard is not an assumption of the HL7 standard, a more general approach to terminology services is needed - at least to cover those areas in which HL7 is terminology dependent.
				</item>
					<item>
						<loc href="http://www.w3.org/TR/owl-features/">
							<emph role="strong">The DAML + OIL and OWL Web Ontology Language</emph>
						</loc>
						<br/>
                               While this is not strictly a terminology server specification it contains elements from the representation of ontological aspects that are relevant to some of the large scale terminologies such as SNOMED Clinical Terms, NHS Clinical Terms Version 3 and GALEN. However, this web based proposal is also a heavy weight specification that is unlikely to facilitate early widespread implementation.
				</item>
					<item>
						<emph role="strong">API specifications specific to individual terminologies</emph>
						<br/>
							An example of this is the <loc href="http://www.clinical-info.co.uk/ct3.htm">"Read Code - Version 3 API"</loc> specified for the NHS Clinical Terms in 1996 and revised in 1998. Work is proceeding to develop a SNOMED CT API based on similar principles. There is an informal understanding that this specific API will converge with or utlize elements of the CTS where tese are appropriate. A COM implementation of this is supported by at least one freeware coding engine <loc href="http://www.clininfo.co.uk/clue5/index.htm"> (CLUE).</loc> Specifications of this type identify many of the general functions needed to access a terminology. However, they are inevitably specific to the needs of a particular terminology. Explicit support for a single defined terminology model allows efficient implementation within an operational environment at the expense of the flexibility to access other terminologies.
				</item>
					<item>
						<emph role="strong">General purpose RDBS interfaces including SQL and ODBC</emph>
						<br/>
						For "simple" code lists, a simple SQL query may be the most efficient way to look up a code. In addition to the code-value / code-meaning pairs, however, many coding schemes have other relevant properties that may only be accessed through a secondary service. This does not prevent the use of SQL but it requires a common model against which queries can be run and an efficient means of returning the properties required. These additional properties apply to the scheme as a whole as well as to individual entries in the terminology.
				</item>
					<item>
						<emph role="strong">Terminology Query Language (TQL)</emph>
						<br/>TQL, formerly based on an SQL-like syntax, today implements as a URI-based language specific to terminology servers designed by Michael Hogarth and colleagues from the University of California. TQL provides a rich mechanism that deals specifically with common properties and relationships in terminological models. A <loc href="http://jterm.ucdavis.edu">working Java-based implementation of TQL</loc> can be downloaded for free from the web.
				</item>
				</list>
			</div2>
			<div2 id="CTSintroVersions">
				<head>Revision History and Versions</head>
				<p>
The version of the CTS API described in this document does very little when it comes to handling revisions and revision history.   Much of this effort has been deliberately postponed until a subsequent release.  The approach that we are taking is to get a functional API out and in place and then enhance and revise it as needed.
</p>
			</div2>
			<div2 id="CTSStateExtensions">
			        <head>Stateful and Session Extensions</head>
			        <p> The CTS specification has been designed in a way that allows stateless/session independent operations.  While this allows a wider variety of implementations, it does have the potential to negatively impact the performance of systems that could take advantage of previously fetched references to value sets, concepts, etc.  It is not the intent of this specification to preclude or prohibit such implementations.  Vendors who extend the CTS API to allow stateful and/or session-based implementations are strongly encouraged to submit the extensions to the HL7 Vocabulary Technical Committee for inclusion in a subsequent version of this specification.</p>
			        </div2>
		</div1>
		<div1 id="CTSModules">
			<head>CTS Modules</head>
			<div2 id="CTSMandVAPI">
				<head>The Message and Vocabulary API</head>
				<p>
                                There are two distinct layers between HL7 Version 3 message processing applications and the target vocabularies.  The upper layer, the <emph role="strong">Message API</emph>, communicates with the messaging software, and does so in terms of vocabulary domains, contexts, value sets, coded attributes and other artifacts of the HL7 message model. The lower layer, the <emph role="strong">Vocabulary API</emph>, communicates with the terminology service software, and does so in terms of code systems, concept codes, designations, relationships and other terminology specific entities.</p>
				<p>
					<exhibit role="figure">
						<caption align="BOTTOM">Message and Vocabulary APIs</caption>
						<graphic source="ctsFig1.gif"/>
					</exhibit>
				</p>
				<p>The Message API is specific to HL7.  Its primary purpose is to allow a wide variety of message processing applications to create, validate and translate CD-derived data types in a consistent and reproducible fashion.  </p>
				<p>
The Vocabulary API is intended to be generic<footnote>
						<p>While it is intended to be generic, it represents a distinct subset of the sort of capabilities that a generalized vocabulary API should provide.  In addition, much of the nomenclature used in the CTS Vocabulary API is HL7-centric and would have to under go translation were it to be put into more generalized use.</p>
					</footnote>. It allows applications to query different terminologies<footnote>
						<p>When used in this context, the word "terminology" is intended to describe any organized set of codes, including the entities commonly referred to as "code sets", "ontologies", "vocabularies", "classification systems", etc.</p>
					</footnote>  in a consistent, well-defined fashion.  The Message API utilizes the Vocabulary API. The following figure shows an example of a Message/Vocabulary interaction sequence.  In this example, an application requests that the Message Runtime Service fill out the details of a CD-derived attribute.  The service, in turn, makes multiple calls to the Vocabulary API service in order to get concept code designations, code system names, release versions, etc.</p>
				<p>
					<exhibit role="figure">
						<caption align="BOTTOM">Sample Message/Vocabulary API interaction</caption>
						<graphic source="ctsFig2.gif"/>
					</exhibit>
				</p>
			</div2>
			<div2 id="CTSRuntime">
				<head>Runtime and Browsing Functions</head>
				<div3 id="CTSGenActorClasses">
					<head>General HL7 CTS User (Actor) Classes</head>
					<p>The classes of actors that are anticipated to be users of the HL7 CTS API include:</p>
					<list role="unordered">
						<item>
							<emph role="strong">Message Creation Software</emph> – Software that is involved in the creation of HL7 messages.  From a vocabulary perspective, this process involves the translation of internal messages and data into the syntax and semantics of the HL7 Version 3 standard.
</item>
						<item>
							<emph role="strong">Message Processing Software</emph> – Software that receives, decodes and acts on the content of standard HL7 Version 3 messages.  This process may include validation, translation and inferencing steps.
</item>
						<item>
							<emph role="strong">RIM Modelers</emph> – The combination of people and tools that create and define HL7 Message content.
</item>
						<item>
							<emph role="strong">Software Developers</emph> – The people who build the software that creates, validates and processes HL7 Version 3 messages.
</item>
						<item>
							<emph role="strong">Vocabulary Translators</emph> – A combination of tools and people that translate the abstract HL7 Version 3 specification into the structure and terms of actual data processing applications.
</item>
					</list>
				</div3>
				<div3 id="CTSGenUserClasses">
					<head>The Divided Requirements Profile</head>
					<p>
The first two actor classes – message creation and message processing – have a different requirements profile than do the succeeding three:</p>
					<list role="unordered">
						<item>Performance – High throughput and scalability are paramount for message creation and processing.  Modeling and mapping is considerably more tolerant of variable and potentially sub-optimal response times.</item>
						<item>Reliability – Message creation and processing software requires highly reliable software, while the modeling and authoring environment can tolerate some degree of unreliability and occasional failures.</item>
						<item>Functionality – Once solidified, the functional requirements of message creation and processing software will remain fixed.  Any additional capabilities beyond those requirements will not be used.  Authoring and modeling, however, will continue to create new and different browsing and viewing demands, and any (useful) functional capabilities may be drawn upon at random times.</item>
					</list>
					<p>Throughout the rest of this document, the message creation and processing profile will be referred to as the Runtime profile and the authoring and browsing as the Browser profile.</p>
				</div3>
			</div2>
			<div2 id="CTSTrans">
				<head>Translation</head>
				<p>One additional functional area still needs to be specified – concept code translation between different code systems.  The ability to translate between code sets for different realms is an integral part of the messaging API.  It is specified as a separate interface at the vocabulary layer because translation is not specific to a single vocabulary.  Translation services have the potential to be developed independently from one or more of the terminologies included in the translation process.
</p>
			</div2>
			<div2 id="CTSisc">
				<head>Individual Specification Components</head>
				<p>     The message/vocabulary split can be combined with the two requirements profiles to yield five separate modules:</p>
				<table id="spec_comp">
					<caption align="BOTTOM">Specification Components</caption>
					<col width="23"/>
					<col width="20"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>&nbsp;</th>
							<th>Runtime</th>
							<th>Browser</th>
						</tr>
					</thead>
					<tr>
						<td>
							<emph role="strong">Message API</emph>
						</td>
						<td>Message Runtime</td>
						<td>Message Browser</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">Vocabulary API</emph>
						</td>
						<td>Vocabulary Runtime</td>
						<td>Vocabulary Browser</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">Translation</emph>
						</td>
						<td colspan="2" align="center">Vocabulary Translation</td>
					</tr>
				</table>
				<p>This specification is written in a fashion that should make it possible for each of these areas to be developed independently and still interoperate.  Some terminology developers may wish to focus exclusively on the Vocabulary API, while some developers may only implement the Runtime API. Theoretically, the Message API would only need to be implemented once, as the underlying HL7 structure is public and available to everyone.  In practice, however, it may be necessary to more tightly couple the Message Runtime with the Vocabulary Runtime to achieve the desired performance.</p>
			</div2>
		</div1>
		<div1 id="CTSModFunctions">
			<head>Synopsis of Module Functions</head>
			<p>The following sections contain a brief synopsis of the functionality of each of the five modules described above. Some parameters and utility functions have been omitted for the sake of clarity.  This is strictly a high level overview and all of the functions below will be described in considerably more detail later in this document.</p>
			<div2 id="CTSMessLayRunFun">
				<head>Message Layer Runtime Functions</head>
				<p>The Message Layer Runtime Module describes the services used by the message creation, processing and translation software.</p>
				<table id="rt_functions123">
					<caption align="BOTTOM">Message Layer Runtime Functions</caption>
					<col width="23"/>
					<col width="30"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>Function</th>
							<th>Inputs</th>
							<th>Outputs</th>
							<th>Description</th>
						</tr>
					</thead>
					<tr>
						<td>
							<emph role="strong">getServiceName</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service name</td>
						<td>Return the name that was assigned to this service by the service provider.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Version identifier</td>
						<td>Return the current version of the service software.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceDescription</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service description</td>
						<td>Return a description of the service function, authors, copyrights, etc.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getHL7ReleaseVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Version identifier</td>
						<td>Return the HL7 release version that is currently supported by this service.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getCTSVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Major and minor version number</td>
						<td>Return the CTS version that this service implements.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedMatchAlgorithms</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>List of match algorithms</td>
						<td>Return a list of string match algorithms implemented by this service.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedVocabularyDomains</emph>
						</td>
						<td>Match text and algorithm, time limit and size limit</td>
						<td>List of vocabulary domain names</td>
						<td>Return a list of the vocabulary domains matching the supplied match text that are recognized by this service.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">validateCode</emph>
						</td>
						<td>Name of the vocabulary domain, code to be validated, application context(realm), flag indicating whether to validate active concepts only and flag indicating whether to check both errors and warnings or just errors</td>
						<td>List of errors and warnings.</td>
						<td>Validate the coded attribute for the supplied vocabulary domain and context.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">validateTranslation</emph>
						</td>
						<td>Name of the vocabulary domain, coded attribute containing translation(s) to be validated, application context(realm), flag indicating whether to validate active concepts only and flag indicating whether to check both errors and warnings or just errors</td>
						<td>List of errors and warnings.</td>
						<td>Validate the CD translations, if any, for the supplied vocabulary domain and context.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">translateCode</emph>
						</td>
						<td>Name of the vocabulary domain, coded attribute to be translated, target coding system, and target application context(realm)</td>
						<td>Translation of the coded attribute.</td>
						<td>Translate the supplied coded attribute into a form that uses the target code system or uses whatever code system is appropriate for the supplied context</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">fillInDetails</emph>
						</td>
						<td>Coded attribute and target language code</td>
						<td>Coded attribute value with details supplied.</td>
						<td>Fill in the optional parts of the coded attribute such as the concept display name, the code system name and code system version.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">subsumes</emph>
						</td>
						<td>Parent coded attribute, child coded attribute</td>
						<td>True / False</td>
						<td>Determine whether the parent coded attribute subsumes (or implies) the child.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">areEquivalent</emph>
						</td>
						<td>First coded attribute, second coded attribute</td>
						<td>True / False</td>
						<td>Determine whether the two coded attributes are ‘equivalent’.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupValueSetExpansion</emph>
						</td>
						<td>Name of the vocabulary domain, application context(realm), language for expansion text, flag indicating whether to do a complete expansion of just one level, time limit and size limit</td>		
						<td>Hierarchical expansion of the value set associated with the domain in the supplied context</td>
						<td>Return a hierarchical list of selectable concepts for the supplied vocabulary domain and context.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">expandValueSetExpansionContext</emph>
						</td>
						<td>Opaque expansion context returned from previous lookupValueSetExpansion or expandValueSetExpansionContext call</td>
						<td>Further hierarchical expansion of the value set associated with the domain in the supplied context</td>
						<td>Return further expansion on nested value set contents.</td>
					</tr>
				</table>
			</div2>
			<div2 id="CTSVocabLayerRunFun">
				<head>Vocabulary Layer Runtime Functions</head>
				<p>This set of functions is used by the Message Layer Runtime and Message Layer Browser services as well as the Vocabulary Layer Browser service.  These functions can also be used in a stand-alone fashion.</p>
				<table id="vcrt_functions">
					<caption align="BOTTOM">Vocabulary Layer Runtime Functions</caption>
					<col width="23"/>
					<col width="30"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>Function</th>
							<th>Input</th>
							<th>Output</th>
							<th>Description</th>
						</tr>
					</thead>
					<tr>
						<td>
							<emph role="strong">getServiceName</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service name</td>
						<td>Return the name that was assigned to this service by the service provider.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Version identifier</td>
						<td>Return the current version of the service software.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceDescription</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service description</td>
						<td>Return a description of the service function, authors, copyrights, etc.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getCTSVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Major and minor version number</td>
						<td>Return the CTS version that this service implements.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedCodeSystems</emph>
						</td>
						<td>Time limit and size limit</td>
						<td>List of code systems and versions supported by the service implementation. </td>
						<td>Return the identifier, name and release versions of all code systems that are supported by the service. </td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupCodeSystemInfo</emph>
						</td>
						<td>Code system name or identifier</td>
						<td>Description of the code system including name, id, description, version, supported languages, supported relations, supported properties, etc.</td>
						<td>Return detailed information about a specific code system.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">isConceptIdValid</emph>
						</td>
						<td>Code system identifier, concept code and flag indicating whether inactive concepts are considered valid</td>
						<td>True / False
                                                </td>
						<td>Determine whether concept code is currently valid in the specified code system</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupDesignation</emph>
						</td>
						<td>Code system identifier, concept code and target language code</td>
						<td>Designation text</td>
						<td>Return the preferred designation for the concept code in the supplied language</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">areCodesRelated</emph>
						</td>
						<td>Code system identifier, source concept code, target concept code, relationship code, relationship qualifiers. and flag indicating whether to use only directly related codes or the transitive closure of the relationship</td>
						<td>True/False</td>
						<td>Determine whether the named relationship exists between the source and target codes.</td>
					</tr>
				</table>
			</div2>
			<div2 id="CTSCodeTrans">
				<head>Code Mapping Functions</head>
				<table id="ct_functions">
					<caption align="BOTTOM">Code Mapping Functions</caption>
					<col width="23"/>
					<col width="30"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>Function</th>
							<th>Input</th>
							<th>Output</th>
							<th>Description</th>
						</tr>
					</thead>
					<tr>
						<td>
							<emph role="strong">getServiceName</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service name</td>
						<td>Return the name that was assigned to this service by the service provider.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Version identifier</td>
						<td>Return the current version of the service software.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceDescription</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service description</td>
						<td>Return a description of the service function, authors, copyrights, etc.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getCTSVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Major and minor version number</td>
						<td>Return the CTS version that this service implements.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedMaps</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>List of named sets consisting of from code system id, name and version, to code system id, name, and version and a mapping description</td>
						<td>Return a list of mappings that are supported by this service.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">mapConceptCode</emph>
						</td>
						<td>Source code system identifier and concept code, target code system identifier and name of mapping resource</td>
						<td>Corresponding concept code in target system and quality indicator</td>
						<td>Return the mapping of the supplied concept code from the source code system to the target code system using the named mapping resource.</td>
					</tr>
				</table>
			</div2>
			<div2 id="CTSMessLayBrowFun">
				<head>Message Layer Browsing Functions</head>
				<table id="mlb_functions">
					<caption align="BOTTOM">Message Layer Browsing Functions</caption>
					<col width="23"/>
					<col width="30"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>Function</th>
							<th>Input</th>
							<th>Output</th>
							<th>Description</th>
						</tr>
					</thead>
					<tr>
						<td>
							<emph role="strong">getServiceName</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service name</td>
						<td>Return the name that was assigned to this service by the service provider.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Version identifier</td>
						<td>Return the current version of the service software.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceDescription</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service description</td>
						<td>Return a description of the service function, authors, copyrights, etc.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getHL7ReleaseVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Version identifier</td>
						<td>Return the HL7 release version that is currently supported by this service.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getCTSVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Major and minor version number</td>
						<td>Return the CTS version that this service implements.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedMatchAlgorithms</emph>
						</td>
						<td>&nbsp;</td>
						<td>List of string match algorithms implemented by the browser service
</td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedAttributes</emph>
						</td><td>Match text and algorithm, time limit and size limit</td>
						<td>List of RIM attributes known to the browser
</td>
						<td>Returns a list of RIM attributes whose name matches the supplied match text that are known to the browser.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedVocabularyDomains</emph>
						</td>
						<td>Match text and algorithm, time limit and size limit</td>
						<td>List of vocabulary domains known to the browser
</td>
						<td>Returns a list of vocabulary domains whose name matches the supplied match text that are known to the browser.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedValueSets</emph>
						</td>
						<td>Match text and algorithm, time limit and size limit</td>
						<td>List of value sets known to the browser</td>
						<td>Returns a list of value sets whose name matches the supplied match text that are known to the browser.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedCodeSystems</emph>
						</td>
						<td>Match text and algorithm, time limit and size limit</td>
						<td>List of code systems known to the browser</td>
						<td>Returns a list of code systems whose name matches the supplied match text that are known to the browser.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupVocabularyDomain</emph>
						</td>
						<td>Name of vocabulary domain</td>
						<td>Domain name, description, domains restricted by this domain, list of RIM attributes that use this domain, and list of value sets that represent this domain</td>
						<td>Look up all of the information known about the supplied vocabulary domain </td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupValueSet</emph>
						</td>
						<td>Value set name or identifier</td>
						<td>Detailed value set description, including name, identifier, description, list of value sets used to construct the set, value sets that this set helps define, list of concept codes the value set references, etc.</td>
						<td>Look up detailed information on a value set (including vocabulary domains, constructors, etc).</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupCodeSystem</emph>
						</td>
						<td>Code system name or identifier</td>
						<td>Name, id, copyright, release and registration information</td>
						<td>Look up details on a code system</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupValueSetForDomain</emph>
						</td>
						<td>Name of vocabulary domain and application context(realm)</td>
						<td>Name and id of the value set used for this vocabulary domain</td>
						<td>
                                                        Return the identifier of the value set that would be used for the vocabulary in the supplied context (if any).
                                                </td>
					</tr>
					<tr>
						<td>
							<emph role="strong">isCodeInValueSet</emph>
						</td>
						<td>Value set name or identifier, code system identifier and concept code, and indicator whether to include the "head code" as part of the value set</td>
						<td>True/False
</td>
						<td>
                                                        Determine whether the supplied concept code is a valid value in the supplied value set
                                                </td>
					</tr>
				</table>
			</div2>
			<div2 id="CTSVocLayBrowFun">
				<head>Vocabulary Layer Browsing Functions</head>
				<table id="vlb_functions">
					<caption align="BOTTOM">Vocabulary Layer Browsing Functions</caption>
					<col width="23"/>
					<col width="30"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>Function</th>
							<th>Input</th>
							<th>Output</th>
							<th>Description</th>
						</tr>
					</thead>
					<tr>
						<td>
							<emph role="strong">getServiceName</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service name</td>
						<td>Return the name that was assigned to this service by the service provider.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Version identifier</td>
						<td>Return the current version of the service software.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getServiceDescription</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Service description</td>
						<td>Return a description of the service function, authors, copyrights, etc.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getCTSVersion</emph>
						</td>
						<td>&nbsp;<br/>
						</td>
						<td>Major and minor version number</td>
						<td>Return the CTS version that this service implements.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedMatchAlgorithms</emph>
						</td>
						<td>&nbsp;</td>
						<td>List of string match algorithms implemented by the browser service
</td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">getSupportedCodeSystems</emph>
						</td>
						<td>Time limit and size limit</td>
						<td>List of supported code systems and their descriptions</td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupConceptCodesByDesignation</emph>
						</td>
						<td>Code system identifier, match text and algorithm, target language code, flag indicating whether non-active concepts should be retrieved, time limit and size limit</td>
						<td>List of code system identifiers and concept codes.</td>
						<td>Return a list of concept codes that have designations that match the supplied match string in the supplied language, if any.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupConceptCodesByProperty</emph>
						</td>
						<td>Code system identifier, match text and algorithm, target language code, flag indicating whether non-active concepts whould be retrieved, optional list of property mime types, time limit and size limit</td>
						<td>List of code system id / concept codes.</td>
						<td>Return a list of concept codes that have properties that meet the supplied criteria</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupCompleteCodedConcept</emph>
						</td>
						<td>Code system identifier and concept code</td>
						<td>Everything that is known about the concept (designations, properties, relationships, etc.)</td>
						<td>Return a complete description of the supplied concept code</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupDesignations</emph>
						</td>
						<td>Code system id and concept code, match text and algorithm, target language</td>
						<td>List of designations</td>
						<td>Return all designations for the supplied concept code that match the supplied criteria.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupProperties</emph>
						</td>
						<td>Code system id and concept code, match text and algorithm, list of property codes to search, list of mime types to match and target language code</td>
						<td>List of concept properties (property code, value, language, mime type)</td>
						<td>Return the properties of the given code system id / concept code that match the supplied criteria.</td>
					</tr>
					<tr>
						<td>
							<emph role="strong">lookupCodeExpansion</emph>
						</td>
						<td>Code system id and concept code, relationship code, relationship direction indicator, target languag code, size limit and time limit</td>
						<td>Hierarchical code expansion list</td>
						<td>Recursively list the concept codes that are related to the supplied concept, including the preferred designation for the codes.</td>
					</tr>
				</table>
			</div2>
		</div1>
		<div1 id="CTSMessAPIMod">
			<head>The CTS Message API Model</head>
			<div2 id="CTSMessAPIintro">
				<head>Introduction</head>
				<p>This section describes the model that underlies the <emph>CTS Message API</emph>.  It describes the relationship between HL7 coded attributes and vocabulary. It is based on the
<loc href="http://www.hl7.org/library/data-model/met/modelpage.html">HL7_V3_Meta-Model Version 1.16</loc> and, with the exception of the coloring scheme, attempts to remain consistent with its notation and data types.  This document does not provide a complete or in-depth model of all the logical entities that might comprise a coding system<footnote>
						<p>Within this document, the term "code system" refers to a system of codes, descriptions, designations, properties and relationships.  Other common names for this entity include "vocabulary", "terminology", "coding scheme", "classification scheme" and "ontology".</p>
					</footnote>. Its primary purpose is to describe the classes and relationships that have a direct bearing on the contents of HL7 coded attributes from the perspective of a meta-model.</p>
				<p>The Vocabulary API model describes the CTS model from vocabulary perspective and provides more detail about concept codes, designations, relationships, etc.</p>
				<div3 id="CTSMessAPINot">
					<head>Notation</head>
					<p>In the diagrams that follow, the classes whose instances are solely the responsibility of the HL7 Modeling Groups are colored green and classes that represent content that is managed by either HL7 or a third party terminology provider are colored  blue.  Existing meta-model classes will be colored a pale yellow.  The authors of this document have little or no control over the content and structure of these existing classes – they are in the model solely as reference points.</p>
					<p>The descriptions that follow the model use a semi-formal notation based on the model content :
                                        </p>
					<list role="unordered">
						<item>Class names will be represented in <emph role="strong">boldface</emph> (e.g. <emph role="strong">VocabularyDomain</emph>, <emph role="strong">ValueSet</emph>)</item>
						<item>Attribute names will appear in <emph>italics</emph> (e.g. <emph>vocabularyDomain_name</emph>, <emph>valueSet_id</emph>)</item>
						<item>Relationships will be <emph role="underline">underlined</emph> (e.g. a <emph role="strong">VocabularyDomain</emph> is <emph role="underline">represented by</emph> zero or more <emph role="strong">VocabularyDomainValueSets</emph>)</item>
					</list>
					<p>
Where appropriate, relationship cardinality will be expressed by the forms below or something similar:</p>
					<list role="unordered">
						<item>1..1 "<emph role="strong">Class 1</emph> must  <emph role="underline">relationship</emph> with exactly one <emph role="strong">Class 2</emph> "</item>
						<item>0..1      "<emph role="strong">Class 1</emph>  may be <emph role="underline">relationship</emph> by at most one <emph role="strong">Class 2</emph> "</item>
						<item>1..*     "<emph role="strong">Class 1</emph>  must be <emph role="underline">relationship</emph> by one or more <emph role="strong">Class 2</emph> "</item>
						<item>0..*     "<emph role="strong">Class 1</emph>  may be <emph role="underline">relationship</emph> by zero or more <emph role="strong">Class 2</emph> "</item>
					</list>
				</div3>
			</div2>
			<div2 id="CTSMessAPIVoc">
				<head>Vocabulary Domain</head>
				<p>
                                A vocabulary domain serves as the link between an HL7 coded attribute and the set(s) of valid concept codes for that attribute.  A vocabulary domain represents an abstract conceptual space such as "countries of the world", "the gender of a person used for administrative purposes", etc. </p>
				<p>The figure below below shows the relationship between vocabulary domains and HL7 attributes.</p>
				<p>
					<exhibit role="figure">
						<caption align="BOTTOM">RIM Attributes and Vocabulary Domains</caption>
						<graphic source="ctsFig3.gif"/>
					</exhibit>
				</p>
				<p>An <emph role="strong">Attribute_domain_constraint </emph>must <emph role="underline">constrain</emph> the possible values of exactly one RIM <emph role="strong">attribute</emph> by <emph role="underline">limiting the possible values</emph> to those described by exactly one <emph role="strong">VocabularyDomain</emph>.
A <emph role="strong">VocabularyDomain</emph> may <emph role="underline">describe the possible values</emph> of zero or more <emph role="strong">Attribute_domain_constraints</emph>.  A <emph role="strong">DIM_attribute_row </emph> must be <emph role="underline">based on</emph> exactly one <emph role="strong">Attribute</emph> from the HL7 model, and serves to express the presence of the attribute in a specific design information model (DIM).  <emph role="strong">DIM_attribute_rows</emph> inherit all of the constraints of the <emph role="strong">Attribute</emph> that they are <emph role="underline">based on</emph>, and <emph role="strong">DIM_attribute_row </emph> may be <emph role="underline">constrained by</emph> zero or more <emph role="strong">DIM_attribute_domain_constraints</emph>.</p>
				<p>
A hierarchical message description (HMD) completely defines the structure of a set of messages.  <emph role="strong">HMD_attribute_rows </emph> are a part of a HMD, and each HMD_attribute_row is <emph role="underline">based on</emph> exactly one <emph role="strong">DIM_attribute_row </emph>.  An <emph role="strong">HMD_attribute_row</emph> inherits all of the constraints of the corresponding <emph role="strong">DIM_attribute_row </emph> and may be yet further <emph role="underline">constrained by</emph> at most one <emph role="strong">HMD_domain_constraint</emph>. </p>
				<p>

Each <emph role="strong">VocabularyDomain</emph> has a unique <emph>name</emph> along with a <emph>description</emph> of the conceptual space that it represents.  <emph role="strong">VocabularyDomains</emph> that <emph role="underline">describe the possible values</emph> of <emph role="strong">DIM_attribute_domain_constraints</emph> or <emph role="strong">HMD_domain_constraints</emph>
					<emph role="underline"> restrict</emph> the conceptual space of the corresponding <emph role="strong">DIM_attribute_domain</emph> or <emph role="strong">Attribute_domain_constraint </emph>upon which the domain is based.</p>
				<p>
The example below shows how vocabulary domains might be constrained between the attribute, the DIM attribute row and the HMD attribute row.</p>
				<table id="t7">
					<caption align="BOTTOM">Sample Vocabulary Domain Restriction</caption>
					<col width="23"/>
					<col width="20"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>Attribute</th>
							<th>Vocabulary Domain</th>
							<th>Description</th>
							<th>Restricts Domain</th>
						</tr>
					</thead>
					<tr>
						<td>
							<emph>sourceCountry</emph>
						</td>
						<td>Country</td>
						<td>A country of the world</td>
						<td>-</td>
					</tr>
					<tr>
						<td>
							<emph>sourceCountry</emph>(DIM)                                         </td>
						<td>HL7MemberCountry</td>
						<td>Any country that is an official member of HL7</td>
						<td>Country</td>
					</tr>
					<tr>
						<td>
							<emph>sourceCountry</emph>(HMD)                                         </td>
						<td>EUHL7MemberCountry</td>
						<td>Any EU country that is an official member of HL7</td>
						<td>HL7MemberCountry</td>
					</tr>
				</table>
				<div3 id="CTSMessAPIAddConst">
					<head>Additional Constraints
						<footnote>
							<p>Note: In this context, constraint refers to constraints on model itself, not attribute domains.</p>
						</footnote>
					</head>
					<list role="unordered">
						<item>An <emph role="strong">Attribute</emph> must be <emph role="underline">constrained by</emph> exactly one <emph role="strong">Attribute_domain_constraint </emph>if and only if the <emph>attribute type</emph> is "coded".</item>
						<item>Any <emph role="strong">VocabularyDomain</emph> that describes the possible values of a DIM_attribute_domain_constraint must be <emph role="underline">based on</emph> the <emph role="strong">VocabularyDomain</emph> of the corresponding <emph role="strong">Attribute</emph>.</item>
						<item>Any <emph role="strong">VocabularyDomain</emph> that <emph role="underline">describes the possible values of</emph> a <emph role="strong">RIM_attribute_domain_constraint</emph> must be <emph role="underline">based on</emph> the <emph role="strong">VocabularyDomain</emph> of the corresponding <emph role="strong">DIM_attribute_row </emph> if one exists and on the <emph role="strong">VocabularyDomain</emph> of the corresponding Attribute if one doesn’t.</item>
					</list>
				</div3>
			</div2>
			<div2 id="CTSValueSet">
				<head>Value Set</head>
				<p>
                                A vocabulary domain describes a ‘conceptual space’ from which the values of an attribute can be drawn.  Before an attribute can be used in a message, however, the actual list of concept codes needs to be defined.  A list of valid concept codes is referred to as a value set.</p>
				<p>
					<exhibit role="figure">
						<caption align="BOTTOM">Value Sets</caption>
						<graphic source="ctsFig4.gif"/>
					</exhibit>
				</p>
				<p>
A <emph role="strong">VocabularyDomain</emph> may be <emph role="underline">represented by</emph> zero or more <emph role="strong">ValueSets</emph>.  While it is possible for abstract RIM and DIM attributes to not be <emph role="underline">represented by</emph> any <emph role="strong">ValueSets</emph> at all, <emph role="strong">VocabularyDomains</emph> that <emph role="underline">describe the possible values of </emph>
					Coded <emph role="strong">Attributes</emph> used in an actual messages must be <emph role="underline">represented by</emph> at least one <emph role="strong">Value_set</emph>.</p>
				<div3 id="CTSMessAPIlinkingt">
					<head>Linking Vocabulary Domains to Value sets</head>
					<p>A <emph role="strong">VocabularyDomainValueSet</emph> represents an association between exactly one <emph role="strong">VocabularyDomain</emph> and exactly one <emph role="strong">ValueSet</emph>.  Each association between a <emph role="strong">VocabularyDomain</emph> and a <emph role="strong">ValueSet</emph> may <emph role="underline">apply in</emph> zero or one <emph role="strong">ApplicationContexts</emph>.  An <emph role="strong">ApplicationContext</emph> names a specific geopolitical entity (e.g. EU, Canada) and/or practice setting (e.g. veterinary medicine, public health), etc. and may be a <emph role="underline">setting_for</emph> zero or more <emph role="strong">VocabularyDomainValueSet</emph> associations.</p>
				</div3>
				<div3 id="CTSMessAPIDefVal">
					<head>Defining Value sets</head>
					<p>A <emph role="strong">ValueSet</emph> may <emph role="underline">include</emph> a list of zero or more <emph role="strong">CodedConcepts</emph> drawn from a single <emph role="strong">CodeSystem</emph>. A <emph role="strong">ValueSet</emph> can represent:</p>
					<list role="unordered">
						<item>All of the <emph role="strong">CodedConcepts</emph>
							<emph role="underline"> defined in</emph> exactly one <emph role="strong">CodeSystem</emph>
						</item>
						<item>A specified list of <emph role="strong">CodedConcepts</emph> that are <emph role="underline">defined in</emph> exactly one <emph role="strong">CodeSystem</emph>
						</item>
						<item>The set of <emph role="strong">CodedConcepts</emph> represented by another <emph role="strong">ValueSet</emph>.</item>
					</list>
					<p>
The details about each of these forms will be described in the next section.  First we describe the characteristics that all value sets have in common.</p>
					<p>
It is anticipated that there will be far too many value sets to be able to assign a unique mnemonic or meaningful name to all of them.  The primary identifier for a ValueSet is a meaningless numeric identifier, the valueSet_id<footnote>
							<p>This will most likely be an ISO OID, rooted at 2.16.840.1.113883.1.11, but this decision has not be finalized.</p>
						</footnote>.  The valueSet_name can also contain a unique ‘meaningful’ identifier where appropriate.  The valueSet_name is designed for communication between carbon-based life forms.
</p>
					<p>A <emph role="strong">ValueSet</emph> has a <emph>description</emph> that describes the intent and purpose of the set.  It also has a <emph>definingExpression</emph>, which is intended to carry a formal machine readable expression that can be used to construct the <emph role="strong">ValueSet</emph>. The meaning and interpretation of <emph>definingExpression</emph> is not part of this specification. Both <emph>description</emph> and <emph>definingExpression</emph> are optional.  The <emph role="strong">ValueSet</emph> attribute, <emph>allCodes</emph>, is described below.</p>
				</div3>
				<div3 id="CTSMessAPIDefValsetcontent">
					<head>Defining Value Set Content</head>
					<p>A <emph role="strong">ValueSet</emph> must either be <emph role="underline">constructed_using</emph> at least one other <emph role="strong">ValueSet</emph> or it must be <emph role="underline">based on</emph> exactly one <emph role="strong">CodeSystem</emph> or both<footnote><p>It is possible for a constructed value set to reference other value sets that are drawn from more than one code system.  A given value set may, howver, only <i>directly</i> reference concepts drawn from a single code system.</p></footnote>. A <emph role="strong">CodeSystem</emph>	<emph role="underline"> defines</emph> a set of zero or more <emph role="strong">CodedConcepts</emph> which, in turn, signify relevant classes or entities within a particular domain of interest.  <emph role="strong">CodeSystems</emph> can range from a simple table of genders to classification systems such as ICD-9 to rich, description-logic based systems such as OpenGalen or SNOMED-CT.  As many <emph role="strong">CodeSystems</emph> undergo periodic revision, it is useful to record the <emph role="strong">ReleaseVersion</emph> that was <emph role="underline">used to define</emph> a given <emph role="strong">ValueSet</emph> at a particular point in time. A <emph role="strong">ValueSet</emph> may be <emph role="underline">defined_using</emph> at most one <emph role="strong">ReleaseVersion</emph>.  A <emph role="strong">ReleaseVersion</emph> may be <emph role="underline">used_to_define</emph> zero or more <emph role="strong">ValueSets</emph>. The <emph role="underline">defined using</emph> relationship is strictly informative, and services may use a later revision of the code system to represent the <emph role="strong">ValueSet</emph> content.<footnote>
							<p>This document doesn’t address the issue of how to reference a specific version of a code system or the state of a value set at a particular point in time.  These topics will be covered in a subsequent release of the specification.</p>
						</footnote>Code systems will be discussed in considerably more detail in a later section describing the CTS Vocabulary API.</p>
					<div4 id="CTSMessAPIRepCont">
						<head>Representing the entire contents of a code system</head>
						<p>A <emph role="strong">ValueSet</emph> can be defined to include all of the <emph role="strong">CodedConcepts</emph>
							<emph role="underline"> defined in</emph> the <emph role="strong">CodeSystem</emph> upon which the <emph role="strong">ValueSet</emph> is <emph role="underline">based</emph> by setting the <emph>allCodes</emph> attribute to TRUE. A <emph role="strong">ValueSet</emph> with <emph>allCodes</emph> set to TRUE may not <emph role="underline">include</emph> any <emph role="strong">CodeReferences</emph>.</p>
						<table id="t8">
							<caption align="BOTTOM">A value set representing an entire code system</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>valueSet_id</th>
									<th>valueSet_name</th>
									<th>description</th>
									<th>all Codes</th>
									<th>CodeSystem</th>
									<th>Release Version</th>
								</tr>
							</thead>
							<tr>
								<td>
                                                        2.16.840.1.113883.1.11.1
                                                </td>
								<td>AdministrativeGender</td>
								<td>The gender of a person used for administrative purposes (as opposed to clinical gender)</td>
								<td>True</td>
								<td>2.16.840.1.113883.5.1</td>
								<td>5</td>
							</tr>
						</table>
					</div4>
					<div4 id="CTSMessAPIRepCodeSys">
						<head>Representing Selected Parts of a Code System</head>
						<p>A <emph role="strong">ValueSet</emph> may include zero or more <emph role="strong">CodedConcepts</emph>
							<emph role="underline"> defined in</emph> the <emph role="strong">CodeSystem</emph> on which the <emph role="strong">ValueSet</emph> is <emph role="underline">based</emph>.  This is accomplished by <emph role="underline">including</emph> one or more <emph role="strong">CodeReferences</emph>.  A <emph role="strong">CodeReference</emph> ties a <emph role="strong">CodedConcept</emph> to a <emph role="strong">ValueSet</emph>.  It must <emph role="underline">reference</emph> exactly one <emph role="strong">CodedConcept</emph>. The <emph>relation_code</emph> attribute, however, implicitly references all of the <emph role="strong">CodedConcepts</emph> that are the <emph role="underline">target of</emph> the <emph role="strong">ConceptRelationship </emph>with the <emph role="underline">included</emph>
							<emph role="strong">CodedConcept</emph>. A <emph role="strong">CodeReference</emph> can include or exclude the referenced <emph role="strong">CodedConcept</emph> itself. It can include all of the target codes or only the leaf nodes.  These various possibilities are reflected in the <emph>includeReferencedCode</emph>, <emph>relationship_code</emph> and <emph>leafOnly</emph> attributes described in the following table:</p>
						<table id="t9">
							<caption align="BOTTOM">Code Reference Attribute Options</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>
										<emph>allCodes</emph>
									</th>
									<th>
										<emph>includeReferencedCode</emph>
									</th>
									<th>
										<emph>relationship_code</emph>
									</th>
									<th>
										<emph>leafOnly</emph>
									</th>
									<th>Description</th>
								</tr>
							</thead>
							<tr>
								<td>True</td>
								<td>-</td>
								<td>-</td>
								<td>-</td>
								<td>Include all of the codes in the code system.</td>
							</tr>
							<tr>
								<td>False</td>
								<td>True</td>
								<td>-</td>
								<td>-</td>
								<td>Include only the referenced concept code</td>
							</tr>
							<tr>
								<td>False</td>
								<td>True</td>
								<td>hasSubtype  </td>
								<td>False</td>
								<td>Include the referenced code and all of its subtypes</td>
							</tr>
							<tr>
								<td>False</td>
								<td>False</td>
								<td>hasSubtype  </td>
								<td>False</td>
								<td>Include all of the subtypes of the referenced code but not the referenced code itself.
</td>
							</tr>
							<tr>
								<td>False</td>
								<td>False</td>
								<td>hasSubtype  </td>
								<td>True</td>
								<td>Include only the leaf subtypes of the referenced code

</td>
							</tr>
						</table>
						<p>
                                                        Attribute combinations other than those described above are not valid.  <emph>relation_code</emph> should be drawn from the HL7 RelationshipCode code system if possible.</p>
					</div4>
				</div3>
				<div3 id="CTSMessAPIIncValSets">
					<head>Including other value sets in a value set</head>
					<p>A <emph role="strong">ValueSet</emph> may also be <emph role="underline">constructed using</emph> zero or more additional <emph role="strong">ValueSets</emph>.  Including a <emph role="strong">ValueSet</emph> means that the <emph role="strong">CodedConcepts</emph> represented by the included set are to be included as part of the containing set. <emph role="strong">ValueSetConstructors</emph> serve two purposes:</p>
					<list role="ordered">
						<item>They allow <emph role="strong">ValueSets</emph> to be included by reference, meaning  that changes in the contained set are automatically included in the container.</item>
						<item>They make it possible to include <emph role="strong">CodedConcepts</emph>  from more than one <emph role="strong">CodeSystem</emph> in a single <emph role="strong">ValueSet</emph>.</item>
					</list>
					<p>A <emph role="strong">ValueSetConstructor</emph> connects two <emph role="strong">ValueSets</emph> – the included set and the set being constructed.  <emph>includeHeadCode</emph> determines whether the head code of the included set  (if any) is to be included as part of the containing value set.</p>
					<p>The table below shows examples of value set constructors.  The value set "HL7ConformanceInclusion"  includes the contents of the value set, "InclusionNotMandatory" which, in turn includes the set "InclusionNotRequired".  </p>
					<table id="t10">
						<caption align="BOTTOM">Example Value Set Constructors</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="413"/>
						<thead>
							<tr>
								<th>usedToBuildSet</th>
								<th>(name)</th>
								<th>includedSet</th>
								<th>(name)</th>
								<th>Include Head Code</th>
							</tr>
						</thead>
						<tr>
							<td>2.16.840.1.113883.1.11.10010</td>
							<td>HL7ConformanceInclusion</td>
							<td>2.16.840.1.113883.1.11.10012</td>
							<td>InclusionNotMandatory</td>
							<td>False</td>
						</tr>
						<tr>
							<td>2.16.840.1.113883.1.11.10012</td>
							<td>InclusionNotMandatory</td>
							<td>2.16.840.1.113883.1.11.10015</td>
							<td>InclusionNotRequired</td>
							<td>True</td>
						</tr>
					</table>
				</div3>
				<div3 id="CTSMessAPIHeadCodes">
					<head>Head codes</head>
					<p>
                                        A <emph role="strong">ValueSet</emph>
						<emph role="underline"> references</emph> a set of <emph role="strong">CodedConcepts</emph>. Frequently,  the association between a <emph role="strong">ValueSet</emph>  and a collection of <emph role="strong">CodedConcepts</emph> implies a subsumption, partitive or other hierarchical relationship where the value set itself represents the ‘whole’(parent) and the concept codes the individual ‘parts’ (children).  When this is the case, there may also be a corresponding concept code in the code system itself that represents the same ‘whole’ or ‘parent’ concept. We refer to this corresponding code as the ‘head code’ of the associated value set.
Many coded attributes in the HL7 RIM can have varying degrees of granularity. Using the example above, the InclusionNotRequired value set has a head code, "NR", and two subsidiary codes "Excluded (X) " and "Required may be empty (RE)".  The second assignment line above indicates that the valid values for this value set may be "X" for excluded, "RE" for required, but may be empty and "NR" when the inclusion is not required for a non-specific reason. </p>
					<p>
When a value set is used to construct another value set, the head code may or may not be part of the included set.  This provides the ability to represent what the HL7 community refers to as ‘abstract’ and ‘specializable’ value sets.  A <emph role="strong">ValueSet</emph> may be <emph role="underline">identified_by</emph> at most one <emph role="strong">CodedConcept</emph>, which is known as the "head code". A <emph role="strong">CodedConcept</emph> may be the <emph role="underline">head_code_for</emph> zero or more <emph role="strong">ValueSets</emph>.
</p>
				</div3>
			</div2>
			<div2 id="CTSMessAPIRegCodeSys">
				<head>Registered Code System</head>
				<p>
                                Many of the code systems used within HL7 will be supplied by outside parties.  The <emph role="strong">CodeSystem</emph> class, defined later in this document, represents the characteristics common to all code systems used within the HL7 environment.  HL7 also maintains an internal registry (metadata) about code systems themselves – a code system registry. This registry is intended to function as a central repository of metadata about any code system that may appear in an HL7 message, be it internal to a site or system or commonly used and sanctioned between systems.</p>
				<p>
Registration does not constitute ‘sanctioning’ from an HL7 standpoint. It simply records a reference.  The registration process also assigns a code system identifier (OID) for a code system if one doesn’t already exist.</p>
				<p>
					<exhibit role="figure">
						<caption align="BOTTOM">Registered Code System</caption>
						<graphic source="ctsFig5.gif"/>
					</exhibit>
				</p>
				<p>A <emph role="strong">CodeSystemRegistration</emph> has the following attributes:</p>
				<list role="unordered">
					<item>
						<emph>sponsor</emph> – the name, address and the like of the person or organization that officially sponsors this code system within HL7</item>
					<item>
						<emph>publisher</emph> – the name, address and the like of the organization responsible for creating and maintaining the code system</item>
					<item>
						<emph>versionReportingMethod</emph> – a description of how and how often new versions are created and distributed</item>
					<item>
						<emph>licensingInformation</emph> – a description of the required licenses, costs and how they are acquired</item>
					<item>
						<emph>inUMLS</emph> – ‘true’ means that the coded terms defined in this code system are included in the Unified Medical Language System (UMLS)</item>
					<item>
						<emph>systemSpecificLocatorInfo</emph> – information specific to the code system publisher that serves to define or identify the specific coding system.  Within HL7, systemSpecificLocatorInfo may sometimes used to identify the corresponding Version 2.x HL7 table where appropriate.</item>
					<item>
						<emph>codeSystemType_code</emph> –  A code that identifies whether the code system is maintained and distributed internally by HL7 (I), is maintained and distributed by a third party(E) or is maintained by a third party, but is distributed by HL7 (EI).</item>
				</list>
			</div2>
		</div1>
		<div1 id="CTSMessAPISpec">
			<head>The CTS Message API Specification</head>
			<div2 id="CTSMessAPIIntro">
				<head>Introduction</head>
				<p>The CTS Message API (CTSMAPI) is divided into two sections – the <emph>runtime</emph> section, which defines the set of functions that are necessary for everyday operation of HL7 Version 3 message software and the <emph>browsing</emph> section, which is used for authoring and construction of HL7 messages.  Software using the browsing section is presumed to have access to a corresponding runtime section, whereas software in the runtime section may not have access to a browsing section.</p>
			</div2>
			<div2 id="CTSCommMsgEle">
				<head>Common CTS Message Elements</head>
				<div3 id="CTSBasicDataEle">
					<head>Basic Data Elements</head>
					<p>The following section describes the basic types that are used in the CTS Message API.  Types with the prefix "types::" are all based on the HL7 Version 3 Data Types and are not described further here.</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Basic CTS Message API Types</caption>
						<codefragment file="CTSMAPI.xml" section="basicData"/>
					</exhibit>
					<list role="unordered">
						<item>
							<codeelement>CTSVersionId</codeelement>    - a structure that contains the major and minor version of the CTS Specification.  The current version of the specification would be major:1, minor:0 (1.0)</item>
						<item>
							<codeelement>CodeSystemId</codeelement>       - A unique code system identifier. In the HL7 context, this should be the ISO Object Identifier (OID) assigned by HL7 if one exists.  Other identifiers such as the DCE UUID, etc. may be used as code system identifiers in non-HL7 settings. In these situations is the responsibility of the implementor to reconcile any namespace conflicts that may arise between OID's and the other identifiers..</item>
						<item>
							<codeelement>CodeSystemName</codeelement>     - the name of a code system.  Both code system id and code system names are unique within the HL7 Version 3 namespace, but this is not guaranteed to be universally true.</item>
						<item>
							<codeelement>ConceptCode</codeelement>                - a code that uniquely represents a class or concept within a given code system.</item>
						<item>
							<codeelement>VocabularyDomainName</codeelement> - the unique name of an HL7 vocabulary domain</item>
						<item>
							<codeelement>ReleaseVersionId</codeelement>  - an identifier that uniquely names a release / version within the context of a code system.</item>
						<item>
							<codeelement>ValueSetId</codeelement>                - an ISO Object Identifier (OID) that uniquely identifies a HL7 value set.</item>
						<item>
							<codeelement>ValueSetName</codeelement>      - the unique name or mnemonic for a value set.  Not all value sets will have both ids and names, but when they do, both must be unique.</item>
						<item>
							<codeelement>ConceptId</codeelement>         - the combination of a code system identifier and a concept code which together provide a globally unique name for a concept</item>
						<item>
							<codeelement>ReleaseVersionId</codeelement>  - the unique identifier of a version or release of one or more code systems</item>
						<item>
							<codeelement>ExpansionContext</codeelement>  – an opaque blob used to pass contextual information between the server and client</item>
					</list>
				</div3>
				<div3 id="CTSConceptCodes">
					<head>Concept Codes</head>
					<p>The Message API uses a number of coded attributes which are described below.</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Coded Concepts used in the Message API</caption>
						<codefragment file="CTSMAPI.xml" section="conceptCodes"/>
					</exhibit>
					<list role="unordered">
						<item>
							<codeelement>LanguageCode</codeelement> – a code for a spoken or written language that follows the rules described in <loc href="http://www.ietf.org/rfc/rfc3066.txt"> IETF RFC 3066 – Tag for Identification of Languages</loc>.  This language code consists of multiple subtags separated by hyphens (‘-‘).  The first subtag identifies the major language code.  It must be drawn from <loc href="http://www.loc.gov/standards/iso639-2/">ISO 639.2 -Codes for the representation of names of languages--Part 1: Alpha-2 Code</loc> whenever possible. If no two character code is available, it may be drawn from <loc href="http://lcweb.loc.gov/standards/iso639-2/langhome.html">ISO 639.2 - Codes for the representation of names of languages--Part 2: Alpha-3 Code</loc>.  There are also additional escape mechanisms that aren’t described further here.<br/>
The second subtag is optional. If present, it must be 2-8 characters in length.  If two characters in length, it should contain a country code drawn from <loc href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/index.html">ISO 3166-1 Two character country codes</loc>. If the subtag is 3-8 characters long, it must come from the <loc href="http://www.iana.org/assignments/language-tags">IANA language tag registry</loc>.  Additional subtags serve to further refine the language.</item>
						<item>
							<codeelement>RelationshipCode</codeelement>  - a concept code that uniquely identifies a particular relation as it occurs in a code system.  Relationship codes must be drawn from the HL7 ConceptRelationship code system whenever possible.</item>
						<item>
							<codeelement>ApplicationContextCode</codeelement>    - a code that identifies a context or realm such as a geopolitical domain, profession or other setting.  </item>
						<item>
							<codeelement>DataTypeCode</codeelement>              - a code that identifies the data type of a RIM attribute (e.g. CD, CE, CS, BIN, ST, etc).</item>
						<item>
							<codeelement>CodingStrengthCode</codeelement>        - a code that identifies how non-codeable elements should be treated within an HL7 attribute (CWE - coded with allowed exceptions, CNE - coded, no exceptions)</item>
						<item>
							<codeelement>ValueSetNodeTypeCode</codeelement>      - a code that defines the type of a value set that is returned as a nested list. Types are "A" – abstract, meaning that the value set is not selectable, "S" – specializable, meaning that the values set may be selected but also has further refinements and "L" – leaf,  meaning that the node represents a selectable concept code that has no further subdivisions.</item>
						<item>
							<codeelement>CodeSystemTypeCode</codeelement> - a code that identifies a code system as internally maintained by HL7 (I), externally maintained (E) or externally maintained but HL7 carries an internal copy (EI).</item>
						<item>
							<codeelement>MatchAlgorithmCode</codeelement> - a code that identifies a string matching algorithm.  Match algorithm codes are used in internal search functions</item>
					</list>
					<p>The following table lists the code systems and OIDS that are used in the CTS MAPI messages.</p>
					<table id="t11">
						<caption align="BOTTOM">Coded Data Element OIDS and Names</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="413"/>
						<thead>
							<tr>
								<th>MAPI Data Element</th>
								<th>Code System OID</th>
								<th>Code System Name</th>
							</tr>
						</thead>
						<tr>
							<td>LanguageCode</td>
							<td>2.16.840.1.113883.6.99</td>
							<td>ISO 639-1 Two character Alpha Language Codes</td>
						</tr>
						<tr>
							<td>LanguageCode</td>
							<td>2.16.840.1.113883.6.100</td>
							<td>ISO 639-2 Three character Alpha Language Codes</td>
						</tr>
						<tr>
							<td>RelationshipCode</td>
							<td>2.16.840.1.113883.5.1088</td>
							<td>ConceptCodeRelationship</td>
						</tr>
						<tr>
							<td>ApplicationContextCode</td>
							<td>2.16.840.1.113883.5.147</td>
							<td>VocabularyDomainQualifier.RealmOfUse</td>
						</tr>
						<tr>
							<td>DataTypeCode</td>
							<td>2.16.840.1.113883.5.1007</td>
							<td>DataType</td>
						</tr>
						<tr>
							<td>CodingStrengthCode</td>
							<td>2.16.840.1.113883.5.147</td>
							<td>VocabularyDomainQualifier</td>
						</tr>
						<tr>
							<td>ValueSetNodeTypeCode</td>
							<td>2.16.840.1.113883.5.24</td>
							<td>ConceptGenerality</td>
						</tr>
						<tr>
							<td>CodeSystemType</td>
							<td>2.16.840.1.113883.5.1085</td>
							<td>CodeSystemType</td>
						</tr>
						<tr>
							<td>MatchAlgorithmCode</td>
							<td>2.16.840.1.113883.5.1094</td>
							<td>MatchAlgorithm</td>
						</tr>
					</table>
					<div4 id="CTSMatchAlgorithm">
						<head>Text Match Algorithms</head>
						<p>Several of the functions in the sections that follow allow a string of text to be passed as a search criteria. This text is accompanied by a "match algorithm code" that determines how the text will be applied.  The table below lists a set of pre-determined match algorithms.  If the "required" column is TRUE, all service implementations must support this algorithm in order to be considered compliant.  If the "required" column if FALSE, it isn't necessary for a service to implement the algorithm, but if it does, it should use the supplied code to represent the algorithm.  Note that the match algorithm list is not exhaustive.  It is permissible for service implementations to extend the list below with additional, custom match algorithms as appropriate, although implementers are strongly encouraged to register the algorithm code with HL7 to enable future interoperability.<br/>
							<br/>
						</p>
						<table id="MatchAlgorithmCodes">
							<caption align="BOTTOM">Match Algorithm Codes</caption>
							<col width="23"/>
							<col width="300"/>
							<col width="113"/>
							<thead>
								<tr>
									<th>Match Algorithm Code</th>
									<th>Description</th>
									<th>Required</th>
								</tr>
							</thead>
							<tr>
								<td>IdenticalIgnoreCase</td>
								<td>The lower case representation of the target text must match the lower case representation matchText exacty.</td>
								<td>TRUE</td>
							</tr>
							<tr>
								<td>Identical</td>
								<td>The target text must match the matchText exactly.</td>
								<td>FALSE</td>
							</tr>
							<tr>
								<td>StartsWithIgnoreCase</td>
								<td>The lower case representation of target text must begin with the lower case representation of matchText.</td>
								<td>TRUE</td>
							</tr>
							<tr>
								<td>StartsWith</td>
								<td>The target text must begin with the matchText.</td>
								<td>FALSE</td>
							</tr>
							<tr>
								<td>EndsWithIgnoreCase</td>
								<td>The lower case representation of the target text must end with the lower case representation of matchText.</td>
								<td>TRUE</td>
							</tr>
							<tr>
								<td>EndsWith</td>
								<td>The target text must end with the matchText.</td>
								<td>FALSE</td>
							</tr>
							<tr>
								<td>ContainsPhraseIgnoreCase</td>
								<td>The lower case representation of the target text must contain the lower case representation of the matchText.</td>
								<td>TRUE</td>
							</tr>
							<tr>
								<td>ContainsPhrase</td>
								<td>The target text must contain the matchText.</td>
								<td>FALSE</td>
							</tr>
							<tr>
								<td>WordsAnyOrderIgnoreCase</td>
								<td>The target text must contain all of the words in the match text, but in any order.</td>
								<td>FALSE</td>
							</tr>
							<tr>
								<td>WildCardsIgnoreCase</td>
								<td>The match text may contain zero or more 'wild cards', designated by an asterisk (*). Wild cards match 0 of more characters in the target string.  The escape character is a backslash('\') meaning that the matchText "a\*b*' would match any string that begins with the string "a*b".</td>
								<td>FALSE</td>
							</tr>
							<tr>
								<td>RegularExpression</td>
								<td>The match text may contain regular expressions, as defined in <loc href="http://www.w3c.org/TR/xmlschema-2/#regexs"> XML Schema Part 2: Datatypes</loc>. </td>
								<td>FALSE</td>
							</tr><tr>
								<td>NYSIIS</td>
								<td>New York State Identification and Intelligence System phonetic encoding</td>
								<td>FALSE</td>
							</tr>
						</table>
					</div4>
				</div3>
				<div3 id="CTSIndentSec">
					<head>Service Identification Section</head>
					<p>     The message runtime and browsing API both inherit a common identification interface.</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Common Identification Interface</caption>
						<codefragment file="CTSMAPI.xml" section="identification"/>
					</exhibit>
					<list role="unordered">
						<item>
							<codeelement>getServiceName</codeelement>   - returns the name assigned to the service by the service provider</item>
						<item>
							<codeelement>getServiceVersion</codeelement> - returns an implementation-specific service version identifier</item>
						<item>
							<codeelement>getServiceDescription</codeelement>     - returns a description of the service, author, purpose, etc.</item>
						<item>
							<codeelement>getHL7ReleaseVersion</codeelement>      - returns the latest HL7 vocabulary (not RIM) release represented by the service.  </item>
						<item>
							<codeelement>getCTSVersion</codeelement>             - returns the specific CTS version that the service implements (e.g. 1.0)</item>
					</list>
				</div3>
				<div3 id="CTSExcepts">
					<head>Exceptions</head>
					<p>
The following table contains the exceptions that can be raised by one or more of the methods described in this chapter.  An exception is an abnormal condition that prevents a method invocation from completing.</p>
					<p>The exceptions described below assume that the baseline exception includes a text field where the specific details of the exception can be spelled out.  The additional attributes below provide further information beyond the basic text.</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Message API Exceptions</caption>
						<codefragment file="CTSMAPI.xml" section="exceptions"/>
					</exhibit>
					<list role="unordered">
						<exception name="UnexpectedError"> - An error that could not be anticipated by the specification has occurred. This includes things like memory faults, I/O errors, database access errors and any other sort of unexpected event that prevents successful completion of the API call.  possible_cause can carry a more detailed description of what actually occurred.</exception>
						<exception name="UnknownVocabularyDomain"> - The vocabularyDomain_name isn’t recognized by the service</exception>
						<exception name="UnknownApplicationContextCode">    - The applicationContext_code isn’t recognized by the service</exception>
						<exception name="UnknownValueSet">
							<list role="ordered">
								<item>A value set id was supplied, but it isn’t recognized by the service or</item>
								<item>Only a value set name was supplied the name isn't recognized by the service</item>
								<item>Neither a name or an id was supplied</item>
							</list>
						</exception>
						<exception name="ValueSetNameIdMismatch">  - Both valueSet_id and valueSet_name were supplied in a method call. valueSet_id identified a valid value set but it either wasn't the same set as that identified by valueSet_name. valueSet_name may identify a different value set or no valid value set at all.</exception>
						<exception name="UnknownConceptCode"> - concept_id.concept_code isn’t recognized as a valid concept code in the code system identified by concept_id.codeSystem_id</exception>
						<exception name="SubsumptionNotSupported"> - The service doesn't support subsumption testing for the code system named by codeSystem_id.</exception>
						<exception name="UnrecognizedQualifier">  - The supplied relationship qualifier isn’t recognized by the service.</exception>
						<exception name="UnableToTranslate"> - the service wasn’t able to perform the requested translation</exception>
						<exception name="UnknownCodeSystem">
							<list role="ordered">
								<item>A code system_id was supplied and wasn’t recognized by the service</item>
								<item>A code system name was supplied, but not the id and the name wasn’t recognized by the service</item>
								<item>Neither the code system name nor the code system id were supplied</item>
							</list>
						</exception>
						<exception name="InvalidExpansionContext"> - The expansion context that was supplied by the client is invalid.  This can occur because the context was somehow corrupted or because a time limit has expired and the context is no longer valid.</exception>
						<exception name="QualifiersNotSupported"> - The service doesn’t support subsumption testing on post-coordinated expressions</exception>
						<exception name="NoApplicableValueSet"> - The service was unable to determine which value set should be used for vocabularyDomain_name and applicationContext_code.</exception>
						<exception name="CodeSystemNameIdMismatch"> - codeSystem_name doesn’t identify the same code system as codeSystem_id, or it doesn’t name a code system at all.</exception>
						<exception name="TimeoutError"> - The time limit specified for the function call has expired.</exception>
						<exception name="BadlyFormedMatchText"> - The supplied match text was syntactically incorrect for the specified match algorithm.</exception>
						<exception name="UnknownMatchAlgorithm"> - The supplied match algorithm isn't supported by the service.</exception>
					</list>
				</div3>
			</div2>
			<div2 id="CTSCommMsgRTAPI">
				<head>The CTS Message Runtime API</head>
				<div3 id="CTSMessRTIdSect">
					<head>Message Runtime Identification Section</head>
					<p>The following sections describe the interface methods of the runtime portion of the message API.</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Message Runtime Identification Section</caption>
						<codefragment file="CTSMAPI.xml" section="runtime"/>
					</exhibit>
					<p>
The Runtime section inherits the identification information from the Identification section.</p>
					<p>
						<codeelement>getSupportedMatchAlgorithms</codeelement> - return a list of match algorithms that are implemented in the service.</p>
					<p>
						<codeelement>getSupportedVocabularyDomains</codeelement> - return a list of vocabulary domains that are known to the service.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>matchText</codeelement> - If present and non-null, only vocabulary domains having names that match the text.  If matchtext absent or null, all vocabulary domains will be returned.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - If the matchText is present and non-null, the matchAlgorithm_code determines how the match text is applied. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchAlgorithm</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSValCodedAtt">
					<head>Validate a Coded Attribute</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">ValidateCodeReturn structures</caption>
						<codefragment file="CTSMAPI.xml" section="validateCodeBlock"/>
					</exhibit>
					<p>
A ValidationDetail entry contains a detailed description of an error or warning.
</p>
					<list role="unordered">
						<item>
							<codeelement>codeInError</codeelement>       - the concept code that the actual error or warning occurred on.  If the error was detected in a concept qualifier or a translation, this value contains the qualifier name, qualifier value or translation value that was actually in error.</item>
						<item>
							<codeelement>isError</codeelement>   - TRUE means that the detail entry describes an error. FALSE means that it is a warning.</item>
						<item>
							<codeelement>error_id</codeelement>  - the error identifier (see: <tabref ref="tvalcode"/> - ValidateCode and ValidateTranslation return codes)</item>
						<item>
							<codeelement>errorText</codeelement> - a textual explanation of the error or warning</item>
					</list>
					<p>ValidateCodeReturn returns the summary of validateCode call along with the details</p>
					<list role="unordered">
						<item>
							<codeelement>nErrors</codeelement>   - the number of errors encountered.  If greater than zero,  the code or translation is not valid. </item>
						<item>
							<codeelement>nWarnings</codeelement> - the number of warnings returned.  If a code or translation only has warnings, it can still be transmitted and processed even though some of the fields may not be correct.</item>
						<item>
							<codeelement>detail</codeelement>    - a list of the individual errors and/or warnings</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">validateCode</caption>
						<codefragment file="CTSMAPI.xml" section="validateCode"/>
					</exhibit>
					<p>validateCode determines whether the coded attribute value contains a valid concept representation for the supplied vocabulary domain and application context.  If errorCheckOnly is false, it also validates the code system name and displayName attributes if they are present.  It then recursively validates the qualifiers using the same criteria. Concept codes that have originalText and no code are always considered invalid. validateCode doesn’t validate translations.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>vocabularyDomain_name</codeelement>     - vocabulary domain for the supplied coded attribute</item>
						<item>
							<codeelement>codeToValidate</codeelement>            - the HL7 concept code to be validated.  At bare minimum code must contain the code and code system attributes.  </item>
						<item>
							<codeelement>applicationContext_code</codeelement>   - the context or "realm" in which the code is to be used</item>
						<item>
							<codeelement>activeConceptsOnly</codeelement>        - if true (default), only concept codes that are currently active are considered valid.  If false, the code will be considered valid as long as it is present in the code system.</item>
						<item>
							<codeelement>errorCheckOnly</codeelement>            - if true, the concept code will only be checked for errors.  No warnings will be returned</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownVocabularyDomain</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownApplicationContextCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSValTransCodeAtt">
					<head>Validate the Translation(s) of a Coded Attribute</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">ValidateTranslation</caption>
						<codefragment file="CTSMAPI.xml" section="validateTranslation"/>
					</exhibit>
					<p>validateTranslation validates the primary code and any translations of an HL7 coded attribute. Any errors or warnings are returned in the ValidateCodeReturn structure.</p>
					<p>
Note: the details of what constitutes a valid translation are not covered in this document.  It is presumed that an outside entity has defined the rules of translation and that this function provides a standardized way to access those rules.  Refer to <specref ref="CTScodeTranMod"/>  for the underlying translation model.</p>
					<list role="unordered">
						<item>
							<codeelement>vocabularyDomain_name</codeelement>    - vocabulary domain for the supplied coded attribute</item>
						<item>
							<codeelement>codeToValidate</codeelement>           - the HL7 concept code to be validated.  At bare minimum code must contain the code and code system attributes.  </item>
						<item>
							<codeelement>applicationContext_code</codeelement>  - the context or "realm" in which the code is to be used</item>
						<item>
							<codeelement>activeConceptsOnly</codeelement>       - if true (default), only concept codes that are currently active are considered valid.  If false, the code will be considered valid as long as it is present in the code system.</item>
						<item>
							<codeelement>errorCheckOnly</codeelement>           - if true, the concept code will only be checked for errors.  No warnings will be returned</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownVocabularyDomain</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownApplicationContextCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
					<div4 id="CTSValCodeValTransRet">
						<head>ValidateCode and ValidateTranslation Return codes</head>
						<p>The following table lists the validation error identifiers and associated text that can be returned from ValidateCode and/or ValidateTranslation.</p>
						<table id="tvalcode">
							<caption>ValidateCode and ValidateTranslation return codes</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>ID</th>
									<th>Type</th>
									<th>Text</th>
									<th>Description</th>
								</tr>
							</thead>
							<tr>
								<td>E001</td>
								<td>E</td>
								<td>Unknown code system</td>
								<td>The code system isn’t recognized by the service.</td>
							</tr>
							<tr>
								<td>E002</td>
								<td>E</td>
								<td>Invalid concept code for code system</td>
								<td>The concept code isn’t valid for the supplied (or implied in the case of CS data types) code system.</td>
							</tr>
							<tr>
								<td>E003</td>
								<td>E</td>
								<td>Code system not valid for vocabulary domain</td>
								<td>The code system is recognized by the service, but it isn’t valid for the vocabulary domain and application context.</td>
							</tr>
							<tr>
								<td>E004</td>
								<td>E</td>
								<td>Concept code is not active</td>
								<td>The concept code is valid for the domain, but it is no longer active.  This error occurs only when activeConceptsOnly is true.</td>
							</tr>
							<tr>
								<td>E005</td>
								<td>E</td>
								<td>Concept code is not valid for vocabulary domain</td>
								<td>The concept code is valid for the code system, but is not allowed in the vocabulary domain and application context.</td>
							</tr>
							<!--tr>
								<td>E006</td>
								<td>E</td>
								<td>Qualifiers not allowed for data type</td>
								<td>The data type associated with vocabulary domain doesn’t allow qualifiers</td>
							</tr-->
							<!--tr>
								<td>E007</td>
								<td>E</td>
								<td>Translation not allowed for data type</td>
								<td>The data type associated with the vocabulary domain doesn’t support translations.</td>
							</tr-->
							<tr>
								<td>E008</td>
								<td>E</td>
								<td>Invalid role name for vocabulary domain</td>
								<td>The code system and concept code of the qualifier role are legal, but are not valid for the vocabulary domain.</td>
							</tr>
							<tr>
								<td>E009</td>
								<td>E</td>
								<td>Role name must be supplied for vocabulary domain</td>
								<td>A qualifier was present that didn’t have a name component and it is required for this vocabulary domain.</td>
							</tr>
							<tr>
								<td>E010</td>
								<td>E</td>
								<td>Invalid value for qualifier</td>
								<td>The qualifier value is a valid concept code, but is not valid in the context of the qualifier.</td>
							</tr>
							<tr>
								<td>E011</td>
								<td>E</td>
								<td>Invalid translation</td>
								<td>The translation code system and concept code are valid, but it is not a valid translation of the containing concept code.</td>
							</tr>
							<!--tr>
								<td>E012</td>
								<td>E</td>
								<td>Missing code system</td>
								<td>A concept code is present, but no code system has been specified and it is required for this vocabulary domain.</td>
							</tr-->
							<tr>
								<td>E013</td>
								<td>E</td>
								<td>Missing concept code</td>
								<td>The concept code field is empty.</td>
							</tr>
							<tr>
								<td>E014</td>
								<td>E</td>
								<td>Unknown coding rationale</td>
								<td>The coding rationale code is not recognized.</td>
							</tr>
							<!--tr>
								<td>W001</td>
								<td>W</td>
								<td>Code system not allowed in CS data type</td>
								<td>The coded attribute is defined as a Coded Simple (CS) type and does not allow a code system id, name or version.  The coded attribute as passed supplied one or more of these fields.</td>
							</tr-->
							<tr>
								<td>W002</td>
								<td>W</td>
								<td>Code system name doesn’t match code system </td>
								<td>The code system name does not match the code system id.</td>
							</tr>
							<tr>
								<td>W003</td>
								<td>W</td>
								<td>Unknown code system version</td>
								<td>The version is not recognized for the supplied code system.</td>
							</tr>
							<tr>
								<td>W004</td>
								<td>W</td>
								<td>Display name incorrect for concept code</td>
								<td>The display name is not correct for the supplied concept code.</td>
							</tr>
							<tr>
								<td>W005</td>
								<td>W</td>
								<td>No HL7 translation present</td>
								<td>None of the translations have a SH (both Source and HL7) or HL7 coding rationale. </td>
							</tr>
							<tr>
								<td>W006</td>
								<td>W</td>
								<td>Concept code is not active</td>
								<td>The supplied concept code is not active and activeConceptsOnly is TRUE.</td>
							</tr>
						</table>
					</div4>
				</div3>
				<div3 id="CTSTransCodedAtt">
					<head>Translate a Coded Attribute</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Translate Code</caption>
						<codefragment file="CTSMAPI.xml" section="translateCode"/>
					</exhibit>
					<p>translateCode translates fromCode into the concept code, if any, that is valid for the vocabulary domain in the target code system or application context.  It returns a complete copy of fromCode with the new translation (if any) appended to the end of the CD.translation sequence.  If fromCode already contains a valid translation for the target code system or application context, the return copy of fromCode will match the original.</p>
					<list role="unordered">
						<item>
							<codeelement>vocabularyDomain_name</codeelement>    - the vocabulary domain of the coded attribute to be translated</item>
						<item>
							<codeelement>fromCode</codeelement>– the code to be translated</item>
						<item>
							<codeelement>toCodeSystem_id</codeelement>  - (optional) If supplied, translate the code into a concept code (or codes) drawn from this code system rather than determining the code system from the target context.</item>
						<item>
							<codeelement>toApplicationContext_code</codeelement>    - (optional) The application context of the translated code.  Used to determine the target value set which, in turn, determines the target code system. Only one of toCodeSystem_id or targetContext may be specified.  If neither or both are specified an UnableToTranslate exception will be thrown.</item>
					</list>
					<p>
translateCode returns an HL7 coded attribute that has been translated into the terms of the target coding system. The target code system can either be supplied in the call or can be determined from the targetContext.</p>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownVocabularyDomain</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownApplicationContextCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnableToTranslate</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSFillDetCodedAtt">
					<head>Fill in the Details of a Coded Attribute</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">fillInDetails</caption>
						<codefragment file="CTSMAPI.xml" section="fillInDetails"/>
					</exhibit>
					<p>

fillInDetails returns a complete copy of codeToFillIn with codeSystemName, codeSystemVersion and displayName filled out in the base code and its qualifiers, if any.  Qualifiers are filled out recursively - if qualifiers are nested or have other qualifiers, the details are filled in here as well. fillInDetails does not change the code translations. </p>
					
					<p>
Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>codeToFillIn</codeelement>      - coded attribute to be completed</item>
						<item>
							<codeelement>displayLanguage_code</codeelement>- language to use for the display name(s).  If blank or null, the default language code for the code system is used.</item>
					</list>
					<p>
Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownConceptCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownLanguage</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSDetOneCodedAtt">
					<head>Determine Whether One Coded Attribute Subsumes a Second</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">subsumes</caption>
						<codefragment file="CTSMAPI.xml" section="subsumes"/>
					</exhibit>
					<p>
subsumes tests whether the parent coded attribute subsumes (is implied by) the child.  If neither parentCode nor childCode have any qualifiers and both are drawn from the same code system, subsumes returns true if and only if childCode can be determined to belong to the transitive closure of the <emph>hasSubtype</emph> relationship graph headed by parentCode.  This document makes no further assertions of the semantics of subsumption beyond this one case.  </p>
					<p>
If the service supports subsumption involving qualifiers and/or subsumption tests across multiple code systems, it must define the appropriate translation semantics.  If the service doesn’t support qualifier subsumption, it should raise the QualifiersNotSupported exception if presented with a parentCode or childCode containing qualifiers.  Similarily, if the service doesn’t support cross-code system subsumption testing, it should raise SubsumptionNotSupported when supplied with codes with different code systems.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>parentCode</codeelement>       - the parent coded attribute to test</item>
						<item>
							<codeelement>childCode</codeelement>- the child coded attribute to test</item>
					</list>
					<p>subsumes will return ‘true’ if the child code can be determined to be a subtype of the parent.  Subsumes will also return ‘true’ if the child and parent codes are equivalent. Translations are ignored in this method.</p>
					<p>
Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>SubsumptionNotSupported</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnrecognizedQualifier</exceptionRef></item>
						<item>
							<exceptionRef>QualifiersNotSupported</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSTestTwoCodedAtt">
					<head>Test Whether Two Coded Attributes are Equivalent</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">areEquivalent</caption>
						<codefragment file="CTSMAPI.xml" section="areEquivalent"/>
					</exhibit>
					<p>
areEquivalent determines whether the two supplied codes represent an equivalent concept from the perspective of the service.  It is possible for one or both of the supplied codes to include qualifiers or be drawn from different code systems.  code1 and code2 are considered equivalent if and only if code1 subsumes code2 and code2 subsumes code1.  The semantics of subsumption are defined in the previous section.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>code1</codeelement>    - first code to test for equivalence</item>
						<item>
							<codeelement>code2</codeelement>    - second code to test</item>
					</list>
					<p>
Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>SubsumptionNotSupported</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnrecognizedQualifier</exceptionRef>
						</item>
						<item>
							<exceptionRef>QualifiersNotSupported</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSExpandVocDom">
					<head>Expand a Vocabulary Domain</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">ValueSetDescriptor structure</caption>
						<codefragment file="CTSMAPI.xml" section="valueSetDescriptor"/>
					</exhibit>
					<p>
Every value set has a unique identifier.  In addition, some value sets may also have an optional mnemonic or name, which, if present, must also be unique.</p>
					<list role="unordered">
						<item>
							<codeelement>ValueSet_id</codeelement>              - the unique value set identifier.</item>
						<item>
							<codeelement>ValueSet_name</codeelement>    - the unique value set name (optional)</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">ValueSetExpansion node</caption>
						<codefragment file="CTSMAPI.xml" section="valueSetExpansion"/>
					</exhibit>
					<list role="unordered">
						<item>
							<codeelement>pathLength</codeelement>     - an integer that defines the distance from the root value set.  The root value set will always have a path length of 0</item>
						<item>
							<codeelement>nodeType_code</codeelement>   - a concept code drawn from the HL7 ConceptGenerality (2.16.840.1.113883.5.24) code system.  One of:
        <list role="unordered">
								<item>"S"       - a specializable node.  The concept_id in this node can be selected, but the node can also be further expanded.</item>
								<item>"A"       - an abstract node. The concept_id (if any) in this node cannot be selected. The node must be further expanded. To make a selection</item>
								<item>"L"       - a leaf node.  The concept_id in this node may be selected, but no further expansion is possible.</item>
								
							</list>
						</item>
						<item>
							<codeelement>valueSet</codeelement> - id and name (if any) of the value set associated with this node</item>
						<item>
							<codeelement>concept_id</codeelement>                       - the code system and concept code associated with this node, if any</item>
						<item>
							<codeelement>displayName</codeelement>                      - the display name used to represent this node.  </item>
						<item>
							<codeelement>isExpandable</codeelement>                - TRUE means that this node can be further expanded using the expandValueSetExpansionContext function. canExpand will only be TRUE for specializable and abstract nodes, and then only when the original lookupValueSetExpansion call was made with expandAll set to FALSE.</item>
						<item>
							<codeelement>expansionContext</codeelement> - if isExpandable is TRUE, expansionContext contains whatever is required by the specific service implementation to further expand the node in a subsequent call.  It is opaque to the client software.</item>
					</list>
					<p>
The various cases below describe how different sorts of value set definitions would be expanded.
</p>
					<p>Case 1:  Value set A references all of the codes in a non-hierarchical code system, which contains concept codes 1,2, ..N  </p>
					<table id="t14">
						<caption align="BOTTOM">ValueSetExpansion Case 1</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="137"/>
						<thead>
							<tr>
								<th>pathLength</th>
								<th>nodeType_code</th>
								<th>Concept_id</th>
								<th>displayName</th>
							</tr>
						</thead>
						<tr>
							<td> 0</td>
							<td>A (abstract)</td>
							<td>-</td>
							<td>(A).valueSet_name</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>1</td>
							<td>(1).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>2</td>
							<td>(2).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>…</td>
							<td>…</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>N</td>
							<td>(N).preferredName</td>
						</tr>
					</table>
					<p>Case 2: Value set B references all of the codes in a hierarchical code system.  The concept code hierarchy is reflected in concept id (1 is root, 1.1 is first child of root, 1.2 second child, 1.2.1 first child of first child, etc.)</p>
					<table id="t15">
						<caption align="BOTTOM">ValueSetExpansion Case 2</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="137"/>
						<thead>
							<tr>
								<th>pathLength</th>
								<th>nodeType_code</th>
								<th>Concept_id</th>
								<th>displayName</th>
							</tr>
						</thead>
						<tr>
							<td>
0</td>
							<td>A (abstract)</td>
							<td>-</td>
							<td>(B).valueSet_name</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>S (specializable)</td>
							<td>1</td>
							<td>(1).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>S (specializable)</td>
							<td>1.1</td>
							<td>(1.1).preferredName</td>
						</tr>
						<tr>
							<td>
…</td>
							<td>S (specializable)</td>
							<td>…</td>
							<td>…</td>
						</tr>
						<tr>
							<td>
n</td>
							<td>L (leaf)</td>
							<td>1.1.1..n</td>
							<td>(1.1.1.n).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>S (specializable)</td>
							<td>2</td>
							<td>(2).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>S (specializable)</td>
							<td>2.1</td>
							<td>(2.1) preferredName</td>
						</tr>
						<tr>
							<td>
…</td>
							<td>S (specializable)</td>
							<td>…</td>
							<td>…</td>
						</tr>
						<tr>
							<td>
M</td>
							<td>L (leaf)</td>
							<td>2.1..m</td>
							<td>(2.1..m).preferredName</td>
						</tr>
					</table>
					<p>Case 3: Value set C  specifically references concept codes 1,2,3 in a code system. No references include a relationship code and there is no head code.</p>
					<table id="t16">
						<caption align="BOTTOM">ValueSetExpansion Case 3</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="137"/>
						<thead>
							<tr>
								<th>pathLength</th>
								<th>nodeType_code</th>
								<th>Concept_id</th>
								<th>displayName</th>
							</tr>
						</thead>
						<tr>
							<td>
0</td>
							<td>A (abstract)</td>
							<td>-</td>
							<td>(C).valueSetName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>1</td>
							<td>(1).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>2</td>
							<td>(2).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>3</td>
							<td>(3).preferredName</td>
						</tr>
					</table>
					<p>Case 4: Value set D references concept codes  1,2,3,4 in a code system. No references include a relationship code, but concept code 4 is defined as the head code.</p>
					<table id="t17">
						<caption align="BOTTOM">ValueSetExpansion Case 4</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="137"/>
						<thead>
							<tr>
								<th>pathLength</th>
								<th>nodeType_code</th>
								<th>Concept_id</th>
								<th>displayName</th>
							</tr>
						</thead>
						<tr>
							<td>
0</td>
							<td>A (abstract)</td>
							<td>4</td>
							<td>(4).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>1</td>
							<td>(1).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>2</td>
							<td>(2).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>L (leaf)</td>
							<td>3</td>
							<td>(3).preferredName</td>
						</tr>
					</table>
					<p>Case 5: Value set E references value set D above, with includeHeadCode set to TRUE</p>
					<table id="t18">
						<caption align="BOTTOM">ValueSetExpansion Case 5</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="137"/>
						<thead>
							<tr>
								<th>pathLength</th>
								<th>nodeType_code</th>
								<th>Concept_id</th>
								<th>displayName</th>
							</tr>
						</thead>
						<tr>
							<td>
0</td>
							<td>A (abstract)</td>
							<td>-</td>
							<td>(E).valueSet_name</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>S (specializable)</td>
							<td>4</td>
							<td>(4).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>L (leaf)</td>
							<td>1</td>
							<td>(1).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>L (leaf)</td>
							<td>2</td>
							<td>(2).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>L (leaf)</td>
							<td>3</td>
							<td>(3).preferredName</td>
						</tr>
					</table>
					<p>Case 6: Value set F references value set D above, with includeHeadCode set to FALSE</p>
					<table id="t19">
						<caption align="BOTTOM">ValueSetExpansion Case 6</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="137"/>
						<thead>
							<tr>
								<th>pathLength</th>
								<th>nodeType_code</th>
								<th>Concept_id</th>
								<th>displayName</th>
							</tr>
						</thead>
						<tr>
							<td>
0</td>
							<td>A (abstract)</td>
							<td>-</td>
							<td>(F).valueSet_name</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>A (abstract)</td>
							<td>4</td>
							<td>(4).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>L (leaf)</td>
							<td>1</td>
							<td>(1).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>L (leaf)</td>
							<td>2</td>
							<td>(2).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>L (leaf)</td>
							<td>3</td>
							<td>(3).preferredName</td>
						</tr>
					</table>
					<p>Case 7: Value set G references concept codes 1.1, 2.1 and 3.1 in a hierarchical code system.  All three references use the hasSubtype relationship code.  The 1.1 reference includes the referenced code. The 2.1 reference excludes the referenced code.  The 3.1 reference has leafOnly set to true.  G has no head code.</p>
					<table id="t20">
						<caption align="BOTTOM">ValueSetExpansion Case 7</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="137"/>
						<thead>
							<tr>
								<th>pathLength</th>
								<th>nodeType_code</th>
								<th>Concept_id</th>
								<th>displayName</th>
							</tr>
						</thead>
						<tr>
							<td>
0</td>
							<td>A (abstract)</td>
							<td>-</td>
							<td>(G).valueSet_name</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>S (specializable)</td>
							<td>1.1</td>
							<td>(1.1).preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>S (specializable)</td>
							<td>1.1.1</td>
							<td>(1.1.1).preferredName</td>
						</tr>
						<tr>
							<td>
…</td>
							<td>S (specializable)</td>
							<td>1.1….</td>
							<td>…</td>
						</tr>
						<tr>
							<td>
n</td>
							<td>L (leaf)</td>
							<td>1.1…..n</td>
							<td>(1.1….n).preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>A (abstract)</td>
							<td>1.2</td>
							<td>(1.2) preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>S (specializable)</td>
							<td>1.2.1</td>
							<td>(1.2.1)preferredName</td>
						</tr>
						<tr>
							<td>
…</td>
							<td>S (specializable)</td>
							<td>1.2.1…</td>
							<td>…</td>
						</tr>
						<tr>
							<td>
m</td>
							<td>L (leaf)</td>
							<td>1.2.1…m</td>
							<td>(1.2…m)preferredName</td>
						</tr>
						<tr>
							<td>
1</td>
							<td>A (abstract)</td>
							<td>1.3</td>
							<td>(1.3) preferredName</td>
						</tr>
						<tr>
							<td>
2</td>
							<td>A (abstract)</td>
							<td>1.3.1</td>
							<td>(1.3.1) preferredName</td>
						</tr>
						<tr>
							<td>
…</td>
							<td>A (abstract)</td>
							<td>1.3.1…</td>
							<td>…</td>
						</tr>
						<tr>
							<td>
k</td>
							<td>L(leaf)</td>
							<td>1.3.1…k</td>
							<td>(1.3.1..k)preferredName</td>
						</tr>
					</table>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupValueSetExpansion</caption>
						<codefragment file="CTSMAPI.xml" section="lookupValueSetExpansion"/>
					</exhibit>
					<p>
lookupValueSetExpansion returns an expansion of the value set associated with the supplied vocabulary domain and optional context.  The entire vocabulary domain can be expanded all at once (expandAll = TRUE) or can be expanded one level at a time (expandAll  = FALSE).  If expanding one level at a time, every node that can be further expanded will have isExpandable set to TRUE, meaning that the expansionContext can be passed to expandValueSetExpansionContext for further expansion.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>vocabularyDomain_name</codeelement>    - vocabulary domain to expand</item>
						<item>
							<codeelement>applicationContext_code</codeelement>– context in which the vocabulary domain is to be expanded (optional)</item>
						<item>
							<codeelement>language_code</codeelement>    - language to be used for the returned display names</item>
						<item>
							<codeelement>expandAll</codeelement>        - TRUE means expand all nodes to their entire depth, FALSE means expand one level (default: TRUE)</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownVocabularyDomain</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownApplicationContextCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownLanguage</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">expandValueSetExpansionContext</caption>
						<codefragment file="CTSMAPI.xml" section="expandValueSetExpansionContext"/>
					</exhibit>
					<p>
expandValueSetExpansionContext takes an opaque expansionContext that was previously returned in a ValueSetExpansion entry and further expands the corresponding node. An additional level.  The return is identical to that of lookupValueSetExpansion, and all of the initial constraints, including the timeout value still apply.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>expansionContext</codeelement>- context returned by a previous lookupValueSetExpansion or expandValueSetExpansionContext call </item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>InvalidExpansionContext</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
			</div2>
			<div2 id="CTSMessBrowAPI">
				<head>CTS Message Browsing API</head>
				<p>The second part of the CTS Message API contains a set of functions that can be used to examine and browse attributes, vocabulary domains and value sets.</p>
				<div3 id="CTSMessBrowIDinfo">
					<head>Message Browser Identification Information</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Message Browser Identification</caption>
						<codefragment file="CTSMAPI.xml" section="browser"/>
					</exhibit>
					<p>
The message browser inherits the identification information from the interface described in <specref ref="CTSIndentSec"/>.
</p>
				</div3>
				<div3 id="CTSMessBrowDescSect">
					<head>Message Browser Description Section</head>
					<p>This section describes several "building block" structures that are used by the service description and then describes how the information is accessed via the service.</p>
					<div4 id="CTSMessBrowBB">
						<head>Browser Description Building Blocks</head>
						<exhibit role="codefragment">
							<caption align="BOTTOM">RIMCodedAttribute structure</caption>
							<codefragment file="CTSMAPI.xml" section="RIMCodedAttribute"/>
						</exhibit>
						<p>
RIMAttributeId uniquely identifies a coded attribute in the RIM.</p>
						<list role="unordered">
							<item>
								<codeelement>model_id</codeelement>         - the RIM model identifier</item>
							<item>
								<codeelement>class_name</codeelement>               - the name of the RIM Class</item>
							<item>
								<codeelement>attribute_name</codeelement>   - the name of the attribute within the class</item>
						</list>
						<p>The RIMCodedAttribute describes a RIM attribute.</p>
						<list role="unordered">
							<item>
								<codeelement>RIMAttribute_id</codeelement>  - the unique attribute identifier</item>
							<item>
								<codeelement>dataType_code</codeelement>    - a code that identifies the attribute data type, drawn from the HL7 DataType code system</item>
							<item>
								<codeelement>codingStrength_code</codeelement>- the attribute strength.  Drawn from the HL7 VocabularyDomainQualifier code system</item>
							<item>
								<codeelement>vocabularyDomain_name</codeelement>- the name of the vocabulary domain associated with the attribute.</item>
						</list>
						<exhibit role="codefragment">
							<caption id="CTSCodeSystemDescriptor" align="BOTTOM">CodeSystemDescriptor structure</caption>
							<codefragment file="CTSMAPI.xml" section="codeSystemDescriptor"/>
						</exhibit>
						<p>A CodeSystemDescriptor consists of a code sytem identifier, its name, any copyright information and a list of available versions.</p>
						<list role="unordered">
							<item>
								<codeelement>codeSystem_id</codeelement>    - the ISO Object Identifier (OID) of the code system
</item>
							<item>
								<codeelement>codeSystem_name</codeelement>  - the name of the code system. Unique within the HL7 Version 3 context.
</item>
							<item>
								<codeelement>copyright</codeelement>        - copyright notice for the code system, if any.  If present, the copyright should be displayed whenever code system is accessed or used.</item>
							<item>
								<codeelement>availableReleases</codeelement>- the releases of the code system that are currently supported by the service.  In the current version of this specification, at most one release may be queried for any code system.  Future versions will allow more than one however.</item>
						</list>
					</div4>
					<div4 id="CTSMessBrowID">
						<head>Browser Description</head>
						<exhibit role="codefragment">
							<caption align="BOTTOM">Message Browser Description</caption>
							<codefragment file="CTSMAPI.xml" section="browserDescription"/>
						</exhibit>
						<p>The message browser description lists all of the various entities that are supported by the particular service.</p>
						<list role="unordered">
						        <item><p>
						<codeelement>getSupportedAttributes</codeelement> - return a list of the RIM attributes that are known to the service and match the supplied criteria.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>matchText</codeelement> - If present and non-null, only RIM attributes having names that match the text will be returned.  If matchtext absent or null, all RIM attributes will be returned.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - If the matchText is present and non-null, the matchAlgorithm_code determines how the match text is applied. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchAlgorithm</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
					</item>
							<item>
								<p>
						<codeelement>getSupportedVocabularyDomains</codeelement> - return a list of the vocabulary domains that are known to the service and match the supplied criteria.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>matchText</codeelement> - If present and non-null, only vocabulary domains having names that match the text will be returned.  If matchtext absent or null, all vocabulary domains will be returned.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - If the matchText is present and non-null, the matchAlgorithm_code determines how the match text is applied. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchAlgorithm</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
</item>
							<item>
								<p>
						<codeelement>getSupportedValueSets</codeelement> - return a list of the value sets that are known to the service and match the supplied criteria.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>matchText</codeelement> - If present and non-null, only value sets having names that match the text will be returned.  If matchtext absent or null, all value sets will be returned.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - If the matchText is present and non-null, the matchAlgorithm_code determines how the match text is applied. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchAlgorithm</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
</item>
							<item>
								<p>
						<codeelement>getSupportedCodeSystems</codeelement> - return a list of the code systems that are known to the service and match the supplied criteria.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>matchText</codeelement> - If present and non-null, only code system names names that match the text will be returned.  If matchtext absent or null, all code systems will be returned.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - If the matchText is present and non-null, the matchAlgorithm_code determines how the match text is applied. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchAlgorithm</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
					</item>	
					</list>
				</div4>
				</div3>
				<div3 id="CTSLookUpVocabDom">
					<head>Look Up a Vocabulary Domain</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">VocabularyDomainDescription structure</caption>
						<codefragment file="CTSMAPI.xml" section="vocabularyDomainDescription"/>
					</exhibit>
					<p>The VocabularyDomainValueSet structure contains the description of a value set (see: <specref ref="CTSExpandVocDom"/> for details) and the context code, if any, in which the value set applies</p>
					<list role="unordered">
						<item>
							<codeelement>definedByValueSet</codeelement>	- the value set that defines a vocabulary domain in the specific application context</item>
						<item>
							<codeelement>applicationContext_code</codeelement> - the context in which the value set applies</item>
					</list>
					<p>VocabularyDomainDescription is the structure returned by the lookupVocabularyDomain function.</p>
					<list role="unordered">
						<item>
							<codeelement>vocabularyDomain_name</codeelement>    - the unique name of the vocabulary domain
</item>
						<item>
							<codeelement>description</codeelement>                      - a description of the domain
</item>
						<item>
							<codeelement>restrictsDomain_name</codeelement>     - the vocabulary domain that this domain restricts, if any
</item>
						<item>
							<codeelement>basisOfDomains</codeelement>           - a list of the domains that are restrictions of this domain, if any
</item>
						<item>
							<codeelement>constrainsAttributes</codeelement>     - a list of the RIM attributes that use this vocabulary domain, if any
</item>
						<item>
							<codeelement>representedByValueSets</codeelement>   - a list of the value sets and context that can represent this vocabulary domain, if any</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupVocabularyDomain </caption>
						<codefragment file="CTSMAPI.xml" section="lookupVocabularyDomain"/>
					</exhibit>
					<p>
lookupVocabularyDomain returns detailed information about a vocabulary domain.
</p>
					<list role="unordered">
						<item>
							<codeelement>vocabularyDomain_name</codeelement>    - the name of the vocabulary domain to look up</item>
					</list>
					<p>
Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownVocabularyDomain</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSLookUpValSet">
					<head>Look Up a Value Set</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">FullValueSetDescriptionstructure</caption>
						<codefragment file="CTSMAPI.xml" section="valueSetDescription"/>
					</exhibit>
					<p>
FullValueSetDescription includes a complete description of the value set  including the list of included concept codes and other value sets.</p>
					<p>
						<codeelement>ValueSetConstructor</codeelement>
					</p>
					<list role="unordered">
						<item>
							<codeelement>includedValueSet</codeelement> - the identifier and name, if any of a value set that is considered to be part of the containing set
</item>
						<item>
							<codeelement>includeHeadCode</codeelement>  - TRUE means that the head code, if any, of the included value set is considered to be part of the including set.  FALSE means that it isn’t.</item>
					</list>
					<p>
						<codeelement>ValueSetCodeReference</codeelement>
					</p>
					<list role="unordered">
						<item>
							<codeelement>referenced_code</codeelement>  - a concept code that is referenced by the value set
</item>
						<item>
							<codeelement>relationship_code</codeelement>-  A relationship code. If present, all of the descendants of the referenced code are consider part of the value set as well, subject to the leafOnly constraint below. If the relationship is transitive, all descendants are included in the value set.  If the relationship is not transitive, only the direct targets of the referenced code are considered.
</item>
						<item>
							<codeelement>includeReferencedCode</codeelement>- TRUE means that the referenced code itself is part of the value set. FALSE means that only the children or descendants are included. includeReferencedCode will always be TRUE when a relationship code is not supplied.
</item>
						<item>
							<codeelement>leafOnly</codeelement>         - TRUE means only include the leaf nodes of  the relationship. FALSE means include all descendant nodes except, perhaps, the referenced code itself. leafOnly must always be FALSE if no relationship_code is present.</item>
					</list>
					<p>
						<codeelement>ValueSetDescription</codeelement>
					</p>
					<list role="unordered">
						<item>
							<codeelement>idAndName-</codeelement>the value set identifier and name, if any
</item>
						<item>
							<codeelement>description</codeelement>      - a textual description of the value set and its use
</item>
						<item>
							<codeelement>definingExpression</codeelement>- an expression that defines the set contents (if any)
</item>
						<item>
							<codeelement>basedOnCodeSystem</codeelement> - the code system id, name and version used to construct the value set
</item>
						<item>
							<codeelement>allCodes</codeelement>         - TRUE means that all of the codes in the code system are included in the value set.   If TRUE, the value set mustn't reference any additional code
</item>
						<item>
							<codeelement>head_code</codeelement>- the concept code that represents the entire value set (if any)</item>
					</list>
					<p>
						<codeelement>FullValueSetDescription</codeelement>
					</p>
					<list role="unordered">
						<item>
							<codeelement>description</codeelement>              - The id, name, description, etc. of the value set
</item>
						<item>
							<codeelement>constructedUsingValueSets</codeelement>- a list of additional value sets and head code inclusions, if any, that are used to construct this set
</item>
						<item>
							<codeelement>usedToDefine</codeelement>             - a list of any other value sets that have been constructed using this set
</item>
						<item>
							<codeelement>referencesCodes</codeelement>          - a list of concept codes that this value set explicitly references.  This will be empty if allCodes is true and will not include any codes that are implicitly included from other value sets and/or concept code relationships.</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupValueSet</caption>
						<codefragment file="CTSMAPI.xml" section="lookupValueSet"/>
					</exhibit>
					<p>lookupValueSet retrieves a complete description of a value set given either a value set identifier or a value set name.
</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>valueSet_id</codeelement>              - the identifier of the value set to look up
</item>
						<item>
							<codeelement>valueSet_name</codeelement>    - the name of the value set to look up</item>
					</list>
					<p>Either the value set id, the value set name or both may be supplied.  If both are supplied, the name must correctly match the id or an error will be raised.</p>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownValueSet</exceptionRef>
						</item>
						<item>
							<exceptionRef>ValueSetNameIdMismatch</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSLookUpDetInformCodeSys">
					<head>Look up Detailed Information About a Code System</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupCodeSystem return structure</caption>
						<codefragment file="CTSMAPI.xml" section="codeSystemRegistration"/>
					</exhibit>
					<p>
						<codeelement>CodeSystemRegistration:</codeelement>
					</p>
					<list role="unordered">
						<item>
							<codeelement>sponsor</codeelement>                  - the HL7 member or organization that sponsers the registration
</item>
						<item>
							<codeelement>publisher</codeelement>        - the name of the official publisher of the code system
</item>
						<item>
							<codeelement>versionReportingMethod</codeelement>    - how new versions are created and distributed
</item>
						<item>
							<codeelement>licensingInformation</codeelement>     - licensing requirements for the code system
</item>
						<item>
							<codeelement>inUMLS</codeelement>           - TRUE means that the code system is contained in the Unified Medical Language System (UMLS)
</item>
						<item>
							<codeelement>systemSpecificLocatorInfo</codeelement>-  the meaning of this field depends upon the specific publisher.  It serves to further identify the code system information and is intended to contain things like the HL7 Version 2 table name, etc.
</item>
						<item>
							<codeelement>codeSystemType_code</codeelement>      - A concept code that specifies whether the code system is internally created and maintained by HL7 (I), externally created and maintained (E) or externally created but HL7 maintains an internal image for convenience (EI)</item>
							
					</list>
					<p>Note: The registration elements above are intended to be descriptive only.  While many of the fields (sponsor, publisher, versionReportingMethod, etc.) could have additional structure, it wasn't considered necessary within the scope of the present document</p>
					<p>
						<codeelement>CodeSystemInfo</codeelement>
					</p>
					<list role="unordered">
						<item>
							<codeelement>description</codeelement> - basic description of the code system - see: <tabref ref="CTSCodeSystemDescriptor"/>CTSCodeSystemDescriptor structure</item>
						<item>
							<codeelement>registrationInfo</codeelement> - registration information for the code system (if any)</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupCodeSystem</caption>
						<codefragment file="CTSMAPI.xml" section="lookupCodeSystem"/>
					</exhibit>
					<p>lookupCodeSystem returns detailed information for a code system given either a code system identifier (OID) or name.</p>
					<list role="unordered">
						<item>
							<codeelement>codeSystem_Id</codeelement>    - the unique code system identifier, which is usually the ISO OID
</item>
						<item>
							<codeelement>codeSystem_name</codeelement>  - the name of the code system</item>
					</list>
					<p>Either the code system id, the code system name or both may be supplied.  If both the id and name are supplied, the name must match the id or an error will be raised.</p>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>CodeSystemNameIdMismatch</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSGetValueForVocabDom">
					<head>Look up the Value Set for a Vocabulary Domain and Context</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupValueSetForDomain</caption>
						<codefragment file="CTSMAPI.xml" section="lookupValueSetForDomain"/>
					</exhibit>
					<p>
lookupValueSetForDomain returns the descriptor (id and name if any) of the value set that would be used for the supplied domain in the application context (if any).</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>vocabularyDomain_name</codeelement>    -  name of the vocabulary domain to look up
</item>
						<item>
							<codeelement>applicationContext_code</codeelement>  - application context (optional)
</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownVocabularyDomain</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownApplicationContextCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>NoApplicableValueSet</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSDetWhetConceptCode">
					<head>Determine Whether a Concept Code is in a Value Set</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">isCodeInValueSet</caption>
						<codefragment file="CTSMAPI.xml" section="isCodeInValueSet"/>
					</exhibit>
					<p>isCodeInValueSet returns true if the supplied concept identifier is included in and can be selected from the value set, false otherwise.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>valueSet_id</codeelement>              - the identifier of the value set to look up
</item>
						<item>
							<codeelement>valueSet_name</codeelement>    - the name of the value set to look up
</item>
						<item>
							<codeelement>includeHeadCode</codeelement>  - TRUE means that the head code (if there is any) is considered to be part of the set. FALSE means that the head code, if any, is excluded.
</item>
						<item>
							<codeelement>codeToValidate</codeelement>   - the code system id and concept code to test</item>
					</list>
					<p>Either the value set id, the value set name or both may be supplied.  If both are supplied, the name must correctly match the id or an error will be raised.</p>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownValueSet</exceptionRef>
						</item>
						<item>
							<exceptionRef>ValueSetNameIdMismatch</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownConceptCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
			</div2>
		</div1>
		<div1 id="CTSVocAPISpec">
			<head>Vocabulary API Model</head>
			<div2 id="CTSVocabAPIIntro">
				<head>Introduction</head>
				<p>The following sections describe the model underlying the CTS Vocabulary API.  Note that this document does not provide a complete or in-depth model of all the possible entities that might comprise a coding system<footnote>
						<p>Within this document, the term "code system" is used to designate a system of codes, descriptions, designations, properties and relationships.  Other terms that are often used to designate this entity include "vocabulary", "terminology", "coding scheme", "classification scheme" and "ontology".</p>
					</footnote>  - it only describes the classes and relationships that have a direct bearing on the contents of HL7 coded attributes from the vocabulary perspective.</p>
			</div2>
			<div2 id="CTSVocabAPICodeSys">
				<head>CodeSystem</head>
				<p>
					<exhibit role="figure">
						<caption align="BOTTOM">Code Systems</caption>
						<graphic source="ctsFig6.gif"/>
					</exhibit>
				</p>
				<p>
A <emph role="strong">CodeSystem</emph> may <emph role="underline">define</emph> zero or more <emph role="strong">CodedConcepts</emph>.  A <emph role="strong">coded concept</emph> represents a class or concept within a particular domain of discourse. Every <emph role="strong">CodedConcept</emph> must be <emph role="underline">defined in</emph> exactly one <emph role="strong">CodeSystem</emph>. Once defined, the meaning of a coded concept may not change. Existing coded concepts may be retired and new coded concepts may be added, but once defined, the meaning of a coded concept must remain static.</p>
				<p>A <emph role="strong">CodeSystem</emph> has the following attributes:</p>
				<list role="unordered">
					<item>
						<emph>codeSystem_id</emph> - a globally unique identifier for the code system.  Within the context of HL7, a<emph> codeSystemId</emph> should take the form of an ISO Object Identifier (OID).  HL7 maintains a registry of code system OIDS, and users are strongly encouraged to register any OID used in these services in the registry.
</item>
					<item>
						<emph>codeSystem_name</emph> - a short token that uniquely identifies the code system within the context of the HL7 RIM. Within HL7, code system names are recorded in a ‘code system of code systems’  associated with the <emph role="strong">CodeSystem</emph> vocabulary domain.  The <emph>name</emph> is used strictly for communication between carbon-based life forms, and <emph>codeSystemId</emph> should be used for all computer to computer communication.</item>
					<item>
						<emph>fullName</emph> - The official name of the <emph role="strong">CodeSystem</emph>. For systems that are registered in the HL7 <emph role="strong">CodeSystem</emph> vocabulary domain, <emph>fullName</emph> is the preferred English <emph role="strong">ConceptDesignation</emph> for the  <emph role="strong">CodedConcept</emph> matching the <emph role="strong">CodeSystem</emph>
						<emph> name</emph>.</item>
					<item>
						<emph>codeSystemDescription</emph> - A description of the purpose and content of the <emph role="strong">CodeSystem</emph>. For systems that are registered in the HL7 CodeSystem vocabulary domain, <emph>description</emph> is the English <emph role="strong">ConceptDescription</emph> of the <emph role="strong">CodedConcept</emph> matching the <emph role="strong">CodeSystem</emph>
						<emph> name</emph>.</item>
					<item>
						<emph>copyright</emph> - An optional copyright notice that, if present, should be displayed whenever the code system is accessed or used.</item>
				</list>
				<p>
The following attributes carry additional metadata about a code system:</p>
				<list role="unordered">
					<item>
						<emph>supportedLanguages</emph> - The list of all of the languages that are fully or partially supported byr the code system.  A "supported" language is recognized by the code system and at least some of the concept designations or properties are available in that language. All code systems must support at least one language. While the service must list all of the primary language subtags that it supports, it is optional whether it lists secondary languages.  (i.e., if it supports "en-UK", it must list "en" but may or may not list "en-UK"). The first language in the supportedLanguages list is treated as the default language for the code system.</item>
					<item>
						<emph>supportedRelations</emph> - The relations (roles) represented in the code system.  Note that the subtype relation is treated as a first-class relationship in this model (code: hasSubtype). A relation code has both a code system identifier and a concept code, so it is possible to draw relation codes from many sources.  For the purposes of interoperability, the relation codes should be drawn from the HL7 ConceptRelationship code system - OID 2.16.840.1.113883.5.1088 - whenever possible.</item>
					<item>
						<emph>supportedProperties</emph>        - The property codes supported by the code system.  Whenever possible, however, property codes should use the HL7 ConceptProperty code system (OID 2.16.840.1.113883.5.1087).  </item>
					<item>
						<emph>supportedMimeTypes</emph> - A list of the MIME types used in designations, descriptions or properties in the code system.  These codes must be drawn from the officially designated HL7 Media Type code system, which is currently OID 2.16.840.1.113883.5.79 - MediaType.  The text/plain MIME type must be supported by all code systems.</item>
					<item>supportedRelationshipQualifiers - A list of the relationship qualifiers that are recognized by the code system.</item>
				</list>
				<p>
A <emph role="strong">CodeSystem</emph> may <emph role="underline">represent</emph> zero or one <emph role="strong">CodeSystemVersion</emph> at any given point in time. <footnote>
						<p>The ability to access past release versions of a code system will be implemented in a subsequent revision of this specification.</p>
					</footnote>
				</p>
			</div2>
			<div2 id="CTSVocabAPICodedConcept">
				<head>CodedConcept</head>
				<p>
A <emph role="strong">CodedConcept</emph> is unique within the <emph role="strong">CodeSystem</emph> that <emph role="underline">defines</emph> it. A <emph role="strong">CodedConcept</emph> must be <emph role="underline">designatedBy</emph>  at least one <emph role="strong">ConceptDesignation</emph>. A <emph role="strong">ConceptDesignation</emph> must <emph role="underline">represent the intent of</emph> one or more <emph role="strong">CodedConcepts. </emph>
					<footnote>
						<p>The reason that a designation is shown as associated with more than one coded concept is to stress the fact that it is possible for more than one coded concept to share the same designation <emph>text</emph>.  The model does not making any assertions about whether a designation is a "first class object" - that is whether it has an identity beyond the textual portion.</p>
					</footnote>
					<emph role="strong">CodedConcepts</emph> may be <emph role="underline">characterizedBy</emph> zero or more <emph role="strong">ConceptProperties</emph>. A <emph role="strong">ConceptProperty</emph> may <emph role="underline">represent or define</emph> one or more <emph role="strong">CodedConcepts</emph>.  </p>
				<p>A <emph role="strong">CodedConcept</emph> may be the <emph role="underline">sourceFor</emph>  and/or the <emph role="underline">targetOf</emph> zero or more <emph role="strong">ConceptRelationships</emph>.  Relationships are described in more detail in a following section.</p>
				<p>A <emph role="strong">CodedConcept</emph> has the following attributes:</p>
				<list role="unordered">
					<item>
						<emph>code</emph>  - an identifier that uniquely names the class or "concept" within the context of the defining <emph role="strong">CodeSystem</emph>.  Once assigned, the ‘meaning’ of a concept code should never change. This document makes no assumptions one way or the other regarding more than one <emph role="strong">CodedConcept</emph> being assigned the same ‘meaning’ within a <emph role="strong">CodeSystem</emph>. </item>
					<item>
						<emph>status</emph> - represents the current status of the <emph role="strong">CodedConcept</emph> within the <emph role="strong">CodeSystem</emph>.  Concept status values are drawn from the HL7 ConceptStatus (OID: 2.16.840.1.113883.5.1086) code system. Possible status values include ‘proposed’, ‘active’, ‘deleted’ and ‘retired’.  This specification only recognizes the distinction between ‘active’ or ‘not active’ at the moment.  Concept status and versioning will be more completely addressed in a subsequent version of this specification.</item>
				</list>
			</div2>
			<div2 id="CTSVocabAPIConceptDes">
				<head>ConceptDesignation</head>
				<p>
A <emph role="strong">ConceptDesignation</emph> is a name or other textual symbol that <emph role="underline">represents the intent of</emph> zero or more <emph role="strong">CodedConcepts</emph>.  <emph role="strong">ConceptDesignations</emph> are language dependent. </p>
				<p>
					<emph role="strong">ConceptDesignation</emph> has the following attributes:</p>
				<list role="unordered">
					<item>
						<emph>designation</emph>       - A string of text that provides an external representation of a CodedConcept.</item>
					<item>
						<emph>LanguageCode</emph>             – a language code that follows the rules described in <loc href="http://www.ietf.org/rfc/rfc3066.txt"> IETF RFC 3066 – Tag for Identification of Languages</loc>.  This language code consists of multiple subtags separated by hyphens (‘-‘).  The first subtag identifies the major language code.  It must be drawn from <loc href="http://www.loc.gov/standards/iso639-2/">ISO 639.2 -Codes for the representation of names of languages--Part 1: Alpha-2 Code</loc> whenever possible. If no two character code is available, it may be drawn from <loc href="http://lcweb.loc.gov/standards/iso639-2/langhome.html">ISO 639.2 - Codes for the representation of names of languages--Part 2: Alpha-3 Code</loc>.  There are also additional escape mechanisms that aren’t described further here.<br/>
The second subtag is optional. If present, it must be 2-8 characters in length.  If two characters in length, it should contain a country code drawn from <loc href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/index.html">ISO 3166-1 Two character country codes</loc>. If the subtag is 3-8 characters long, it must come from the <loc href="http://www.iana.org/assignments/language-tags">IANA language tag registry</loc>.  Additional subtags serve to further refine the language.</item>
					<item>
						<emph>preferredForLanguage</emph>      - TRUE means that this designation should be used to <emph>represent the intent of</emph> the <emph role="strong">CodedConcept</emph> in the specified language when no other contextual information is present. Only one designation may be identified as "preferred" for any given language.</item>
				</list>
			</div2>
			<div2 id="CTSVocabAPIConceptProp">
				<head>ConceptProperty</head>
				<p>A <emph role="strong">ConceptProperty</emph> is an "attribute", "facet" or some other characteristic that may <emph role="underline">represent or help define</emph>the intended meaning of zero or more <emph role="strong">CodedConcepts</emph>. <emph role="strong">ConceptProperty</emph> has the following attributes:</p>
				<list role="unordered">
					<item>
						<emph>propertyCode</emph>       - A combination of a code system id and concept code that identifies the type of property.  Whenever possible, property codes should use the HL7 ConceptProperty code system (OID 2.16.840.1.113883.5.1087). </item>
					<item>
						<emph>propertyValue</emph>     - The textual value of the associated property.</item>
					<item>
						<emph>language_code</emph>     - A language code drawn from the code system officially designated by HL7 for such purposes, which is currently OID
2.16.840.1.113883.6.84 - <loc href="http://www.ietf.org/rfc/rfc3066.txt"> IETF RFC 3066 – Tag for Identification of Languages</loc>.  Not all  <emph role="strong">ConceptProperties</emph> have language codes and, if omitted, it is presumed that the property is of a nature that no language applies. </item>
					<item>
						<emph>mimeType_code</emph>  - A code drawn from the officially designated HL7 Media Type code system, which is currently OID 2.16.840.1.113883.5.79 - MediaType. Not all <emph role="strong">ConceptProperties</emph> will have an associated MIME type, text/plain is the default.</item>
				</list>
			</div2>
			<div2 id="CTSVocabAPIConceptRel">
				<head>ConceptRelationship</head>
				<p>
The <emph role="strong">ConceptRelationship</emph> class represents binary relationships over the set of <emph role="strong">CodedConcepts</emph>
					<emph role="underline"> defined in</emph> a single <emph role="strong">CodeSystem</emph>.<footnote>
						<p>This model is not complete and does not fully represent of the semantics of ontology and terminology systems.  The assertion of a relationship between two coded terms is obviously not sufficient to describe the semantic implication of the relationship to either the associated coded terms or instances thereof.  It is also important to note that this document makes no statement on the implications of the absence of an asserted relationship between two codes.  It is left to the discretion of the individual terminology providers to fill in the additional semantics as is appropriate for their own model and content.</p>
					</footnote>Each <emph role="strong">ConceptRelationship</emph> must <emph role="underline">have</emph> exactly one <emph role="strong">CodedConcept</emph> as a <emph role="underline">source</emph> and exactly one <emph role="strong">CodedConcept</emph> as a <emph role="underline">target.</emph>  The <emph>relationship_code</emph> attribute identifies a directed relation.  The HL7 ConceptCodeRelationship code system (OID 2.16.840.1.113883.5.1088) defines the relations that are used within the HL7 Version 3 Vocabulary. The definitions within this code system determine which concept code is the source and which the target, the transitivity, symmetry and reflexivity characteristics of the relation and the term used to represent the inverse of the relationship. </p>
				<p>
This list of relationship codes include:
</p>
				<table id="t21">
					<caption align="BOTTOM">Basic Relationship Codes</caption>
					<col width="23"/>
					<col width="20"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>Concept Code</th>
							<th>IDescription</th>
							<th>Trans</th>
							<th>Reflexive</th>
							<th>Symmetric</th>
							<th>Inverse</th>
						</tr>
					</thead>
					<tr>
						<td>hasSubtype</td>
						<td>An otherwise unspecified subtype relationship.</td>
						<td>Yes</td>
						<td>No</td>
						<td>No</td>
						<td>isSubtypeOf</td>
					</tr>
					<tr>
						<td>hasPart</td>
						<td>An otherwise unspecified partitive relationship.</td>
						<td>Yes</td>
						<td>Yes</td>
						<td>No</td>
						<td>isPartOf</td>
					</tr>
					<tr>
						<td>smallerThan</td>
						<td>A generic ordering relationship.</td>
						<td>Yes</td>
						<td>No</td>
						<td>No</td>
						<td>greaterThan</td>
					</tr>
				</table>
			</div2>
		</div1>
		<div1 id="CTSVocabAPISpec">
			<head>Vocabulary API Specification</head>
			<div2 id="CTSVocabAPISpecIntro">
				<head>Introduction</head>
				<p>
The CTS Vocabulary API (CTSVAPI) is divided into two sections - the runtime section, which defines the set of functions that are needed for everyday operation of HL7 Version 3 message software and the browsing section, which is used in the process of defining and creating HL7 vocabulary and values set/vocabulary domain content.  The browsing section is presumed to have access to the runtime API, so the functionality of the API is not reproduced in the browsing section.  Both sections share the same set of basic type definitions described below.</p>
			</div2>
			<div2 id="CTSVocabAPIBasicTypes">
				<head>Basic Types</head>
				<p>
The following table lists the basic data types that are used in the CTS Vocabulary Runtime, Vocabulary Browser  and Translation APIs.</p>
				<exhibit role="codefragment">
					<caption align="BOTTOM">Basic Types</caption>
					<codefragment file="CTSVAPI.xml" section="basicData"/>
				</exhibit>
				<list role="unordered">
					<item>
						<codeelement>OID</codeelement>    - An ISO Object Identifier (OID).
</item>
					<item>
						<codeelement>Description</codeelement>              - A textual description of an object or entity. Some descriptions can be quite lengthy and impelementations will need to take this fact into account
</item>
					<item>
						<codeelement>CTSVersionId</codeelement>     - The version identifier of a Common Terminology Services (CTS) implementation.  Version 1.0 would be major: 1 minor: 0
</item>
					<item>
						<codeelement>CodeSystemId</codeelement>     - A unique code system identifier. In the HL7 context, this should be the ISO Object Identifier (OID) assigned by HL7, if one exists.  This does not preclude, however, the use of other identifiers such as a DCE UUID in a non-HL7 contexts. In this case, however, it is the responsibility of the implementor to reconcile any namespace conflicts.
</item>
					<item>
						<codeelement>CodeSystemName</codeelement>   - A short mnemonic or name for a code system.  CodeSystemName is unique within the HL7 Version 3 namespace, but this cannot be counted on in situations outside of HL7 control.
</item>
					<item>
						<codeelement>ConceptCode</codeelement>              - A code that uniquely identifies a class or concept within the context of a code system.
</item>
					<item>
						<codeelement>ConceptId</codeelement>        - the combination of a CodeSystemId and a ConceptCode that is used to provide a globally unique identifier for a concept
</item>
					<item>
						<codeelement>VersionId</codeelement>        - a unique version identifier.  Typically, version identifiers have some sort of ordering that allows people and/or software to determine which order identifiers come in.
</item>
					<item>
						<codeelement>CodeSystemVersion</codeelement>- a version identifier for a code system.
</item>
					<item>
						<codeelement>ExpansionContext</codeelement> - an opaque sequence of bytes used to transfer context between the service and the client.</item>
				</list>
				<div3 id="CTSVocabAPICodedDataElem">
					<head>Coded Data Elements</head>
					<p>This section describes the coded data elements used in the vocabulary API</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Vocabulary Coded Elements</caption>
						<codefragment file="CTSVAPI.xml" section="conceptCodes"/>
					</exhibit>
					<list role="unordered">
						<item>
							<codeelement>LanguageCode</codeelement>     – a code for a spoken or written language that follows the rules described in <loc href="http://www.ietf.org/rfc/rfc3066.txt"> IETF RFC 3066 – Tag for Identification of Languages</loc>.  This language code consists of multiple subtags separated by hyphens (‘-‘).  The first subtag identifies the major language code.  It must be drawn from <loc href="http://www.loc.gov/standards/iso639-2/">ISO 639.2 -Codes for the representation of names of languages--Part 1: Alpha-2 Code</loc> whenever possible. If no two character code is available, it may be drawn from <loc href="http://lcweb.loc.gov/standards/iso639-2/langhome.html">ISO 639.2 - Codes for the representation of names of languages--Part 2: Alpha-3 Code</loc>.  There are also additional escape mechanisms that aren’t described further here.<br/>
The second subtag is optional. If present, it must be 2-8 characters in length.  If two characters in length, it should contain a country code drawn from <loc href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/index.html">ISO 3166-1 Two character country codes</loc>. If the subtag is 3-8 characters long, it must come from the <loc href="http://www.iana.org/assignments/language-tags">IANA language tag registry</loc>.  Additional subtags serve to further refine the language.</item>
						<item>
							<codeelement>MimeTypeCode</codeelement> - A mime type drawn from <loc href="http://www.ietf.org/rfc/rfc2045.txt">IETF RFC2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</loc>.  HL7 also maintains a subset of the Mime type codes in the Media Type code system, OID 2.16.840.1.113883.5.79 - MediaType.
</item>
						<item>
							<codeelement>ConceptStatusCode</codeelement>-  the status of a concept within a code system (active, retired, etc.)
</item>
						<item>
							<codeelement>PropertyCode</codeelement>     - a property that may be associated with concepts in a code system.
</item>
						<item>
							<codeelement>RelationshipCode</codeelement> - identifies a particular relation as it occurs in a code system.  Relationship codes must be drawn from the HL7 ConceptRelationship code system whenever possible.
</item>
						<item>
							<codeelement>MapQualityCode</codeelement>   - the general "quality" of a concept mapping (exact, broader, narrower, etc.)
</item>
						<item>
							<codeelement>RelationQualifierCode</codeelement>    - qualifier for a concept relationship.</item>
						<item>
							<codeelement>MatchAlgorithmCode	-</codeelement>a code for an algorithm used for string matching and comparison.</item>
					</list>
					<p>The following table lists the code systems and OIDS that are used in the CTS VAPI messages.</p>
					<table id="t22">
						<caption>Coded Data Element OIDS and Names</caption>
						<col width="23"/>
						<col width="20"/>
						<col width="137"/>
						<thead>
							<tr>
								<th>VAPI Data Element</th>
								<th>Code System OID</th>
								<th>Code System Name</th>
							</tr>
						</thead>
						<tr>
							<td>LanguageCode</td>
							<td>2.16.840.1.113883.6.99</td>
							<td>ISO639-1</td>
						</tr>
						<tr>
							<td>LanguageCode</td>
							<td>2.16.840.1.113883.6.100</td>
							<td>ISO639-2</td>
						</tr>
						<tr>
							<td>MimeTypeCode</td>
							<td>2.16.840.1.113883.5.79</td>
							<td>MediaType</td>
						</tr>
						<tr>
							<td>ConceptStatusCode</td>
							<td>2.16.840.1.113883.5.1086</td>
							<td>ConceptStatusCode</td>
						</tr>
						<tr>
							<td>PropertyCode        </td>
							<td>2.16.840.1.113883.5.1087    </td>
							<td>ConceptProperty</td>
						</tr>
						<tr>
							<td>RelationshipCode    </td>
							<td>2.16.840.1.113883.5.1088    </td>
							<td>ConceptCodeRelationship</td>
						</tr>
						<tr>
							<td>MapQualityCode      </td>
							<td>2.16.840.1.113883.5.1093    </td>
							<td>TranslationQuality</td>
						</tr>
						<tr>
							<td>RelationQualifierCode</td>
							<td>-</td>
							<td>-</td>
						</tr>
						<tr>
							<td>MatchAlgorithmCode</td>
							<td>2.16.840.1.113883.5.1094</td>
							<td>MatchAlgorithm</td>
						</tr>
					</table>
				</div3>
				<div3 id="CTSVocabAPIServicesID">
					<head>Service Identification Section</head>
					<p>The vocabulary runtime and browsing API both inherit a common identification interface.</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Common Identification Interface</caption>
						<codefragment file="CTSVAPI.xml" section="identification"/>
					</exhibit>
					<p>The service identification describes the service implementation - its name, version, description and which CTS version it is implementing.  It is possible for any identification access call to raise an <exceptionRef>UnexpectedError</exceptionRef> exception.</p>
					<list role="unordered">
						<item>
							<codeelement>getServiceName</codeelement> - returns the name given to the service by the service provider.
</item>
						<item>
							<codeelement>getServiceVersion</codeelement>- returns a version identifier specific to the service implementation
</item>
						<item>
							<codeelement>getServiceDescription</codeelement>    - a  description of the service, author, purpose, etc.
</item>
						<item>
							<codeelement>getCTSVersion</codeelement>   - the specific CTS version that the service implements (e.g. 1.0)</item>
					</list>
				</div3>
				<div3 id="CTSVocabAPIExceptions">
					<head>Exceptions</head>
					<p>The following table contains the exceptions that can be raised by one or more of the methods described in this section.  An exception is an abnormal condition that prevents a method invocation from completing.  Exceptions involving communications, operating system, database, etc. errors are not included in the list below, and it is assumed that the mechanisms for handling this type of error will already be addressed by the language and/or communications subsystem used in the implementation.</p>
					<p>
The exceptions described below assume that the baseline exception includes a text field where the specific details of the exception can be spelled out.  The additional attributes below provide further information beyond this basic text.</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Vocabulary API Exceptions</caption>
						<codefragment file="CTSVAPI.xml" section="exceptions"/>
					</exhibit>
					<list role="unordered">
						<exception name="UnexpectedError" section="CTSMessAPISpec"/>
						<exception name="UnknownCodeSystem"> - the code system identifier isn't recognized by the service.</exception>
						<exception name="UnknownConceptCode"> - the code system identifier was recognized, but the concept_code wasn’t defined in the code system.</exception>
						<exception name="UnknownPropertyCode">  - property_code isn’t supported by the code system
</exception>
						<exception name="UnknownLanguageCode"> - language_code isn’t supported by the code system
</exception>
						<exception name="UnknownRelationshipCode">           - relationship_code isn’t supported by the code system
</exception>
						<exception name="UnknownRelationQualifier">  - relationQualifier_code isn’t supported by the code system
</exception>
						<exception name="UnknownMimeTypeCode">             - mimeType_code isn’t  supported by the code system
</exception>
						<exception name="NoApplicableDesignationFound">      - no designation could be found for concept_id in language language_code
</exception>
						<exception name="CodeSystemNameIdMismatch">  - codeSystem_name doesn’t identify the same code system as codeSystem_id, or it doesn’t name a code system at all.
</exception>
						<exception name="BadlyFormedMatchText">              - matchText can’t be parsed by the service</exception>
						<exception name="TimeoutError" section="CTSMessAPISpec"/>
						<exception name="UnknownMatchAlgorithm" section="CTSMessAPISpec"/>
					</list>
				</div3>
			</div2>
			<div2 id="CTSVocabRTAPI">
				<head>The CTS Vocabulary Runtime API</head>
				<p>This section describes the attributes and methods of the runtime section of the CTS Vocabulary API.</p>
				<exhibit role="codefragment">
					<caption align="BOTTOM">Vocabulary Runtime Service</caption>
					<codefragment file="CTSVAPI.xml" section="runtime"/>
				</exhibit>
				<div3 id="CTSVocabRTAPICodeSys">
					<head>Code Systems Supported by the API</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">CodeSystem Information Structure</caption>
						<codefragment file="CTSVAPI.xml" section="codeSystemIdAndVersions"/>
					</exhibit>
					<list role="unordered">
						<item>
							<codeelement>codeSystem_id</codeelement>     - the unique code system identifier, which is usually the ISO OID.
</item>
						<item>
							<codeelement>codeSystem_name</codeelement>  - the official name of the code system.
</item>
						<item>
							<codeelement>copyright</codeelement>        - copyright notice associated with code system, if any.
</item>
						<item>
							<codeelement>codeSystem_versions</codeelement>- the version or versions of the code system that are supported by this service.  This list may be empty if the code system doesn’t support individual version identifiers.</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">getSupportedCodeSystems</caption>
						<codefragment file="CTSVAPI.xml" section="getSupportedCodeSystems"/>
					</exhibit>
					<p>getSupportedCodeSystems provides a list of all code systems and versions supported by the service. </p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client nust assume that there were additional items that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSVocabRTAPILookCodeSys">
					<head>Look up Identifying Information About a Code System</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupCodeSystemInfo return structure</caption>
						<codefragment file="CTSVAPI.xml" section="codeSystemInfo"/>
					</exhibit>
					<list role="unordered">
						<item>
							<codeelement>codeSystem</codeelement>               - the code system id, name and supported version(s)
</item>
						<item>
							<codeelement>fullName</codeelement>- the complete name of the code system
</item>
						<item>
							<codeelement>codeSystemDescription</codeelement>- the description of the code system contents
</item>
						<item>
							<codeelement>supportedLanguages</codeelement>- a list of all of the languages supported by the service for the code system.  A "supported" language is recognized by the code system and at least some of the concept designations or properties are available in that language. All code systems must support at least one language. While the service must list all of the primary language subtags that it supports, it is optional whether it lists secondary languages.  (i.e., if it supports "en-UK", it must list "en" but may or may not list "en-UK"). The first language in the supportedLanguages list is treated as the default language for the code system.
</item>
						<item>
							<codeelement>supportedRelations</codeelement>- a list of all of the relationship codes supported by the service for the code system.  A "supported" relationship is recognized by the code system and the code system is able to determine whether any two concept codes in the code system are or are not related to each other under this relationship.  A non-hierarchical code system doesn’t need to support any relationships.  Subsumption is represented by the hasSubtype relationship code.
</item>
						<item>
							<codeelement>supportedProperties</codeelement>- a list of all of the properties supported by the service for the code system.  A "supported" property means that the code system recognizes the property and at least one coded concept is associated with this property and an optional value.
</item>
						<item>
							<codeelement>supportedMimeTypes</codeelement>- a list of the mime types supported by the code system.  All code systems must support the "text/plain" mime type, even if there are no properties associated with it.
</item>
						<item>
							<codeelement>supportedRelationQualifiers</codeelement>- a list of the relationship qualifiers supported by the code system (if any).</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupCodeSystemInfo</caption>
						<codefragment file="CTSVAPI.xml" section="lookupCodeSystemInfo"/>
					</exhibit>
					<p>
lookupCodeSystemInfo takes a code system identifier (OID) and/or name and returns a detailed description of the code system and elements that are supported by the service.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>codeSystem_id</codeelement>    - the iso OID of the code system
</item>
						<item>
							<codeelement>codeSystem_name</codeelement>  - the unique code system name   </item>
					</list>
					<p>
Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>CodeSystemNameIdMismatch</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSVocabRTAPIValiConcept">
					<head>Validate a Concept Identifier</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">isConceptIdValid</caption>
						<codefragment file="CTSVAPI.xml" section="isConceptIdValid"/>
					</exhibit>
					<p>
isConceptIdValid determines whether the supplied concept identifier is valid.</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>concept_id</codeelement>               - the code system and concept code to validate
</item>
						<item>
							<codeelement>activeConceptsOnly</codeelement>- TRUE means that only active concepts are considered valid.  FALSE means that any concept code known to the code system is ok.</item>
					</list>
					<p>
Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSVocabRTAPILookupDesigforcon">
					<head>Look up a Designation for a Concept Identifier</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">StringAndLanguage Structure</caption>
						<codefragment file="CTSVAPI.xml" section="stringAndLanguage"/>
					</exhibit>
					<p>
The StringAndLanguage structure contains both the text and associated language code.  The two part structure exists because it is possible for the language returned by lookupDesignation and other operations to be different than the requested language.  As an example, the client may request the designation for a concept in the en-scouse (English Liverpudlian dialect) and the service may return a designation in unqualified English (en).  The client software may need to know that the returned value doesn’t exactly match the requested value.</p>
					<p>
Some programming language bindings may already include the language code as part of the return value (e.g. XML/SOAP).  For the sake of consistency, the language_code field should be carried in those bindings even if it is redundant.</p>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupDesignation</caption>
						<codefragment file="CTSVAPI.xml" section="lookupDesignation"/>
					</exhibit>
					<p>lookupDesignation returns the most appropriate designation for the supplied concept identifier in the specified language. If language_code is blank or null,  the default code system language will be used.  lookupDesignation will first attempt to find a designation that exactly matches the supplied language. If no matches are found, it will remove the rightmost subtag, if any and try again.  This process will be repeated until a matching designation is found or only the primary subtag remains.  As an example, "en-UK-south" would match "en-UK-south", "en-UK" and "en" in that order.  It would not match "en-US" or "fr".</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>concept_id</codeelement>                - the code system id and concept code
</item>
						<item>
							<codeelement>language_code</codeelement>     - the desired language of the returned designation</item>
					</list>
					<p>
Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownLanguageCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownConceptCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>NoApplicableDesignationFound</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
					<div4 id="CTSVocabRTAPIlookupDesigMatch">
						<head>lookupDesignation Matching Rules</head>
						<p>
							<loc href="http://www.ietf.org/rfc/rfc3066.txt">RFC 3066, Tags for the Identification of Languages</loc> specifies a multipart language code.  The first part is derived from the two or three character language codes as specified in ISO 639, with two character codes taking precedence to three in the case of duplicates.  The second part of the language code, the subtag, specifies the country, region or other variant.</p>
						<list role="ordered">
							<item>Determine whether the primary language code is supported by the code system and, if not, raise UnknownLanguageCode
</item>
							<item>If a designation with a exactly matching language code and preferredForLanguage set to true is located, return it.
</item>
							<item>If there are any designations that exactly match the language code and preferredForLanguage is set to false return the alphabetically earliest of these designations.
</item>
							<item>If the language code has one or more secondary subtags, remove the rightmost tag and repeat steps 1 and 2
</item>
							<item>If the language code doesn’t have a second subtag raise NoApplicableDesignationFound.</item>
						</list>
					</div4>
				</div3>
				<div3 id="CTSVocabRTAPIDetWheterTwoConcodes">
					<head>Determine Whether Two Concept Codes are Related</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">areCodesRelated</caption>
						<codefragment file="CTSVAPI.xml" section="areCodesRelated"/>
					</exhibit>
					<p>
Determine whether the supplied concept codes are related</p>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>codeSystem_id</codeelement>    - the code system of the parent and child codes
</item>
						<item>
							<codeelement>source_code</codeelement>              - the concept code that occurs as the source of the relationship
</item>
						<item>
							<codeelement>target_code</codeelement>               - the concept code that occurs as the target of the relationship
</item>
						<item>
							<codeelement>relationship_code</codeelement> - the concept code that identifies the relationship
</item>
						<item>
							<codeelement>relationQualifiers</codeelement> - an optional list of relationship qualifier codes.  If the relationQualifiers list contains one or more qualifier codes, only relationship entries that that have qualifiers that match all of the qualifiers in the list will be considered.
</item>
						<item>
							<codeelement>directRelationsOnly</codeelement>- TRUE means test direct relationships only, FALSE means that the transitive closure of the relationship is to be tested if the relationship is transitive.  If the relationship is not transitive, the result is the same no matter the setting of this flag.</item>
					</list>
					<p>areCodesRelated returns TRUE if one of the following conditions holds:
</p>
					<list role="ordered">
						<item>There is a direct relationship of type relationship_code between source_code and target_code according to the specified code system.
</item>
						<item>There is a direct relationship of type relationship_code between target_code and source_code according to the specified code system and the relationship is defined as symmetric.
</item>
						<item>Source_code equals target code and the relationship is reflexive.
</item>
						<item>directRelationsOnly is FALSE, relationship_code is transitive and there is a relationship of type relationship_code between source_code and target_code in the forward transitive closure of relationship_code starting at source_code.
</item>
						<item>directRelationsOnly is FALSE, relationship_code is transitive and symmetric and there is a relationship of type relationship_code between target_code and source_code in the backwards transitive closure of relationship_code starting at source_code</item>
					</list>
					<p>
Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownConceptCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownRelationshipCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownRelationQualifier</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
			</div2>
			<div2 id="CTSVocabBrowsingAPI">
				<head>The CTS Vocabulary Browsing API</head>
				<p>
The CTS Vocabulary Browser module may be implemented separately or in combination with the CTS Vocabulary Messaging module.  The browsing functions are designed to provide additional capabilities that are more appropriate in an authoring and browsing environment where performance isn’t an absolutely critical requirement.</p>
				<p>
The CTS Vocabulary Browsing API uses the same basic types as the runtime API, which are defined in <specref ref="CTSVocabAPIBasicTypes"/>.
This section describes the attributes and methods of the browser section of the CTS Vocabulary API.</p>
				<exhibit role="codefragment">
					<caption align="BOTTOM">Vocabulary Browser Service</caption>
					<codefragment file="CTSVAPI.xml" section="browser"/>
				</exhibit>
				<p>The browser inherits the basic attributes of the Identification section, which is described in <specref ref="CTSVocabAPIServicesID"/>
				</p>
				<div3 id="CTSVocabBrowsingAPICodeSystSupt">
					<head>Code Systems Supported by the API</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Supported Browser Properties</caption>
						<codefragment file="CTSVAPI.xml" section="browserSupport"/>
					</exhibit>
					<p>getSupportedCodeSystems provides a list of all code systems and versions supported by the service.  The CodeSsytemIdAndVersionsList structure is defined in <specref ref="CTSVocabRTAPICodeSys"/>
					</p>
					<list role="unordered">
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSVocabBrowsingAPISearchConCodesbyTxt">
					<head>Search for Concept Codes by Designation Text</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupConceptCodesByDesignation</caption>
						<codefragment file="CTSVAPI.xml" section="lookupConceptCodesByDesignation"/>
					</exhibit>
					<p>
Return a list of concept identifiers having matching designation(s)and criteria</p>
					<list role="unordered">
						<item>
							<codeelement>codeSystem_id</codeelement> - code system to be searched.
</item>
						<item>
							<codeelement>matchText</codeelement> - If present and non-null, only vocabulary domains having names that match the text.  If matchtext absent or null, all vocabulary domains will be returned.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - If the matchText is present and non-null, the matchAlgorithm_code determines how the match text is applied. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>language_code</codeelement>     - if supplied, restrict the search to designations with this language only.  (Default: Search all languages).  Language code matches will not be more general than the supplied language_code.  If, for example, "en" is passed as the language code, it will match designations with a language of "en", "en-UK", "en-UK-south", etc.  If, however, "en-UK-south" is passed as the language code, only concepts having designations in that specific language will be returned.
</item>
						<item>
							<codeelement>activeConceptsOnly</codeelement>- TRUE means match active concept codes only, FALSE means match any concept code in the code system (Default: TRUE)
</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownLanguageCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSVocabBrowsingAPISearchConCodesbyProp">
					<head>Search for Concept Codes by Property</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupConceptCodesByProperty</caption>
						<codefragment file="CTSVAPI.xml" section="lookupConceptCodesByProperty"/>
					</exhibit>
					<p>Return a list of concept identifiers having one or more properties with values that match the supplied match text string and other criteria:</p>
					<list role="unordered">
						<item>
							<codeelement>codeSystem_id</codeelement> - code system to be searched.
</item>
						<item>
							<codeelement>matchText</codeelement> - the text to search for.  The format and syntax of matchText depends upon the matchAlgorithmCode.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - The match algorithm to use when comparing the match text with the target designations. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>language_code</codeelement>     - if supplied, restrict the search to designations with this language only.  (Default: Search all languages).  Language code matches will not be more general than the supplied language_code.  If, for example, "en" is passed as the language code, it will match designations with a language of "en", "en-UK", "en-UK-south", etc.  If, however, "en-UK-south" is passed as the language code, only concepts having designations in that specific language will be returned.
</item>
						<item>
							<codeelement>activeConceptsOnly</codeelement>- TRUE means match active concept codes only, FALSE means match any concept code in the code system (Default: TRUE)
</item>
						<item>
							<codeelement>properties</codeelement>- list of properties codes to be searched.  (Default: search all properties)
</item>
						<item>
							<codeelement>mimeTypes</codeelement>- list of mime types to search.  (Default: search all MIME types)</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>Exceptions:</p>
					<list role="ordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownLanguageCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownPropertyCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMimeTypeCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSVocabBrowsingAPIRetComplDesc">
					<head>Return a Complete Description of a Coded Concept</head>
					<p>The following structures are all used to build the complete coded concept description return structure</p>
					<div4 id="CTSVocabBrowsingAPIConceptDesignation">
						<head>ConceptDesignation Structure</head>
						<exhibit role="codefragment">
							<caption align="BOTTOM">ConceptDesignation structure</caption>
							<codefragment file="CTSVAPI.xml" section="conceptDesignation"/>
						</exhibit>
						<list role="unordered">
							<item>
								<codeelement>designation</codeelement>              - a designation for a coded concept
</item>
							<item>
								<codeelement>language_code</codeelement>    - the language of the designation
</item>
							<item>
								<codeelement>preferredForLanguage</codeelement>- TRUE means that this designation should be used for the supplied language unless other criteria apply. At most, one designation may be marked as preferred for a given concept and language.</item>
						</list>
					</div4>
					<div4 id="CTSVocabBrowsingAPIConceptProperty">
						<head>ConceptProperty Structure</head>
						<exhibit role="codefragment">
							<caption align="BOTTOM">ConceptProperty structure</caption>
							<codefragment file="CTSVAPI.xml" section="conceptProperty"/>
						</exhibit>
						<list role="unordered">
							<item>
								<codeelement>property_code</codeelement>     - a concept code that identifies a particular property
</item>
							<item>
								<codeelement>propertyValue</codeelement>    - the value of this property for a given concept
</item>
							<item>
								<codeelement>language_code</codeelement>     - the language of the propertyValue (optional)
</item>
							<item>
								<codeelement>mimeTypeCode</codeelement>     - the MIME type of the propertyValue (default: text/plain)</item>
						</list>
					</div4>
					<div4 id="CTSVocabBrowsingAPICompCodedCon">
						<head>CompleteCodedConceptDescription Structure</head>
						<exhibit role="codefragment">
							<caption align="BOTTOM">ConceptRelationship structure</caption>
							<codefragment file="CTSVAPI.xml" section="conceptRelationship"/>
						</exhibit>
						<list role="unordered">
							<item>
								<codeelement>sourceConcept_id</codeelement>- the concept identifier (code system id and concept code) of the source concept in the relationship.</item>
							<item>
								<codeelement>relationship_code</codeelement>- the relationship code.</item>
							<item>
								<codeelement>relationQualifiers-</codeelement>an optional list of qualifier codes that further refine or otherwise qualify the relationship entry.
</item>
							<item>
								<codeelement>targetConcept_id</codeelement> - concept identifier (code system id and concept code) of the target of the relationship.</item>
						</list>
						<exhibit role="codefragment">
							<caption align="BOTTOM">CompleteCodedConceptDescription structure</caption>
							<codefragment file="CTSVAPI.xml" section="completeCodedConceptDescription"/>
						</exhibit>
						<list role="unordered">
							<item>
								<codeelement>concept_id</codeelement>                - the code system identifier and concept code being retrieved.
</item>
							<item>
								<codeelement>conceptStatus_code</codeelement>- the status of the concept in the given code system version.
</item>
							<item>
								<codeelement>codeSystem_version</codeelement>- the version of the code system that the description was drawn from.
</item>
							<item>
								<codeelement>designatedBy</codeelement>      - a list of all of the designations for the coded concept.
</item>
							<item>
								<codeelement>hasProperties</codeelement>     - a list of all of the properties of the coded concept excluding the ConceptDesignation properties.
</item>
							<item>
								<codeelement>sourceFor</codeelement>                - a list of all of the relationships in which this concept plays the role of "source".
</item>
							<item>
								<codeelement>targetOf</codeelement>         - a list of all of the relationships in which this concept plays the role of "target".</item>
						</list>
						<exhibit role="codefragment">
							<caption align="BOTTOM">lookupCompleteCodedConcept</caption>
							<codefragment file="CTSVAPI.xml" section="lookupCompleteCodedConcept"/>
						</exhibit>
						<p>lookupCompleteCodedConcept returns a structure containing everything that is known about a given concept code (from the CTS perspective).</p>
						<p>Parameters:</p>
						<list role="unordered">
							<item>
								<codeelement>concept_id</codeelement>- a code system identifier and concept code</item>
						</list>
						<p>
Exceptions:</p>
						<list role="unordered">
							<item>
								<exceptionRef>UnknownCodeSystem</exceptionRef>
							</item>
							<item>
								<exceptionRef>UnknownConceptCode</exceptionRef>
							</item>
							<item>
								<exceptionRef>UnexpectedError</exceptionRef>
							</item>
						</list>
					</div4>
				</div3>
				<div3 id="CTSVocabBrowsingAPILkupDesigConCode">
					<head>Look up Designations for a Specific Concept Code</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Look up concept designations</caption>
						<codefragment file="CTSVAPI.xml" section="lookupDesignations"/>
					</exhibit>
					<p>
lookupDesignations returns selected designations for the supplied concept.  The matching rules for lookupDesignations are identical to those defined in <specref ref="CTSVocabBrowsingAPISearchConCodesbyTxt"/>. The ConceptDesignationList return structure is described in <specref ref="CTSVocabBrowsingAPIConceptDesignation"/>.</p>
					<list role="unordered">
						<item>
							<codeelement>concept_id</codeelement>                - the code system identifier and concept code to look up
</item>
						<item>
							<codeelement>matchText</codeelement> - the text to search for.  The format and syntax of matchText depends upon the matchAlgorithmCode.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - The match algorithm to use when comparing the match text with the target designations. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>language_code</codeelement>     - if supplied, restrict the search to this language only.  (Default: Search all languages)</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownConceptCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchAlgorithm</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownLanguageCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSVocabBrowsingAPILkupPropConCode">
					<head>Look up Properties for a Concept Code</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Look up concept properties</caption>
						<codefragment file="CTSVAPI.xml" section="lookupProperties"/>
					</exhibit>
					<p>lookupProperties returns selected properties for the supplied concept. Properties, matchText language_code and mimeTypes properties follow the same rules as those in lookupConceptCodesByProperty. The ConceptPropertyList return structure is described in <specref ref="CTSVocabBrowsingAPIConceptProperty"/>.</p>
					<list role="unordered">
						<item>
							<codeelement>concept_id</codeelement>- the code system identifier and concept code to get the properties for
</item>
						<item>
							<codeelement>properties</codeelement>- a list of properties to search.  If omitted or empty, all properties are searched.
</item>
						<item>
							<codeelement>matchText</codeelement> - the text to search for.  The format and syntax of matchText depends upon the matchAlgorithmCode.</item>
						<item>
							<codeelement>matchAlgorithm_code</codeelement> - The match algorithm to use when comparing the match text with the target designations. See <specref ref="CTSMatchAlgorithm"/> for details.</item>
						<item>
							<codeelement>language_code</codeelement>     - if supplied, restrict the search to this language only.  (Default: Search all languages)</item>
						<item>mimeTypes - list of mime types to search.  (Default: search all MIME types)</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownConceptCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>BadlyFormedMatchText</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMatchAlgorithm</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownLanguageCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownPropertyCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownMimeTypeCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
				</div3>
				<div3 id="CTSVocabBrowsingAPIRetListConCode">
					<head>Return a List of Related ConceptCodes</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">lookupCodeExpansion return structure</caption>
						<codefragment file="CTSVAPI.xml" section="relatedCode"/>
					</exhibit>
					<p>Parameters:</p>
					<list role="unordered">
						<item>
							<codeelement>pathLength</codeelement>      - an integer that defines the distance from the codeToExpand in hops.  The root node will always have a path length of 0.</item>
						<item>
							<codeelement>concept_code</codeelement>     - related concept code
</item>
						<item>
							<codeelement>designation</codeelement>              - the preferred designation for code in the appropriate language and usage context, or the default designation if none is stated explicitly as being preferred
</item>
						<item>
							<codeelement>relationQualifiers</codeelement>               - list of relationship qualifiers that apply to this node
</item>
						<item>
							<codeelement>canExpand</codeelement>         - TRUE means that there are additional concept codes directly related to concept_code that can be further expanded.
</item>
						<item>
							<codeelement>expansionContext</codeelement>- if canExpand is true, this field contains an opaque context that can be used to further expand the code in this node.</item>
					</list>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Look up a hierarchical code expansion</caption>
						<codefragment file="CTSVAPI.xml" section="lookupCodeExpansion"/>
					</exhibit>

lookupCodeExpansion returns a flattened list of codes that have relationship relationship_code to expandConcept_id.concept_code in the code system named by expandConcept_id.codeSystem_id.
<list role="unordered">
						<item>
							<codeelement>expandConcept_id</codeelement>  - code system identifier and concept code to be expanded.  If the relationship_code is "hasSubtype" and souceToTarget is true, the concept code can be omitted, meaning that we want all "root" concepts in the subtype relationship - all concepts that do not appear as the target of one or more hasSubtype relationships.
</item>
						<item>
							<codeelement>relationship_code</codeelement> - relationship to be expanded
</item>
						<item>
							<codeelement>sourceToTarget</codeelement>- TRUE means expand from source to target.  FALSE means expand from target to source.
</item>
						<item>
							<codeelement>directRelationsOnly</codeelement>- if TRUE or relationship_code is not transitive, only the direct targets (or sources if sourceToTarget is FALSE) of expandConcept_id are returned.  If FALSE and relationship_code is transitive, descendants or ancestors are returned as well.
</item>
						<item>
							<codeelement>designationlanguage_code</codeelement>    - language that the returned concept designations should be in
</item>
						<item>
							<codeelement>timeout</codeelement> - The time, in milliseconds, that the client is willing to wait for this operation to be completed.  A timeout value of 0 means that there is no time limit on the operation.</item>
						<item>
							<codeelement>sizeLimit</codeelement> - The maximum number of elements that the service may return.  If exactly sizeLimit items are returned, the client assume that there were additional itemes that weren't returned.  A sizeLimit of 0 indicates that the number of items that may be returned is unlimited.</item>
					</list>
					<p>A depth-first tree-walk is used to return the descendants or ancestors of the node. if a node occurs in more than one branch, it is replicated for the return structure.  If directRelationsOnly is false, the relationship is transitive, and there is a cycle in the relationship structure, expansion will stop at the last non-repeating node.  canExpand will be set to true for this node which will allow the client to manually descend the cyclic structure if it chooses, one cycle at a time.</p>
					<p>language_code is used to determine which designation to return in the RelatedCode structure. The rules for determining the correct designation are the same as in the lookupDesignation method, except that this method doesn't throw a NoApplicableDesignationFound exception.  If there isn't an applicable designation for a particular node, the designation field will contain an empty string.</p>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>UnknownCodeSystem</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownConceptCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownRelationshipCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnknownLanguageCode</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
					<div4 id="CTSVocabBrowsingAPILkupCodeExpansion">
						<head>lookupCodeExpansion detail</head>
						<p>In the diagram below, the vertices represent an arbitrary transitive relationship with the arrows pointing from the source concepts to the target concepts.</p>
						<p>
							<exhibit role="figure">
								<caption align="BOTTOM">Sample Graph for lookupCodeExpansion examples</caption>
								<graphic source="ctsFig7.gif"/>
							</exhibit>
						</p>
						<p>

The following tables show the values that would be returned from lookupCodeExpansion using the information described in the figure above and the supplied parameters.</p>
						<table id="t21">
							<caption align="BOTTOM">lookupCodeExpansion(expandConcept_id=D, sourceToTarget=TRUE, directRelationsOnly=TRUE)</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>1</td>
								<td>E</td>
								<td>TRUE</td>
								<td>(ecE)</td>
							</tr>
							<tr>
								<td>1</td>
								<td>F</td>
								<td>TRUE</td>
								<td>(ecF)</td>
							</tr>
							<tr>
								<td>1</td>
								<td>I</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>1</td>
								<td>J</td>
								<td>TRUE</td>
								<td>(ecJ)</td>
							</tr>
						</table>
						<p>
							<br/>
							<br/>
						</p>
						<table id="t22">
							<caption align="BOTTOM">lookupCodeExpansion (expandConcept_id=D, sourceToTarget=TRUE, directRelationsOnly=FALSE)</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>1</td>
								<td>E</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>G</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>3</td>
								<td>H</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>1</td>
								<td>F</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>G</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>3</td>
								<td>H</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>1</td>
								<td>I</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>1</td>
								<td>J</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>K</td>
								<td>TRUE</td>
								<td>(ecK)</td>
							</tr>
							<tr>
								<td>3</td>
								<td>M</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
						</table>
						<p>Note that node 2K was returned in the example above as expandable because a cycle was detected.</p>
						<p>
							<br/>
							<br/>
						</p>
						<table id="t23">
							<caption align="BOTTOM">lookupCodeExpaionsion (expandConcept_id=D, sourceToTarget=FALSE, directRelationsOnly=FALSE)</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>1</td>
								<td>B</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>A</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>1</td>
								<td>C</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>K</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>1</td>
								<td>J</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>D</td>
								<td>TRUE</td>
								<td>(ecD)</td>
							</tr>
						</table>
						<p>
							<br/>
							<br/>
						</p>
						<table id="t24">
							<caption align="BOTTOM">lookupCodeExpansion (expandConcept_id=, sourceToTarget=TRUE, directRelationsOnly=TRUE)</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>1</td>
								<td>A</td>
								<td>TRUE</td>
								<td>(ecA)</td>
							</tr>
							<tr>
								<td>1</td>
								<td>L</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
						</table>
						<p>
							<br/>
							<br/>
						</p>
						<table id="t25">
							<caption align="BOTTOM">lookupCodeExpansion (expandConcept_id =, sourceToTarget=TRUE, directRelationsOnly=FALSE)</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>1</td>
								<td>L</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>1</td>
								<td>A</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>B</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>3</td>
								<td>D</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>4</td>
								<td>E</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>5</td>
								<td>G</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>6</td>
								<td>H</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>4</td>
								<td>F</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>5</td>
								<td>G</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>6</td>
								<td>H</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>4</td>
								<td>I</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>4</td>
								<td>J</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>5</td>
								<td>K</td>
								<td>TRUE</td>
								<td>(ecK)</td>
							</tr>
							<tr>
								<td>6</td>
								<td>M</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>C</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>3</td>
								<td>D</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>4</td>
								<td>E</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>5</td>
								<td>G</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>6</td>
								<td>H</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>4</td>
								<td>F</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>5</td>
								<td>G</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>6</td>
								<td>H</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>4</td>
								<td>I</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>4</td>
								<td>J</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>5</td>
								<td>K</td>
								<td>TRUE</td>
								<td>(ecK)</td>
							</tr>
							<tr>
								<td>6</td>
								<td>M</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
							<tr>
								<td>2</td>
								<td>C</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
						</table>
						<p>
							<br/>
							<br/>
						</p>
						<table id="t26">
							<caption align="BOTTOM">lookupCodeExpansion (expandConcept_id =, sourceToTarget=FALSE, directRelationsOnly=FALSE)</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>1</td>
								<td>H</td>
								<td>TRUE</td>
								<td>(ecH)</td>
							</tr>
							<tr>
								<td>1</td>
								<td>I</td>
								<td>TRUE</td>
								<td>(ecI)</td>
							</tr>
							<tr>
								<td>1</td>
								<td>M</td>
								<td>TRUE</td>
								<td>(ecM)</td>
							</tr>
							<tr>
								<td>1</td>
								<td>L</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
						</table>
						<p>
							<br/>
							<br/>
						</p>
						<table id="t27">
							<caption align="BOTTOM">lookupCodeExpansion (expandConcept_id=L, sourceToTarget=TRUE, directRelationsOnly=FALSE)</caption>
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>-   </td>
								<td>-   </td>
								<td>-   </td>
								<td>-</td>
							</tr>
						</table>
					</div4>
				</div3>
				<div3 id="CTSVocabBrowsingAPIFurtExpRetNode">
					<head>Further Expand a Returned Node</head>
					<exhibit role="codefragment">
						<caption align="BOTTOM">Further expand a previously expanded node</caption>
						<codefragment file="CTSVAPI.xml" section="expandCodeExpansionContext"/>
					</exhibit>
					<p>
expandCodeExpansionContext further expands a RelatedCodeList node that was returned by a previous lookupCodeExpansion or expandCodeExpansionContext call. </p>
					<list role="unordered">
						<item>
							<codeelement>contextToExpand</codeelement>- an opaque identifier that was returned in an expansionContext attribute of a RelatedCodeList node in a previous lookupCodeExpansion or expandCodeExpansionContext call</item>
					</list>
					<p>Exceptions:</p>
					<list role="unordered">
						<item>
							<exceptionRef>InvalidExpansionContext</exceptionRef>
							<p>Note: expansion contexts are not necessarily permanent.  The temporal validity of an expansion context is a function of the specific service implementation.</p>
						</item>
						<item>
							<exceptionRef>NoApplicableDesignationFound</exceptionRef>
						</item>
						<item>
							<exceptionRef>TimeoutError</exceptionRef>
						</item>
						<item>
							<exceptionRef>UnexpectedError</exceptionRef>
						</item>
					</list>
					<div4 id="CTSVocabBrowsingAPIexpandCodeExpDet">
						<head>expandCodeExpansionContext  Detail</head>
						<p>
Extending the examples in <specref ref="CTSVocabBrowsingAPIRetListConCode"/>.</p>
						<p>
1)      expandCodeExpansionContext( (expandContext=ecE) using ecE returned by example one in the previous section</p>
						<table id="t30">
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>1</td>
								<td>G</td>
								<td>TRUE</td>
								<td>(ecG)</td>
							</tr>
						</table>
						<p>     Note that the path length is continued from the previous call.</p>
						<p>2)   expandCodeExpansionContext( (expandContext=ecG) using ecG returned by the immediately preceeding call</p>
						<table id="t30">
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
							</thead>
							<tr>
								<td>1</td>
								<td>H</td>
								<td>FALSE</td>
								<td>-</td>
							</tr>
						</table>
						<p>3)   expandCodeExpansionContext (expandContext=ecK) following example 2 in the previous section would yield:</p>
						<table id="t31">
							<col width="23"/>
							<col width="20"/>
							<col width="137"/>
							<thead>
								<tr>
									<th>pathLength</th>
									<th>concept_code</th>
									<th>canExpand</th>
									<th>expansionContext</th>
								</tr>
								<tr>
									<td>3</td>
									<td>D</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>4</td>
									<td>E</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>5</td>
									<td>G</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>6</td>
									<td>H</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>4</td>
									<td>F</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>5</td>
									<td>G</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>6</td>
									<td>H</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>4</td>
									<td>I</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>4</td>
									<td>J</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
								<tr>
									<td>5</td>
									<td>K</td>
									<td>TRUE</td>
									<td>(ecK)</td>
								</tr>
								<tr>
									<td>6</td>
									<td>M</td>
									<td>FALSE</td>
									<td>-</td>
								</tr>
							</thead>
						</table>
					</div4>
				</div3>
			</div2>
		</div1>
		<div1 id="CTScodeTranMod">
			<head>Code Mapping Model</head>
			<div2 id="CTScodeTransModIntro">
				<head>Introduction</head>
				<p>HL7 messaging software may need to map from local concepts to the standardized codes used in the HL7 messaging environment, or between different standardized code sets. The Code Mapping API provides an interface for performing these mappings.  Note that the mapping model in this version of the specification is quite limited, and there is no way to map one source code into multiple target codes.  It is anticipated that the mapping functionality will be expanded in a later version of this specification.</p>
				<p>
					<exhibit role="figure">
						<caption align="BOTTOM">CTS Code Mapping Model</caption>
						<graphic source="ctsFig8.gif"/>
					</exhibit>
				</p>
			</div2>
			<div2 id="CTScodeTransCodeSysTrans">
				<head>CTS Code Mapping</head>
				<p>
A <emph role="strong">CodeMap</emph> maps some or all of the concept codes <emph role="underline">from</emph> a source <emph role="strong">CodeSystem</emph>
					<emph role="underline"> to</emph> the closest corresponding concept code in the target <emph role="strong">CodeSystem</emph>. A <emph role="strong">CodeMap</emph> is unidirectional - mapping from the source to the target does not imply the ability to map from the target back to the source.  A <emph role="strong">CodeMap</emph> may optionally identify the <emph role="underline">from</emph> or <emph role="underline">to</emph> versions of the code systems being translated. </p>
				<p>A <emph role="strong">CodeMap</emph> '<emph role="underline">contains</emph>' one or more <emph role="strong">MapEntries</emph>.  Note that the representation of this in this document is strictly symbolic and is not intended to specify how code mappings are actually performed.</p>
				<p>Each <emph role="strong">CodeMap</emph> is identified by a unique<emph> map_name</emph>. It is possible for there to be more than one <emph role="strong">CodeMap</emph> between the same source and target <emph role="strong">CodeSystems</emph>. Each <emph role="strong">CodeMap</emph> has an optional<emph> mapDescription</emph> attribute that describes the source of the translation, when it was created, how it was done, etc.</p>
			</div2>
			<div2 id="CTScodeTransTransEntry">
				<head>MapEntry</head>
				<p>
A <emph role="strong">TranslationEntry</emph> represents a translation from the <emph>fromCode</emph> concept code in the source <emph role="strong">CodeSystem</emph> to a corresponding <emph>toCode</emph> concept code in the target <emph role="strong">CodeSystem</emph>. <emph>mapQuality_code</emph> signifies the 'quality' of the translation from the source code to the target code, and can be one of "exact", "narrower", "broader" or "partial overlap".  </p>
			</div2>
		</div1>
		<div1 id="CTScodeTranSpec">
			<head>Code Mapping Specification</head>
			<div2 id="CTScodeTransSpecIntro">
				<head>Introduction</head>
				<p>
The Code Mapping Interface supports the map of concept codes in one or more source code systems into their equivalent codes in a target system.
</p>
			</div2>
			<div2 id="CTScodeTransSpecId">
				<head>Mapping Service Identification</head>
				<exhibit role="codefragment">
					<caption align="BOTTOM">Code Mapping Identification</caption>
					<codefragment file="CTSVAPI.xml" section="mapping"/>
				</exhibit>
			</div2>
			<div2 id="CTScodeTranSpecSupTrans">
				<head>Code Map</head>
				<exhibit role="codefragment">
					<caption align="BOTTOM">Code Map Description</caption>
					<codefragment file="CTSVAPI.xml" section="supportedMap"/>
				</exhibit>
				<p>
a CodeMap identifies a particular mapping</p>
				<list role="unordered">
					<item>
						<codeelement>map_name			-</codeelement>the unique name of the particular code map.</item>
					<item>
						<codeelement>fromCodeSystem_id</codeelement>        - the ISO OID of the source code system .
</item>
					<item>
						<codeelement>fromCodeSystem_name</codeelement>      - the name of the source code system.
</item>
					<item>
						<codeelement>fromCodeSystem_version</codeelement>   - the version of the source code system used in the map (optional).
</item>
					<item>
						<codeelement>toCodeSystem_id</codeelement>           - the ISO OID of the target code system.
</item>
					<item>
						<codeelement>toCodeSystem_name</codeelement>         - the name of the target code system.
</item>
					<item>
						<codeelement>toCodeSystem_version</codeelement>     - the version of the target code system used in the map (optional).
</item>
					<item>
						<codeelement>description</codeelement>               - a description of the map (source, version, date, location, etc.)
</item>
				</list>
				<exhibit role="codefragment">
					<caption align="BOTTOM">Get Supported Code Maps</caption>
					<codefragment file="CTSVAPI.xml" section="supportedMaps"/>
				</exhibit>
				<p>getSupportedMaps returns the set of code maps that are supported by this particular service.  Note that code maps are not symmetric.  The fact that a service supports a map from code system A to code system B does not imply that it also supports a map in the reverse direction.
</p>
			</div2>
			<div2 id="CTScodeTranExceptions">
				<head>Exceptions</head>
				<p>The following table contains the exceptions that can be raised by one or more of the methods described in this chapter.  An exception is an abnormal condition that prevents a method invocation from completing.  Exceptions involving communications, operating system, database, etc. errors are not included in the list below, and it is assumed that the mechanisms for handling this type of error will already be addressed by the language and/or communications subsystem used in the implementation.</p>
				<p>
The exceptions described below assume that the baseline exception includes a text field where the specific details of the exception can be spelled out.  The additional attributes below provide further information beyond this basic text.</p>
				<exhibit role="codefragment">
					<caption align="BOTTOM">Code Mapping Exceptions</caption>
					<codefragment file="CTSVAPI.xml" section="mapExceptions"/>
				</exhibit>
				<list role="unordered">
					<exception name="UnknownCodeSystem" section="CTSVocabAPISpec"/>
					<exception name="UnknownConceptCode" section="CTSVocabAPISpec"/>
					<exception name="MappingNotAvailable"> -  the service doesn’t support translation between fromCodeSystem_id and toCodeSystem_id.</exception>
					<exception name="UnableToMap"> - the service wasn’t able to perform the requested mapping.</exception>
					<exception name="UnknownMapName"> - the supplied map name isn't recognized by the service.</exception>
					<exception name="AmbiguousMapRequest"> - there is more than one possible code map between the supplied source and target code systems.  <emph>possible_maps</emph> contains the list of applicable map names.</exception>
					<exception name="MapNameSourceMismatch"> - the code system id supplied in the fromConcept_id parameter didn't match the source code system id in the map named in map_name.</exception>
					<exception name="MapNameTargetMismatch"> - the code system id supplied in the toCodeSystem_id parameter didn't match the target code system id in the map named in map_name.</exception>
					<exception name="UnexpectedError" section="CTSMessAPISpec"/>
				</list>
			</div2>
			<div2 id="CTScodeTranSpecTranConCode">
				<head>Map a Concept Code</head>
				<exhibit role="codefragment">
					<caption align="BOTTOM">mapConceptCode Output Structure</caption>
					<codefragment file="CTSVAPI.xml" section="mappedConceptCode"/>
				</exhibit>
				<list role="unordered">
					<item>
						<codeelement>mappedConcept_id</codeelement>- a code system identifier and concept code.
</item>
					<item>
						<codeelement>mapQuality_code</codeelement>- a code representing the ‘quality’ of the mapping operation, such as exact, broader, narrower, etc.
</item>
				</list>
				<exhibit role="codefragment">
					<caption align="BOTTOM">Map a concept code</caption>
					<codefragment file="CTSVAPI.xml" section="mapConceptCode"/>
				</exhibit>
				<p>mapConceptCode maps the supplied code system id and concept code to the corresponding code (if any) in the target system. fromConcept_id must be supplied. Either toCodeSystem_id, map_name or both may be specified. If only map_name is supplied, toCodeSystem_id is determined by the name.  If both parameters are supplied, they must be in agreement.</p>
				<p>Parameters:</p>
				<list role="unordered">
					<item>
						<codeelement>fromConcept_id</codeelement>   - code system id and concept code to be mapped
</item>
					<item>
						<codeelement>toCodeSystem_id</codeelement>  - code system id of the mapping target
</item>
					<item>
						<codeelement>map_name</codeelement> - name of the map to use</item>
				</list>
				<p>Exceptions:</p>
				<list role="unordered">
					<item>
						<exceptionRef>UnknownCodeSystem</exceptionRef>
					</item>
					<item>
						<exceptionRef>UnknownConceptCode</exceptionRef>
					</item>
					<item>
						<exceptionRef>MappingNotAvailable</exceptionRef>
					</item>
					<item>
						<exceptionRef>UnknownMapName</exceptionRef>
					</item>
					<item>
						<exceptionRef>AmbiguousMapRequest</exceptionRef>
					</item>
					<item>
						<exceptionRef>MapNameSourceMismatch</exceptionRef>
					</item>
					<item>
						<exceptionRef>MapNameTargetMismatch</exceptionRef>
					</item>
					<item>
						<exceptionRef>UnableToMap</exceptionRef>
					</item>
					<item>
						<exceptionRef>UnexpectedError</exceptionRef>
					</item>
				</list>
			</div2>
		</div1>
		<div1 id="CTSLangBind">
			<head>CTS Programming Language Bindings (Informative)</head>
			<div2 id="CTSLangBindIDLJava">
				<head>Translating from IDL into Java</head>
				<p>
The interface signatures for CTS have been specified using the interface definition language as specified in <emph>ISO/IEC 14750:1999 -- Open Distributed Processing -- Interface Definition Language (IDL)</emph>. The Object Management Group (OMG) has specified mappings between IDL and many common programming languages, including ADA, C, C++, COBOL, Java, Lisp, PL/1, Python, and Smalltalk. Bindings also exist between IDL and the Microsoft Common Object Model (COM).</p>
				<p>
Unfortunately, these language mappings are not completely independent of the underlying CORBA architecture.  As an example, in the Java language mapping:</p>
				<list role="unordered">
					<item>Exception classes extend org.omg.CORBA.UserException and invoke it as a superclass with [class]Helper.id() as an argument.
</item>
					<item>Struct classes implement org.omg.CORBA.portable.IDLEntity
</item>
					<item>Interface classes are named [class]Operations.java
</item>
					<item>Many additional support files are created ( [class]Holder.java, [class]Helper.java., _[class]Stub.java, [class]POA.java, [class]POATie.java</item>
				</list>
				<p>It isn’t a difficult task, however, to remove these CORBA remnants, yielding an implementation-neutral interface specification.  </p>
				<p>The steps used to get from IDL to the target languages of SOAP and Java are:</p>
				<list role="ordered">
					<item>Transform the IDL into Java:<br/>
        java com.sun.tools.corba.se.idl.toJavaPortable.Compile -fallTIE -pkgPrefix types org.hl7 -pkgPrefix CTSMAPI org.hl7 -pkgPrefix CTSVAPI org.hl7  CTSVAPI.idl</item>
					<item>Remove the baseline interface files - those with corresponding ‘xxxOperations.java’.  As an example, the file ‘Browser.java’ is removed because there is a corresponding ‘BrowserOperations.java’.</item>
					<item>Remove all of the output files that end in  ‘Holder.java’, ‘Helper.java’, ‘Stub.java’,  ‘POA.java’ and ‘POATie.java’
</item>
					<item>Replace "extends org.omg.CORBA.UserException" with "extends java.lang.Exception" and remove all super invocations from the exception class constructors.</item>
					<item>Change the comments from /* to /** so that they are included in the Java doc.<br/>
The references to org.omg.CORBA.portable.IDLEntity are not removed, as they reference an empty class that may still be useful to distinguish different types.</item>
				</list>
				<p>
The Figures below show samples of these transformations:</p>
				<exhibit role="example">
					<caption align="BOTTOM">Structure Declaration in IDL</caption>
					<pre>
/* CTS Specification Version Identifier */
        struct CTSVersionId {
                short   major;
                short   minor;
        };
</pre>
				</exhibit>
				<exhibit role="example">
					<caption align="BOTTOM">Structure Declaration in Java</caption>
					<pre>
package org.hl7.CTSVAPI;


/**
* org/hl7/CTSVAPI/CTSVersionId.java .
* Generated by the IDL-to-Java compiler (portable), version "3.1"
* from idl/CTSVAPI.idl
* Monday, March 8, 2004 11:17:26 PM CST
*/


/**
 *$lt;PRE>CTS Specification Version Identifier &lt;/PRE>
 */
public final class CTSVersionId implements org.omg.CORBA.portable.IDLEntity
{
  public short major = (short)0;
  public short minor = (short)0;

  public CTSVersionId ()
  {
  } // ctor

  public CTSVersionId (short _major, short _minor)
  {
    major = _major;
    minor = _minor;
  } // ctor

} // class CTSVersionId

</pre>
				</exhibit>
				<exhibit role="example">
					<caption align="BOTTOM">Exception Declaration in IDL</caption>
					<pre>

/*
 * A property code was used that wasn't valid for the code system
 */
        exception UnknownPropertyCode {
                PropertyCode            property_code;
        };
</pre>
				</exhibit>
				<exhibit role="example">
					<caption align="BOTTOM">Exception Declaration in Java</caption>
					<pre>
package org.hl7.CTSVAPI;


/**
* org/hl7/CTSVAPI/UnknownPropertyCode.java .
* Generated by the IDL-to-Java compiler (portable), version "3.1"
* from idl/CTSVAPI.idl
* Monday, March 8, 2004 11:17:26 PM CST
*/

public final class UnknownPropertyCode extends java.lang.Exception
{
  public String property_code = null;

  public UnknownPropertyCode ()
  {
    // super(UnknownPropertyCodeHelper.id());
  } // ctor

  public UnknownPropertyCode (String _property_code)
  {
    // super(UnknownPropertyCodeHelper.id());
    property_code = _property_code;
  } // ctor


  public UnknownPropertyCode (String $reason, String _property_code)
  {
    // super(UnknownPropertyCodeHelper.id() + "  " + $reason);
    property_code = _property_code;
  } // ctor

} // class UnknownPropertyCode
</pre>
				</exhibit>
				<exhibit role="example">
					<caption align="BOTTOM">Interface Declaration in IDL</caption>
					<pre>
/*************************************************
 *      Code mapping interface                   *
 *                                               *
 * The code mapping interface represents one     *
 * or more mappings between code systems         *
 *************************************************/
        interface CodeMapping : Identification {

/* List of mappings supported by the service */
                CodeMapList getSupportedMaps() raises (UnexpectedError);


/* Map a concept code from one code system into the closest equivalent (if any)
 * in the target code system
 *      fromConcept_id                   - The code system / concept code to map
 *      toCodeSystem_id                  - The target code system
 *	map_name			 - Name of the map to use.  Can be omitted if there is only one possible map
 *					   from the fromConcept_id code system to the toCodeSystem_id.
 *
 *      Returns                         - Mapped concept in target system
 *
 *      Exceptions
 *              UnknownCodeSystem       - Either the from or the to code system isn't supported
 *                                        by this map service
 *              UnknownConceptCode      - The concept code to be mapped isn't part of the code system
 *              MappingNotAvailable     - There is not a map from the supplied concept code to the
 *                                        target code system.
 *
 *		UnableToMap      	- The requested concept code could not be mapped
 *		UnknownMapName		- mapping_name is not understood by the service
 *		MapSourceMismatch	- source code system id in map didn't match fromConcept_id code system
 *		MapTargetMismatch	- target code system id in map didn't match targetCodeSystem_id in call
 *		AmbiguousMapRequest	- There is more than one possible map between the source concept and target
 *		UnexpectedError		- An unspecified error occurred that prevented successful completion
 *					  of the request
 */
                MappedConceptCode mapConceptCode(
                        in ConceptId                    fromConcept_id,
                        in CodeSystemId                 toCodeSystem_id,
                        in string			map_name
                        )
                        raises ( UnknownCodeSystem,
                                 UnknownConceptCode,
                                 MappingNotAvailable,
                                 UnknownMapName,
                                 AmbiguousMapRequest,
                                 MapNameSourceMismatch,
                                 MapNameTargetMismatch,
                                 UnableToMap,
                                 UnexpectedError);
        };
</pre>
				</exhibit>
				<exhibit role="example">
					<caption align="BOTTOM">Interface Declaration in Java</caption>
					<pre>
package org.hl7.CTSVAPI;


/**
* org/hl7/CTSVAPI/CodeMappingOperations.java .
* Generated by the IDL-to-Java compiler (portable), version "3.1"
* from idl/CTSVAPI.idl
* Monday, March 8, 2004 11:17:27 PM CST
*/


/*************************************************
 *      Code mapping interface                   *
 *                                               *
 * The code mapping interface represents one     *
 * or more mappings between code systems         *
 *************************************************/
public interface CodeMappingOperations  extends org.hl7.CTSVAPI.IdentificationOperations
{

  /**
 *&lt;PRE>List of mappings supported by the service &lt;/PRE>
 */
  org.hl7.CTSVAPI.CodeMap[] getSupportedMaps () throws org.hl7.CTSVAPI.UnexpectedError;

  /**
 *&lt;PRE>Map a concept code from one code system into the closest equivalent (if any)
   * in the target code system
   *      fromConcept_id                   - The code system / concept code to map
   *      toCodeSystem_id                  - The target code system
   *	map_name			 - Name of the map to use.  Can be omitted if there is only one possible map
   *					   from the fromConcept_id code system to the toCodeSystem_id.
   *
   *      Returns                         - Mapped concept in target system
   *
   *      Exceptions
   *              UnknownCodeSystem       - Either the from or the to code system isn't supported
   *                                        by this map service
   *              UnknownConceptCode      - The concept code to be mapped isn't part of the code system
   *              MappingNotAvailable     - There is not a map from the supplied concept code to the
   *                                        target code system.
   *
   *		UnableToMap      	- The requested concept code could not be mapped
   *		UnknownMapName		- mapping_name is not understood by the service
   *		MapSourceMismatch	- source code system id in map didn't match fromConcept_id code system
   *		MapTargetMismatch	- target code system id in map didn't match targetCodeSystem_id in call
   *		AmbiguousMapRequest	- There is more than one possible map between the source concept and target
   *		UnexpectedError		- An unspecified error occurred that prevented successful completion
   *					  of the request
   &lt;/PRE>
 */
  org.hl7.CTSVAPI.MappedConceptCode mapConceptCode (org.hl7.CTSVAPI.ConceptId fromConcept_id, String toCodeSystem_id, String map_name)
  		throws org.hl7.CTSVAPI.UnknownCodeSystem, org.hl7.CTSVAPI.UnknownConceptCode, org.hl7.CTSVAPI.MappingNotAvailable,
  		       org.hl7.CTSVAPI.UnknownMapName, org.hl7.CTSVAPI.AmbiguousMapRequest, org.hl7.CTSVAPI.MapNameSourceMismatch,
  		       org.hl7.CTSVAPI.MapNameTargetMismatch, org.hl7.CTSVAPI.UnableToMap, org.hl7.CTSVAPI.UnexpectedError;
} // interface CodeMappingOperations

</pre>
				</exhibit>
			</div2>
			<div2 id="CTSLangBindIDLWSDL">
				<head>Translating from IDL to WSDL</head>
				<p>
The Apache Axis 1.1 java2wsdl compiler is used to transform the Java into WSDL.  An example invocation method for CTSVAPI would be:</p>
				<exhibit role="example">
java org.apache.axis.wsdl.Java2WSDL -n urn://HL7.org/CTSVAPI -i org.hl7.refImpl.CTSVAPI -lhttp://localhost:8080/axis/services/CTSVAPIService org.hl7.CTSVAPI
</exhibit>
				<exhibit role="example">
					<caption align="BOTTOM">Interface Declaration in WSDL</caption>
					<pre>
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;wsdl:definitions targetNamespace="urn://hl7.org/CTSVAPI" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap"
                     xmlns:impl="urn://hl7.org/CTSVAPI" xmlns:intf="urn://hl7.org/CTSVAPI" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
                     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
                     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	&lt;wsdl:types>
		&lt;schema targetNamespace="urn://hl7.org/CTSVAPI" xmlns="http://www.w3.org/2001/XMLSchema">
			&lt;import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			&lt;complexType name="SupportedMap">
				&lt;sequence>
					&lt;element name="map_name" nillable="true" type="xsd:string"/>
					&lt;element name="mapDescription" nillable="true" type="xsd:string"/>
					&lt;element name="fromCodeSystem_id" nillable="true" type="xsd:string"/>
					&lt;element name="fromCodeSystem_name" nillable="true" type="xsd:string"/>
					&lt;element name="fromCodeSystem_version" nillable="true" type="xsd:string"/>
					&lt;element name="toCodeSystem_id" nillable="true" type="xsd:string"/>
					&lt;element name="toCodeSystem_name" nillable="true" type="xsd:string"/>
					&lt;element name="toCodeSystem_version" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="ArrayOfSupportedMap">
				&lt;complexContent>
					&lt;restriction base="soapenc:Array">
						&lt;attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SupportedMap[]"/>
					&lt;/restriction>
				&lt;/complexContent>
			&lt;/complexType>
			&lt;complexType name="UnexpectedError">
				&lt;sequence>
					&lt;element name="possible_cause" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="ConceptId">
				&lt;sequence>
					&lt;element name="codeSystem_id" nillable="true" type="xsd:string"/>
					&lt;element name="concept_code" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="MappedConceptCode">
				&lt;sequence>
					&lt;element name="mappedConcept_id" nillable="true" type="impl:ConceptId"/>
					&lt;element name="mapQuality_code" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="MappingNotAvailable">
				&lt;sequence>
					&lt;element name="fromCodeSystem_id" nillable="true" type="xsd:string"/>
					&lt;element name="toCodeSystem_id" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="UnableToMap">
				&lt;sequence/>
			&lt;/complexType>
			&lt;complexType name="UnknownConceptCode">
				&lt;sequence>
					&lt;element name="concept_code" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="UnknownCodeSystem">
				&lt;sequence>
					&lt;element name="codeSystem_id" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="UnknownMapName">
				&lt;sequence>
					&lt;element name="map_name" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="AmbiguousMapRequest">
				&lt;sequence>
					&lt;element maxOccurs="unbounded" name="possible_maps" nillable="true" type="xsd:string"/>
				&lt;/sequence>
			&lt;/complexType>
			&lt;complexType name="CTSVersionId">
				&lt;sequence>
					&lt;element name="major" type="xsd:short"/>
					&lt;element name="minor" type="xsd:short"/>
				&lt;/sequence>
			&lt;/complexType>
		&lt;/schema>
	&lt;/wsdl:types>
	&lt;wsdl:message name="UnknownMapName">
		&lt;wsdl:part name="fault" type="impl:UnknownMapName"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="AmbiguousMapRequest">
		&lt;wsdl:part name="fault" type="impl:AmbiguousMapRequest"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="getServiceDescriptionResponse">
		&lt;wsdl:part name="getServiceDescriptionReturn" type="xsd:string"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="MappingNotAvailable">
		&lt;wsdl:part name="fault" type="impl:MappingNotAvailable"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="getServiceVersionRequest">

   &lt;/wsdl:message>
	&lt;wsdl:message name="getSupportedMapsResponse">
		&lt;wsdl:part name="getSupportedMapsReturn" type="impl:ArrayOfSupportedMap"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="UnknownConceptCode">
		&lt;wsdl:part name="fault" type="impl:UnknownConceptCode"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="UnexpectedError">
		&lt;wsdl:part name="fault" type="impl:UnexpectedError"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="UnknownCodeSystem">
		&lt;wsdl:part name="fault" type="impl:UnknownCodeSystem"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="UnableToMap">
		&lt;wsdl:part name="fault" type="impl:UnableToMap"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="getCTSVersionRequest">

   &lt;/wsdl:message>
	&lt;wsdl:message name="getServiceNameResponse">
		&lt;wsdl:part name="getServiceNameReturn" type="xsd:string"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="getServiceNameRequest">

   &lt;/wsdl:message>
	&lt;wsdl:message name="getServiceDescriptionRequest">

   &lt;/wsdl:message>
	&lt;wsdl:message name="mapConceptCodeRequest">
		&lt;wsdl:part name="fromConcept_id" type="impl:ConceptId"/>
		&lt;wsdl:part name="toCodeSystem_id" type="xsd:string"/>
		&lt;wsdl:part name="map_name" type="xsd:string"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="mapConceptCodeResponse">
		&lt;wsdl:part name="mapConceptCodeReturn" type="impl:MappedConceptCode"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="getSupportedMapsRequest">

   &lt;/wsdl:message>
	&lt;wsdl:message name="getCTSVersionResponse">
		&lt;wsdl:part name="getCTSVersionReturn" type="impl:CTSVersionId"/>
	&lt;/wsdl:message>
	&lt;wsdl:message name="getServiceVersionResponse">
		&lt;wsdl:part name="getServiceVersionReturn" type="xsd:string"/>
	&lt;/wsdl:message>
	&lt;wsdl:portType name="CodeMappingOperations">
		&lt;wsdl:operation name="getSupportedMaps">
			&lt;wsdl:input message="impl:getSupportedMapsRequest" name="getSupportedMapsRequest"/>
			&lt;wsdl:output message="impl:getSupportedMapsResponse" name="getSupportedMapsResponse"/>
			&lt;wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="mapConceptCode" parameterOrder="fromConcept_id toCodeSystem_id map_name">
			&lt;wsdl:input message="impl:mapConceptCodeRequest" name="mapConceptCodeRequest"/>
			&lt;wsdl:output message="impl:mapConceptCodeResponse" name="mapConceptCodeResponse"/>
			&lt;wsdl:fault message="impl:AmbiguousMapRequest" name="AmbiguousMapRequest"/>
			&lt;wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/>
			&lt;wsdl:fault message="impl:UnableToMap" name="UnableToMap"/>
			&lt;wsdl:fault message="impl:MappingNotAvailable" name="MappingNotAvailable"/>
			&lt;wsdl:fault message="impl:UnknownMapName" name="UnknownMapName"/>
			&lt;wsdl:fault message="impl:UnknownConceptCode" name="UnknownConceptCode"/>
			&lt;wsdl:fault message="impl:UnknownCodeSystem" name="UnknownCodeSystem"/>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="getCTSVersion">
			&lt;wsdl:input message="impl:getCTSVersionRequest" name="getCTSVersionRequest"/>
			&lt;wsdl:output message="impl:getCTSVersionResponse" name="getCTSVersionResponse"/>
			&lt;wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="getServiceDescription">
			&lt;wsdl:input message="impl:getServiceDescriptionRequest" name="getServiceDescriptionRequest"/>
			&lt;wsdl:output message="impl:getServiceDescriptionResponse" name="getServiceDescriptionResponse"/>
			&lt;wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="getServiceName">
			&lt;wsdl:input message="impl:getServiceNameRequest" name="getServiceNameRequest"/>
			&lt;wsdl:output message="impl:getServiceNameResponse" name="getServiceNameResponse"/>
			&lt;wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="getServiceVersion">
			&lt;wsdl:input message="impl:getServiceVersionRequest" name="getServiceVersionRequest"/>
			&lt;wsdl:output message="impl:getServiceVersionResponse" name="getServiceVersionResponse"/>
			&lt;wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/>
		&lt;/wsdl:operation>
	&lt;/wsdl:portType>
	&lt;wsdl:binding name="CodeMappingServiceSoapBinding" type="impl:CodeMappingOperations">
		&lt;wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		&lt;wsdl:operation name="getSupportedMaps">
			&lt;wsdlsoap:operation soapAction=""/>
			&lt;wsdl:input name="getSupportedMapsRequest">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:input>
			&lt;wsdl:output name="getSupportedMapsResponse">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:output>
			&lt;wsdl:fault name="UnexpectedError">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="mapConceptCode">
			&lt;wsdlsoap:operation soapAction=""/>
			&lt;wsdl:input name="mapConceptCodeRequest">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:input>
			&lt;wsdl:output name="mapConceptCodeResponse">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:output>
			&lt;wsdl:fault name="AmbiguousMapRequest">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
			&lt;wsdl:fault name="UnexpectedError">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
			&lt;wsdl:fault name="MapNameSourceMismatch">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
			&lt;wsdl:fault name="MapNameTargetMismatch">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
			&lt;wsdl:fault name="UnableToMap">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
			&lt;wsdl:fault name="MappingNotAvailable">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
			&lt;wsdl:fault name="UnknownMapName">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
			&lt;wsdl:fault name="UnknownConceptCode">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
			&lt;wsdl:fault name="UnknownCodeSystem">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="getCTSVersion">
			&lt;wsdlsoap:operation soapAction=""/>
			&lt;wsdl:input name="getCTSVersionRequest">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:input>
			&lt;wsdl:output name="getCTSVersionResponse">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:output>
			&lt;wsdl:fault name="UnexpectedError">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="getServiceDescription">
			&lt;wsdlsoap:operation soapAction=""/>
			&lt;wsdl:input name="getServiceDescriptionRequest">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:input>
			&lt;wsdl:output name="getServiceDescriptionResponse">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:output>
			&lt;wsdl:fault name="UnexpectedError">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="getServiceName">
			&lt;wsdlsoap:operation soapAction=""/>
			&lt;wsdl:input name="getServiceNameRequest">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:input>
			&lt;wsdl:output name="getServiceNameResponse">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:output>
			&lt;wsdl:fault name="UnexpectedError">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
		&lt;/wsdl:operation>
		&lt;wsdl:operation name="getServiceVersion">
			&lt;wsdlsoap:operation soapAction=""/>
			&lt;wsdl:input name="getServiceVersionRequest">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:input>
			&lt;wsdl:output name="getServiceVersionResponse">
				&lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:output>
			&lt;wsdl:fault name="UnexpectedError">
				&lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/>
			&lt;/wsdl:fault>
		&lt;/wsdl:operation>
	&lt;/wsdl:binding>
	&lt;wsdl:service name="CodeMappingOperationsService">
		&lt;wsdl:port binding="impl:CodeMappingServiceSoapBinding" name="CodeMappingService">
			&lt;wsdlsoap:address location="http://localhost:8080/axis/services/CodeMappingService"/>
		&lt;/wsdl:port>
	&lt;/wsdl:service>
&lt;/wsdl:definitions>

</pre>
				</exhibit>
			</div2>
		</div1>
		<back>
			<div1 id="annexA">
				<head>Annex A:   Summary of Service Requirements (Informative)</head>
				<div1 id="AppendIntro">
					<head>Introduction</head>
					<p>
This section summarizes the broad scope of terminology services which draws on material and experience from the other relevant work identified in section 2.</p>
					<p>The detailed proposals in this document address a limited subset of these services which are of most immediate relevance to assist implementation of HL7 Version 3.</p>
				</div1>
				<div1 id="ServerInfoServices">
					<head>Server information services</head>
					<div2 id="ServerInfoServicesIntro">
						<head>Introduction</head>
						<p>This section is concerned with services that provide information about the terminology server and the terminologies it supports.</p>
					</div2>
					<div2 id="ServerInfoservRetInfoCap">
						<head>Retrieve information about the capabilities and version of the server</head>
						<p>Use case: To enable a client application to interact appropriately with servers supporting different versions of a terminology server specification.</p>
						<p>
All specifications are subject to evolution and particular implementations may provide additional features. Therefore, a version independent means of establishing the capabilities of a server is essential.</p>
					</div2>
					<div2 id="ServerInfoservRetInfoTerm">
						<head>Retrieve information about terminologies accessible via the server</head>
						<p>Use case: To enable a client application to establish whether a server can be used to access a specified terminology. </p>
						<p>A single instance of the server may provide access to one or more terminologies and a client application may have access to several alternative terminology servers. </p>
						<p>This service could be provided either in the form of a test for a specific terminology (E.g. does server support terminology X) or a request for a list of supported terminologies.</p>
					</div2>
				</div1>
				<div1 id="TermMetaServ">
					<head>Terminology metadata services</head>
					<div2 id="TermMetaServIntro">
						<head>Introduction</head>
						<p>
This section is concerned with services which access the  information about a terminology as supported by the server. </p>
						<p>
All use cases envisaged in this section require access to a single specified terminology each time a service is invoked. Each request for a service specifies one identified terminology that is available on the server. </p>
					</div2>
					<div2 id="TermMetaServRetInfo">
						<head>Retrieve information about a terminology accessible via the server</head>
						<p>
Use case: To allow the client application to determine whether the server provides data that is sufficiently complete, up-to-date and authoritative.</p>
						<p>
The client application must able to access various properties of the available terminologies (e.g. version numbers, release date, authorized source and whether it’s available in its entirety or is limited in some way).</p>
					</div2>
					<div2 id="TermMetaServRetProps">
						<head>Retrieve details of properties of concepts or terms in this terminology</head>
						<p>
Use case: To allow the client application to determine the properties available for each concept or term in the terminology in order to process or display them in an appropriate way.</p>
						<p>
Some terminologies have more extensive sets of properties associated with each concept or term. A server may provide access to all these properties or to a limited set of properties. The client application needs to be aware of the properties of a terminology that are accessible via the server.</p>
					</div2>
					<div2 id="TermMetaServRetRela">
						<head>Retrieve details of relationship types used in this terminology</head>
						<p>
Use case: To allow the client application to determine the relationship types that are supported by this terminology so that it can make valid requests for relationship information.</p>
						<p>
Some terminologies support a variety of types of relationships between term and/or concepts. For example:</p>
						<list role="unordered">
							<item>several terms may be synonyms representing the same concept. </item>
							<item>a concept may be related to other more general supertype concepts (e.g. "pneumonia" as a subtype of  "lung disease" and also a subtype of "infection")</item>
							<item>a concept may be defined in terms of several other concepts.
</item>
							<item>a concept may be associated with other concepts which can be used to qualify it.</item>
						</list>
					</div2>
					<div2 id="TermMetaServRetSerCri">
						<head>Retrieve details of search criteria supported for this terminology</head>
						<p>
Use case: To allow the client application to determine the permissible search criteria that are supported by the server in respect of a particular accessible terminology.</p>
						<p>
There are a variety of potential search criteria that may be applied to locate a concept or term. Servers may vary in the types of criteria they can support and the criteria appropriate for searching particular accessible terminologies may also vary.</p>
					</div2>
				</div1>
				<div1 id="TermContServ">
					<head>Terminology content services</head>
					<div2 id="TermContServRetInfo">
						<head>Introduction</head>
						<p>
This section is concerned with services which access the  information content of a terminology.</p>
						<p>
Most use cases envisaged here require access to a single specified terminology each time a service is invoked. Each request for a service specifies one identified terminology that is available on the server.  An alternative approach would be to instantiate a session for a particular terminology in which all subsequent service  requests apply.</p>
						<p>
Some use cases may arguably benefit from an option to apply the same service request across all or a selected set of terminologies supported by a server. For example, to search for all terms in all supported terminologies containing a specified phrase. However, this imposes a significant set of complications:</p>
						<list role="unordered">
							<item>The server would need to integrate results from various source terminologies</item>
							<item>The terminologies may not share a common structure and may not be searchable in the same ways.</item>
							<item>It requires each retrieved item to identify the terminology at </item>
						</list>
					</div2>
					<div2 id="TermContServRetProps">
						<head>Retrieve the properties of a concept or term</head>
						<p>
A service is required which returns the accessible properties of a single concept or term. The required concept or term is selected using it’s a unique identifier. The result returned  is a set of properties of the selected item.  All the properties may be returned or a selected set of properties could be specified in the request.</p>
						<p>
Use case: To enable a client application to display or validate the textual meaning of a concept or term represented by a unique identifier.</p>
						<p>
If an identifier is stored or communicated without its associated textual description, this service is essential to enable the client to render the information in a human-readable form. If the text is stored or communicated with the identifier, this service provides a means of validation that the identifier (which is presumable subject to machine processing or retrieval) has the same meaning as the accompanying text.</p>
						<p>
Use case: To enable the client application to display alternative textual translations of the meaning of the identified concept. </p>
						<p>
Some terminologies allow multiple terms associated with one concept as synonyms or language/dialect translations. The server should provide the client application with access to these term variants and where they exist.</p>
						<p>
Use case: To enable the client application to access additional properties related to a concept or term so that it can be processed and/or rendered appropriately.</p>
						<p>
Some terminologies recognize additional properties associated with each concept and/or term. For example a concept may have a property which indicates if it is intended for current use or retained to support legacy data. A term may have a properties indicate its language and whether it is a preferred term or a synonym. </p>
					</div2>
					<div2 id="TermContServRetCon">
						<head>Retrieve a set of concepts or terms matching specified text criteria</head>
						<div3 id="TermContServRetConGenUse">
							<head>General use case</head>
							<p>
Use case: To allow a concept or term to be found by entering one or more words. Modes of entry for a search may include typing, speech recognition and parsing of selected text in an electronic document. The results should be a set of matches that may be used to populate a menu, list or other user interface control in a client application.</p>
							<p>
The range of useful search criteria is likely to vary according to the size, structure and richness of the terminology. Criteria are identified below in relation to different use cases. </p>
							<p>
Performance is critical issue for this service as it may return many terms and concepts for real time display. Return of the complete concept or term with all its associated properties and relationships is unnecessary and may impact performance. By default this service should therefore return only the text of the matching term and the associated unique identifier. </p>
						</div3>
						<div3 id="TermContServRetConTextRet">
							<head>Text criteria for retrievals</head>
							<p>
Various types of text criteria may be valuable according to the size of the terminology (the larger the terminology the more extensive and selective the criteria need to be) and the mode of entry. The list below outlines the main types of text criteria that may be required: </p>
							<p>Phrase matches</p>
							<list role="unordered">
								<item>Phrase match complete - complete verbatim match between phrase and term</item>
								<item>Phrase match start - a match between phrase and start of term</item>
								<item>Phrase match in term - a match between phrase and any part of the term</item>
							</list>
							<p>Word matches</p>
							<list role="unordered">
								<item>Word match complete - the complete word appears somewhere in the term</item>
								<item>Word match start - the (part) word matches the start of a word in the term</item>
								<item>Pattern extended word (the pattern is tested only in the context of a word</item>
								<item>Word form matches (e.g. "tuberculosis" for "tuberculosis")</item>
							</list>
							<p>Multiple words matches</p>
							<list role="unordered">
								<item>Apply one of the word match criteria for each word. Variations on multiple word matches</item>
								<item>Multiple word order independent match - All words typed appear somewhere in the term.</item>
								<item>Word order dependent - All words typed appear somewhere in the term.
</item>
							</list>
							<p>Pattern matches</p>
							<list role="unordered">
								<item>Phrase pattern matches - the term matches a regular expression.
</item>
								<item>Word pattern matches - as for word matches but the word is represented by a regular expression.</item>
							</list>
							<p>Modifications applicable to most types of text search</p>
							<list role="unordered">
								<item>Case dependent/independent searching</item>
								<item>Accent and special character handling in searches</item>
								<item>Defining word breaks for word searches</item>
								<item>Soundex matching</item>
								<item>Match words/phrases/abbreviations with similar meanings (e.g. "renal" for "kidney", "MI" for "myocardial infarction" or "mitral incompetence") </item>
							</list>
							<p>Text searches may need to be moderated by other criteria noted in the next section.</p>
						</div3>
						<div3 id="TermContServRetConModText">
							<head>Additional criteria modifying text retrieval</head>
							<p>To meet some use cases for text based retrieval additional criteria need to be applied. The following three types of additional criteria may be applicable to some or all terminologies supported by the server.</p>
							<p>Status criteria</p>
							<p>Use case: To allow a client application to retrieve only concepts or terms in current use.</p>
							<p>A terminology may contain concepts or terms that are no longer intended for current use but which are retained to support interpretation of legacy data.
Vocabulary domain criteria </p>
							<p>Use case: To allow a client application to limit a requested retrieval to concepts or terms in a specified vocabulary domain. For example, to limit the search to values that are permissible in a particular attribute of an HL7 message.</p>
							<p>A terminology may contain values applicable to different contexts and these may be permitted for use in different attributes of particular HL7 messages. </p>
							<p>Support for these criteria requires the server to have access to the appropriate HL7 vocabulary domain tables.</p>
							<p>Relationship criteria</p>
							<p>Use case: To allow a client application to limit a requested retrieval to terms or concepts that have a particular relationship between another concept. For example, limit retrieval for the word "appendix" to concepts that have a  subtype relationship with "surgical procedure".</p>
							<p>A terminology may contain relationships which provide a useful mechanism for refining a search. Support for this type of search will only be available for some terminologies and the degree of sophistication of the criteria will vary according to the nature of the supported relationships.</p>
						</div3>
					</div2>
					<div2 id="TermContServRetRel">
						<head>Retrieve a set of concepts or terms specified by relationships</head>
						<div3 id="TermContServRetRelAll">
							<head>Retrieve all relationships for an identified concept or term</head>
							<p>Use case: To allow the client application to display the relationships, make semantic deduction or offer choices of valid qualifiers that can be applied to a concept.</p>
							<p>This complete retrieval option may be efficient when many relationships need to be reviewed by the client application. However, the following pair of more selective relationship retrieval services may be more efficient for specific review and navigation.</p>
						</div3>
						<div3 id="TermContServRetRelId">
							<head>Retrieve the relationship types available for an identified concept or term</head>
							<p>Use case: To allow the client application to determine which relationships are available prior to selective retrieval of concepts with a specified relationship (see below)</p>
							<p>This offers no additional functionality compared with retrieving all relationships (see above). However, it may be more efficient  for identifying relationship types to be processed in more individually (see below).</p>
							<p>Relationship types may include some that are specific to a terminology. However, some general types of relationship should be represented in a common way by this service if they are supported by the terminology:</p>
							<list role="unordered">
								<item>The subtype relationship </item>
								<item>The relationship between a concept and its synonymous terms. </item>
							</list>
						</div3>
						<div3 id="TermContServRetSpecRel">
							<head>Retrieve concepts/terms with a specified relationship type to a concept/term</head>
							<p>Use case: To allow the client application to offer the user options to navigate across specified semantic links, for example, to refine a concept  or to generalize a concept.</p>
							<p>Use case: To allow the client application to display synonyms associated with a concept.</p>
							<p>Use case: To allow the client application to make semantic deductions <emph role="underline">based on</emph> subtype relationships, for example, to count instances of "pneumonia" as instances of "lung disease" and "infection".</p>
							<p>This offers no additional functionality compared with retrieving all relationships (see above). However, this selective service may be more efficient  for specific review and navigation.</p>
							<p>By default this service should return the unique identifier and term for each concept or term.</p>
						</div3>
					</div2>
					<div2 id="TermContServAll">
						<head>Retrieve all concepts or terms in a particular vocabulary domain</head>
						<p>Use case: To allow the client application to access the complete set of values that may be applicable to a specified attribute in an HL7 message.</p>
						<p>
This service is closely related to the text search with additional vocabulary domain criteria. However, in this case all concepts in the vocabulary domain are returned without any attempt at text matching.  </p>
						<p>
By default this service should return the unique identifier and term for each concept or term.</p>
					</div2>
					<div2 id="TermContServValUni">
						<head>Validate a unique identifier</head>
						<div3 id="TermContServValUniCheck">
							<head>Check that a unique identifier is valid in the terminology</head>
							<p>Use case: To allow a client application to validate the content of a message by ensuring that identifiers (or codes) in the message are valid in the referenced terminology.  </p>
							<p>This use case can also be met by attempting to retrieve the required concept or term. However, requesting retrieval created a processing and data overhead when compared with a simple test. Validation may be required for many messages each containing many identifiers so a light and efficient validation service is required.  </p>
						</div3>
						<div3 id="TermContServValAddCrit">
							<head>Additional criteria applicable to identifier validation</head>
							<p>Status criteria</p>
							<p>Use case: To allow a client application to test if an identifier in a message or record is in current use.</p>
							<p>A terminology may contain concepts or terms that are no longer intended for current use but which are retained to support interpretation of legacy data.
Vocabulary domain criteria </p>
							<p>Use case: To allow a client application to conform that an identifier in a message is a value within the appropriate vocabulary domain for that message. For example, to limit the search to values that are permissible in a particular attribute of an HL7 message.</p>
							<p>A terminology may contain values applicable to different contexts and these may be permitted for use in different attributes of particular HL7 messages.</p>
							<p>Support for these criteria requires the server to have access to the appropriate HL7 vocabulary domain tables.</p>
							<p>Relationship criteria</p>
							<p>Use case: To allow a client application to test whether a concept should be counted as a subtype of another concept (e.g. a concept used in a decision support algorithm or as a criteria for analysis).</p>
							<p>A terminology may contain relationships which can be used to determine whether a concept is a subtype of another concept.</p>
						</div3>
					</div2>
					<div2 id="MapAndTransCodesA">
						<head>Mapping and transformation of codes and code phrases</head>
						<div3 id="MapAndTransCodesA1">
							<head>Retrieve identifier with the same meaning in another terminology</head>
							<p>Use case: To allow a client application to translate an identifier used in its native environment into the terminology required in a message (and vice versa).</p>
							<p>
In many cases this is a non-trivial task as maps may be one-to-many and may require other contextual information to select a specific value. However, for vocabulary domains with a relatively small number or possible values with know one-to-one (or many-to-one) maps lists this is a useful and service.</p>
						</div3>
						<div3 id="MapAndTransCodesA2">
							<head>Decompose a concept into a post-coordinated expression</head>
							<p>Use case: To allow a client application to break down a complex concept into constituent codes which represent different aspect of the meaning of that concept. For example, to represent  "appendectomy" as "surgical removal" applied to the "vermiform appendix".</p>
							<p>
Some terminologies which include both complex and simple concepts provide relationships that support this transformation. This service may be useful for populating messages which represent different aspects on a complex concept in separated coded elements. The end result of this service is an expression (or code phrase) consisting of attribute value pairs (possibly nested). The client application then has to select which elements are represented in which message attributes. </p>
							<p>
This service may not be strictly necessary in this form. An alternative approach is to retrieve specific relationship types for each message attribute to be populated. </p>
						</div3>
						<div3 id="MapAndTransCodesA3">
							<head>Compose a post-coordinated expression into a pre-coordinated concept</head>
							<p>Use case: To allow a client application to convert a collection of identifiers representing different parts of a more complex concept into a single concept identifier.</p>
							<p>
This is the inverse of the decomposition service. It may not be possible to compose an expression into a single concept as there may be no single concept that represents the full meaning of the post-coordinated expression. Therefore the result of this may be the same post-coordinated expression or another post-coordinated expression with fewer sub-elements. For example, "surgical removal" or "vermiform appendix" as an "emergency" might be composed into "appendectomy" as and "emergency".</p>
						</div3>
					</div2>
				</div1>
			</div1>
			<div1 id="CodeSysUsed">
				<head>Annex B: Code Systems Used in the CTS API (Informative)</head>
				<table id="t40">
					<caption/>
					<col width="23"/>
					<col width="20"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>OID</th>
							<th>Code System Name</th>
							<th>Description</th>
							<th>Sample Values</th>
						</tr>
					</thead>
					<tr>
						<td>
CodeSystem      </td>
						<td>2.16.840.1.113883.5.22</td>
						<td>The set of code systems known to HL7</td>
						<td>CAS (Chemical abstract codes)<br/>
IETF1766 (Language identifiers)<br/>
CodeSystem (Code System)
</td>
					</tr>
					<tr>
						<td>
ConceptStatus   </td>
						<td>2.16.840.1.113883.5.1086</td>
						<td>The status of a domain entry as pertains to its review and incorporation into the HL7 domain specification database.</td>
						<td>A (Active)<br/>
D (Deleted)<br/>
P (Proposed)<br/>
R (Retired)
</td>
					</tr>
					<tr>
						<td>
VocabularyDomainQualifier</td>
						<td>2.16.840.1.113883.5.147 </td>
						<td>The extensibility of coding determines whether or not exceptions are allowed in the domain of a coded attribute</td>
						<td>CWE ( coded with exceptions)<br/>
 CNE  (coded no exceptions)
 </td>
					</tr>
					<tr>
						<td>
Language</td>
						<td>2.16.840.1.113883.6.99</td>
						<td>The human language that is used in textual descriptions or communications. From ISO 639.    </td>
						<td>EN (English)<br/>
DE (German)<br/>
EN-US (English - US dialect)<br/>
EN-GB (English - GB dialect)
</td>
					</tr>
					<tr>
						<td>
TranslationQuality</td>
						<td>2.16.840.1.113883.5.1093</td>
						<td>The relationship between concepts between two code systems.</td>
						<td>Exact<br/>
 Broader Than<br/>
 Narrower Than<br/>
 Different
 </td>
					</tr>
					<tr>
						<td>
ConceptProperty</td>
						<td>2.16.840.1.113883.5.1087</td>
						<td>Concept property identifiers</td>
						<td>openIssue<br/>
appliesTo<br/>
howApplies<br/>
OID
</td>
					</tr>
					<tr>
						<td>
ConceptCodeRelationship</td>
						<td>2.16.840.1.113883.5.1088</td>
						<td>The relationship between two concepts in the same code system.</td>
						<td>hasSubtype<br/>
hasPart<br/>
smallerThan
</td>
					</tr>
					<tr>
						<td>
MatchAlgorithm</td>
						<td>2.16.840.1.113883.5.1094</td>
						<td>The match algorithm to use when searching text.</td>
						<td>Identical<br/>
IdenticalIgnoreCase<br/>
StartsWith<br/>
StartsWithIgnoreCase<br/>
EndsWith<br/>
EndsWithIgnoreCase<br/>
ContainsPhrase<br/>
ContainsPhraseIgnoreCase<br/>
WordsAnyOrder<br/>
WordsAnyOrderIgnoreCase<br/>
WildCards<br/>
WildCardsIgnoreCase<br/>
RegularExpression
</td>
					</tr>
				</table>
				<table id="t50">
					<caption align="BOTTOM">VocabularyConceptRelationship Domain</caption>
					<col width="23"/>
					<col width="20"/>
					<col width="137"/>
					<thead>
						<tr>
							<th>Concept Code</th>
							<th>Designation</th>
							<th>Description</th>
							<th>Transitive</th>
							<th>Inverse</th>
						</tr>
					</thead>
					<tr>
						<td>hasSubtype</td>
						<td>has subtype</td>
						<td>A generic subsumption relationship.  This relationship includes both exhaustive and non-exhaustive subtypes as well as mutually exclusive vs. overlapping.</td>
						<td>True</td>
						<td>isSubtypeOf</td>
					</tr>
					<tr>
						<td>hasPart</td>
						<td>has part</td>
						<td>A generic partitive relationship with no further details specified.  </td>
						<td>True</td>
						<td>isPartOf</td>
					</tr>
					<tr>
						<td>smallerThan</td>
						<td>is smaller than</td>
						<td>A type of ordering relationship indicating quantitatively fewer entities</td>
						<td>True</td>
						<td>greaterThan</td>
					</tr>
				</table>
			</div1>
			<div1 id="IDLRendering">
				<head>Annex C: IDL Specification for the CTS API (Normative)</head>
				<p> The following listings contain the complete IDL used to generate the CTS API </p>
				<div2 id="TypesIDL">
					<head>Basic HL7 Data Types</head>
					<list role="unordered">
						<item>
							<loc href="idl/types.idl">types.idl</loc> - IDL for Basic HL7 Data Types used by CTS</item>
					</list>
				</div2>
				<div2 id="CTSMAPIIdl">
					<head>IDL Definition of CTS Message API</head>
					<list role="unordered">
						<item>
							<loc href="idl/CTSMAPI.idl">CTSMAPI.idl</loc> - IDL Definition of CTS Message API</item>
					</list>
				</div2>
				<div2 id="CTSVAPIIdl">
					<head>IDL Definition of CTS Vocabulary API</head>
					<list role="unordered">
						<item>
							<loc href="idl/CTSVAPI.idl">CTSVAPI.idl</loc> - IDL Definition of CTS Vocabulary and Code Mapping API</item>
					</list>
				</div2>
			</div1>
			<div1 id="XMLRendering">
				<head>Annex D: XML Binding of the CTS API (Normative)</head>
				<p>The following sections containn the WSDL binding of the 5 CTS API modules. Both the IDL description of the API and the WSDL binding are normative descriptions of the CTS API</p>
				<div2 id="MessageRuntimeWSDL">
					<head>WSDL Binding for the CTS Message Runtime API</head>
					<list role="unordered">
						<item>
							<loc href="wsdl/MessageRuntime.wsdl">MessageRuntime.wsdl</loc> - CTS Message Runtime Service</item>
					</list>
				</div2>
				<div2 id="MessageBrowserWSDL">
					<head>WSDL Binding for the CTS Message Browser API</head>
					<list role="unordered">
						<item>
							<loc href="wsdl/MessageBrowser.wsdl">MessageBrowser.wsdl</loc> - CTS Message Browser Service</item>
					</list>
				</div2>
				<div2 id="MessageBrowserWSDL">
					<head>WSDL Binding for the CTS Vocabulary Runtime API</head>
					<list role="unordered">
						<item>
							<loc href="wsdl/VocabRuntime.wsdl">VocabRuntime.wsdl</loc> - CTS Vocabulary Runtime Service</item>
					</list>
				</div2>
				<div2 id="MessageBrowserWSDL">
					<head>WSDL Binding for the CTS Vocabulary Browser API</head>
					<list role="unordered">
						<item>
							<loc href="wsdl/VocabBrowser.wsdl">VocabBrowser.wsdl</loc> - CTS Vocabulary Browser Service</item>
					</list>
				</div2>
				<div2 id="MessageBrowserWSDL">
					<head>WSDL Binding for the CTS Code Mapping API</head>
					<list role="unordered">
						<item>
							<loc href="wsdl/CodeMapping.wsdl">CodeMapping.wsdl</loc> - CTS Code Mapping Service</item>
					</list>
				</div2>
			</div1>
		</back>
	</body>
</spec>

