The pros and cons of relationship grouping (and the benefit of proximal primitive supertype modeling)
I was triggered by Daniel's experiment on Relationship groups, and wondered whether it was the case that different relationship groups held relationships of the same type to destinations that are each other's super/subtype.
Remember that without rolegrouping, this couldn't be the case, as the more generic relationship would be overridden by the more specific relationship.
So I ran this family of queries to get some basic stats:
SELECT r1.sourceId, r1.typeId, r1.destinationId, r2.destinationId, pathlength FROM `relationships` r1 join `relationships` r2 on r1.sourceId=r2.sourceId and r1.typeId=r2.typeId and r1.active=1 and r2.active=1 join transitiveclosure on r1.destinationId=supertypeID and r2.destinationId=subtypeId where pathlength > 0
This returns 10485 rows.SELECT r1.sourceId, count( r1.destinationId) FROM `relationships` r1 join `relationships` r2 on r1.sourceId=r2.sourceId and r1.typeId=r2.typeId and r1.active=1 and r2.active=1 join transitiveclosure on r1.destinationId=supertypeID and r2.destinationId=subtypeId where pathlength > 0 group by r1.sourceId order by count(r1.destinationId) asc
This involves 6789 unique concepts. The number of records returned per concept range from 1 to 25 (for 18932005 |Rastelli operation in repair of transposition of great vessels (procedure)|).
Some examples, that seem wrong, right, or point at other issues.
The male/female balance in the first two is by change, and coincidentally the first three contained "with" or "without" in their description (note that I picked low conceptId's, that 's why I added more):
Example 1:
127009 |Miscarriage with laceration of cervix (disorder)|
Stated:
127009 |Miscarriage with laceration of cervix (disorder)| Inferred:
Here: Laceration ISA Damage, but the finding site is missing.
Adding finding site 71252005 |Cervix uteri structure (body structure)| to the definition would have created a set of ungrouped attributes that could have overridden the "Damage of Pelvic Structure".
I must admit that that in this case I'm not sure what would happen, given the ungrouped "After Miscarriage" inherited from a supertype. Can anyone clarify?
One mechanism is that first the jointly specified morphology and finding site override the ones of the supertype, after which the "After miscarriage" remains, or these three get grouped together, in which case there is no overriding.
Example 2: 147001 |Superficial foreign body of scrotum without major open wound but with infection (disorder)|
Stated:
Inferred:
Here, it seems that the "pathologic process = infectious process" hasn't been included in the group, whereas it should have been.
Example 3: 222008 |Acute epiglottitis with obstruction (disorder)|
Stated:
Interestingly, whereas this is correct, the stated morphology (inflammation) and finding site (epiglottis) are redundant with the specified supertype, which as exactly the same group.
However, in this case it can be argued that it is not the obstruction of the epiglottis itself , but of another laryngeal structure.
Example 4: 334301000119105 |Senile ectropion of right lower eyelid (disorder)|
Inferred:
Here the problem seems to be that eversion isn't a type of malposition, and only the eversion was specified to be of the right lower eyelid.
Happy to hear other people's thoughts on these findings, ways to solve them and steps to prevent them happening in the future.
Ronald