Skip to content

[Data - 3127] Add tag to cohort definitions - #3173

Merged
Zhimin-arya merged 23 commits into
developfrom
Zhimin-arya/data-3127_add-tag-to-cohort-definitions
Sep 1, 2026
Merged

[Data - 3127] Add tag to cohort definitions#3173
Zhimin-arya merged 23 commits into
developfrom
Zhimin-arya/data-3127_add-tag-to-cohort-definitions

Conversation

@Zhimin-arya

@Zhimin-arya Zhimin-arya commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Feature

Result:

  • The tag ids are populated into webapi.cohort_tag
image
  • Summary in webapi.tag
image

Merge Checklist

Please cross check this list if additions / modifications needs to be done on top of your core changes and tick them off. Reviewer can as well glance through and help the developer if something is missed out.

  • Automated Tests (Jasmine integration tests, Unit tests, and/or Performance tests)
  • Updated Manual tests / Demo Config
  • Documentation (Application guide, Admin guide, Markdown, Readme and/or Wiki)
  • Verified that local development environment is working with latest changes (integrated with latest develop branch)
  • following best practices in code review doc

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds provenance and review-status tags to imported Phenotype Library cohorts.

Changes:

  • Seeds tag groups and implements tag creation/assignment.
  • Makes cohort imports update existing definitions.
  • Disables caching for MIMIC conversion tasks and broadens tag DTO compatibility.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
services/atlas-db-init/220_imported_cohort_metadata_tag_group.sql Seeds cohort tag groups.
plugins/functions/d2e-webapi/src/dto/cohortdefinition.ts Accepts nullable WebAPI tag metadata.
plugins/flows/data_transformation/mimic_omop_conversion_plugin/omop_conversion.py Disables task caching.
plugins/flows/data_transformation/mimic_omop_conversion_plugin/load_data.py Disables loading-task caching.
plugins/flows/base/phenotype_plugin/get_cohort_definitions.R Retrieves and returns review statuses.
plugins/flows/base/phenotype_plugin/flow.py Upserts and tags imported cohorts.
plugins/flows/_shared_flow_utils/api/PhenotypeTagAPI.py Adds WebAPI tag operations.
plugins/flows/_shared_flow_utils/api/PhenotypeAPI.py Adds name-based cohort updates.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread services/atlas-db-init/230_imported_cohort_metadata_tag_group.sql
Comment thread plugins/flows/base/phenotype_plugin/get_cohort_definitions.R Outdated
Comment thread plugins/flows/base/phenotype_plugin/get_cohort_definitions.R
if (921 %in% cohortsID) {
cohortsID <- cohortsID[cohortsID!=921]
}
cohortDefinitionSets <- PhenotypeLibrary::getPlCohortDefinitionSet(cohortsID)
Comment thread plugins/flows/_shared_flow_utils/api/PhenotypeAPI.py
Comment on lines +112 to +114
for name, group in wanted:
if name.lower() not in by_name:
by_name[name.lower()] = self._create_tag(dataset_id, name, group["id"])
Comment thread plugins/flows/_shared_flow_utils/api/PhenotypeTagAPI.py Outdated
Comment thread plugins/flows/_shared_flow_utils/api/PhenotypeAPI.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the tag for atlas cohort definition creation

4 participants