edmcouncil / idmp

This repository stores the OWL ontology built on the basis of the ISO standards for identification of medicinal products.
https://spec.edmcouncil.org/idmp/
MIT License
29 stars 10 forks source link

Nameless substances #228

Closed mereolog closed 1 year ago

mereolog commented 1 year ago

The current ontology of substances allows for nameless substances, i.e., it does not require that an instance of Substance must have a name.

As a result, one can add the following triple to the IDMP ontology and the ontology will remain consistent:

<rdf:Description rdf:about="https://gsrs.ncats.nih.gov/api/v1/substances/e67c9314-1e17-4876-a745-47f27c2169e6">
        <rdf:type>
            <owl:Restriction>
                <owl:onProperty rdf:resource="https://www.omg.org/spec/Commons/Designators/hasName"/>
                <owl:allValuesFrom rdf:resource="http://www.w3.org/2002/07/owl#Nothing"/>
            </owl:Restriction>
        </rdf:type>
</rdf:Description>

In a nutshell the above restriction defines the class of all resources without names, so when we add it, https://gsrs.ncats.nih.gov/api/v1/substances/e67c9314-1e17-4876-a745-47f27c2169e6 will be required to have no name.

IMHO this shows the need for the following restriction added to Substance: hasName some SubstanceName.

Having such constraints in place may help with defining informative SHACL shapes.

tw-osthus commented 1 year ago

If we have decided that 'Amlodipine' is an instance of substance, then it makes sense to require a name.

By the definition of substance is a subclass of matter, Amlodipine is can only be interpreted as the universal set of all matter with a defined composition, if we want to avoid punning.

I am still thinking that it is likely to be broken. If we make Amlodipine a subclass of Substance, then requiring a name is wrong.

This substance in this bottle is an acid. => true, because acid is a subclass This substance in this bottle is Amlodipine => true if Amlodipine is a class, false if instance.

I require some Amlodipine for treatment => ok, if subclass, incorrect otherwise I require matter that is some subset of Amlodipine for treatment => ok, if instance, but very strange

Have we made a decision on this topic? If not we should wait with this constraint.

mereolog commented 1 year ago

At the moment amlodipine is an instance of substance - and my remark applies to such kind of modelling.

A second-thought is that perhaps we should have a min 0 constraint instead: hasName min 0 SubstanceName.

ElisaKendall commented 1 year ago

@merelog, @tw-osthus To resolve this, Thomas and I agreed to the following:

  1. add a new property, hasSubstanceName as a subproperty of hasName, with a min 0 relationship to SubstanceName, where hasSubstanceName includes any and all annotations on that property that we can glean from the implementation guide (ISO 19844) - the draft annex L says the name should be mandatory, and also the ID should be mandatory, but currently there is NO REGISTRATION AUTHORITY for such an ID according to FDA, and it doesn't yet exist, only many codes. So we will make both min 0.
  2. add a new class, called matter, with two subclasses: material and substance.

And then hopefully that is enough. There is no hasName some values from ... constraint on substance saying that it has to have a name at the moment, but there is discussion of this in the Annex L to ISO 19844 document, so I'm happy to add that.