Conversation
tag entity to dto conversion was added tag entity was added to assets
some refactorings were made
some refactorings were made
endpoints for assigning and unassigning of tags for cohorts was added
tag groups were added to result list
concept set checking was added additional fields were added to entity
endpoints for proteced tafs were added additional fields were added to tag entity checking of adding tag to group was added checking of assigning protected tags was added persmissions were added
list of mandatory tag groups was added to checking
some refactorings
# Conflicts: # src/main/java/org/ohdsi/webapi/util/GenericExceptionMapper.java
|
This PR does need a description to at least the Issue that describes the functionality, but just looking through sourcecode, there are a few questions: Q1: what does refresh stat period do? If there are statistics related to tags, what are they? Q2: What is the purpose of coupling 'checkers' with 'tags'? I'm referring to IRChecker, CohortChecker, etc. It feels strange to see seemignly independent functions (tagging and validation) being coupled together, but I could be misunderstanding the purpose of tags (my understanding being: tags were things you attach to entities, and I don't see a warning message an 'entity'). Q3: The presence of hashing will not impact the hashing/design hash generation of an entity, right? It would be odd to have a different cohort definition hash if tags were added/removed. |
|
Q1: It counts the number of assigning of each tag to the entity to allow user to understand how many times each tag was used |
|
@chrisknoll the description is here: #1917 |
|
Should we be concerned that the tables don't follow naming conventions: Correct (singluar form):
Possible issue (note plural form):
There are minor exceptions to this:
But the exceptions are far fewer than the norm. |
|
I've attempted to create a nested structure of tags but I don't see them on the UI, here's what I inserted: The structure is: On the front end, we see: I'm not actually sure how you're supposed to navigate through a hierarchy of tags. |
|
Chris, from the description "parent group ID - in case of necessity Tag Groups can be nested; there are no limitations how deep are the nested levels (for the initial implementation the nested level is 1); if the value is omitted (NULL or a specific constant to be defined) it is a top-level Tag Group" This is crucial for the current implementation - "for the initial implementation the nested level is 1" @chrisknoll |
|
OIk, Fair enough, I didn't realize what that was referring to when I read it. Personally, I think the idea behind nested groups should be discarded: by my thinking, the hierarchy is going to be difficult to manage (considering there's no restriction on 1 group having multiple parents), harder to understand (same reason), showing them in the UI is going to be difficult, etc. What I love about what is implemented so far is the notion of 'tag groups' where a group becomes a column of the entity talb,e and facet filters are provided for each group. I think that's very clever, and very useful. I haven't checked, but I haven't tried to create a tag that doesn't belong to any group at all (I'm assuming that is supported? since tags and groups are defined in the same table). If we ditch the notion of hierarchies, then tags are just things that can be grouped together, making a UI to manage them very straight forward (just a form with name-value pairs and the collection of groups that the tag is assigned to). If ditching hierarchies can be the direction, then maybe we can think of 'tag groups' separately from 'tags' and create the model from that. as it stands now, everything is a tag, which can have a parent-child relationship in tag_groups. I don't mean to suggest any major changes to the architecture (although, I know that's how it might sound) but I have some worry about functionality that may never be realized or become overcomplicated to manage. I guess I need to hear from those folks who had their hopes set on tag hierarcies and how they would be used in practice. I attempted to show a use case in my own SQL examples above, but anything more complicated than what I tried to do would really become difficult to organize in a larger scale implementation. |
|
@alondhe do you have any comments on the function of hierarchical tags? I think this subject came up in our meeting, but I thought we opted for a simple approach. Did you have a vision as to how managing a hierarchy of tags might be managed, from a UI perspective? or how you would show the hierarchy of a tag once it is assigned to an asset? In contrast to that, the way 'members of a group' is shown as a column in the entity list (like cohort definition list). That's cool and nice. And you can also say that only 1 member of a tag group can be assigned at a time (which is cool for a type of tag that is for 'status' where you can only either be 'draft' or 'finalized'..but not both). So, I like those but I can't quite picture how nested tags would behave, and wanted to get your input on that. |
There was a problem hiding this comment.
Eerything seems to be working (tho I did not look too closely at the logic behind the tag statistics refresh). Only thing I would request changes to is the naming conventions around the table names: tag_groups -> tag_group, tags -> tag, tags_seq -> tag_seq, etc.
Also, I noticed that certain tests were updated, but I don't think I noticed any tag-specific tests being implemented for tags, such as confirming that the individual tag color is overridden if it is provided for the specific tag vs. group tag (for example).
Will there be test cases?
|
@chrisknoll |
|
Hi @chrisknoll - I agree, we didn't aim to make a multi-level (nested) hierarchy with this. It's tag group -> tag value, and that's all. We considered the idea of allowing something deeper, like TA -> TA Value -> TA sub-value, but felt it to be too complicated for the UX. |
chrisknoll
left a comment
There was a problem hiding this comment.
Can you confirm that the sequence was renamed too?
|
Thanks @alondhe for the info. So, I don't want to throw a wrench in anything since this current impl works provided you do not try to nest groups (you can insert the data, but it won't appear in the UI). Maybe we can think about a refactoring in a later relase where we have defiend Tag and TagGroup elements that have associations with each other, and that will (I think) make the object model more clear about what's involved in tags. What has been implemented is a great acocmplishment, and I don't want to lose sight on that, so I do want to express gratitude for the efforts: Thanks to all who did pull this together, it will be very helpful and useful to use. Once these last minor details about naming is resolved we can merge this in. |
|
Awesome, thanks @chrisknoll! |
Yes |
* initial script for postgresql was added tag entity to dto conversion was added tag entity was added to assets * index were added to script some refactorings were made * index were added to script some refactorings were made * count of assigned tags was added endpoints for assigning and unassigning of tags for cohorts was added * Assets Tags implementation * added search endpoint tag groups were added to result list * endpoints for assigning and unassigning of tags for assets were added * mandatory tags checking was added concept set checking was added additional fields were added to entity * tests were fixed endpoints for proteced tafs were added additional fields were added to tag entity checking of adding tag to group was added checking of assigning protected tags was added persmissions were added * Assets Tags implementation * description was added to tag list of mandatory tag groups was added to checking * Design was changed to "Tags" * Design was changed to "Tags" * removed unused function from AbstractDaoService * removed unused sql statements some refactorings * Assets Tags i18n * Assets Tags implementation - tag reassign confirmation added * Master merge - compilation fix * Fix - enable tests * tables with tags were renamed to singular form * tests were added * sequence for tags was renamed to singular form Co-authored-by: Sergey Suvorov <sergey.suvorov@odysseusinc.com>
|
There was an oversight when I approved this change, resulting in a backwards-compatability error: This change changes the signature of the object from CohortExpression to a CohortDTO. These objects are not JSON compatable (one is a raw circe expresison, the other acts like a 'wrapper' where you have the expression and expressionType). This type of backwards compatibility change should not have been let in. We should try to understand how to revert this. |

Description: #1917
Frontend PR: OHDSI/Atlas#2589