This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "VocMnt-CodeSysRev"

From HL7Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Code System Revisions [[#Nt3|''[Not fully exposed in application]'']]==
+
{{:VocMnt-CodeSysRev/Root}}
 
+
{{:VocMnt-CodeSysRev/Register}}
A code system revision can either create (register) a new code system or update an existing system.
+
:{{to-top}}
===Registering a New Code System [[#Nt1|''[Not exposed in application]'']]===
+
{{:VocMnt-CodeSysRev/AddCode}}
 
+
:{{to-top}}
[[Image:VocMnt070.gif|thumb|center|384px|'''registerCodeSystem ''']]
+
{{:VocMnt-CodeSysRev/AddPrintName}}
 
+
:{{to-top}}
The '''registerCodeSystem''' element is used to register a new external, internal or external/internally coded code system with the HL7 RIM vocabulary.  The attributes of the '''registerCodeSystem''' entry are described below.
+
{{:VocMnt-CodeSysRev/AddProperty}}
 
+
:{{to-top}}
[[Image:VocMnt080.gif|thumb|center|512px|Attributes of in '''registerCodeSystem ''']]
+
{{:VocMnt-CodeSysRev/DefineRel}}
 
+
:{{to-top}}
{| class="wikitable" style="text-align:left"
+
{{:VocMnt-CodeSysRev/Modify}}
!width="15%"|
+
:{{to-top}}
!
+
{{:VocMnt-CodeSysRev/ChangeMeta}}
|-
+
:{{to-top}}
!valign="top"|codeSystemName
+
{{:VocMnt-CodeSysRev/ChangePrintName}}
|The full name used to describe the code system.
+
:{{to-top}}
|-
+
{{:VocMnt-CodeSysRev/ChangeCodeDesc}}
!valign="top"|codeSystemMnemonic
+
:{{to-top}}
|A short mnemonic used to represent the code system within the HL7 vocabulary.  The mnemonic must be unique.
+
{{:VocMnt-CodeSysRev/MoveCode}}  
|-
+
:{{to-top}}
!valign="top"|codeSystemType
+
{{:VocMnt-CodeSysRev/RetireCode}}
|'''''(see table below)'''''
+
:{{to-top}}
|-
+
{{:VocMnt-CodeSysRev/RemoveRel}}
!valign="top"|codeSystemOID
+
:{{to-top}}
|the official ISO Object Identifier (OID) of the code system.  The OID can be omitted when '''vocabularyRevision.documentStatus''' is anything other than '''''Final'''''.  The '''codeSystemOID '''must be explicitly stated before the code system can be registered in the official RIM database.
 
 
 
If the code system OID is omitted, it will be assigned an available number from the HL7 example root branch (2.16.840.1.113883.19).  A number will be assigned from the 2.16.840.1.113883.19.5 branch for internal code systems and the 2.16.840.1.113883.19.6 branch for External systems.
 
|}  
 
 
 
:  
 
:
 
{| border="1" cellpadding="5" cellspacing="0"
 
|+'''<u>codeSystemType</u> values'''
 
!width="15%"|codeSystemType
 
!Meaning
 
|-
 
|valign="top"|I
 
|''(Internal)'' The code system is created and maintained by HL7 '''(default)'''
 
|-
 
|valign="top"|E
 
|''(External)'' The code system is created and maintained by an outside party and is not carried in the HL7 tables
 
|-
 
|valign="top"|EI
 
|''(External/Internally maintained)'' The code system is created and maintained by an outside party, but a copy is carried within the HL7 tables for convenience.
 
|}
 
====Code System Description====
 
The '''description''' element immediately follows the [[#Ballot_Status|'''ballotStatus''']] if it exists. Otherwise it is the first element in the code system registration block.  It is optional and describes the intent or purpose of the code system revision.
 
 
 
[[Image:VocMnt091.gif|thumb|center|640px|Example XML header for '''codeSystemRevision''']]
 
 
 
The example above registers a new ''Beer and Flavor Classification'' code system under the mnemonic ''BEERS''.  The entry has passed RIM harmonization with 17 for, 4 against and one abstention.  The code system is ''Internal'' by default.  Because an OID isn’t supplied, an OID will automatically be generated from the 2.16.840.1.113883.19.5 branch.
 
 
 
[[Image:VocMnt101.gif|thumb|center|640px|Example XML for external code system registration]]
 
 
 
The above example registers the LOINC code system as an external entry under the mnemonic “LOINC” with the OID “2.16.840.1.113883.6.1”
 
 
 
====Adding Concept Codes to a Code System [[#Nt3|''[Exposed under VS in application]'']]====
 
 
 
The '''registerCodeSystem''' operation allows concept codes to be added to the newly registered system.
 
[[Image:VocMnt110.gif|thumb|center|384px|Elements '''addCodesToCodeSystem''']]
 
 
 
The first component of '''addCodesToCodeSystem''' is an optional [[#Ballot_Status|'''ballotStatus''']] as described above. Codes may either be added underneath an already existing concept code or as a completely new hierarchical node.  In this context “under” is used to imply subsumption.  If, for example, ''Pale Ale'' is a kind of ''Ale'', the code for ''Pale Ale'' would occur “under” the code for ''Ale''.
 
 
 
It is anticipated that the '''underCode''' option will be used primarily when rearranging existing code systems. Its attributes are:
 
 
 
[[Image:VocMnt120.gif|thumb|center|512px|Attributes '''underCode''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|conceptCode
 
|The concept code of an existing parent node
 
|-
 
!valign="top"|conceptName
 
|A valid designation for the parent node.  '''conceptName''' is optional, but will be validated if it is supplied.
 
|}  
 
             
 
The '''newCode''' node identifies a new concept code to be added to the code system.
 
 
 
[[Image:VocMnt130.gif|thumb|center|512px|Attributes '''newCode ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|conceptCode
 
|The new concept code to be added to the code system.  The code must not already exist in the system.
 
|-
 
!valign="top"|conceptName
 
|A valid designation for the concept code is required.
 
|}  
 
 
 
Each ''newCode'' entry can also include a description of the intent and purpose of the code.  The description element is optional, but '''<u>strongly recommended</u>'''.  Additional '''newCode''' entries may be nested underneath other entries as needed. The figure below shows a sample set of '''newCode''' entries.
 
 
 
[[Image:VocMnt141.gif|thumb|center|640px|Example XML for '''addCodesToCodeSystem''']]
 
 
 
The above example adds four new concept codes as “root nodes” – 1001 (ALE), 1005 (PORTER), 1006 (STOUT) and 1007 (BITTER STOUT).  It also adds concept codes 1002 (PALE ALE), 1003 (BITTER ALE) and 1004 (LIGHT ALE) as children of the ALE node.
 
 
 
[[Image:VocMnt151.gif|thumb|center|640px|Example XML for '''addCodesToCodeSystem '''on existing system]]
 
 
 
The example above shows how concept codes can be added underneath an existing concept code in an existing code system.  In the example we add two new concept codes – 1008 and 1009 as children of the existing concept code 1006 (STOUT).
 
 
 
====Adding Print Names to a Concept Code [[#Nt3|''[Exposed under VS in application]'']]====
 
 
 
Both the '''registerCodeSystem''' and the '''selectCodeSystem''' branches allow additional print names to be added to existing concept codes.
 
 
 
[[Image:VocMnt160.gif|thumb|center|384px|Element '''addPrintNameToCode ''']]
 
 
 
Each '''addPrintNameToCode''' entry can have its own ballot status (see above). If omitted, the [[#Ballot_Status|'''ballotStatus''']] of the containing element will be used.
 
 
 
[[Image:VocMnt170.gif|thumb|center|512px|Attributes '''addPrintNameToCode ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|conceptCode
 
|The concept code to which the new print name is to be added.
 
|-
 
!valign="top"|conceptName
 
|A valid previous designation for concept code.  Optional, but will be validated if it is supplied.
 
|-
 
!valign="top"|newPrintName
 
|The print name to be added to the concept code
 
|-
 
!valign="top"|languageCode
 
|The language code for the print name. Default is “en” for English
 
|-
 
!valign="top"|isPreferred
 
|Flag indicating whether the print name is preferred for the language.  Default is “true”.
 
|}
 
 
 
If the '''isPreferred flag''' is '''''true''''', the default value, all other print names for the same concept code and language will have their '''isPreferred flags''' set to '''''false'''''.
 
 
 
[[Image:VocMnt181.gif|thumb|center|640px|Example XML for '''addPrintNameToCode''']]
 
 
 
The example above adds two new German print names to concept code 1004 – LIGHT ALE.  The first name, Pils, is the preferred German name.
 
 
====Adding Properties to a Concept Code [[#Nt1|''[Not exposed in application]'']]====
 
 
 
Properties such as '''''openIssue''''', '''''appliesTo''''', '''''howApplies''''', etc. can be added to concept codes during either the code system registration or code system update phases.
 
 
 
[[Image:VocMnt190.gif|thumb|center|384px|Element '''addPropertyToCode''']]
 
 
 
'''addPropertyToCode''' can have its own [[#Ballot_Status|'''ballotStatus''']] or can inherit the [[#Ballot_Status|'''ballotStatus''']] from the containing entry. The concept code, property id and language code are defined as attributes (see below).  The property value itself is entered in the property element.
 
 
 
[[Image:VocMnt200.gif|thumb|center|512px|Attributes of '''addPropertyToCode ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|conceptCode
 
|The concept code to which the property is to be added
 
|-
 
!valign="top"|conceptName
 
|The preferred name of the code.  Optional, but validated if supplied.
 
|-
 
!valign="top"|propertyId
 
|The unique identifier of the property to be added
 
|-
 
!valign="top"|language
 
|The language of the property.  Default is “en” if not supplied.
 
|}  
 
 
 
[[Image:VocMnt211.gif|thumb|center|640px|Example XML for '''addPropertyToCode ''']]
 
 
 
The above example adds an '''''appliesTo''''' property to concept code “1007”.  The sample also shows an example of a negative vote – probably because the '''''appliesTo''''' property was being badly misused.
 
 
 
====Defining Relationships between Concept Codes [[#Nt1|''[Not exposed in application]'']]====
 
 
 
Additional relationships other than subsumption may be asserted to exist between concept codes.  As an example, one may want to assert that one concept code occurs '''''before''''' a second in a basic ordering.  Relationships can be added to concept codes during either the code system registration or code system update phases.
 
 
 
[[Image:VocMnt220.gif|thumb|center|384px|Element '''addConceptRelationship ''']]
 
 
 
As with the other operations, '''addConceptRelationship''' can have its own [[#Ballot_Status|'''ballotStatus''']] or can inherit the [[#Ballot_Status|'''ballotStatus''']] from the containing entry.  The '''addConceptRelationship''' attributes define the relationship to be added:
 
 
 
[[Image:VocMnt230.gif|thumb|center|512px|Attributes of '''addConceptRelationship ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|parentCodeSystemMnemonic
 
|The mnemonic identifying the code system that holds the parent code.  Optional. If blank, is assumed to be the code system established by the parent '''registerCodeSystem'''  or '''selectCodeSystem'''.
 
|-
 
!valign="top"|parentCode
 
|The concept code that occurs on the “left hand” or parent side of the relationship
 
|-
 
!valign="top"|parentName
 
|A valid designation for the parent code.  Optional but validated if present
 
|-
 
!valign="top"|relationship
 
|A valid relationship code (e.g. smallerThan)
 
|-
 
!valign="top"|childCodeSystemMnemonic
 
|The mnemonic identifying the code system that holds the child (related)  code.  Optional. If blank, is assumed to be the code system established by the parent '''registerCodeSystem'''  or '''selectCodeSystem'''.
 
|-
 
!valign="top"|childCode
 
|The concept code that occurs on the “right hand” or child side of the relationship
 
|-
 
!valign="top"|childName
 
|A valid designation for the child code.  Optional but validated if present.
 
|}  
 
 
[[Image:VocMnt241.gif|thumb|center|640px|Example XML for '''addConceptRelationship ''']]
 
 
 
The above example asserts that concept code “1002” is “less than” concept code “1003” in an ordinal sense.
 
 
===Modifying an Existing Code System [[#Nt2|''[Not fully exposed in application]'']]===
 
 
 
It is also possible to modify the contents of a previously registered code system.  As with new code systems, it is possible to add new concept codes to the code system, new print names or properties to concept codes, and new relationships between concept codes.  In addition it is also possible to modify the properties of the code system itself, modify or remove print names, descriptions, properties and relationships.  It is also possible to retire concept codes from code systems and adjust subsumption relationships.
 
 
 
[[Image:VocMnt250.gif|thumb|center|384px|Element '''selectCodeSystem''']]
 
 
 
'''selectCodeSystem''' has an optional [[#Ballot_Status|'''ballotStatus''']] element that can be used to record the vote on the entire modification. The first four '''selectCodeSystem''' operations (shown with a gray background in the figure above) have been discussed under '''registerCodeSystem''' (above), where they also apply. The remaining six operations are discussed in the following sub-sections.
 
 
 
'''selectCodeSystem''' has a single attribute, '''codeSystemMnemonic''', that selects the code system to be modified.
 
 
 
[[Image:VocMnt260.gif|thumb|center|512px|Attributes of '''selectCodeSystem ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|codeSystemMnemonic
 
|The HL7 mnemonic code for the code system to be selected
 
|}
 
 
 
[[Image:VocMnt271.gif|thumb|center|640px|Example XML for '''selectCodeSystem ''']]
 
 
 
The above example selects the “BEERS” code system for modification.  Unless otherwise noted, all of the changes within the selection were passed by a 12-1-0 vote (the author being the single negative vote) with the provision that author will sample all of the changes before they are officially recorded.
 
 
====Modifying the Code System Mnemonic, Name or Description [[#Nt1|''[Not exposed in application]'']]====
 
 
 
The '''modifyCodeSystem''' element is used to update the properties of the code system itself.
 
 
 
[[Image:VocMnt280.gif|thumb|center|384px|Element '''modifyCodeSystem''']]
 
 
 
'''modifyCodeSystem''' has two optional elements.  The first, [[#Ballot_Status|'''ballotStatus''']], defines the status of the modification if it is different than the status as it occurs on the '''selectCodeSystem''' node. The second optional element, '''description''', is used to add, update or remove the existing code system description. If the '''description''' element is not supplied, the existing code system description is unchanged. The name of a code system can be changed as well, using the '''codeSystemName''' attribute.
 
 
 
[[Image:VocMnt290.gif|thumb|center|512px|Attributes of '''modifyCodeSystem ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|codeSystemName
 
|If present, the code system OID will be updated to this value
 
|-
 
!valign="top"|newOID
 
|If present, the code system OID will be updated to this value
 
|}  
 
 
 
[[Image:VocMnt301.gif|thumb|center|640px|Example XML for '''modifyCodeSystem ''']]
 
 
 
The above example changes the BEERS code system name from what it was previously (Beer and Flavor Classification) to “Castello Beer and Flavor Classification.
 
 
 
====Updating the Print Name of a Concept Code [[#Nt3|''[Exposed under VS in application]'']]====
 
 
 
Print names for concept codes can be removed or updated, and the setting for which print name is preferred for a given language can be changed as well.
 
 
 
[[Image:VocMnt310.gif|thumb|center|384px|Element '''updateCodePrintName''']]
 
 
 
'''updateCodePrintName''' includes an optional [[#Ballot_Status|'''ballotStatus''']] that reflects the status of the change if it is different from that of the entire revision.
 
 
 
[[Image:VocMnt320.gif|thumb|center|512px|Attributes of '''updateCodePrintName ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|conceptCode
 
|The concept code to be changed
 
|-
 
!valign="top"|oldPrintName
 
|The original print name
 
|-
 
!valign="top"|newPrintName
 
|The new print name.  If omitted, the name isn’t changed.  If present, but empty, the print name is removed.
 
|-
 
!valign="top"|languageCode
 
|The language code for both the old and new print names.  Default: en.  Note: the language of a print name cannot be changed.  If this is necessary, the print name for one language must first be removed and then re-added under the second language.
 
|-
 
!valign="top"|isPreferred
 
|'''''true''''' means that this print name is the preferred one for the supplied language.  Setting this to '''''true''''' sets all other '''isPreferred''' flags to '''''false''''' to for the given concept code/language.
 
|}
 
 
[[Image:VocMnt331.gif|thumb|center|640px|Example XML for '''updateCodePrintName ''']]
 
 
 
The first entry above changes the print name of concept code “1004” from “LIGHT ALE” to “Light Ale”.  The second entry changes the German print name for concept code “1004” from “Pils” to “Kölsch”. Note that this operation would fail if there wasn’t already a German print name “Pils”.  The third entry changes “Lager” to be the preferred German print name if it isn’t already.  If it is, this operation would still succeed.  The fourth entry removes the “Kölsch” print name completely – a somewhat odd request since we went to all the trouble of changing it a couple lines earlier.
 
 
====Changing the Description of a Concept Code [[#Nt3|''[Exposed under VS in application]'']]====
 
 
 
The description of a concept code may be added, modified or removed using the '''updateCodeDescription''' element.
 
 
 
[[Image:VocMnt340.gif|thumb|center|384px|Element '''updateCodeDescription''']]
 
 
 
As with all updates, '''updateCodeDescription''' can have its own [[#Ballot_Status|'''ballotStatus''']] if needed to reflect special cases.  It has an optional '''oldDescription''' element that can contain the description that is being changed and a '''newDescription''' element that contains the revised description or can be empty if the description is to be completely removed.  If present, the '''oldDescription''' will be validated against the database before the change is performed.
 
 
 
[[Image:VocMnt350.gif|thumb|center|512px|Attributes of '''updateCodeDescription ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|conceptCode
 
|The concept code that the change is being applied to
 
|-
 
!valign="top"|conceptName
 
|A valid designation for the concept code.  Optional, but will be validated if supplied.
 
|}
 
 
 
[[Image:VocMnt361.gif|thumb|center|640px|Example XML for '''updateCodeDescription''']]
 
 
 
The example above removes the second sentence from the “Light Ale” description.  Note that the preferred name is “Light Ale” rather than “LIGHT ALE” because of an update that occurred earlier in both this document and the actual XML update source.
 
 
 
====Moving a Code in the Subsumption Hierarchy [[#Nt3|''[Exposed under VS in application]'']]====
 
 
 
Concept codes can be rearranged within the concept subsumption hierarchy.  ''' moveCode''' can be used to assert that one concept code is a “kind of” or “is implied by” a second concept code.  It can also remove this assertion.
 
 
 
[[Image:VocMnt370.gif|thumb|center|384px|Element '''moveCode''']]
 
 
 
As with all update operations, '''moveCode''' has a separate, optional '''ballotStatus node'''. The '''moveCode''' attributes specify the operation to be performed:
 
 
 
[[Image:VocMnt380.gif|thumb|center|512px|Attributes of '''moveCode''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|conceptCode
 
|The code of the concept to be moved.
 
|-
 
!valign="top"|conceptName
 
|A valid designation for the concept to be moved.  Optional, and if supplied it will be validated against the database before the operation occurs.
 
|-
 
!valign="top"|fromParentCode
 
|The current direct parent of the concept code, if any.  This attribute should be omitted if conceptCode doesn’t currently occur under any other node.
 
|-
 
!valign="top"|fromParentName
 
|A valid designation for the from parent code.  Optional, but validated if supplied.
 
|-
 
!valign="top"|toParentCode
 
|The new parent of conceptCode.  If omitted, conceptCode no longer has a parent in the subsumption hierarchy.
 
|-
 
!valign="top"|toParentName
 
|A valid designation for the to parent code. Optional, but validated if supplied.
 
|}
 
 
 
[[Image:VocMnt391.gif|thumb|center|640px|Example XML for '''moveCode ''']]
 
 
 
In the above example, concept code “1008” (SWEET STOUT) is first removed as a child of “1006” (STOUT).  If this operation succeeds, both STOUT and SWEET STOUT would be root nodes in the subsumption hierarchy.  The second part the operation asserts that 1006 (STOUT) is a kind of 1008 (SWEET STOUT).  Note that all other entries in the subsumption hierarchy remain unchanged (e.g. 1009 – MILK STOUT) remains a kind of STOUT throughout.
 
 
 
====Retiring a Concept Code [[#Nt3|''[Exposed under VS in application]'']]====
 
 
 
While a concept code may never be reused within a code system, it may be ''''retired'''' from active use.
 
 
 
[[Image:VocMnt400.gif|thumb|center|384px|Element '''retireCode ''']]
 
 
 
As with all operations, '''retireCode''' may be accompanied by an optional [[#Ballot_Status|'''ballotStatus''']]. The attributes of '''retireCode''' determine what actually happens:
 
 
 
[[Image:VocMnt410.gif|thumb|center|512px|Attributes of '''retireCode ''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|conceptCode
 
|The code of the concept to be retired
 
|-
 
!valign="top"|conceptName
 
|A valid designation for the concept to be retired.  Optional, but validated if supplied.
 
|-
 
!valign="top"|replacementCode
 
|A new or existing concept code that will replace the retired code.  If new, all of the retired code’s names, properties and relationships are copied over to the new code.  If '''replacementCode''' already exists, the current concept code’s properties, etc. are dropped.
 
|-
 
!valign="top"|replacementName
 
|The name of the replacement concept code.  If the replacement code exists and this name is supplied it will be validated.  If the replacement code is new and this name is supplied, it will become the preferred name for the replacement code.
 
|-
 
!valign="top"|completeDelete
 
|'''<<Editor is Uncertain as to what this means>>'''
 
|}  
 
 
====Removing Existing Concept Relationships [[#Nt1|''[Not exposed in application]'']]====
 
 
 
It is also possible to undo relationships that have previously been asserted using the '''addConceptRelationship''' node.
 
 
 
[[Image:VocMnt420.gif|thumb|center|384px|Element '''removeConceptRelationship''']]
 
 
 
Like all operations, '''removeConceptRelationship''' can have a [[#Ballot_Status|'''ballotStatus''']] entry that overrides the outside status.  '''removeConceptRelationship''' has the following attributes:
 
 
 
[[Image:VocMnt430.gif|thumb|center|512px|Attributes of '''removeConceptRelationship''']]
 
 
 
{| class="wikitable" style="text-align:left"
 
!width="15%"|
 
!
 
|-
 
!valign="top"|parentCodeSystemMnemonic
 
|The mnemonic identifying the code system that holds the parent code.  Optional. If blank, is assumed to be the code system established by the parent '''registerCodeSystem'''  or '''selectCodeSystem'''.
 
|-
 
!valign="top"|parentCode
 
|The left hand or parent side of an existing relationship entry
 
|-
 
!valign="top"|parentName
 
|A valid designation for the parentCode.  Optional but validated if present.
 
|-
 
!valign="top"|relationship
 
|The code for the existing relationship (e.g. smallerThan)
 
|-
 
!valign="top"|childCodeSystemMnemonic
 
|The mnemonic identifying the code system that holds the child code.  Optional. If blank, is assumed to be the code system established by the parent '''registerCodeSystem'''  or '''selectCodeSystem'''.
 
|-
 
!valign="top"|childCode
 
|The right hand or child side of an existing relationship entry
 
|-
 
!valign="top"|childName
 
|A valid designation for the '''childCode'''.  Optional but validated if present.
 
|}
 

Latest revision as of 18:10, 30 September 2007

Code System Revisions

[Not fully exposed in application]

A code system revision can either create (register) a new code system or update an existing system.

Registering a New Code System

[Not exposed in application]
registerCodeSystem

The registerCodeSystem element is used to register a new external, internal or external/internally coded code system with the HL7 RIM vocabulary. The attributes of the registerCodeSystem entry are described below.

Attributes of in registerCodeSystem
codeSystemName The full name used to describe the code system.
codeSystemMnemonic A short mnemonic used to represent the code system within the HL7 vocabulary. The mnemonic must be unique.
codeSystemType (see table below)
codeSystemOID the official ISO Object Identifier (OID) of the code system. The OID can be omitted when vocabularyRevision.documentStatus is anything other than Final. The codeSystemOID must be explicitly stated before the code system can be registered in the official RIM database.

If the code system OID is omitted, it will be assigned an available number from the HL7 example root branch (2.16.840.1.113883.19). A number will be assigned from the 2.16.840.1.113883.19.5 branch for internal code systems and the 2.16.840.1.113883.19.6 branch for External systems.

codeSystemType values
codeSystemType Meaning
I (Internal) The code system is created and maintained by HL7 (default)
E (External) The code system is created and maintained by an outside party and is not carried in the HL7 tables
EI (External/Internally maintained) The code system is created and maintained by an outside party, but a copy is carried within the HL7 tables for convenience.

Code System Description

The description element immediately follows the ballotStatus if it exists. Otherwise it is the first element in the code system registration block. It is optional and describes the intent or purpose of the code system revision.

Example XML header for codeSystemRevision

The example above registers a new Beer and Flavor Classification code system under the mnemonic BEERS. The entry has passed RIM harmonization with 17 for, 4 against and one abstention. The code system is Internal by default. Because an OID isn’t supplied, an OID will automatically be generated from the 2.16.840.1.113883.19.5 branch.

Example XML for external code system registration

The above example registers the LOINC code system as an external entry under the mnemonic “LOINC” with the OID “2.16.840.1.113883.6.1”

Jump to top of page

Adding Concept Codes to a Code System

[Exposed under VS in application]

The registerCodeSystem operation allows concept codes to be added to the newly registered system.

Elements addCodesToCodeSystem

The first component of addCodesToCodeSystem is an optional ballotStatus as described above. Codes may either be added underneath an already existing concept code or as a completely new hierarchical node. In this context “under” is used to imply subsumption. If, for example, Pale Ale is a kind of Ale, the code for Pale Ale would occur “under” the code for Ale.

It is anticipated that the underCode option will be used primarily when rearranging existing code systems. Its attributes are:

Attributes underCode
conceptCode The concept code of an existing parent node
conceptName A valid designation for the parent node. conceptName is optional, but will be validated if it is supplied.

The newCode node identifies a new concept code to be added to the code system.

Attributes newCode
conceptCode The new concept code to be added to the code system. The code must not already exist in the system.
conceptName A valid designation for the concept code is required.

Each newCode entry can also include a description of the intent and purpose of the code. The description element is optional, but strongly recommended. Additional newCode entries may be nested underneath other entries as needed. The figure below shows a sample set of newCode entries.

Example XML for addCodesToCodeSystem

The above example adds four new concept codes as “root nodes” – 1001 (ALE), 1005 (PORTER), 1006 (STOUT) and 1007 (BITTER STOUT). It also adds concept codes 1002 (PALE ALE), 1003 (BITTER ALE) and 1004 (LIGHT ALE) as children of the ALE node.

Example XML for addCodesToCodeSystem on existing system

The example above shows how concept codes can be added underneath an existing concept code in an existing code system. In the example we add two new concept codes – 1008 and 1009 as children of the existing concept code 1006 (STOUT).

Jump to top of page

Adding Print Names to a Concept Code

[Exposed under VS in application]

Both the registerCodeSystem and the selectCodeSystem branches allow additional print names to be added to existing concept codes.

Element addPrintNameToCode

Each addPrintNameToCode entry can have its own ballot status (see above). If omitted, the ballotStatus of the containing element will be used.

Attributes addPrintNameToCode
conceptCode The concept code to which the new print name is to be added.
conceptName A valid previous designation for concept code. Optional, but will be validated if it is supplied.
newPrintName The print name to be added to the concept code
languageCode The language code for the print name. Default is “en” for English
isPreferred Flag indicating whether the print name is preferred for the language. Default is “true”.

If the isPreferred flag is true, the default value, all other print names for the same concept code and language will have their isPreferred flags set to false.

Example XML for addPrintNameToCode

The example above adds two new German print names to concept code 1004 – LIGHT ALE. The first name, Pils, is the preferred German name.

Jump to top of page

Adding Properties to a Concept Code

[Not exposed in application]

Properties such as openIssue, appliesTo, howApplies, etc. can be added to concept codes during either the code system registration or code system update phases.

Element addPropertyToCode

addPropertyToCode can have its own ballotStatus or can inherit the ballotStatus from the containing entry. The concept code, property id and language code are defined as attributes (see below). The property value itself is entered in the property element.

Attributes of addPropertyToCode
conceptCode The concept code to which the property is to be added
conceptName The preferred name of the code. Optional, but validated if supplied.
propertyId The unique identifier of the property to be added
language The language of the property. Default is “en” if not supplied.
Example XML for addPropertyToCode

The above example adds an appliesTo property to concept code “1007”. The sample also shows an example of a negative vote – probably because the appliesTo property was being badly misused.

Jump to top of page

Defining Relationships between Concept Codes

[Not exposed in application]

Additional relationships other than subsumption may be asserted to exist between concept codes. As an example, one may want to assert that one concept code occurs before a second in a basic ordering. Relationships can be added to concept codes during either the code system registration or code system update phases.

Element addConceptRelationship

As with the other operations, addConceptRelationship can have its own ballotStatus or can inherit the ballotStatus from the containing entry. The addConceptRelationship attributes define the relationship to be added:

Attributes of addConceptRelationship
parentCodeSystemMnemonic The mnemonic identifying the code system that holds the parent code. Optional. If blank, is assumed to be the code system established by the parent registerCodeSystem or selectCodeSystem.
parentCode The concept code that occurs on the “left hand” or parent side of the relationship
parentName A valid designation for the parent code. Optional but validated if present
relationship A valid relationship code (e.g. smallerThan)
childCodeSystemMnemonic The mnemonic identifying the code system that holds the child (related) code. Optional. If blank, is assumed to be the code system established by the parent registerCodeSystem or selectCodeSystem.
childCode The concept code that occurs on the “right hand” or child side of the relationship
childName A valid designation for the child code. Optional but validated if present.
Example XML for addConceptRelationship

The above example asserts that concept code “1002” is “less than” concept code “1003” in an ordinal sense.

Jump to top of page

Modifying an Existing Code System

[Not fully exposed in application]

It is also possible to modify the contents of a previously registered code system. As with new code systems, it is possible to add new concept codes to the code system, new print names or properties to concept codes, and new relationships between concept codes. In addition it is also possible to modify the properties of the code system itself, modify or remove print names, descriptions, properties and relationships. It is also possible to retire concept codes from code systems and adjust subsumption relationships.

Element selectCodeSystem

selectCodeSystem has an optional ballotStatus element that can be used to record the vote on the entire modification. The first four selectCodeSystem operations (shown with a gray background in the figure above) have been discussed under registerCodeSystem (above), where they also apply. The remaining six operations are discussed in the following sub-sections.

selectCodeSystem has a single attribute, codeSystemMnemonic, that selects the code system to be modified.

Attributes of selectCodeSystem
codeSystemMnemonic The HL7 mnemonic code for the code system to be selected
Example XML for selectCodeSystem

The above example selects the “BEERS” code system for modification. Unless otherwise noted, all of the changes within the selection were passed by a 12-1-0 vote (the author being the single negative vote) with the provision that author will sample all of the changes before they are officially recorded.

Jump to top of page

Modifying the Code System Mnemonic, Name or Description

[Not exposed in application]

The modifyCodeSystem element is used to update the properties of the code system itself.

Element modifyCodeSystem

modifyCodeSystem has two optional elements. The first, ballotStatus, defines the status of the modification if it is different than the status as it occurs on the selectCodeSystem node. The second optional element, description, is used to add, update or remove the existing code system description. If the description element is not supplied, the existing code system description is unchanged. The name of a code system can be changed as well, using the codeSystemName attribute.

Attributes of modifyCodeSystem
codeSystemName If present, the code system OID will be updated to this value
newOID If present, the code system OID will be updated to this value
Example XML for modifyCodeSystem

The above example changes the BEERS code system name from what it was previously (Beer and Flavor Classification) to “Castello Beer and Flavor Classification.

Jump to top of page

Updating the Print Name of a Concept Code

[Exposed under VS in application]

Print names for concept codes can be removed or updated, and the setting for which print name is preferred for a given language can be changed as well.

Element updateCodePrintName

updateCodePrintName includes an optional ballotStatus that reflects the status of the change if it is different from that of the entire revision.

Attributes of updateCodePrintName
conceptCode The concept code to be changed
oldPrintName The original print name
newPrintName The new print name. If omitted, the name isn’t changed. If present, but empty, the print name is removed.
languageCode The language code for both the old and new print names. Default: en. Note: the language of a print name cannot be changed. If this is necessary, the print name for one language must first be removed and then re-added under the second language.
isPreferred true means that this print name is the preferred one for the supplied language. Setting this to true sets all other isPreferred flags to false to for the given concept code/language.
Example XML for updateCodePrintName

The first entry above changes the print name of concept code “1004” from “LIGHT ALE” to “Light Ale”. The second entry changes the German print name for concept code “1004” from “Pils” to “Kölsch”. Note that this operation would fail if there wasn’t already a German print name “Pils”. The third entry changes “Lager” to be the preferred German print name if it isn’t already. If it is, this operation would still succeed. The fourth entry removes the “Kölsch” print name completely – a somewhat odd request since we went to all the trouble of changing it a couple lines earlier.

Jump to top of page

Changing the Description of a Concept Code

[Exposed under VS in application]

The description of a concept code may be added, modified or removed using the updateCodeDescription element.

Element updateCodeDescription

As with all updates, updateCodeDescription can have its own ballotStatus if needed to reflect special cases. It has an optional oldDescription element that can contain the description that is being changed and a newDescription element that contains the revised description or can be empty if the description is to be completely removed. If present, the oldDescription will be validated against the database before the change is performed.

Attributes of updateCodeDescription
conceptCode The concept code that the change is being applied to
conceptName A valid designation for the concept code. Optional, but will be validated if supplied.
Example XML for updateCodeDescription

The example above removes the second sentence from the “Light Ale” description. Note that the preferred name is “Light Ale” rather than “LIGHT ALE” because of an update that occurred earlier in both this document and the actual XML update source.

Updating Property on a Concept Code

Once a property has been added to a coded concept, that property may be updated using the updatePropertyOnCode' element.

Element updatePropertyOnCode

As with other property setting elements, the value to which the property should be updated is documented as the content of a child property element.

Attributes of updatePropertyOnCode
conceptCode The concept code to which the property is attached
propertyId The identifier (name) of the property to be updated.

Removing Properties from a Concept Code

A property that has been added to a coded concept may be removed using the removePropertyFromCode element.

Element removePropertyFromCode
Attributes of removePropertyFromCode
conceptCode The concept code to which the property is attached
propertyId The identifier (name) of the property to be removed.
Jump to top of page

Moving a Code in the Subsumption Hierarchy

[Exposed under VS in application]

Concept codes can be rearranged within the concept subsumption hierarchy. moveCode can be used to assert that one concept code is a “kind of” or “is implied by” a second concept code. It can also remove this assertion.

Element moveCode

As with all update operations, moveCode has a separate, optional ballotStatus node. The moveCode attributes specify the operation to be performed:

Attributes of moveCode
conceptCode The code of the concept to be moved.
conceptName A valid designation for the concept to be moved. Optional, and if supplied it will be validated against the database before the operation occurs.
fromParentCode The current direct parent of the concept code, if any. This attribute should be omitted if conceptCode doesn’t currently occur under any other node.
fromParentName A valid designation for the from parent code. Optional, but validated if supplied.
toParentCode The new parent of conceptCode. If omitted, conceptCode no longer has a parent in the subsumption hierarchy.
toParentName A valid designation for the to parent code. Optional, but validated if supplied.
Example XML for moveCode

In the above example, concept code “1008” (SWEET STOUT) is first removed as a child of “1006” (STOUT). If this operation succeeds, both STOUT and SWEET STOUT would be root nodes in the subsumption hierarchy. The second part the operation asserts that 1006 (STOUT) is a kind of 1008 (SWEET STOUT). Note that all other entries in the subsumption hierarchy remain unchanged (e.g. 1009 – MILK STOUT) remains a kind of STOUT throughout.

Jump to top of page

Retiring a Concept Code

[Exposed under VS in application]

While a concept code may never be reused within a code system, it may be 'retired' from active use.

Element retireCode

As with all operations, retireCode may be accompanied by an optional ballotStatus. The attributes of retireCode determine what actually happens:

Attributes of retireCode
conceptCode The code of the concept to be retired
conceptName A valid designation for the concept to be retired. Required.
replacementCode A new or existing concept code that will replace the retired code. If new, all of the retired code’s names, properties and relationships are copied over to the new code. If replacementCode already exists, the current concept code’s properties, etc. are dropped.
replacementName The name of the replacement concept code. If the replacement code exists and this name is supplied it will be validated. If the replacement code is new and this name is supplied, it will become the preferred name for the replacement code.
completeDelete <<Editor is Uncertain as to what this means>>
Jump to top of page

Removing Existing Concept Relationships

[Not exposed in application]

It is also possible to undo relationships that have previously been asserted using the addConceptRelationship node.

Element removeConceptRelationship

Like all operations, removeConceptRelationship can have a ballotStatus entry that overrides the outside status. removeConceptRelationship has the following attributes:

Attributes of removeConceptRelationship
parentCodeSystemMnemonic The mnemonic identifying the code system that holds the parent code. Optional. If blank, is assumed to be the code system established by the parent registerCodeSystem or selectCodeSystem.
parentCode The left hand or parent side of an existing relationship entry
parentName A valid designation for the parentCode. Optional but validated if present.
relationship The code for the existing relationship (e.g. smallerThan)
childCodeSystemMnemonic The mnemonic identifying the code system that holds the child code. Optional. If blank, is assumed to be the code system established by the parent registerCodeSystem or selectCodeSystem.
childCode The right hand or child side of an existing relationship entry
childName A valid designation for the childCode. Optional but validated if present.
Jump to top of page