Skip to content

Commit

Permalink
Allow Observation Period in censor events.
Browse files Browse the repository at this point in the history
Fixes #2930.
  • Loading branch information
chrisknoll committed Apr 30, 2024
1 parent dd9e49e commit 44f02c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions js/components/cohortbuilder/components/CensoringCriteriaEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ define([
});
},
},
{
...constants.censoringEventList.addObservationPeriod,
selected: false,
action: function () {
var unwrappedExpression = ko.utils.unwrapObservable(self.expression);
unwrappedExpression
.CensoringCriteria.push({
ObservationPeriod: new criteriaTypes.ObservationPeriod(
null,
unwrappedExpression.ConceptSets
),
});
},
},
{
...constants.censoringEventList.addPayerPlanPeriod,
selected: false,
Expand Down
5 changes: 4 additions & 1 deletion js/components/cohortbuilder/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ define(["knockout"], function (ko) {
title: 'const.eventsList.addObservationPeriod.title',
defaultTitle: 'Add Observation Period',
descriptionInitial: 'const.eventsList.addObservationPeriod.desc_initial',
defaultDescriptionInitial: 'Find patients based on observations.',
defaultDescriptionInitial: 'Find patients based on observation period.',
descriptionCensoring: 'const.eventsList.addObservationPeriod.desc_censoring',
defaultDescriptionCensoring: 'Exit cohort based on observaton period.',
descriptionGroup: 'const.eventsList.addObservationPeriod.desc_group',
defaultDescriptionGroup: 'Find patients based on observation periods.',
},
Expand Down Expand Up @@ -1112,6 +1114,7 @@ define(["knockout"], function (ko) {
'addDrugExposure',
'addMeasurement',
'addObservation',
'addObservationPeriod',
'addPayerPlanPeriod',
'addProcedureOccurrence',
'addSpecimen',
Expand Down

0 comments on commit 44f02c7

Please sign in to comment.