![]() ANSI/HL7 V3 CTS, R1-2005 HL7 Version 3 Standard: Common Terminology Services, Release 1 4/21/2005 |
Responsible Group | Vocabulary Work Group HL7 |
Editor/Principal Contributor | Harold Solbrig solbrig@mayo.edu Mayo Clinic/Foundation |
Principal Contributor | Tony Weida tweida@apelon.com Apelon, Inc. |
Principal Contributor | Larry Streepy streepy@healthlanguage.com Health Language, Inc. |
Contributor | David Markwell david@clincial-info.co.uk Clinical Information Consultancy |
Contributor | Keith Campbell |
Vocabulary Co-Chair/Contributor | Stanley Huff, M.D. stan.huff@ihc.com Intermountain Health Care |
Vocabulary Co-Chair | Christopher Chute, M.D., Dr P.H. chute@mayo.edu Mayo Clinic/Foundation |
Vocabulary Co-Chair | Ted Klein kci@tklein.com Klein Consulting, Inc. |
Vocabulary Co-Chair | Paul Frosdick paul.frosdick@nhsia.nhs.uk NHS Information Authority |
HTML Generated: 2012-09-06T09:04:12
HL7® Version 3 Standard, © 2005 Health Level Seven® International All Rights Reserved.
HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. Pat & TM Off.
Use of these materials is governed by HL7 International's IP Compliance Policy.
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.
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.
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.
This document describes a set of API calls that represent the core functionality that will be needed by basic HL7 Version 3 applications.
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.
The following general principles were used while developing the HL7 CTS specification:
There is no generally accepted standard for terminology services but there are several sources of material on this topic.
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.
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.
There are two distinct layers between HL7 Version 3 message processing applications and the target vocabularies. The upper layer, the Message API, 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 Vocabulary API, communicates with the terminology service software, and does so in terms of code systems, concept codes, designations, relationships and other terminology specific entities.
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.
The Vocabulary API is intended to be generic [1]. It allows applications to query different terminologies [2] 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.
The classes of actors that are anticipated to be users of the HL7 CTS API include:
The first two actor classes – message creation and message processing – have a different requirements profile than do the succeeding three:
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.
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.
The message/vocabulary split can be combined with the two requirements profiles to yield five separate modules:
Runtime | Browser | |
---|---|---|
Message API | Message Runtime | Message Browser |
Vocabulary API | Vocabulary Runtime | Vocabulary Browser |
Translation | Vocabulary Translation |
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.
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.
The Message Layer Runtime Module describes the services used by the message creation, processing and translation software.
Function | Inputs | Outputs | Description |
---|---|---|---|
getServiceName | |
Service name | Return the name that was assigned to this service by the service provider. |
getServiceVersion | |
Version identifier | Return the current version of the service software. |
getServiceDescription | |
Service description | Return a description of the service function, authors, copyrights, etc. |
getHL7ReleaseVersion | |
Version identifier | Return the HL7 release version that is currently supported by this service. |
getCTSVersion | |
Major and minor version number | Return the CTS version that this service implements. |
getSupportedMatchAlgorithms | |
List of match algorithms | Return a list of string match algorithms implemented by this service. |
getSupportedVocabularyDomains | Match text and algorithm, time limit and size limit | List of vocabulary domain names | Return a list of the vocabulary domains matching the supplied match text that are recognized by this service. |
validateCode | 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 | List of errors and warnings. | Validate the coded attribute for the supplied vocabulary domain and context. |
validateTranslation | 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 | List of errors and warnings. | Validate the CD translations, if any, for the supplied vocabulary domain and context. |
translateCode | Name of the vocabulary domain, coded attribute to be translated, target coding system, and target application context(realm) | Translation of the coded attribute. | 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 |
fillInDetails | Coded attribute and target language code | Coded attribute value with details supplied. | Fill in the optional parts of the coded attribute such as the concept display name, the code system name and code system version. |
subsumes | Parent coded attribute, child coded attribute | True / False | Determine whether the parent coded attribute subsumes (or implies) the child. |
areEquivalent | First coded attribute, second coded attribute | True / False | Determine whether the two coded attributes are ‘equivalent’. |
lookupValueSetExpansion | 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 | Hierarchical expansion of the value set associated with the domain in the supplied context | Return a hierarchical list of selectable concepts for the supplied vocabulary domain and context. |
expandValueSetExpansionContext | Opaque expansion context returned from previous lookupValueSetExpansion or expandValueSetExpansionContext call | Further hierarchical expansion of the value set associated with the domain in the supplied context | Return further expansion on nested value set contents. |
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.
Function | Input | Output | Description |
---|---|---|---|
getServiceName | |
Service name | Return the name that was assigned to this service by the service provider. |
getServiceVersion | |
Version identifier | Return the current version of the service software. |
getServiceDescription | |
Service description | Return a description of the service function, authors, copyrights, etc. |
getCTSVersion | |
Major and minor version number | Return the CTS version that this service implements. |
getSupportedCodeSystems | Time limit and size limit | List of code systems and versions supported by the service implementation. | Return the identifier, name and release versions of all code systems that are supported by the service. |
lookupCodeSystemInfo | Code system name or identifier | Description of the code system including name, id, description, version, supported languages, supported relations, supported properties, etc. | Return detailed information about a specific code system. |
isConceptIdValid | Code system identifier, concept code and flag indicating whether inactive concepts are considered valid | True / False | Determine whether concept code is currently valid in the specified code system |
lookupDesignation | Code system identifier, concept code and target language code | Designation text | Return the preferred designation for the concept code in the supplied language |
areCodesRelated | 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 | True/False | Determine whether the named relationship exists between the source and target codes. |
Function | Input | Output | Description |
---|---|---|---|
getServiceName | |
Service name | Return the name that was assigned to this service by the service provider. |
getServiceVersion | |
Version identifier | Return the current version of the service software. |
getServiceDescription | |
Service description | Return a description of the service function, authors, copyrights, etc. |
getCTSVersion | |
Major and minor version number | Return the CTS version that this service implements. |
getSupportedMaps | |
List of named sets consisting of from code system id, name and version, to code system id, name, and version and a mapping description | Return a list of mappings that are supported by this service. |
mapConceptCode | Source code system identifier and concept code, target code system identifier and name of mapping resource | Corresponding concept code in target system and quality indicator | Return the mapping of the supplied concept code from the source code system to the target code system using the named mapping resource. |
Function | Input | Output | Description |
---|---|---|---|
getServiceName | |
Service name | Return the name that was assigned to this service by the service provider. |
getServiceVersion | |
Version identifier | Return the current version of the service software. |
getServiceDescription | |
Service description | Return a description of the service function, authors, copyrights, etc. |
getHL7ReleaseVersion | |
Version identifier | Return the HL7 release version that is currently supported by this service. |
getCTSVersion | |
Major and minor version number | Return the CTS version that this service implements. |
getSupportedMatchAlgorithms | List of string match algorithms implemented by the browser service | ||
getSupportedAttributes | Match text and algorithm, time limit and size limit | List of RIM attributes known to the browser | Returns a list of RIM attributes whose name matches the supplied match text that are known to the browser. |
getSupportedVocabularyDomains | Match text and algorithm, time limit and size limit | List of vocabulary domains known to the browser | Returns a list of vocabulary domains whose name matches the supplied match text that are known to the browser. |
getSupportedValueSets | Match text and algorithm, time limit and size limit | List of value sets known to the browser | Returns a list of value sets whose name matches the supplied match text that are known to the browser. |
getSupportedCodeSystems | Match text and algorithm, time limit and size limit | List of code systems known to the browser | Returns a list of code systems whose name matches the supplied match text that are known to the browser. |
lookupVocabularyDomain | Name of vocabulary domain | 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 | Look up all of the information known about the supplied vocabulary domain |
lookupValueSet | Value set name or identifier | 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. | Look up detailed information on a value set (including vocabulary domains, constructors, etc). |
lookupCodeSystem | Code system name or identifier | Name, id, copyright, release and registration information | Look up details on a code system |
lookupValueSetForDomain | Name of vocabulary domain and application context(realm) | Name and id of the value set used for this vocabulary domain | Return the identifier of the value set that would be used for the vocabulary in the supplied context (if any). |
isCodeInValueSet | 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 | True/False | Determine whether the supplied concept code is a valid value in the supplied value set |
Function | Input | Output | Description |
---|---|---|---|
getServiceName | |
Service name | Return the name that was assigned to this service by the service provider. |
getServiceVersion | |
Version identifier | Return the current version of the service software. |
getServiceDescription | |
Service description | Return a description of the service function, authors, copyrights, etc. |
getCTSVersion | |
Major and minor version number | Return the CTS version that this service implements. |
getSupportedMatchAlgorithms | List of string match algorithms implemented by the browser service | ||
getSupportedCodeSystems | Time limit and size limit | List of supported code systems and their descriptions | |
lookupConceptCodesByDesignation | Code system identifier, match text and algorithm, target language code, flag indicating whether non-active concepts should be retrieved, time limit and size limit | List of code system identifiers and concept codes. | Return a list of concept codes that have designations that match the supplied match string in the supplied language, if any. |
lookupConceptCodesByProperty | 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 | List of code system id / concept codes. | Return a list of concept codes that have properties that meet the supplied criteria |
lookupCompleteCodedConcept | Code system identifier and concept code | Everything that is known about the concept (designations, properties, relationships, etc.) | Return a complete description of the supplied concept code |
lookupDesignations | Code system id and concept code, match text and algorithm, target language | List of designations | Return all designations for the supplied concept code that match the supplied criteria. |
lookupProperties | 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 | List of concept properties (property code, value, language, mime type) | Return the properties of the given code system id / concept code that match the supplied criteria. |
lookupCodeExpansion | Code system id and concept code, relationship code, relationship direction indicator, target languag code, size limit and time limit | Hierarchical code expansion list | Recursively list the concept codes that are related to the supplied concept, including the preferred designation for the codes. |
This section describes the model that underlies the CTS Message API. It describes the relationship between HL7 coded attributes and vocabulary. It is based on the HL7_V3_Meta-Model Version 1.16 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 [3]. 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.
The Vocabulary API model describes the CTS model from vocabulary perspective and provides more detail about concept codes, designations, relationships, etc.
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.
The descriptions that follow the model use a semi-formal notation based on the model content :
Where appropriate, relationship cardinality will be expressed by the forms below or something similar:
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.
The figure below below shows the relationship between vocabulary domains and HL7 attributes.
An Attribute_domain_constraint must constrain the possible values of exactly one RIM attribute by limiting the possible values to those described by exactly one VocabularyDomain. A VocabularyDomain may describe the possible values of zero or more Attribute_domain_constraints. A DIM_attribute_row must be based on exactly one Attribute from the HL7 model, and serves to express the presence of the attribute in a specific design information model (DIM). DIM_attribute_rows inherit all of the constraints of the Attribute that they are based on, and DIM_attribute_row may be constrained by zero or more DIM_attribute_domain_constraints.
A hierarchical message description (HMD) completely defines the structure of a set of messages. HMD_attribute_rows are a part of a HMD, and each HMD_attribute_row is based on exactly one DIM_attribute_row . An HMD_attribute_row inherits all of the constraints of the corresponding DIM_attribute_row and may be yet further constrained by at most one HMD_domain_constraint.
Each VocabularyDomain has a unique name along with a description of the conceptual space that it represents. VocabularyDomains that describe the possible values of DIM_attribute_domain_constraints or HMD_domain_constraints restrict the conceptual space of the corresponding DIM_attribute_domain or Attribute_domain_constraint upon which the domain is based.
The example below shows how vocabulary domains might be constrained between the attribute, the DIM attribute row and the HMD attribute row.
Attribute | Vocabulary Domain | Description | Restricts Domain |
---|---|---|---|
sourceCountry | Country | A country of the world | - |
sourceCountry(DIM) | HL7MemberCountry | Any country that is an official member of HL7 | Country |
sourceCountry(HMD) | EUHL7MemberCountry | Any EU country that is an official member of HL7 | HL7MemberCountry |
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.
A VocabularyDomain may be represented by zero or more ValueSets. While it is possible for abstract RIM and DIM attributes to not be represented by any ValueSets at all, VocabularyDomains that describe the possible values of Coded Attributes used in an actual messages must be represented by at least one Value_set.
A VocabularyDomainValueSet represents an association between exactly one VocabularyDomain and exactly one ValueSet. Each association between a VocabularyDomain and a ValueSet may apply in zero or one ApplicationContexts. An ApplicationContext names a specific geopolitical entity (e.g. EU, Canada) and/or practice setting (e.g. veterinary medicine, public health), etc. and may be a setting_for zero or more VocabularyDomainValueSet associations.
A ValueSet may include a list of zero or more CodedConcepts drawn from a single CodeSystem. A ValueSet can represent:
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.
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 [4]. The valueSet_name can also contain a unique ‘meaningful’ identifier where appropriate. The valueSet_name is designed for communication between carbon-based life forms.
A ValueSet has a description that describes the intent and purpose of the set. It also has a definingExpression, which is intended to carry a formal machine readable expression that can be used to construct the ValueSet. The meaning and interpretation of definingExpression is not part of this specification. Both description and definingExpression are optional. The ValueSet attribute, allCodes, is described below.
A ValueSet must either be constructed_using at least one other ValueSet or it must be based on exactly one CodeSystem or both [5]. A CodeSystem defines a set of zero or more CodedConcepts which, in turn, signify relevant classes or entities within a particular domain of interest. CodeSystems 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 CodeSystems undergo periodic revision, it is useful to record the ReleaseVersion that was used to define a given ValueSet at a particular point in time. A ValueSet may be defined_using at most one ReleaseVersion. A ReleaseVersion may be used_to_define zero or more ValueSets. The defined using relationship is strictly informative, and services may use a later revision of the code system to represent the ValueSet content. [6]Code systems will be discussed in considerably more detail in a later section describing the CTS Vocabulary API.
A ValueSet can be defined to include all of the CodedConcepts defined in the CodeSystem upon which the ValueSet is based by setting the allCodes attribute to TRUE. A ValueSet with allCodes set to TRUE may not include any CodeReferences.
valueSet_id | valueSet_name | description | all Codes | CodeSystem | Release Version |
---|---|---|---|---|---|
2.16.840.1.113883.1.11.1 | AdministrativeGender | The gender of a person used for administrative purposes (as opposed to clinical gender) | True | 2.16.840.1.113883.5.1 | 5 |
A ValueSet may include zero or more CodedConcepts defined in the CodeSystem on which the ValueSet is based. This is accomplished by including one or more CodeReferences. A CodeReference ties a CodedConcept to a ValueSet. It must reference exactly one CodedConcept. The relation_code attribute, however, implicitly references all of the CodedConcepts that are the target of the ConceptRelationship with the includedCodedConcept. A CodeReference can include or exclude the referenced CodedConcept itself. It can include all of the target codes or only the leaf nodes. These various possibilities are reflected in the includeReferencedCode, relationship_code and leafOnly attributes described in the following table:
allCodes | includeReferencedCode | relationship_code | leafOnly | Description |
---|---|---|---|---|
True | - | - | - | Include all of the codes in the code system. |
False | True | - | - | Include only the referenced concept code |
False | True | hasSubtype | False | Include the referenced code and all of its subtypes |
False | False | hasSubtype | False | Include all of the subtypes of the referenced code but not the referenced code itself. |
False | False | hasSubtype | True | Include only the leaf subtypes of the referenced code |
Attribute combinations other than those described above are not valid. relation_code should be drawn from the HL7 RelationshipCode code system if possible.
A ValueSet may also be constructed using zero or more additional ValueSets. Including a ValueSet means that the CodedConcepts represented by the included set are to be included as part of the containing set. ValueSetConstructors serve two purposes:
A ValueSetConstructor connects two ValueSets – the included set and the set being constructed. includeHeadCode determines whether the head code of the included set (if any) is to be included as part of the containing value set.
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".
usedToBuildSet | (name) | includedSet | (name) | Include Head Code |
---|---|---|---|---|
2.16.840.1.113883.1.11.10010 | HL7ConformanceInclusion | 2.16.840.1.113883.1.11.10012 | InclusionNotMandatory | False |
2.16.840.1.113883.1.11.10012 | InclusionNotMandatory | 2.16.840.1.113883.1.11.10015 | InclusionNotRequired | True |
A ValueSet references a set of CodedConcepts. Frequently, the association between a ValueSet and a collection of CodedConcepts 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.
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 ValueSet may be identified_by at most one CodedConcept, which is known as the "head code". A CodedConcept may be the head_code_for zero or more ValueSets.
Many of the code systems used within HL7 will be supplied by outside parties. The CodeSystem 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.
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.
A CodeSystemRegistration has the following attributes:
The CTS Message API (CTSMAPI) is divided into two sections – the runtime section, which defines the set of functions that are necessary for everyday operation of HL7 Version 3 message software and the browsing 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.
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.
The Message API uses a number of coded attributes which are described below.
The following table lists the code systems and OIDS that are used in the CTS MAPI messages.
MAPI Data Element | Code System OID | Code System Name |
---|---|---|
LanguageCode | 2.16.840.1.113883.6.99 | ISO 639-1 Two character Alpha Language Codes |
LanguageCode | 2.16.840.1.113883.6.100 | ISO 639-2 Three character Alpha Language Codes |
RelationshipCode | 2.16.840.1.113883.5.1088 | ConceptCodeRelationship |
ApplicationContextCode | 2.16.840.1.113883.5.147 | VocabularyDomainQualifier.RealmOfUse |
DataTypeCode | 2.16.840.1.113883.5.1007 | DataType |
CodingStrengthCode | 2.16.840.1.113883.5.147 | VocabularyDomainQualifier |
ValueSetNodeTypeCode | 2.16.840.1.113883.5.24 | ConceptGenerality |
CodeSystemType | 2.16.840.1.113883.5.1085 | CodeSystemType |
MatchAlgorithmCode | 2.16.840.1.113883.5.1094 | MatchAlgorithm |
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.
Match Algorithm Code | Description | Required |
---|---|---|
IdenticalIgnoreCase | The lower case representation of the target text must match the lower case representation matchText exacty. | TRUE |
Identical | The target text must match the matchText exactly. | FALSE |
StartsWithIgnoreCase | The lower case representation of target text must begin with the lower case representation of matchText. | TRUE |
StartsWith | The target text must begin with the matchText. | FALSE |
EndsWithIgnoreCase | The lower case representation of the target text must end with the lower case representation of matchText. | TRUE |
EndsWith | The target text must end with the matchText. | FALSE |
ContainsPhraseIgnoreCase | The lower case representation of the target text must contain the lower case representation of the matchText. | TRUE |
ContainsPhrase | The target text must contain the matchText. | FALSE |
WordsAnyOrderIgnoreCase | The target text must contain all of the words in the match text, but in any order. | FALSE |
WildCardsIgnoreCase | 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". | FALSE |
RegularExpression | The match text may contain regular expressions, as defined in XML Schema Part 2: Datatypes. | FALSE |
NYSIIS | New York State Identification and Intelligence System phonetic encoding | FALSE |
The message runtime and browsing API both inherit a common identification interface.
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.
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.
The following sections describe the interface methods of the runtime portion of the message API.
The Runtime section inherits the identification information from the Identification section.
Parameters:
Exceptions:
A ValidationDetail entry contains a detailed description of an error or warning.
ValidateCodeReturn returns the summary of validateCode call along with the details
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.
Parameters:
Exceptions:
validateTranslation validates the primary code and any translations of an HL7 coded attribute. Any errors or warnings are returned in the ValidateCodeReturn structure.
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 Code Mapping Model for the underlying translation model.
Exceptions:
The following table lists the validation error identifiers and associated text that can be returned from ValidateCode and/or ValidateTranslation.
ID | Type | Text | Description |
---|---|---|---|
E001 | E | Unknown code system | The code system isn’t recognized by the service. |
E002 | E | Invalid concept code for code system | The concept code isn’t valid for the supplied (or implied in the case of CS data types) code system. |
E003 | E | Code system not valid for vocabulary domain | The code system is recognized by the service, but it isn’t valid for the vocabulary domain and application context. |
E004 | E | Concept code is not active | The concept code is valid for the domain, but it is no longer active. This error occurs only when activeConceptsOnly is true. |
E005 | E | Concept code is not valid for vocabulary domain | The concept code is valid for the code system, but is not allowed in the vocabulary domain and application context. |
E008 | E | Invalid role name for vocabulary domain | The code system and concept code of the qualifier role are legal, but are not valid for the vocabulary domain. |
E009 | E | Role name must be supplied for vocabulary domain | A qualifier was present that didn’t have a name component and it is required for this vocabulary domain. |
E010 | E | Invalid value for qualifier | The qualifier value is a valid concept code, but is not valid in the context of the qualifier. |
E011 | E | Invalid translation | The translation code system and concept code are valid, but it is not a valid translation of the containing concept code. |
E013 | E | Missing concept code | The concept code field is empty. |
E014 | E | Unknown coding rationale | The coding rationale code is not recognized. |
W002 | W | Code system name doesn’t match code system | The code system name does not match the code system id. |
W003 | W | Unknown code system version | The version is not recognized for the supplied code system. |
W004 | W | Display name incorrect for concept code | The display name is not correct for the supplied concept code. |
W005 | W | No HL7 translation present | None of the translations have a SH (both Source and HL7) or HL7 coding rationale. |
W006 | W | Concept code is not active | The supplied concept code is not active and activeConceptsOnly is TRUE. |
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.
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.
Exceptions:
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.
Parameters:
Exceptions:
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 hasSubtype relationship graph headed by parentCode. This document makes no further assertions of the semantics of subsumption beyond this one case.
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.
Parameters:
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.
Exceptions:
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.
Parameters:
Exceptions:
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.
The various cases below describe how different sorts of value set definitions would be expanded.
Case 1: Value set A references all of the codes in a non-hierarchical code system, which contains concept codes 1,2, ..N
pathLength | nodeType_code | Concept_id | displayName |
---|---|---|---|
0 | A (abstract) | - | (A).valueSet_name |
1 | L (leaf) | 1 | (1).preferredName |
1 | L (leaf) | 2 | (2).preferredName |
1 | L (leaf) | … | … |
1 | L (leaf) | N | (N).preferredName |
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.)
pathLength | nodeType_code | Concept_id | displayName |
---|---|---|---|
0 | A (abstract) | - | (B).valueSet_name |
1 | S (specializable) | 1 | (1).preferredName |
2 | S (specializable) | 1.1 | (1.1).preferredName |
… | S (specializable) | … | … |
n | L (leaf) | 1.1.1..n | (1.1.1.n).preferredName |
1 | S (specializable) | 2 | (2).preferredName |
2 | S (specializable) | 2.1 | (2.1) preferredName |
… | S (specializable) | … | … |
M | L (leaf) | 2.1..m | (2.1..m).preferredName |
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.
pathLength | nodeType_code | Concept_id | displayName |
---|---|---|---|
0 | A (abstract) | - | (C).valueSetName |
1 | L (leaf) | 1 | (1).preferredName |
1 | L (leaf) | 2 | (2).preferredName |
1 | L (leaf) | 3 | (3).preferredName |
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.
pathLength | nodeType_code | Concept_id | displayName |
---|---|---|---|
0 | A (abstract) | 4 | (4).preferredName |
1 | L (leaf) | 1 | (1).preferredName |
1 | L (leaf) | 2 | (2).preferredName |
1 | L (leaf) | 3 | (3).preferredName |
Case 5: Value set E references value set D above, with includeHeadCode set to TRUE
pathLength | nodeType_code | Concept_id | displayName |
---|---|---|---|
0 | A (abstract) | - | (E).valueSet_name |
1 | S (specializable) | 4 | (4).preferredName |
2 | L (leaf) | 1 | (1).preferredName |
2 | L (leaf) | 2 | (2).preferredName |
2 | L (leaf) | 3 | (3).preferredName |
Case 6: Value set F references value set D above, with includeHeadCode set to FALSE
pathLength | nodeType_code | Concept_id | displayName |
---|---|---|---|
0 | A (abstract) | - | (F).valueSet_name |
1 | A (abstract) | 4 | (4).preferredName |
2 | L (leaf) | 1 | (1).preferredName |
2 | L (leaf) | 2 | (2).preferredName |
2 | L (leaf) | 3 | (3).preferredName |
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.
pathLength | nodeType_code | Concept_id | displayName |
---|---|---|---|
0 | A (abstract) | - | (G).valueSet_name |
1 | S (specializable) | 1.1 | (1.1).preferredName |
2 | S (specializable) | 1.1.1 | (1.1.1).preferredName |
… | S (specializable) | 1.1…. | … |
n | L (leaf) | 1.1…..n | (1.1….n).preferredName |
1 | A (abstract) | 1.2 | (1.2) preferredName |
2 | S (specializable) | 1.2.1 | (1.2.1)preferredName |
… | S (specializable) | 1.2.1… | … |
m | L (leaf) | 1.2.1…m | (1.2…m)preferredName |
1 | A (abstract) | 1.3 | (1.3) preferredName |
2 | A (abstract) | 1.3.1 | (1.3.1) preferredName |
… | A (abstract) | 1.3.1… | … |
k | L(leaf) | 1.3.1…k | (1.3.1..k)preferredName |
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.
Parameters:
Exceptions:
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.
Parameters:
Exceptions:
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.
The message browser inherits the identification information from the interface described in Service Identification Section.
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.
RIMAttributeId uniquely identifies a coded attribute in the RIM.
The RIMCodedAttribute describes a RIM attribute.
A CodeSystemDescriptor consists of a code sytem identifier, its name, any copyright information and a list of available versions.
The message browser description lists all of the various entities that are supported by the particular service.
Parameters:
Exceptions:
Parameters:
Exceptions:
Parameters:
Exceptions:
Parameters:
Exceptions:
The VocabularyDomainValueSet structure contains the description of a value set (see: Expand a Vocabulary Domain for details) and the context code, if any, in which the value set applies
VocabularyDomainDescription is the structure returned by the lookupVocabularyDomain function.
lookupVocabularyDomain returns detailed information about a vocabulary domain.
Exceptions:
FullValueSetDescription includes a complete description of the value set including the list of included concept codes and other value sets.
lookupValueSet retrieves a complete description of a value set given either a value set identifier or a value set name.
Parameters:
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.
Exceptions:
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
lookupCodeSystem returns detailed information for a code system given either a code system identifier (OID) or name.
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.
Exceptions:
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).
Parameters:
Exceptions:
isCodeInValueSet returns true if the supplied concept identifier is included in and can be selected from the value set, false otherwise.
Parameters:
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.
Exceptions:
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 [7] - it only describes the classes and relationships that have a direct bearing on the contents of HL7 coded attributes from the vocabulary perspective.
A CodeSystem may define zero or more CodedConcepts. A coded concept represents a class or concept within a particular domain of discourse. Every CodedConcept must be defined in exactly one CodeSystem. 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.
A CodeSystem has the following attributes:
The following attributes carry additional metadata about a code system:
A CodeSystem may represent zero or one CodeSystemVersion at any given point in time. [8]
A CodedConcept is unique within the CodeSystem that defines it. A CodedConcept must be designatedBy at least one ConceptDesignation. A ConceptDesignation must represent the intent of one or more CodedConcepts. [9]CodedConcepts may be characterizedBy zero or more ConceptProperties. A ConceptProperty may represent or define one or more CodedConcepts.
A CodedConcept may be the sourceFor and/or the targetOf zero or more ConceptRelationships. Relationships are described in more detail in a following section.
A CodedConcept has the following attributes:
A ConceptDesignation is a name or other textual symbol that represents the intent of zero or more CodedConcepts. ConceptDesignations are language dependent.
ConceptDesignation has the following attributes:
A ConceptProperty is an "attribute", "facet" or some other characteristic that may represent or help definethe intended meaning of zero or more CodedConcepts. ConceptProperty has the following attributes:
The ConceptRelationship class represents binary relationships over the set of CodedConcepts defined in a single CodeSystem. [10]Each ConceptRelationship must have exactly one CodedConcept as a source and exactly one CodedConcept as a target. The relationship_code 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.
This list of relationship codes include:
Concept Code | IDescription | Trans | Reflexive | Symmetric | Inverse |
---|---|---|---|---|---|
hasSubtype | An otherwise unspecified subtype relationship. | Yes | No | No | isSubtypeOf |
hasPart | An otherwise unspecified partitive relationship. | Yes | Yes | No | isPartOf |
smallerThan | A generic ordering relationship. | Yes | No | No | greaterThan |
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.
The following table lists the basic data types that are used in the CTS Vocabulary Runtime, Vocabulary Browser and Translation APIs.
This section describes the coded data elements used in the vocabulary API
The following table lists the code systems and OIDS that are used in the CTS VAPI messages.
VAPI Data Element | Code System OID | Code System Name |
---|---|---|
LanguageCode | 2.16.840.1.113883.6.99 | ISO639-1 |
LanguageCode | 2.16.840.1.113883.6.100 | ISO639-2 |
MimeTypeCode | 2.16.840.1.113883.5.79 | MediaType |
ConceptStatusCode | 2.16.840.1.113883.5.1086 | ConceptStatusCode |
PropertyCode | 2.16.840.1.113883.5.1087 | ConceptProperty |
RelationshipCode | 2.16.840.1.113883.5.1088 | ConceptCodeRelationship |
MapQualityCode | 2.16.840.1.113883.5.1093 | TranslationQuality |
RelationQualifierCode | - | - |
MatchAlgorithmCode | 2.16.840.1.113883.5.1094 | MatchAlgorithm |
The vocabulary runtime and browsing API both inherit a common identification interface.
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
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.
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.
This section describes the attributes and methods of the runtime section of the CTS Vocabulary API.
getSupportedCodeSystems provides a list of all code systems and versions supported by the service.
Parameters:
Exceptions:
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.
Parameters:
Exceptions:
isConceptIdValid determines whether the supplied concept identifier is valid.
Parameters:
Exceptions:
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.
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.
lookupDesignation returns the most appropriate designation for the supplied concept identifier in the specified language and context. 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".
Parameters:
Exceptions:
RFC 3066, Tags for the Identification of Languages 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.
Determine whether the supplied concept codes are related
Parameters:
areCodesRelated returns TRUE if one of the following conditions holds:
Exceptions:
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.
The CTS Vocabulary Browsing API uses the same basic types as the runtime API, which are defined in Basic Types. This section describes the attributes and methods of the browser section of the CTS Vocabulary API.
The browser inherits the basic attributes of the Identification section, which is described in Service Identification Section
getSupportedCodeSystems provides a list of all code systems and versions supported by the service. The CodeSsytemIdAndVersionsList structure is defined in Code Systems Supported by the API
Exceptions:
Return a list of concept identifiers having matching designation(s)and criteria
Exceptions:
Return a list of concept identifiers having one or more properties with values that match the supplied match text string and other criteria:
Exceptions:
The following structures are all used to build the complete coded concept description return structure
lookupCompleteCodedConcept returns a structure containing everything that is known about a given concept code (from the CTS perspective).
Parameters:
Exceptions:
lookupDesignations returns selected designations for the supplied concept. The matching rules for lookupDesignations are identical to those defined in Search for Concept Codes by Designation Text. The ConceptDesignationList return structure is described in ConceptDesignation Structure.
Exceptions:
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 ConceptProperty Structure.
Exceptions:
Parameters:
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.
language_code and usageContext_code are 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.
Exceptions:
In the diagram below, the vertices represent an arbitrary transitive relationship with the arrows pointing from the source concepts to the target concepts.
The following tables show the values that would be returned from lookupCodeExpansion using the information described in the figure above and the supplied parameters.
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
1 | E | TRUE | (ecE) |
1 | F | TRUE | (ecF) |
1 | I | FALSE | - |
1 | J | TRUE | (ecJ) |
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
1 | E | FALSE | - |
2 | G | FALSE | - |
3 | H | FALSE | - |
1 | F | FALSE | - |
2 | G | FALSE | - |
3 | H | FALSE | - |
1 | I | FALSE | - |
1 | J | FALSE | - |
2 | K | TRUE | (ecK) |
3 | M | FALSE | - |
Note that node 2K was returned in the example above as expandable because a cycle was detected.
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
1 | B | FALSE | - |
2 | A | FALSE | - |
1 | C | FALSE | - |
2 | K | FALSE | - |
1 | J | FALSE | - |
2 | D | TRUE | (ecD) |
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
1 | A | TRUE | (ecA) |
1 | L | FALSE | - |
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
1 | L | FALSE | - |
1 | A | FALSE | - |
2 | B | FALSE | - |
3 | D | FALSE | - |
4 | E | FALSE | - |
5 | G | FALSE | - |
6 | H | FALSE | - |
4 | F | FALSE | - |
5 | G | FALSE | - |
6 | H | FALSE | - |
4 | I | FALSE | - |
4 | J | FALSE | - |
5 | K | TRUE | (ecK) |
6 | M | FALSE | - |
2 | C | FALSE | - |
3 | D | FALSE | - |
4 | E | FALSE | - |
5 | G | FALSE | - |
6 | H | FALSE | - |
4 | F | FALSE | - |
5 | G | FALSE | - |
6 | H | FALSE | - |
4 | I | FALSE | - |
4 | J | FALSE | - |
5 | K | TRUE | (ecK) |
6 | M | FALSE | - |
2 | C | FALSE | - |
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
1 | H | TRUE | (ecH) |
1 | I | TRUE | (ecI) |
1 | M | TRUE | (ecM) |
1 | L | FALSE | - |
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
- | - | - | - |
expandCodeExpansionContext further expands a RelatedCodeList node that was returned by a previous lookupCodeExpansion or expandCodeExpansionContext call.
Exceptions:
Note: expansion contexts are not necessarily permanent. The temporal validity of an expansion context is a function of the specific service implementation.
Extending the examples in Return a List of Related ConceptCodes.
1) expandCodeExpansionContext( (expandContext=ecE) using ecE returned by example one in the previous section
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
1 | G | TRUE | (ecG) |
Note that the path length is continued from the previous call.
2) expandCodeExpansionContext( (expandContext=ecG) using ecG returned by the immediately preceeding call
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
1 | H | FALSE | - |
3) expandCodeExpansionContext (expandContext=ecK) following example 2 in the previous section would yield:
pathLength | concept_code | canExpand | expansionContext |
---|---|---|---|
3 | D | FALSE | - |
4 | E | FALSE | - |
5 | G | FALSE | - |
6 | H | FALSE | - |
4 | F | FALSE | - |
5 | G | FALSE | - |
6 | H | FALSE | - |
4 | I | FALSE | - |
4 | J | FALSE | - |
5 | K | TRUE | (ecK) |
6 | M | FALSE | - |
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.
A CodeMap maps some or all of the concept codes from a source CodeSystem to the closest corresponding concept code in the target CodeSystem. A CodeMap is unidirectional - mapping from the source to the target does not imply the ability to map from the target back to the source. A CodeMap may optionally identify the from or to versions of the code systems being translated.
A CodeMap 'contains' one or more MapEntries. Note that the representation of this in this document is strictly symbolic and is not intended to specify how code mappings are actually performed.
Each CodeMap is identified by a unique map_name. It is possible for there to be more than one CodeMap between the same source and target CodeSystems. Each CodeMap has an optional mapDescription attribute that describes the source of the translation, when it was created, how it was done, etc.
A TranslationEntry represents a translation from the fromCode concept code in the source CodeSystem to a corresponding toCode concept code in the target CodeSystem. mapQuality_code 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".
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.
a CodeMap identifies a particular mapping
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.
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.
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.
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.
Parameters:
Exceptions:
The interface signatures for CTS have been specified using the interface definition language as specified in ISO/IEC 14750:1999 -- Open Distributed Processing -- Interface Definition Language (IDL). 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).
Unfortunately, these language mappings are not completely independent of the underlying CORBA architecture. As an example, in the Java language mapping:
It isn’t a difficult task, however, to remove these CORBA remnants, yielding an implementation-neutral interface specification.
The steps used to get from IDL to the target languages of SOAP and Java are:
The Figures below show samples of these transformations:
/* CTS Specification Version Identifier */ struct CTSVersionId { short major; short minor; };
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 </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
/* * A property code was used that wasn't valid for the code system */ exception UnknownPropertyCode { PropertyCode property_code; };
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
/************************************************* * 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); };
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 { /** *<PRE>List of mappings supported by the service </PRE> */ org.hl7.CTSVAPI.CodeMap[] getSupportedMaps () throws org.hl7.CTSVAPI.UnexpectedError; /** *<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 </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
The Apache Axis 1.1 java2wsdl compiler is used to transform the Java into WSDL. An example invocation method for CTSVAPI would be:
<?xml version="1.0" encoding="UTF-8"?> <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"> <wsdl:types> <schema targetNamespace="urn://hl7.org/CTSVAPI" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="SupportedMap"> <sequence> <element name="map_name" nillable="true" type="xsd:string"/> <element name="mapDescription" nillable="true" type="xsd:string"/> <element name="fromCodeSystem_id" nillable="true" type="xsd:string"/> <element name="fromCodeSystem_name" nillable="true" type="xsd:string"/> <element name="fromCodeSystem_version" nillable="true" type="xsd:string"/> <element name="toCodeSystem_id" nillable="true" type="xsd:string"/> <element name="toCodeSystem_name" nillable="true" type="xsd:string"/> <element name="toCodeSystem_version" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="ArrayOfSupportedMap"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SupportedMap[]"/> </restriction> </complexContent> </complexType> <complexType name="UnexpectedError"> <sequence> <element name="possible_cause" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="ConceptId"> <sequence> <element name="codeSystem_id" nillable="true" type="xsd:string"/> <element name="concept_code" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="MappedConceptCode"> <sequence> <element name="mappedConcept_id" nillable="true" type="impl:ConceptId"/> <element name="mapQuality_code" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="MappingNotAvailable"> <sequence> <element name="fromCodeSystem_id" nillable="true" type="xsd:string"/> <element name="toCodeSystem_id" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="UnableToMap"> <sequence/> </complexType> <complexType name="UnknownConceptCode"> <sequence> <element name="concept_code" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="UnknownCodeSystem"> <sequence> <element name="codeSystem_id" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="UnknownMapName"> <sequence> <element name="map_name" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="AmbiguousMapRequest"> <sequence> <element maxOccurs="unbounded" name="possible_maps" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="CTSVersionId"> <sequence> <element name="major" type="xsd:short"/> <element name="minor" type="xsd:short"/> </sequence> </complexType> </schema> </wsdl:types> <wsdl:message name="UnknownMapName"> <wsdl:part name="fault" type="impl:UnknownMapName"/> </wsdl:message> <wsdl:message name="AmbiguousMapRequest"> <wsdl:part name="fault" type="impl:AmbiguousMapRequest"/> </wsdl:message> <wsdl:message name="getServiceDescriptionResponse"> <wsdl:part name="getServiceDescriptionReturn" type="xsd:string"/> </wsdl:message> <wsdl:message name="MappingNotAvailable"> <wsdl:part name="fault" type="impl:MappingNotAvailable"/> </wsdl:message> <wsdl:message name="getServiceVersionRequest"> </wsdl:message> <wsdl:message name="getSupportedMapsResponse"> <wsdl:part name="getSupportedMapsReturn" type="impl:ArrayOfSupportedMap"/> </wsdl:message> <wsdl:message name="UnknownConceptCode"> <wsdl:part name="fault" type="impl:UnknownConceptCode"/> </wsdl:message> <wsdl:message name="UnexpectedError"> <wsdl:part name="fault" type="impl:UnexpectedError"/> </wsdl:message> <wsdl:message name="UnknownCodeSystem"> <wsdl:part name="fault" type="impl:UnknownCodeSystem"/> </wsdl:message> <wsdl:message name="UnableToMap"> <wsdl:part name="fault" type="impl:UnableToMap"/> </wsdl:message> <wsdl:message name="getCTSVersionRequest"> </wsdl:message> <wsdl:message name="getServiceNameResponse"> <wsdl:part name="getServiceNameReturn" type="xsd:string"/> </wsdl:message> <wsdl:message name="getServiceNameRequest"> </wsdl:message> <wsdl:message name="getServiceDescriptionRequest"> </wsdl:message> <wsdl:message name="mapConceptCodeRequest"> <wsdl:part name="fromConcept_id" type="impl:ConceptId"/> <wsdl:part name="toCodeSystem_id" type="xsd:string"/> <wsdl:part name="map_name" type="xsd:string"/> </wsdl:message> <wsdl:message name="mapConceptCodeResponse"> <wsdl:part name="mapConceptCodeReturn" type="impl:MappedConceptCode"/> </wsdl:message> <wsdl:message name="getSupportedMapsRequest"> </wsdl:message> <wsdl:message name="getCTSVersionResponse"> <wsdl:part name="getCTSVersionReturn" type="impl:CTSVersionId"/> </wsdl:message> <wsdl:message name="getServiceVersionResponse"> <wsdl:part name="getServiceVersionReturn" type="xsd:string"/> </wsdl:message> <wsdl:portType name="CodeMappingOperations"> <wsdl:operation name="getSupportedMaps"> <wsdl:input message="impl:getSupportedMapsRequest" name="getSupportedMapsRequest"/> <wsdl:output message="impl:getSupportedMapsResponse" name="getSupportedMapsResponse"/> <wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/> </wsdl:operation> <wsdl:operation name="mapConceptCode" parameterOrder="fromConcept_id toCodeSystem_id map_name"> <wsdl:input message="impl:mapConceptCodeRequest" name="mapConceptCodeRequest"/> <wsdl:output message="impl:mapConceptCodeResponse" name="mapConceptCodeResponse"/> <wsdl:fault message="impl:AmbiguousMapRequest" name="AmbiguousMapRequest"/> <wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/> <wsdl:fault message="impl:UnableToMap" name="UnableToMap"/> <wsdl:fault message="impl:MappingNotAvailable" name="MappingNotAvailable"/> <wsdl:fault message="impl:UnknownMapName" name="UnknownMapName"/> <wsdl:fault message="impl:UnknownConceptCode" name="UnknownConceptCode"/> <wsdl:fault message="impl:UnknownCodeSystem" name="UnknownCodeSystem"/> </wsdl:operation> <wsdl:operation name="getCTSVersion"> <wsdl:input message="impl:getCTSVersionRequest" name="getCTSVersionRequest"/> <wsdl:output message="impl:getCTSVersionResponse" name="getCTSVersionResponse"/> <wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/> </wsdl:operation> <wsdl:operation name="getServiceDescription"> <wsdl:input message="impl:getServiceDescriptionRequest" name="getServiceDescriptionRequest"/> <wsdl:output message="impl:getServiceDescriptionResponse" name="getServiceDescriptionResponse"/> <wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/> </wsdl:operation> <wsdl:operation name="getServiceName"> <wsdl:input message="impl:getServiceNameRequest" name="getServiceNameRequest"/> <wsdl:output message="impl:getServiceNameResponse" name="getServiceNameResponse"/> <wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/> </wsdl:operation> <wsdl:operation name="getServiceVersion"> <wsdl:input message="impl:getServiceVersionRequest" name="getServiceVersionRequest"/> <wsdl:output message="impl:getServiceVersionResponse" name="getServiceVersionResponse"/> <wsdl:fault message="impl:UnexpectedError" name="UnexpectedError"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="CodeMappingServiceSoapBinding" type="impl:CodeMappingOperations"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getSupportedMaps"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getSupportedMapsRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:input> <wsdl:output name="getSupportedMapsResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:output> <wsdl:fault name="UnexpectedError"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> </wsdl:operation> <wsdl:operation name="mapConceptCode"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="mapConceptCodeRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:input> <wsdl:output name="mapConceptCodeResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:output> <wsdl:fault name="AmbiguousMapRequest"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> <wsdl:fault name="UnexpectedError"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> <wsdl:fault name="MapNameSourceMismatch"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> <wsdl:fault name="MapNameTargetMismatch"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> <wsdl:fault name="UnableToMap"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> <wsdl:fault name="MappingNotAvailable"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> <wsdl:fault name="UnknownMapName"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> <wsdl:fault name="UnknownConceptCode"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> <wsdl:fault name="UnknownCodeSystem"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> </wsdl:operation> <wsdl:operation name="getCTSVersion"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getCTSVersionRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:input> <wsdl:output name="getCTSVersionResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:output> <wsdl:fault name="UnexpectedError"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> </wsdl:operation> <wsdl:operation name="getServiceDescription"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getServiceDescriptionRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:input> <wsdl:output name="getServiceDescriptionResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:output> <wsdl:fault name="UnexpectedError"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> </wsdl:operation> <wsdl:operation name="getServiceName"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getServiceNameRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:input> <wsdl:output name="getServiceNameResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:output> <wsdl:fault name="UnexpectedError"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> </wsdl:operation> <wsdl:operation name="getServiceVersion"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getServiceVersionRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:input> <wsdl:output name="getServiceVersionResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:output> <wsdl:fault name="UnexpectedError"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn://hl7.org/CTSVAPI" use="encoded"/> </wsdl:fault> </wsdl:operation> </wsdl:binding> <wsdl:service name="CodeMappingOperationsService"> <wsdl:port binding="impl:CodeMappingServiceSoapBinding" name="CodeMappingService"> <wsdlsoap:address location="http://localhost:8080/axis/services/CodeMappingService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
This section summarizes the broad scope of terminology services which draws on material and experience from the other relevant work identified in section 2.
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.
This section is concerned with services that provide information about the terminology server and the terminologies it supports.
Use case: To enable a client application to interact appropriately with servers supporting different versions of a terminology server specification.
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.
Use case: To enable a client application to establish whether a server can be used to access a specified terminology.
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.
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.
This section is concerned with services which access the information about a terminology as supported by the server.
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.
Use case: To allow the client application to determine whether the server provides data that is sufficiently complete, up-to-date and authoritative.
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).
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.
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.
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.
Some terminologies support a variety of types of relationships between term and/or concepts. For example:
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.
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.
This section is concerned with services which access the information content of a terminology.
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.
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:
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.
Use case: To enable a client application to display or validate the textual meaning of a concept or term represented by a unique identifier.
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.
Use case: To enable the client application to display alternative textual translations of the meaning of the identified concept.
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.
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.
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.
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.
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.
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.
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:
Phrase matches
Word matches
Multiple words matches
Pattern matches
Modifications applicable to most types of text search
Text searches may need to be moderated by other criteria noted in the next section.
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.
Status criteria
Use case: To allow a client application to retrieve only concepts or terms in current use.
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
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.
A terminology may contain values applicable to different contexts and these may be permitted for use in different attributes of particular HL7 messages.
Support for these criteria requires the server to have access to the appropriate HL7 vocabulary domain tables.
Relationship criteria
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".
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.
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.
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.
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)
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).
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:
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.
Use case: To allow the client application to display synonyms associated with a concept.
Use case: To allow the client application to make semantic deductions based on subtype relationships, for example, to count instances of "pneumonia" as instances of "lung disease" and "infection".
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.
By default this service should return the unique identifier and term for each concept or term.
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.
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.
By default this service should return the unique identifier and term for each concept or term.
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.
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.
Status criteria
Use case: To allow a client application to test if an identifier in a message or record is in current use.
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
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.
A terminology may contain values applicable to different contexts and these may be permitted for use in different attributes of particular HL7 messages.
Support for these criteria requires the server to have access to the appropriate HL7 vocabulary domain tables.
Relationship criteria
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).
A terminology may contain relationships which can be used to determine whether a concept is a subtype of another concept.
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).
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.
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".
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.
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.
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.
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".
OID | Code System Name | Description | Sample Values |
---|---|---|---|
CodeSystem | 2.16.840.1.113883.5.22 | The set of code systems known to HL7 | CAS (Chemical abstract codes) IETF1766 (Language identifiers) CodeSystem (Code System) |
ConceptStatus | 2.16.840.1.113883.5.1086 | The status of a domain entry as pertains to its review and incorporation into the HL7 domain specification database. | A (Active) D (Deleted) P (Proposed) R (Retired) |
VocabularyDomainQualifier | 2.16.840.1.113883.5.147 | The extensibility of coding determines whether or not exceptions are allowed in the domain of a coded attribute | CWE ( coded with exceptions) CNE (coded no exceptions) |
Language | 2.16.840.1.113883.6.99 | The human language that is used in textual descriptions or communications. From ISO 639. | EN (English) DE (German) EN-US (English - US dialect) EN-GB (English - GB dialect) |
TranslationQuality | 2.16.840.1.113883.5.1093 | The relationship between concepts between two code systems. | Exact Broader Than Narrower Than Different |
ConceptProperty | 2.16.840.1.113883.5.1087 | Concept property identifiers | openIssue appliesTo howApplies OID |
ConceptCodeRelationship | 2.16.840.1.113883.5.1088 | The relationship between two concepts in the same code system. | hasSubtype hasPart smallerThan |
MatchAlgorithm | 2.16.840.1.113883.5.1094 | The match algorithm to use when searching text. | Identical IdenticalIgnoreCase StartsWith StartsWithIgnoreCase EndsWith EndsWithIgnoreCase ContainsPhrase ContainsPhraseIgnoreCase WordsAnyOrder WordsAnyOrderIgnoreCase WildCards WildCardsIgnoreCase RegularExpression |
Concept Code | Designation | Description | Transitive | Inverse |
---|---|---|---|---|
hasSubtype | has subtype | A generic subsumption relationship. This relationship includes both exhaustive and non-exhaustive subtypes as well as mutually exclusive vs. overlapping. | True | isSubtypeOf |
hasPart | has part | A generic partitive relationship with no further details specified. | True | isPartOf |
smallerThan | is smaller than | A type of ordering relationship indicating quantitatively fewer entities | True | greaterThan |
The following listings contain the complete IDL used to generate the CTS API
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
Return to top of page |