Search



  

Overview

The SNOMED CT concept model is the set of rules that determines the permitted sets of relationships between particular types of concepts.

Notes

Concept model rules are represented in a machine readable form by the members of the following four reference set types:

For full details of these reference set and the ways in which the rules are represented in these reference sets, refer to the SNOMED CT Machine Readable Concept Model (MRCM) specification and guide.

Requirements and Options

Access to concept model rules is required to support a range of different practical uses including those identified in the Interdependencies section on this page. The general techniques for accessing the data are the same as those for other references sets. However, interpretation of the data requires access to related data in each of the MRCM reference set types. To illustrate this the requirements listed in  Table 4.13-1 and service examples are presented in a logical interrelated order.

Table 4.13-1: Services Required

Service Name and StatusInputOutput

Get the refsetId of specific type of MRCM reference set applicable to concepts in an identified module

REQUIRED INTERNAL SERVICE

SNOMED CT Edition and Version

The conceptId representing the moduleId

The MRCM reference set type (mrcmDomain, mrcmAttributeDomain or mrcmAttributeRange)

The identifier of the specific MRCM reference set applicable to concept in the specified module.

Client applications do not require access to this data. However, it is required as an internal service to enable other MRCM services.

Get the domain or set of domains that include a specified concept

REQUIRED INTERNAL SERVICE

SNOMED CT Edition and Version

The conceptId for which the domains are to be identified.

An indication of whether domains applicable to proximal primitive definitions are to be included.

The conceptId can be used to get the required moduleId and then, using the service above, the appropriate MRCM Domain reference set can be identified.

The general process for identifying the domains that include a specified concept is as follows:

  • Identify the top-level domain that subsumes the concept.
  • Identify each of the domains that is a child or descendant of that top level domain.
  • The concept is included the top-level domain that subsumes the concept and any of its child and descendant domains that which have expression constraints to which it conforms.
    • The expression constraint tested depends proximal primitive indicator value
      • False: Conformance with the domainConstraint is required.
      • True: Conformance with the proximalPrimitiveConstraint is required.

The identifiers of the domains to which the identified concept belongs.

Client applications do not require access to this data. However, it is required as an internal service to enable the service service following MRCM services.

Get the set of attribute rules applicable to an identified concept

REQUIRED

SNOMED CT Edition and Version

The conceptId for which the attribute rules are to be identified.

The required internal services above are used to identify the domains that include the concept.

An indication of whether domains applicable to proximal primitive definitions are to be included.

Content type option - one of the following concept identifiers:

All the above content types subsume the content type 723596005 | All SNOMED CT content| .

The content type 723593002 | All new precoordinated SNOMED CT content| also subsumes the content type 723594008 | All precoordinated SNOMED CT content| .


The selected set of attribute domain rules.

  • Each rule should include the content of all additional data columns in the MRCM Attribute Domain reference set.

The superset of all attribute domain rules that apply to the identified domains apply to the identified concept.

The set of rules returned should be filtered based on the selected content type.Note this is the superset that includes the attributes that can be applied to a top level domain and any sub domains of which a specified concept is a member.

Get the range of values applicable to a specified attribute

REQUIRED

SNOMED CT Edition and Version

The attributeId for which values are to be identified.

Content type options (see previous service)

The id of the concept to which the attribute is being applied (or the moduleId of the module to which concept belongs) are also required unless provided by internal services.

The selected set of attribute domain rules.

  • Each rule should include the content of all the additional data columns in the MRCM Attribute Range reference set.

Conformance with the rangeConstraint expression is determined by applying the expression constraint to a specific value. The rangeConstraint can also be used filter the range of permitted refinements to the value of that attribute in postcoordinated expression.

Interdependencies

Required By

Depends On

Service Examples

The Snowstorm and FHIR examples are presented in plain text and URL encoded versions. Always use the "Encoded URL" when testing the example service requests. The plain text version is included to aid readability but using this version in a service request may result in errors. These errors result from characters that have to be encoded as they are not permitted in a URL (see IETF RFC1738).

Table 4.13-2: Snowstorm API

Service Name

API Call2

Result

Get the set of reference sets applicable to concepts in an identified module

This service is supported internally and used by the services below. The relevant data is also directly accessible at the API using the general service used to access refset members as described in 4.10 Get Data from a Reference Set.

[snowstorm]/snomed-ct/[branchPath]/members?referenceSet=[MrcmModuleScopeRefsetId]&referencedComponentId=[moduleId]&active=true	

For example

[snowstorm]/snomed-ct/MAIN/2020-01-31/members?referenceSet=723563008&referencedComponentId=900000000000207008&active=true

Encoded URL

[snowstorm]/snomed-ct/MAIN%2F2020-01-31/members?referenceSet=723563008&referencedComponentId=900000000000207008&active=true

JSON representation of three refset members each of which refers to one of the MRCM reference sets for concepts in the specified module.

  • The MRCM reference set references is represented by the additionalFields.mrcmRuleRefsetId property.

Get the domain or set of domains that include a specified concept

This service is supported internally and used by the services below. However, it is not directly accessible at the API.


Get the set of attributes applicable to a concept in a specified domain or set of domains

[snowstorm]/snomed-ct/mrcm/[branchPath]/domain-attributes?parentIds=427019001&proximalPrimitiveModeling=%5Btrue%7Cfalse%5D&contentType=%5Bcontent-type%5D%09

For example

[snowstorm]/snomed-ct/mrcm/MAIN/2020-01-31/domain-attributes?parentIds=427019001&proximalPrimitiveModeling=false&contentType=POSTCOORDINATED

Encoded URL

[snowstorm]/snomed-ct/mrcm/MAIN%2F2020-01-31/domain-attributes?parentIds=427019001&proximalPrimitiveModeling=false&contentType=POSTCOORDINATED

Returns a JSON representation of data related to each for the attributes applicable to specified concept.

The data returned is filtered so it only includes data relevant to in the specified contentType.

The data returned includes information from all the columns in the Attribute Domain reference set.

  • It also includes terms associated with the attribute.
  • The contentTypeId and ruleStrengthId are represented by human readable tokenized strings rather than the conceptId.

Get the range of values applicable to a specified attribute

Snowstorm does not provide a specific service for returning the attribute range constraint applicable to a concept model attribute. However, it does support access to the relevant data in two ways. Firstly the general service for access to refset members as (see 4.10 Get Data from a Reference Set) can be as illustrated here. Additionally, the Snowstorm service shown in the next row provides a way to carry out a search that is constrained to the permitted set of values for an attribute.

[snowstorm]/snomed-ct/[branchPath]/members?referenceSet=[MrcmAttributeRangeRefsetId]&referencedComponentId=[attributeId]&active=true&contentType=[contentType]	

For example

[snowstorm]/snomed-ct/MAIN/2020-01-31/members?referenceSet=723562003&referencedComponentId=260870009&active=true&contentType=POSTCOORDINATED

Encoded URL

[snowstorm]/snomed-ct/MAIN%2F2020-01-31/members?referenceSet=723562003&referencedComponentId=260870009&active=true&contentType=POSTCOORDINATED

x

Returns a JSON representation of data related to the specified attribute range.

The range data is returned in the following properties of the additionalFields object:

  • rangeConstraint
  • attributeRule
  • contentTypeId
  • ruleStrengthId

Find values that are within the range or a specified attribute

[snowstorm]/snomed-ct/mrcm/[branchPath]/attribute-values/260870009?contentType=POSTCOORDINATED&termPrefix=[searchTerm]	

For example

[snowstorm]/snomed-ct/mrcm/MAIN/2020-01-31/attribute-values/260870009?contentType=POSTCOORDINATED&termPrefix=urg

Encoded URL

[snowstorm]/snomed-ct/mrcm/MAIN%2F2020-01-31/attribute-values/260870009?contentType=POSTCOORDINATED&termPrefix=urg

Returns a JSON representation of the search results constrained by the rangeConstraint.

  • The data returned is in the same form as documented in the 4.8 Find Concepts section.

Table 4.13-3: FHIR API

Service Name

API Call3

Result
Get concept model rulesN/ANo FHIR terminology services are available to provide detailed information about SNOMED CT concept model rules.

Table 4.13-4: MySQL Example Database

Service Name

SQL Query 4

Result

Get the set of reference sets applicable to concepts in an identified module

SELECT mrcmRuleRefsetId,refsetType 
	FROM snap_refset_mrcmmodulescope m
    JOIN config_refsets r ON r.refsetId=m.mrcmRuleRefsetId
	WHERE active=1 AND refsetId=723563008
	AND referenceComponentId=[moduleId];

For example to get the MRCM refsetIds for 900000000000207008 | SNOMED CT core module|

SELECT mrcmRuleRefsetId,refsetType 
	FROM snap_refset_mrcmmodulescope m
    JOIN config_refsets r ON r.refsetId=m.mrcmRuleRefsetId
    WHERE active=1 AND m.refsetId=723563008
    AND referencedComponentId=900000000000207008;
Alternative approach to get refsetId for a specific MRCM refset for a specific module 900000000000207008 | SNOMED CT core module|

The refsetIds and reference set types of the three MRCM references sets that apply to the specified module.


Get the refsetId of specific type of MRCM reference set applicable to concepts in an identified module
SELECT getMrcmRefsetId([moduleId],[refsetType]);
The MRCM refsetType can be specified either by a single letter (D, A or R) or the full name (mrcmDomain, mrcmAttributeDomain or mrcmAttributeRange).
The first example illustrates use of the full name while the others use the abbreviated style.
SELECT getMrcmRefsetId(900000000000207008,"mrcmDomain");
SELECT getMrcmRefsetId(900000000000207008,"A");
SELECT getMrcmRefsetId(900000000000207008,"R");

Each function call returns a single refsetId.

The other MRCM services described below use this function to determine which reference set to use to access domain, attribute and range constraint information.

Get the domain or set of domains that include a specified concept
CALL getMrcmDomains([conceptId],[proxPrim],@domainId, @domainList);
-- Following line shows the results
SELECT @domainId,@domainList;

Example 1. Get the domains that include the concept 71341001 | Bone structure of femur|

CALL getMrcmDomains(71341001,0,@domainId, @domainList);
-- Following line shows the results
SELECT @domainId, @domainList;

Example 2. Get the domains that include the concept 241075002 | Plain X-ray of femur|

CALL getMrcmDomains(241075002,0,@domainId, @domainList);
-- Following line shows the results
SELECT @domainId, @domainList;

Example 3. Get the proximal primitive domains that include the concept 241075002 | Plain X-ray of femur|

CALL getMrcmDomains(241075002,1,@domainId, @domainList);
-- Following line shows the results
SELECT @domainId, @domainList;

This procedure returns two values.

  • domainId - the most specific domain that includes the specified concept.
  • domainList - a comma separated list of all the domains that include the specified concept.

Example 1 returns the following set of domains:

Example 2 returns the following set of domains

Example 3 returns the following set of proximal primitive domains

  • domainList: 71388002,386053000,387713003,433590000

The procedure adds also adds a row to the config_resultsets table for each of the domains. This makes it easier for the services below to access to look up the attribute and range constraints for the set of domains applicable to a specified concept.

Get the set of attributes applicable to a concept in a specified domain or set of domains

CALL getMrcmAttributeRanges([conceptId],[proxPrim],[contentTypeKey],@ruleSetKey);
-- Following statement shows the attribute ids and terms
SELECT DISTINCT `attributeId`,`term`
  FROM `config_mrcmrulesets` `c`
  JOIN `snap_pref` `p` ON `c`.`attributeId`=`p`.`conceptId`
  WHERE `rulesetKey`=@rulesetKey;

Example 1. Get the attributes applicable to the concept 71341001 | Bone structure of femur| when using postcoordination

CALL getMrcmAttributeRanges(71341001,0,'pos',@ruleSetKey);
-- Following statement shows the attribute ids and terms
SELECT DISTINCT `attributeId`,`term`
  FROM `config_mrcmrulesets` `c`
  JOIN `snap_pref` `p` ON `c`.`attributeId`=`p`.`conceptId`
  WHERE `rulesetKey`=@rulesetKey;

Example 2. Get the attributes and attribute constraints applicable to the concept 71341001 | Bone structure of femur| when using postcoordination.

CALL getMrcmAttributeRanges(71341001,0,'pos',@ruleSetKey);
-- Following statement shows the attribute ids and terms
SELECT `attributeId`,`grouped`, `attributeCardinality`,
`attributeInGroupCardinality`, `attributeContentTypeId`,
`attributeRuleStrengthId`, `rangeConstraint`,
`rangeContentTypeId`, `rangeRuleStrengthId`
  FROM `config_mrcmrulesets` WHERE `rulesetKey`=@rulesetKey;

The getMrcmAttributeRanges procedure generates rows in the config_mrcmrulesets table. It returns a rulesetKey which can be used to query the generated rows. These rows contain not only the attributes but also range constraints.

Both examples get the attributes applicable to the same concept but the results returned by the select queries vary in content.

Example 1 returns the attributeId and preferred terms for each attribute applicable to the specified concept in the context specified by the proximal primitive and content type settings.

Example 2 returns all valid combinations of attributes and attribute range constraints applicable to the specified concept specified in the context specified by the proximal primitive and content type settings.

Get the range of values applicable to a specified attribute
As noted above, the getMrcmAttributeRanges procedure returns the attribute ranges of all attributes applicable to a concept. However, it is also possible to return the attribute range for specific attribute.
SET @attributeId=[attributeId];
SET @contentTypeIdList=[contentTypeIdList];
SET @moduleId=[moduleId];
SELECT  `rangeConstraint`, `contentTypeId`, `ruleStrengthId`
  FROM `snap_refset_mrcmattributerange` 
  WHERE `refsetId`= getMrcmRefsetId(@moduleId,"R"); 
  AND `r`.`active`=1
  AND FIND_IN_SET(`r`.`contentTypeId`,@contentTypeIdList)>0;

Example. Get all the attribute range constraints applicable to the concept 71341001 | Bone structure of femur| when using postcoordination

SET @attributeId=260870009;
SET @contentTypeIdList="723596005,723594008";
SET @moduleId=900000000000207008;
SELECT `rangeConstraint`, `contentTypeId`, `ruleStrengthId`
  FROM `snap_refset_mrcmattributerange` 
  WHERE `refsetId`= getMrcmRefsetId(@moduleId,"R")
  AND `referencedComponentId`=@attributeId
  AND `active`=1
  AND FIND_IN_SET(`contentTypeId`,@contentTypeIdList)>0;

Returns the rangeConstraint for the attribute and the the contentTypeId and ruleStrengthId.

In some cases more than one row may be returned where there are rules with different strengths or applicable to different subsumed contentTypes.


Footnotes
Language and/or dialect should be specified if the service returns terms associated with referenced concepts.
In the Snowstorm service requests [snowstorm] should be replaced by the URL to the Snowstorm server endpoint.
In the FHIR service requests [fhir] should be replaced by the URL to the FHIR terminology server endpoint. FHIR® is a registered trademarks of HL7 (www.hl7.org).
The SNOMED CT MySQL example database is not designed as a terminology server and is not intended for use in a live system . It is referenced in this guide as an illustration that some readers may find helpful. For more information about the SNOMED CT example database see the SNOMED CT - SQL Practical Guide. For instructions on how to build the example database refer to Appendix A: Building the SNOMED CT Example Database.


Feedback
  • No labels