Skip to content

Concept-set selector, criteria UX, group-editor unification & compare modes#116

Merged
p-hoffmann merged 16 commits into
developfrom
p-hoffmann/concept-set-criteria-and-compare-ux
Jun 21, 2026
Merged

Concept-set selector, criteria UX, group-editor unification & compare modes#116
p-hoffmann merged 16 commits into
developfrom
p-hoffmann/concept-set-criteria-and-compare-ux

Conversation

@p-hoffmann

Copy link
Copy Markdown
Member

Summary

  • Concept-set picker now lists the cohort's in-definition sets above the repository: pick a local set to reuse it (same CodesetId), import a repo set as a fresh copy, or create a new empty one. (ConceptSet Selector does not show internal concept sets #111)
  • Added "allow events outside observation period" (defaults true for new criteria) and "restrict to same visit" toggles on correlated/inclusion/nested criteria; entry events now show a greyed, non-interactive ANY label.
  • Merged the two group editors into a single GroupCriteriaUI used by both inclusion rules and nested criteria; NestedCriteria is now an alias of CriteriaGroup, nested sub-groups round-trip through the Atlas converter, and the old editors are deleted. (UI Issues related to Correlated Criteria Editor #112)
  • Compare can now diff concept sets by Expression or Included concepts (default Included); a Source-codes mode exists in the store but is feature-flagged off for now.

…NY label

- CriteriaEventCard: inline switch row (allow events outside observation
  period / restrict to same visit) for wrapped criteria via showCriteriaOptions
- Default ignoreObservationPeriod=true for newly added group/nested criteria (#110)
- EntryEventsList: greyed, non-interactive ANY match-type label (#100)
ConceptSetSelectionDialog now lists the cohort's local (in-definition)
concept sets above the repository table: selecting a local set reuses it
in place (same CodesetId), while the repository imports a fresh copy, and
'New empty set' creates one. Wired into CohortBuilder via
handleLocalConceptSetSelected + :local-concept-sets=usedConceptSets.
extractConceptSets includes the { id: 0|null, name: 'Select concept set…' }
placeholders that seed not-yet-filled criteria; filter the dialog's local
list to sets with a real id (hasRealConceptSetId) so they don't surface as
bogus rows, and guard handleLocalConceptSetSelected against id-less refs.
Renamed copy with the recursive self-reference fixed and an explicit name.
No feature-flag props: per #112 both inclusion rules and nested criteria want
the full group feature set, so showNestedGroups/showQualifyingLimit would be
dead — omitted (YAGNI).
CriteriaEventCard now renders event.nestedCriteria with the shared
GroupCriteriaUI (depth threaded for the deep-nesting warning) and adapts
its number|object select-concept-set payload to select-concept-set-nested.
…onverter

Nested criteria can now hold sub-groups (via GroupCriteriaUI). Added recursive
convertGroupToAtlasGroup / convertAtlasGroupToGroup helpers so they serialize to
and from CorrelatedCriteria.Groups instead of being dropped; AtlasGroup gains a
recursive Groups field.
StrataEditor, InclusionRuleDetail, IncidenceRateStratifyRuleEditor and
CohortBuilder now use GroupCriteriaUI (identical contract). Updated the
consumers' specs to stub/look up GroupCriteriaUI.
…riteriaEditor

Both group editors are now GroupCriteriaUI. Deleted the two components and their
unit/component specs (coverage ported to GroupCriteriaUI specs); removed a dead
stub.
…n store

loadComparisonForMode(sourceKey, otherId, mode) computes expression (client diff
of items), included (compareConceptSets), or source (resolve both -> mapped source
codes -> diff) and caches per mode for the current other set. loadComparison kept
as an included wrapper. Other set is now retained on error.
Segmented mode buttons bound to store.comparisonMode; switching lazily computes
(or serves cached) the mode, a fresh Compare clears the cache.
Source mode relabels the Code/Vocabulary columns to Source Code/Source
Vocabulary; the export filename includes the active mode.
Source comparison stays implemented in the store; the toggle is gated behind
SOURCE_MODE_ENABLED (false) so only Expression/Included show in the UI.
…d/error/fetch

Raises CompareTab function coverage (41%→83%) so the global function-coverage
threshold (77%) is met; CI unit-tests was failing only on that gate.
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.54604% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.74%. Comparing base (4976834) to head (324071f).

Files with missing lines Patch % Lines
src/components/cohort/CohortBuilder.vue 66.66% 8 Missing ⚠️
src/components/cohort-builder/GroupCriteriaUI.vue 96.29% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #116      +/-   ##
===========================================
- Coverage    92.75%   92.74%   -0.02%     
===========================================
  Files          442      442              
  Lines        94333    94275      -58     
  Branches     10672     8093    -2579     
===========================================
- Hits         87502    87432      -70     
- Misses        6831     6843      +12     
Flag Coverage Δ
unit 92.74% <98.54%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@p-hoffmann p-hoffmann merged commit 0a13950 into develop Jun 21, 2026
19 checks passed
@p-hoffmann p-hoffmann deleted the p-hoffmann/concept-set-criteria-and-compare-ux branch June 21, 2026 14:21
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.

1 participant