From 0b923b83d1f93488712271e34cb95847c75863a2 Mon Sep 17 00:00:00 2001 From: Richard Wolfmayr Date: Tue, 12 Sep 2023 13:47:47 +0200 Subject: [PATCH] autosplit finished for single numerical attribute --- src/Cohort.ts | 4 +++- src/CohortRepresentations.ts | 2 +- src/data/Attribute.ts | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Cohort.ts b/src/Cohort.ts index 72bcfd9..116b073 100644 --- a/src/Cohort.ts +++ b/src/Cohort.ts @@ -273,7 +273,9 @@ export async function createCohortAutoSplit( // let dummyrange = [this.getGeneralNumericalFilter(0 , 50 , NumRangeOperators.gte, NumRangeOperators.lte)]; // TODO: remove, just for development of autosplit - const newFilter = getAutoSplitFilter(parentCohort.filters, attribute, null); + + // const newFilter = getAutoSplitFilter(parentCohort.filters, attribute); + const newFilter = null; // not needed // ATTENTION : database != databaseName const cht = new Cohort( diff --git a/src/CohortRepresentations.ts b/src/CohortRepresentations.ts index 3606522..46be338 100644 --- a/src/CohortRepresentations.ts +++ b/src/CohortRepresentations.ts @@ -515,7 +515,7 @@ export class RectCohortRep implements IRectCohortRep { if (Array.isArray(val)) { labelpart = val.map((a) => labelFromFilter(a, label)).join(' / '); } else if (isNull(val)) { - labelpart = label; + labelpart = 'Mixed because of Autosplit'; } else { labelpart = labelFromFilter(val, label); } diff --git a/src/data/Attribute.ts b/src/data/Attribute.ts index 12aeb3c..20cf70d 100644 --- a/src/data/Attribute.ts +++ b/src/data/Attribute.ts @@ -129,8 +129,8 @@ export class ServerColumnAttribute extends Attribute { async getAutoCohort(cht: ICohort, attribute: IAttribute, newCohortId: number): Promise { // if (Array.isArray(attribute)) { - const label = "label"; - return createCohortAutoSplit(cht, niceName(this.id), "label", this.id, newCohortId); + const label = "Mixed - AutoSplit"; + return createCohortAutoSplit(cht, niceName(this.id), label, this.id, newCohortId); // } }