Requirement
Requirement to select a substance or a modification of that substance .... use case: during authoring to prompt the user with all the active ingredient options. Author/modeller chooses a drug and wants to refine the selection using modification-of substances.
- Alternate use case: Clinician chooses a drug and wants to refine the selection using modification-of substances
. - The product may not exist - it could be made up.
- B2i have solved this problem using a real-time recursive search
Background
The modification-of attribute is a transitive property in OWL. Transitive properties have a similar characteristic to an is-a relationships but without stating a subtype relationship.
In SNOMED CT an OWL property chains are used to help organise the hierarchy, allowing products with modified substance to be subsumed into concept groupers defined using the base substance. However in this case the base substance should not be inherited into the product with the modified substance. The base (not modified) version of the substance is found as redundant and removed during NNF calculation. See OWL Guide: 2.5. Generating Necessary Normal Form Relationships from the OWL Refsets
Example property chain: "|Has active ingredient|o |Is modification of|" is a sub-property of "|Has active ingredient|".
Example hierarchy:
Parent
Child
Because
And Property Chain:
SubObjectPropertyOf(
ObjectPropertyChain(
:127489000 |Has active ingredient (attribute)|
:738774007 |Is modification of (attribute)|
)
:127489000 |Has active ingredient (attribute)|
)
.. which results in OWL seeing the non modified ingredient as a property of the concept for the purpose of subsumption.
Finally
TransitiveObjectProperty(:738774007 |Is modification of (attribute)|)
This could be used by the ECL engines.
Solution Options:
- ECL Solution: << 372687004 |Amoxicillin (substance)|
OR ( << 105590001 |Substance (substance)| : << 738774007 |Is modification of (attribute)| = << 372687004 |Amoxicillin (substance)| )
OR ( << 105590001 |Substance (substance)| : << 738774007 |Is modification of (attribute)| = ( << 105590001 |Substance (substance)| : << 738774007 |Is modification of (attribute)| = << 372687004 |Amoxicillin (substance)| ) )
OR ( << 105590001 |Substance (substance)| : << 738774007 |Is modification of (attribute)| = ( << 105590001 |Substance (substance)| : << 738774007 |Is modification of (attribute)| = ( << 105590001 |Substance (substance)| : << 738774007 |Is modification of (attribute)| = << 372687004 |Amoxicillin (substance)| ) ) )
)- Pros: Already works, if you know the maximum number of transitive hops
- Cons: It's not pretty. It may work for modification-of but may not work for longer transitive chains like part-of (body structures)
- NNF Change Solution: Keep the modification-of relationships using a new characteristic type to support querying.
- Pros: Do not need to increase number of concepts or complexity of ECL engines.
- Cons: Big change in the spec? Could be misinterpreted. Seems risky.
- ECL Engine and Language Change Solution: Build a transitive closure for each transitive property, in the same way that we do for the is-a relationship. We would also need special ECL syntax for this.
- Pros: No content change. No classification change.
- Cons: Slightly more work in ECL engines.
- Pseudo-code: Kai Kewley
- In an ECL engine, when building the ECL index:
- Identify which properties are transitive:
Set<String> transitiveProperties = owlOntology.getAxioms(AxiomType.TRANSITIVE_OBJECT_PROPERTY).stream()
.map(axiom -> axiom.getProperty().getNamedProperty().getIRI().getShortForm())
.collect(Collectors.toSet());
- Build up a set of transitive property ancestors:
- Concept:
Map<String, Set<String>> transitiveTypeParentMap;
addRelationship(source, destination, type) {
if (transitiveProperties.contains(type)) {
transitiveTypeAncestorMap.get(type).add(destination);
}
}
- Include transitive property ancestors in ECL index:
- conceptId: 351000220100 |Minocycline hydrochloride dihydrate (substance)|
- ancestors: (usual is-a ancestors)
- 738774007_ancestors: (52886009 |Minocycline hydrochloride (substance)|, 372653009 |Minocycline (substance)|)
- 738774007_parents: (52886009)
733930001_ancestors: ()
- further fields generated depending on the substrate.
- ECL Language could allow something like:
- << [+738774007 |Is modification of|] meaning use modification of transitive hierarchy in addition to is-a hierarchy.
- or << [+*] meaning use all available transitive hierarchies
- Examples:
- < |Product| : << |Has active ingredient| = << [+738774007 |Is modification of|] |Amoxicillin|
- < |Product| : << |Has active ingredient| = << [+*] |Amoxicillin|
- JR: At what point do we stop keeping everything stateless and use a reasoner. Should we check our approach / policy?
- ML: We need a solution that works with all property chains, not just transitive properties... we have that during NNF calculation, we are currently removing it. Perhaps those could be put into the NNF or another file to enable ECL implementations.
- Kai Kewley and Ale to catchup with Jim and Yong on this.
- DK: concerned that complexity of ECL would increase and usefulness may decrease? Maybe other architectures are needed to support another way to run snomed queries?
- JR: Suggests a hybrid ECL engine that can use a reasoner when needed, if the user needs to run a query that requires one and needs the complete answer.
- ALO: Perhaps SI could pre-compute the ECL index in a standard format for use in any ECL engine. A way to reduce the complexity for implementers and also standardise the solution. This could be a file in the release and also an open source tool.
Hybrid ECL Engine with ReasonerTo avoid complexity in
- New Type of SNOMED Query Engine including an OWL Reasoner (an idea from Jeremy)
- Alternative approach to pre-computing the ECL index
?? An ECL engine could detect when OWL reasoning is required and then use OWL to execute specific types of query.. for example queries involving property chains where the NNF is not sufficient.
- Content Change Solution: Create a grouper substance to Content Change Solution: Create a grouper substance to include that substance and all single and multi-hop the modification substances.
- Pros: Would work without other changes. This technique has precedent in the body structure hierarchy.
- Cons: Approx. three times the number of substance concepts. May be hard for implementers who want a clean list. Because of the high number (around 2K) of substances with a modification relationship these groups would need to be generated.
- Current content in numbers:
- 2,297 Substances have the modification-of attribute
- 89 Substance groupers exist with naming: "Substance-X and/or substance-X derivative"
- 37 Product groupers exist with naming: "Product containing substance-X and/or substance-X derivative"