Skip to content

Commit

Permalink
Add description fields for all study asset types #2724 (#2733)
Browse files Browse the repository at this point in the history
Co-authored-by: MakTakin <semyon.titarenko@odysseusinc.com>
  • Loading branch information
anton-abushkevich and TitrS authored Sep 27, 2022
1 parent 29c5bf1 commit 2a2d4ae
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/components/atlas.cohort-editor.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="paddedWrapper">
<!-- contenteditableSwitch must be placed AFTER contentEditable to override 'contenteditable' attribute -->
<div class="divtext cohort-description" data-bind="contentEditable: $component.currentCohortDefinition().description, contenteditableSwitch: canEdit(), placeholder: ko.i18n('components.atlasCohortEditor.enterCohortPlaceholder', 'Enter a cohort definition description here')"></div>
<div class="divtext cohort-description" data-bind="contentEditable: currentCohortDefinition().description, contenteditableSwitch: canEdit(), placeholder: ko.i18n('components.atlasCohortEditor.enterCohortPlaceholder', 'Enter the cohort definition description here')"></div>
<div data-bind="eventListener: [
{ event: 'click', selector: '.conceptset_import', callback: handleConceptSetImport},
{ event: 'click', selector: '.conceptset_edit', callback: handleEditConceptSet}
Expand Down
1 change: 1 addition & 0 deletions js/components/conceptset/InputTypes/ConceptSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ define(['knockout', './ConceptSetItem'], function (ko, ConceptSetItem) {

self.id = data.id;
self.name = ko.observable(data.name || ko.i18n('components.conceptSetBuilder.unnamedConceptSet', 'Unnamed Concept Set')());
self.description = ko.observable(data.description || null);
self.expression = {
items: ko.observableArray(data.expression && data.expression.items &&
data.expression.items.map(function (item) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ define(function(require, exports){
criteria: ko.observable(new CriteriaGroup(s.criteria, this.strataConceptSets)),
}))) || []);
this.tags = ko.observableArray(data.tags);
this.description = ko.observable(data.description || null);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<div data-bind="if: $component.isViewPermitted(), css: classes()">
<loading data-bind="visible: loading()" params="status: ko.i18n('cc.viewEdit.design.loading', 'Loading Cohort Characterization design...')">loading</loading>
<div class="divtext" data-bind="contentEditable: design().description, contenteditableSwitch: isEditPermitted(), placeholder: ko.i18n('cc.viewEdit.design.descriptionPlaceholder', 'Enter the characterization description here')"></div>
<p data-bind="css: classes('descr'), html: ko.i18n('cc.viewEdit.design.description', '<b>Cohort characterization</b> is defined as the process of generating cohort level descriptive summary statistics from person level covariate data. Summary statistics of these person level covariates may be count, mean, sd, var, min, max, median, range, and quantiles. In addition, covariates during a period may be stratified into temporal units of time for time-series analysis such as fixed intervals of time relative to cohort_start_date (e.g. every 7 days, every 30 days etc.), or in absolute calendar intervals such as calendar-week, calendar-month, calendar-quarter, calendar-year.')">
</p>
<div data-bind="css: classes('linked-entities')">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<div class="paddedWrapper">
<!-- ko if: (conceptSetStore.current() != null) -->
<div class="divtext cohort-description" data-bind="contentEditable: conceptSetStore.current().description, contenteditableSwitch: canEditCurrentConceptSet(), placeholder: ko.i18n('components.conceptSet.descriptionPlaceholder', 'Enter the concept set description here')"></div>
<!-- /ko -->
<table class="conceptSetTable stripe compact hover" cellspacing="0" width="100%" data-bind="dataTable:{
xssSafe: true,
data: data(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div data-bind="css: {tabcontent: true, 'tab-disabled':!isEditable()}">

<div class="divtext" data-bind="contentEditable: analysisDescription, contenteditableSwitch: isEditable(), placeholder: ko.i18n('ir.editor.descriptionPlaceholder', 'Enter the analysis description here')"></div>
<div class="criteriaGroup">
<div class="criteriaHeading">
<b data-bind="text: ko.i18n('ir.editor.studyCohorts', 'Study Cohorts')"></b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define([
constructor(params) {
super(params);
this.options = options;

this.analysisDescription = params.description;
this.analysis = params.analysis;
this.analysisCohorts = params.analysisCohorts;
this.loading = ko.observable(false);
Expand Down
2 changes: 1 addition & 1 deletion js/pages/incidence-rates/ir-manager.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<div class="tab-content">
<div role="tabpanel" data-bind="css: { active: $component.activeTab() == tabs.DEFINITION }" class="tab-pane">
<div data-bind="eventListener: [{ event: 'click', selector: '.conceptset_import', callback: handleConceptSetImport}, { event: 'click', selector: '.conceptset_edit', callback: handleEditConceptSet}]">
<ir-analysis-editor params="analysis: selectedAnalysis().expression, analysisCohorts: analysisCohorts, isEditable: isEditable"></ir-analysis-editor>
<ir-analysis-editor params="analysis: selectedAnalysis().expression,description: selectedAnalysis().description, analysisCohorts: analysisCohorts, isEditable: isEditable"></ir-analysis-editor>
</div>
</div>
<div role="tabpanel" data-bind="css: { active: $component.activeTab() == tabs.CONCEPT_SETS }" class="tab-pane">
Expand Down
1 change: 1 addition & 0 deletions js/pages/pathways/PathwayAnalysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ define(function (require, exports) {
this.allowRepeats = ko.observable(data.allowRepeats||false);

this.tags = ko.observableArray(data.tags);
this.description = ko.observable(data.description || null);
}

}
Expand Down
1 change: 1 addition & 0 deletions js/pages/pathways/components/tabs/pathway-design.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div data-bind="css: classes()">
<div class="divtext" data-bind="contentEditable: design().description, contenteditableSwitch: isEditPermitted(), placeholder: ko.i18n('pathways.manager.design.descriptionPlaceholder', 'Enter the cohort pathway description here')"></div>
<p data-bind="css: classes('descr'), html: ko.i18n('pathways.manager.design.description', '<b>Cohort Pathway</b> is defined as the process of generating an aggregated sequence of transitions between the Event Cohorts among those people in the Target Cohorts.')">

</p>
Expand Down

0 comments on commit 2a2d4ae

Please sign in to comment.