8 Hierarchical Code List

Last modified by Helena on 2025/07/20 13:05

8.1 Scope

The Codelist described in the section on structural definitions supports a simple hierarchy of Codes, and restricts any child Code to having just one parent Code. Whilst this structure is useful for supporting the needs of the DataStructureDefinition and the MetadataStructureDefinition, it may not sufficient for supporting the more complex associations between codes that are often found in coding schemes such as a classification scheme. Often, the Codelist used in a DataStructureDefinition is derived from a more complex coding scheme. Access to such a coding scheme can aid applications, such as OLAP applications or data visualisation systems, to give more views of the data than would be possible with the simple Codelist used in the DataStructureDefinition.

Note that a hierarchical code list is not necessarily a balanced tree. A balanced tree is where levels are pre-defined and fixed, (i.e. a level always has the same set of codes, and any code has a fixed parent and child relationship to other codes). A statistical classification is an example of a balanced tree, and the support for a balanced hierarchy is a sub set, and special case, of the hierarchical code list.

The principal features of the Hierarchical Codelist are:

  1. A child code can have more than one parent.
  2. There can be more than one code that has no parent (i.e. more than one “root node”).
  3. There may be many hierarchies (or “views”) defined, in terms of the associations between the codes. Each hierarchy serves a particular purpose in the reporting, analysis, or dissemination of data.
  4. The levels in a hierarchy can be explicitly defined or they can be implicit: (i.e. they exist only as parent/child relationships in the coding structure).

8.2 Inheritance

8.2.1 Class Diagram

1747903601152-126.png

Figure 30: Inheritance class diagram for the Hierarchical Codelist

8.2.2 Explanation of the Diagram

8.2.2.1 Narrative

The HierarchicalCodelist inherits from MaintainableArtefact and thus has identification, naming, versioning and a maintenance agency. Both Hierarchy and Level are a NameableArtefact and therefore have an Id, multi-lingual name and multi-lingual description. A HierachicalCode is an IdentifiableArtefact.

It is important to understand that the Codes participating in a HierarchicalCodelist are not themselves contained in the list – they are referenced from the list and are maintained in one or more Codelists. This is explained in the narrative of the relationship class diagram below..

8.2.2.2 Definitions

The definitions of the various classes, attributes, and associations are shown in the relationship section below.

8.3 Relationship

8.3.1 Class Diagram

1747903661055-474.png

Figure 31: Relationship class diagram of the Hierarchical Code Scheme

8.3.2 Explanation of the Diagram

8.3.2.1 Narrative

The basic principles of the HierarchicalCodelist are:

  1. The HierarchicalCodelist is a specification of the Codes comprising the scheme and the specification of the structure of the Codes in the scheme in terms of one or more Hierarchy.
  2. The Codes in the HierarchicalCodelist are not themselves a part of the scheme, rather they are references to Codes in one or more external Codelists.
  3. Any individual Code may participate in many Hierarchys, in order to give structure to the HierarchicalCodelist.
  4. The Hierarchy of Codes is specified in HierarchicalCode. This references the Code and its immediate child HierarchicalCodes.

A Hierarchy can have formal levels (hasFormalLevels=”true”). However, even if hasFormalLevels=”false” the Hierarchy can still have one or more Levels associated in order to document information about the HierarchicalCodes.

If hasFormalLevels=”false the Hierarchy is “value based” comprising a hierarchy of codes with no formal Levels. If hasFormalLevels=”true” then the hierarchy is “level based” where each Level is a formal Level in the HierarchicalCodeList, such as those present in statistical classifications. In a “level based” hierarchy each HierarchicalCode is linked to the Level in which it resides (which must be in the same Hierarchy as the HierarchicalCode). It is expected that all HierarchicalCodes at the same hierarchic level defined by the +parent/+child association will be linked to the same Level. Note that the +level association need only be specified if the HierarchicalCode is at a different hierarchical level ((implied by the HierarchicalCode parent/child association) than the actual Level in the level hierarchy (implied by the Level parent/child association).

[Note that organisations wishing to be compliant with accepted models for statistical classifications should ensure that the Id is the number associated with the Level, where Levels are numbered consecutively starting with level 1 at the highest Level].

The Level may have CodingFormat information defined (e.g. coding type at that level).

8.3.2.2 Definitions

ClassFeatureDescription
HierarchicalCode list

Inherits from:
MaintainableArtefact

An organised collection of codes that may participate in many parent/child relationships with other Codes in the scheme, as defined by one or more Hierarchy of the scheme.
 +hierarchyAssociation to Hierarchies of Codes.
Hierarchy

Inherits from:
NameableArtefact

A classification structure arranged in levels of detail from the broadest to the most detailed level.
 hasFormalLevels

If “true” this indicates a hierarchy where the structure is arranged in levels of detail from the broadest to the most detailed level.
If “false” this indicates a hierarchy structure where the items in the hierarchy have no formal level structure.

 +codesAssociation to the toplevel Hierarchical Codes in the Hierarchy.
 +levelAssociation to the top Level in the Hierarchy.
Level

Inherits from
NameableArtefact

In a “level based” hierarchy this describes a group of Codes which are characterised by homogeneous coding, and where the parent of each Code in the group is at the same higher level of the Hierarchy.
In a “value based’ hierarchy this describes information about the HierarchicalCodes at the specified nesting level.

 +codeFormatAssociation to the Coding Format.
 +childAssociation to a child Level of Level.
CodingFormat Specifies format information for the codes at this level in the hierarchy such as whether the codes at the level are alphabetic, numeric or alphanumeric and the code length.
HierarchicalCode A hierarchic structure of code references.
 validFromDate from which the construct is valid
 validToDate from which construct is superseded.
 +codeAssociation to the Code that is used at the specific point in the hierarchy.
 +childAssociation to a child Code in the hierarchy.
 +levelAssociation to a Level where levels have been defined for the Hierarchy.
Code The Code to be used at this point in the hierarchy.
 /itemsAssociation to the Code list containing the Code.
Codelist The Code list containing the Code.