Is it possible to use semantic tags in UML associations (among classes) to express the wider semantic nature of the relationship?
For example, consider the relation that Doctor TREATS Patient. Beyond the TREATS relation, we also want to express that it's a medical and humanitarian relation. Is it possible to somehow tag the association between Doctor and Patient with these two additional tags in UML?
Also, consider the example of a Doctor's relation with another Doctor. We want a model where a Doctor can have multiple (semantic) relations such as Professional, Socialand many other relations with another Doctor.
If you want to "tag" UML element, you should take a look at the UML Stereotype concept. In short it is a way to add domain related information to UML element.
In the following screenshot, I defined two stereotypes respectively named "humanitarian" and "medical" and I stereotyped a UML association with both of them.

Another solution would be to define a stereotype which has two boolean properties "humanitarian" and "medical" and set their values as true when the stereotyped is applied.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With