IHTSDO / snowstorm

Scalable SNOMED CT Terminology Server using Elasticsearch
Other
208 stars 83 forks source link

Is it possible for a concept to exist without having ancestors? #585

Open Dongpeng2 opened 8 months ago

Dongpeng2 commented 8 months ago

I am working on a veterinary project and using Snowstorm. In the case below, when the 'id' is 154705004, the concept is correctly outputted, but there is an error in the ancestors. What could be the problem? Do the ancestors simply not exist? It's not just in this case; there are other instances as well.

http://localhost:8080/browser/MAIN/2023-10-01/concepts/154705004/

{
  "conceptId" : "154705004",
  "fsn" : {
    "term" : "Cushing's syndrome (disorder)",
    "lang" : "en"
  },
  "pt" : {
    "term" : "Cushing's syndrome",
    "lang" : "en"
  },
  "active" : false,
  "effectiveTime" : "20020131",
  "released" : true,
  "releasedEffectiveTime" : 20020131,
  "inactivationIndicator" : "DUPLICATE",
  "associationTargets" : {
    "SAME_AS" : [ "47270006" ]
  },
  "moduleId" : "900000000000207008",
  "definitionStatus" : "PRIMITIVE",
  "descriptions" : [ {
    "active" : false,
    "moduleId" : "900000000000207008",
    "released" : true,
    "releasedEffectiveTime" : 20080731,
    "descriptionId" : "534954015",
    "term" : "Cushing's syndrome",
    "conceptId" : "154705004",
    "typeId" : "900000000000003001",
    "acceptabilityMap" : { },
    "type" : "FSN",
    "lang" : "en",
    "caseSignificance" : "ENTIRE_TERM_CASE_SENSITIVE",
    "effectiveTime" : "20080731"
  }, {
    "active" : true,
    "moduleId" : "900000000000207008",
    "released" : true,
    "releasedEffectiveTime" : 20080731,
    "descriptionId" : "2739036011",
    "term" : "Cushing's syndrome (disorder)",
    "conceptId" : "154705004",
    "typeId" : "900000000000003001",
    "acceptabilityMap" : {
      "900000000000509007" : "PREFERRED",
      "900000000000508004" : "PREFERRED"
    },
    "type" : "FSN",
    "inactivationIndicator" : "CONCEPT_NON_CURRENT",
    "lang" : "en",
    "caseSignificance" : "ENTIRE_TERM_CASE_SENSITIVE",
    "effectiveTime" : "20080731"
  }, {
    "active" : true,
    "moduleId" : "900000000000207008",
    "released" : true,
    "releasedEffectiveTime" : 20020131,
    "descriptionId" : "240469013",
    "term" : "Cushing's syndrome",
    "conceptId" : "154705004",
    "typeId" : "900000000000013009",
    "acceptabilityMap" : {
      "900000000000509007" : "PREFERRED",
      "900000000000508004" : "PREFERRED"
    },
    "type" : "SYNONYM",
    "inactivationIndicator" : "CONCEPT_NON_CURRENT",
    "lang" : "en",
    "caseSignificance" : "ENTIRE_TERM_CASE_SENSITIVE",
    "effectiveTime" : "20020131"
  } ],
  "annotations" : [ ],
  "classAxioms" : [ ],
  "gciAxioms" : [ ],
  "relationships" : [ ],
  "alternateIdentifiers" : [ ],
  "validationResults" : [ ]
}

http://localhost:8080/browser/MAIN/2023-10-01/concepts/154705004/ancestors

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Map>
<error>BAD_REQUEST</error>
<message>Concepts in the ECL request do not exist or are inactive on branch MAIN/2023-10-01: 154705004.</message>
</Map>
kaicode commented 8 months ago

All active concepts in SNOMED CT must have at least one parent concept apart from the SNOMED CT root concept. All inactive concepts have no parent or other relationships, they are not part of the hierarchy.

The concept in your example 154705004 |Cushing's syndrome (disorder)| is an example of an inactive concept. Line 11 of the JSON shows that the concept is inactive:

  "active" : false,

For this reason we should not expect it to have any parents, ancestors or any children or descendants.

If we look at this concept in the SNOMED CT Browser, in the "Refsets" tab, we can see that the concept was made inactive because it was a duplicate (recorded in the inactivation indicator refset), and that there is a historical association of type SAME AS pointing to the active concept 47270006 |Hypercortisolism (disorder)|.

Screenshot 2024-03-12 at 16 20 18

If a concept is inactive and has a SAME AS reference to an active concept then that active concept should be used instead for healthcare data input.

When querying over existing healthcare data that may contain inactive concepts the ECL history supplement can be used to ensure that relevant inactive concepts are included in the query results. See SNOMED Query/ECL Guide - History Supplements.

For example this ECL query will return the inactive concept 154705004 |Cushing's syndrome (disorder)|, because although the concept is not part of the hierarchy the history supplement {{ +HISTORY }} uses the historical association to pull the inactive concept into the results.

< 30171000 |Disorder of adrenal gland (disorder)| {{ +HISTORY }}

I hope that helps.

abelardy commented 6 months ago

Line 11 of the JSON shows that the concept is inactive: "active" : false, For this reason we should not expect it to have any parents, ancestors or any children or descendants

Slightly stronger:

Any inactive SNOMED concept will not and must not have any parents, ancestors, children, descendants or any active non-ISA relationships with any other SNOMED concept.