From 7e3a3d949406671cb6e96a2057f1e3c1fc31e842 Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Wed, 2 Oct 2024 12:16:28 +0200 Subject: [PATCH 01/15] chore: activate project-manager in demo environment --- packages/demo/public/options-ccp-demo.json | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/packages/demo/public/options-ccp-demo.json b/packages/demo/public/options-ccp-demo.json index e832934..8e49118 100644 --- a/packages/demo/public/options-ccp-demo.json +++ b/packages/demo/public/options-ccp-demo.json @@ -260,6 +260,7 @@ "backendMeasures": "DKTK_STRAT_DEF_IN_INITIAL_POPULATION", "url": "https://backend.demo.lens.samply.de/prod/", "sites": [ + "dktk-test", "berlin", "berlin-test", "dresden", @@ -277,5 +278,68 @@ ] } ] + }, + "negotiateOptions": { + "negotiateApp": "project-manager", + "newProjectUrl": "https://e260-ccp-req/project-manager/create-query-and-design-project", + "editProjectUrl": "https://e260-ccp-req/project-manager/edit-project", + "siteMapping": [ + { + "site": "dktk-test", + "collection": "lens-dktk-test" + }, + { + "site": "Berlin", + "collection": "lens-berlin" + }, + { + "site": "Dresden", + "collection": "lens-dresden" + }, + { + "site": "Essen", + "collection": "lens-essen" + }, + { + "site": "Frankfurt", + "collection": "lens-frankfurt" + }, + { + "site": "Freiburg", + "collection": "lens-freiburg" + }, + { + "site": "Hannover", + "collection": "lens-hannover" + }, + { + "site": "Mainz", + "collection": "lens-mainz" + }, + { + "site": "München LMU", + "collection": "lens-muenchen-lmu" + }, + { + "site": "München TUM", + "collection": "lens-muenchen-tum" + }, + { + "site": "Ulm", + "collection": "lens-ulm" + }, + { + "site": "Würzburg", + "collection": "lens-wuerzburg" + }, + { + "site": "Mannheim", + "collection": "lens-mannheim" + }, + { + "site": "Hamburg", + "collection": "lens-hamburg" + } + ] } } From ac0afa9a253a31294b4058d01ec2e925e6ec4fad Mon Sep 17 00:00:00 2001 From: Patrick Skowronek Date: Tue, 15 Oct 2024 09:47:11 +0200 Subject: [PATCH 02/15] fix: convert backgroundcolor from string to string array --- packages/lib/src/components/results/ChartComponent.wc.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/lib/src/components/results/ChartComponent.wc.svelte b/packages/lib/src/components/results/ChartComponent.wc.svelte index fa7126f..98cef49 100644 --- a/packages/lib/src/components/results/ChartComponent.wc.svelte +++ b/packages/lib/src/components/results/ChartComponent.wc.svelte @@ -192,6 +192,11 @@ ): ChartDataSets => { let dataSet: number[]; + // This is bad. For some reason the passed value is a string not a array of strings. With this conversion it does work! + if (typeof backgroundColor == "string") { + backgroundColor = backgroundColor.split(","); + } + if (perSite) { dataSet = chartLabels.map((label: string) => { const site: Site | undefined = responseStore.get(label); From 6f7f45ff51aa6abb1a1080203d3dac2978da982d Mon Sep 17 00:00:00 2001 From: Patrick Skowronek Date: Tue, 15 Oct 2024 11:48:37 +0200 Subject: [PATCH 03/15] fix: fix passing group range to charts --- packages/lib/src/components/results/ChartComponent.wc.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/lib/src/components/results/ChartComponent.wc.svelte b/packages/lib/src/components/results/ChartComponent.wc.svelte index 98cef49..5d7b37d 100644 --- a/packages/lib/src/components/results/ChartComponent.wc.svelte +++ b/packages/lib/src/components/results/ChartComponent.wc.svelte @@ -436,6 +436,10 @@ chart.data.datasets = chartData.data; chartLabels = chartData.labels; + if (typeof groupRange == "string") { + groupRange = Number(groupRange); + } + /** * lets the user define a range for the labels when only single values are used eg. '60' -> '60 - 69' */ From a2c70cf3c91cd020741cf8f98ab7152259f4e582 Mon Sep 17 00:00:00 2001 From: Patrick Skowronek Date: Wed, 16 Oct 2024 15:08:22 +0200 Subject: [PATCH 04/15] chore: added dktk-datashield-test --- packages/demo/public/options-ccp-demo.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/demo/public/options-ccp-demo.json b/packages/demo/public/options-ccp-demo.json index 8e49118..b681890 100644 --- a/packages/demo/public/options-ccp-demo.json +++ b/packages/demo/public/options-ccp-demo.json @@ -22,6 +22,7 @@ "wuerzburg": "Würzburg", "mannheim": "Mannheim", "dktk-test": "DKTK-Test", + "dktk-datashield-test": "DKTK Datashield Test", "hamburg": "Hamburg" }, "catalogueKeyToResponseKeyMap": [ @@ -70,6 +71,8 @@ "ulm": "Ulm", "wuerzburg": "Würzburg", "mannheim": "Mannheim", + "dktk-test": "DKTK-Test", + "dktk-datashield-test": "DKTK Datashield Test", "hamburg": "Hamburg" } }, @@ -261,6 +264,7 @@ "url": "https://backend.demo.lens.samply.de/prod/", "sites": [ "dktk-test", + "dktk-datashield-test", "berlin", "berlin-test", "dresden", @@ -288,6 +292,10 @@ "site": "dktk-test", "collection": "lens-dktk-test" }, + { + "site": "dktk-datashield-test", + "collection": "lens-dktk-datashield-test" + }, { "site": "Berlin", "collection": "lens-berlin" From af21b6733b1c3f40d8cbdc8a7210c5a3dc548bd8 Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Thu, 24 Oct 2024 15:26:22 +0200 Subject: [PATCH 05/15] feat: activate negotiate button --- packages/demo/src/AppCCP.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/demo/src/AppCCP.svelte b/packages/demo/src/AppCCP.svelte index f87f35a..7793dfa 100644 --- a/packages/demo/src/AppCCP.svelte +++ b/packages/demo/src/AppCCP.svelte @@ -160,8 +160,7 @@ Diagramme repräsentieren nicht mehr die aktuelle Suche! - - +
Date: Mon, 28 Oct 2024 07:52:35 +0100 Subject: [PATCH 06/15] fix: info and search button with empty second empty query input --- .../buttons/SearchButtonComponenet.wc.svelte | 7 ++++ packages/lib/src/stores/negotiate.ts | 40 ++++++++++--------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/packages/lib/src/components/buttons/SearchButtonComponenet.wc.svelte b/packages/lib/src/components/buttons/SearchButtonComponenet.wc.svelte index 557110d..3bbc13a 100644 --- a/packages/lib/src/components/buttons/SearchButtonComponenet.wc.svelte +++ b/packages/lib/src/components/buttons/SearchButtonComponenet.wc.svelte @@ -49,6 +49,13 @@ const ast = buildAstFromQuery($queryStore); + if (ast.children.includes(null)) { + alert( + "No query entered in one of the queries. You can enter a query or remove the query fields.", + ); + return; + } + options?.spots?.forEach((spot: SpotOption) => { const name = spot.name; const measureItem: MeasureOption | undefined = $measureStore.find( diff --git a/packages/lib/src/stores/negotiate.ts b/packages/lib/src/stores/negotiate.ts index f4cd44e..0e06c3c 100644 --- a/packages/lib/src/stores/negotiate.ts +++ b/packages/lib/src/stores/negotiate.ts @@ -53,28 +53,30 @@ export const buildHumanReadableRecursively = ( } queryLayer.children.forEach((child: AstElement, index: number): void => { - if ("type" in child && "value" in child && "key" in child) { - if (typeof child.value === "string") { - humanReadableQuery += `(${child.key} ${child.type} ${child.value})`; + if (child !== null) { + if ("type" in child && "value" in child && "key" in child) { + if (typeof child.value === "string") { + humanReadableQuery += `(${child.key} ${child.type} ${child.value})`; + } + if ( + typeof child.value === "object" && + "min" in child.value && + "max" in child.value + ) { + humanReadableQuery += `(${child.key} ${child.type} ${child.value.min} and ${child.value.max})`; + } } - if ( - typeof child.value === "object" && - "min" in child.value && - "max" in child.value - ) { - humanReadableQuery += `(${child.key} ${child.type} ${child.value.min} and ${child.value.max})`; - } - } - humanReadableQuery = buildHumanReadableRecursively( - child, - humanReadableQuery, - ); + humanReadableQuery = buildHumanReadableRecursively( + child, + humanReadableQuery, + ); - if (index === queryLayer.children.length - 1) { - } - if (index < queryLayer.children.length - 1) { - humanReadableQuery += ` ${queryLayer.operand} `; + if (index === queryLayer.children.length - 1) { + } + if (index < queryLayer.children.length - 1) { + humanReadableQuery += ` ${queryLayer.operand} `; + } } }); From 68ebbac8e7f0cfa6ade662efbb38e71a0ebbef2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6hler?= Date: Mon, 28 Oct 2024 11:24:17 +0100 Subject: [PATCH 07/15] fix: added missing date option in fieldType enum of catalogue schema --- packages/lib/src/types/catalogue.schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/lib/src/types/catalogue.schema.json b/packages/lib/src/types/catalogue.schema.json index a5c9478..7d6cd08 100644 --- a/packages/lib/src/types/catalogue.schema.json +++ b/packages/lib/src/types/catalogue.schema.json @@ -44,7 +44,8 @@ "enum": [ "single-select", "number", - "autocomplete" + "autocomplete", + "date" ] }, "type": { @@ -133,4 +134,4 @@ } } } -} \ No newline at end of file +} From 95741dcd3ebaf430c5e6b9be832123930212eff7 Mon Sep 17 00:00:00 2001 From: Patrick Skowronek Date: Tue, 29 Oct 2024 15:53:48 +0100 Subject: [PATCH 08/15] feat: implement bbmri negotiator --- .../NegotiateButtonComponent.wc.svelte | 5 +- packages/lib/src/stores/negotiate.ts | 470 +++++++++--------- packages/lib/src/types/options.ts | 14 + 3 files changed, 255 insertions(+), 234 deletions(-) diff --git a/packages/lib/src/components/buttons/NegotiateButtonComponent.wc.svelte b/packages/lib/src/components/buttons/NegotiateButtonComponent.wc.svelte index a9066b9..d1c20e6 100644 --- a/packages/lib/src/components/buttons/NegotiateButtonComponent.wc.svelte +++ b/packages/lib/src/components/buttons/NegotiateButtonComponent.wc.svelte @@ -8,15 +8,14 @@ import { negotiate, negotiateStore } from "../../stores/negotiate"; export let title: string = "Negotiate with biobanks"; - let disabled: boolean = false;