Skip to content

Commit

Permalink
autosplit finished for single numerical attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwolfmayr committed Sep 12, 2023
1 parent e2480d2 commit 0b923b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/Cohort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/CohortRepresentations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/data/Attribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export class ServerColumnAttribute extends Attribute {

async getAutoCohort(cht: ICohort, attribute: IAttribute, newCohortId: number): Promise<ICohort> {
// 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);
// }
}

Expand Down

0 comments on commit 0b923b8

Please sign in to comment.