The SNOMED CT subtype polyhierarchy is an important resource which allows retrieval of all the concepts that are subtypes of a specified concept. The full hierarchy is represented by subtype (is a) relationships between each concept and its proximal supertypes. Therefore, to determine is whether a concept is a subtype of another concept a chain of these subtypes must be followed. It is possible to follow these chain in a relational database environment but the queries to achieve this are complex and often perform poorly.
Fortunately, there is a well-understood way to simplify and speed up the testing process. This requires the creation of a resource known as a transitive closure table. A transitive closure table includes direct relationships between every concept and all of it subtypes and supertypes. This makes it possible to test whether a concept is a subtype of another concept looking for a single row in that table. Similarly it makes it easy to access all the subtypes (or supertypes) of concept with a query on a single table.
SNOMED International provides a Perl script that reads the snapshot relationships file. By processing this file, it rapidly generates the transitive closure of all the subtype relationships and then saves this as a file. The result a two column file (subtypeId and supertypeId) containing more than 6.5 million rows. This transitive closure file can then be read into a database table in the same way as the release files.
By using the transitive closure table very simple queries can:
The transitive closure can also be used to determine which supertype concept or concepts are essential to the definition of a concept. These concepts are known as the proximal primitive supertypes of a concept. Proximal primitive supertypes can be computed as follows.
Create a subset of Set-C containing only those concepts that have no subtypes that are also in Set-C1
|1||Concepts in Set-C that also have subtypes in Set-C are primitive supertypes of concept A but they are not proximal primitive supertypes because these subtype(s) are more specific concepts that are also primitive supertypes of concept A.|