MetaCell / sckan-composer

0 stars 0 forks source link

Feature/csckan-277 #252

Closed D-GopalKrishna closed 3 months ago

D-GopalKrishna commented 3 months ago

Jira Link - https://metacell.atlassian.net/browse/SCKAN-277

Implementation/Requirements :

When the destination is one of RegionLayer AE, it shows as -> Region, Layer in the "Connected from". This is since RegionLayerPair is also AnatomicalEntity. image

@ddelpiano thoughts?

When origin is a RegionLayer AE, the identifier is a pair separated by a comma. uri for - region, layer Screenshot 2024-03-29 122140

D-GopalKrishna commented 3 months ago

Simplification of the code in the image - valid, since we have a code for constraint already in place as following

    class Meta:
        constraints = [
            CheckConstraint(
                check=(
                        Q(simple_entity__isnull=False, region_layer__isnull=True) |
                        Q(simple_entity__isnull=True, region_layer__isnull=False)
                ),
                name='check_anatomical_entity_exclusivity'
            )
        ]

by @afonsobspinto

image

So we never have the condition for the "else". Also the region and layer have required conditions.