From bd56f5bdba730190721d23d1d558d202847017dd Mon Sep 17 00:00:00 2001 From: Martin Lablans <6804500+lablans@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:17:55 +0100 Subject: [PATCH 01/14] Fix a typo in CCP Explorer --- packages/demo/src/AppCCP.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/demo/src/AppCCP.svelte b/packages/demo/src/AppCCP.svelte index bbda8add..9c9b156a 100644 --- a/packages/demo/src/AppCCP.svelte +++ b/packages/demo/src/AppCCP.svelte @@ -193,7 +193,7 @@
* Umfasst Gewebe- und flüssige Proben. Die Anzahl der - FFPE Proben (Schätzung) entspricht der Zahl der + FFPE-Proben (Schätzung) entspricht der Zahl der Diagnosen.
From abc31914a11331703aeccf0d1e4b629fd124b972 Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Thu, 8 Feb 2024 14:23:48 +0100 Subject: [PATCH 02/14] fix: search for tnm and uicc works again --- .../lib/src/cql-translator-service/ast-to-cql-translator.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/lib/src/cql-translator-service/ast-to-cql-translator.ts b/packages/lib/src/cql-translator-service/ast-to-cql-translator.ts index d6643dcc..386b3afc 100644 --- a/packages/lib/src/cql-translator-service/ast-to-cql-translator.ts +++ b/packages/lib/src/cql-translator-service/ast-to-cql-translator.ts @@ -123,6 +123,7 @@ const getSingleton = (criterion: AstBottomLayerValue): string => { case "conditionBodySite": case "conditionLocalization": case "observation": + case "uiccstadium": case "observationMetastasis": case "observationMetastasisBodySite": case "procedure": @@ -137,7 +138,8 @@ const getSingleton = (criterion: AstBottomLayerValue): string => { case "observationMolecularMarkerSeqRefNCBI": case "observationMolecularMarkerEnsemblID": case "department": - case "TNM-x": { + case "TNMp": + case "TNMc": { if (typeof criterion.value === "string") { // TODO: Check if we really need to do this or we can somehow tell cql to do that expansion it self if (criterion.value.slice(-1) === "%") { From cd8a11f256575558f8068c1f5962136d0172acdc Mon Sep 17 00:00:00 2001 From: Patrick Skowronek Date: Tue, 13 Feb 2024 09:40:32 +0100 Subject: [PATCH 03/14] feat: added search criteria for ffpe histo search --- .../public/catalogues/catalogue-dktk.json | 1561 +++++++++-------- .../ast-to-cql-translator.ts | 1 + .../cqlquery-mappings.ts | 5 + 3 files changed, 792 insertions(+), 775 deletions(-) diff --git a/packages/demo/public/catalogues/catalogue-dktk.json b/packages/demo/public/catalogues/catalogue-dktk.json index f57871ec..8a480e32 100644 --- a/packages/demo/public/catalogues/catalogue-dktk.json +++ b/packages/demo/public/catalogues/catalogue-dktk.json @@ -24,7 +24,6 @@ "key": "other", "name": "Divers / intersexuell", "description": "Divers / intersexuell" - }, { "key": "unknown", @@ -18215,14 +18214,14 @@ "description": "0", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "0" - }, - { - "value": "21899-0", - "name": "0" - } + { + "value": "21905-5", + "name": "0" + }, + { + "value": "21899-0", + "name": "0" + } ] ] } @@ -18242,14 +18241,14 @@ "description": "1", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1" - }, - { - "value": "21899-0", - "name": "1" - } + { + "value": "21905-5", + "name": "1" + }, + { + "value": "21899-0", + "name": "1" + } ] ] }, @@ -18259,14 +18258,14 @@ "description": "1a", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1a" - }, - { - "value": "21899-0", - "name": "1a" - } + { + "value": "21905-5", + "name": "1a" + }, + { + "value": "21899-0", + "name": "1a" + } ] ] }, @@ -18276,14 +18275,14 @@ "description": "1a1", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1a1" - }, - { - "value": "21899-0", - "name": "1a1" - } + { + "value": "21905-5", + "name": "1a1" + }, + { + "value": "21899-0", + "name": "1a1" + } ] ] }, @@ -18293,14 +18292,14 @@ "description": "1a2", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1a2" - }, - { - "value": "21899-0", - "name": "1a2" - } + { + "value": "21905-5", + "name": "1a2" + }, + { + "value": "21899-0", + "name": "1a2" + } ] ] }, @@ -18310,14 +18309,14 @@ "description": "1b", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1b" - }, - { - "value": "21899-0", - "name": "1b" - } + { + "value": "21905-5", + "name": "1b" + }, + { + "value": "21899-0", + "name": "1b" + } ] ] }, @@ -18327,14 +18326,14 @@ "description": "1b1", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1b1" - }, - { - "value": "21899-0", - "name": "1b1" - } + { + "value": "21905-5", + "name": "1b1" + }, + { + "value": "21899-0", + "name": "1b1" + } ] ] }, @@ -18344,14 +18343,14 @@ "description": "1b2", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1b2" - }, - { - "value": "21899-0", - "name": "1b2" - } + { + "value": "21905-5", + "name": "1b2" + }, + { + "value": "21899-0", + "name": "1b2" + } ] ] }, @@ -18361,14 +18360,14 @@ "description": "1c", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1c" - }, - { - "value": "21899-0", - "name": "1c" - } + { + "value": "21905-5", + "name": "1c" + }, + { + "value": "21899-0", + "name": "1c" + } ] ] }, @@ -18378,14 +18377,14 @@ "description": "1c1", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1c1" - }, - { - "value": "21899-0", - "name": "1c1" - } + { + "value": "21905-5", + "name": "1c1" + }, + { + "value": "21899-0", + "name": "1c1" + } ] ] }, @@ -18395,14 +18394,14 @@ "description": "1c2", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1c2" - }, - { - "value": "21899-0", - "name": "1c2" - } + { + "value": "21905-5", + "name": "1c2" + }, + { + "value": "21899-0", + "name": "1c2" + } ] ] }, @@ -18412,14 +18411,14 @@ "description": "1c3", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1c3" - }, - { - "value": "21899-0", - "name": "1c3" - } + { + "value": "21905-5", + "name": "1c3" + }, + { + "value": "21899-0", + "name": "1c3" + } ] ] }, @@ -18429,14 +18428,14 @@ "description": "1d", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1d" - }, - { - "value": "21899-0", - "name": "1d" - } + { + "value": "21905-5", + "name": "1d" + }, + { + "value": "21899-0", + "name": "1d" + } ] ] }, @@ -18446,14 +18445,14 @@ "description": "1mi", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "1mi" - }, - { - "value": "21899-0", - "name": "1mi" - } + { + "value": "21905-5", + "name": "1mi" + }, + { + "value": "21899-0", + "name": "1mi" + } ] ] } @@ -18473,14 +18472,14 @@ "description": "2", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "2" - }, - { - "value": "21899-0", - "name": "2" - } + { + "value": "21905-5", + "name": "2" + }, + { + "value": "21899-0", + "name": "2" + } ] ] }, @@ -18490,14 +18489,14 @@ "description": "2a", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "2a" - }, - { - "value": "21899-0", - "name": "2a" - } + { + "value": "21905-5", + "name": "2a" + }, + { + "value": "21899-0", + "name": "2a" + } ] ] }, @@ -18507,14 +18506,14 @@ "description": "2a1", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "2a1" - }, - { - "value": "21899-0", - "name": "2a1" - } + { + "value": "21905-5", + "name": "2a1" + }, + { + "value": "21899-0", + "name": "2a1" + } ] ] }, @@ -18524,14 +18523,14 @@ "description": "2a2", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "2a2" - }, - { - "value": "21899-0", - "name": "2a2" - } + { + "value": "21905-5", + "name": "2a2" + }, + { + "value": "21899-0", + "name": "2a2" + } ] ] }, @@ -18541,14 +18540,14 @@ "description": "2b", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "2b" - }, - { - "value": "21899-0", - "name": "2b" - } + { + "value": "21905-5", + "name": "2b" + }, + { + "value": "21899-0", + "name": "2b" + } ] ] }, @@ -18558,14 +18557,14 @@ "description": "2c", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "2c" - }, - { - "value": "21899-0", - "name": "2c" - } + { + "value": "21905-5", + "name": "2c" + }, + { + "value": "21899-0", + "name": "2c" + } ] ] }, @@ -18575,14 +18574,14 @@ "description": "2d", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "2d" - }, - { - "value": "21899-0", - "name": "2d" - } + { + "value": "21905-5", + "name": "2d" + }, + { + "value": "21899-0", + "name": "2d" + } ] ] } @@ -18602,14 +18601,14 @@ "description": "3", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "3" - }, - { - "value": "21899-0", - "name": "3" - } + { + "value": "21905-5", + "name": "3" + }, + { + "value": "21899-0", + "name": "3" + } ] ] }, @@ -18619,14 +18618,14 @@ "description": "3a", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "3a" - }, - { - "value": "21899-0", - "name": "3a" - } + { + "value": "21905-5", + "name": "3a" + }, + { + "value": "21899-0", + "name": "3a" + } ] ] }, @@ -18636,14 +18635,14 @@ "description": "3b", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "3b" - }, - { - "value": "21899-0", - "name": "3b" - } + { + "value": "21905-5", + "name": "3b" + }, + { + "value": "21899-0", + "name": "3b" + } ] ] }, @@ -18653,14 +18652,14 @@ "description": "3c", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "3c" - }, - { - "value": "21899-0", - "name": "3c" - } + { + "value": "21905-5", + "name": "3c" + }, + { + "value": "21899-0", + "name": "3c" + } ] ] }, @@ -18670,14 +18669,14 @@ "description": "3d", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "3d" - }, - { - "value": "21899-0", - "name": "3d" - } + { + "value": "21905-5", + "name": "3d" + }, + { + "value": "21899-0", + "name": "3d" + } ] ] } @@ -18697,14 +18696,14 @@ "description": "4", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "4" - }, - { - "value": "21899-0", - "name": "4" - } + { + "value": "21905-5", + "name": "4" + }, + { + "value": "21899-0", + "name": "4" + } ] ] }, @@ -18714,14 +18713,14 @@ "description": "4a", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "4a" - }, - { - "value": "21899-0", - "name": "4a" - } + { + "value": "21905-5", + "name": "4a" + }, + { + "value": "21899-0", + "name": "4a" + } ] ] }, @@ -18731,14 +18730,14 @@ "description": "4b", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "4b" - }, - { - "value": "21899-0", - "name": "4b" - } + { + "value": "21905-5", + "name": "4b" + }, + { + "value": "21899-0", + "name": "4b" + } ] ] }, @@ -18748,14 +18747,14 @@ "description": "4c", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "4c" - }, - { - "value": "21899-0", - "name": "4c" - } + { + "value": "21905-5", + "name": "4c" + }, + { + "value": "21899-0", + "name": "4c" + } ] ] }, @@ -18765,14 +18764,14 @@ "description": "4d", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "4d" - }, - { - "value": "21899-0", - "name": "4d" - } + { + "value": "21905-5", + "name": "4d" + }, + { + "value": "21899-0", + "name": "4d" + } ] ] }, @@ -18782,14 +18781,14 @@ "description": "4e", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "4e" - }, - { - "value": "21899-0", - "name": "4e" - } + { + "value": "21905-5", + "name": "4e" + }, + { + "value": "21899-0", + "name": "4e" + } ] ] } @@ -18809,14 +18808,14 @@ "description": "a", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "a" - }, - { - "value": "21899-0", - "name": "a" - } + { + "value": "21905-5", + "name": "a" + }, + { + "value": "21899-0", + "name": "a" + } ] ] } @@ -18836,14 +18835,14 @@ "description": "is", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "is" - }, - { - "value": "21899-0", - "name": "is" - } + { + "value": "21905-5", + "name": "is" + }, + { + "value": "21899-0", + "name": "is" + } ] ] }, @@ -18853,14 +18852,14 @@ "description": "is(DCIS)", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "is(DCIS)" - }, - { - "value": "21899-0", - "name": "is(DCIS)" - } + { + "value": "21905-5", + "name": "is(DCIS)" + }, + { + "value": "21899-0", + "name": "is(DCIS)" + } ] ] }, @@ -18870,14 +18869,14 @@ "description": "is(LCIS)", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "is(LCIS)" - }, - { - "value": "21899-0", - "name": "is(LCIS)" - } + { + "value": "21905-5", + "name": "is(LCIS)" + }, + { + "value": "21899-0", + "name": "is(LCIS)" + } ] ] }, @@ -18887,14 +18886,14 @@ "description": "is(Paget)", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "is(Paget)" - }, - { - "value": "21899-0", - "name": "is(Paget)" - } + { + "value": "21905-5", + "name": "is(Paget)" + }, + { + "value": "21899-0", + "name": "is(Paget)" + } ] ] }, @@ -18904,14 +18903,14 @@ "description": "is(pd)", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "is(pd)" - }, - { - "value": "21899-0", - "name": "is(pd)" - } + { + "value": "21905-5", + "name": "is(pd)" + }, + { + "value": "21899-0", + "name": "is(pd)" + } ] ] }, @@ -18921,14 +18920,14 @@ "description": "is(pu)", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "is(pu)" - }, - { - "value": "21899-0", - "name": "is(pu)" - } + { + "value": "21905-5", + "name": "is(pu)" + }, + { + "value": "21899-0", + "name": "is(pu)" + } ] ] } @@ -18948,14 +18947,14 @@ "description": "X", "aggregatedValue": [ [ - { - "value": "21905-5", - "name": "X" - }, - { - "value": "21899-0", - "name": "X" - } + { + "value": "21905-5", + "name": "X" + }, + { + "value": "21899-0", + "name": "X" + } ] ] } @@ -19025,17 +19024,17 @@ "name": "0", "description": "0", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "0" - }, - { - "value": "21900-6", - "name": "0" - } - ] - ] + [ + { + "value": "21906-3", + "name": "0" + }, + { + "value": "21900-6", + "name": "0" + } + ] + ] }, { "key": "0(sn)", @@ -19047,306 +19046,306 @@ "name": "0(i+)", "description": "0(i+)", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "0(i+)" - }, - { - "value": "21900-6", - "name": "0(i+)" - } - ] - ] + [ + { + "value": "21906-3", + "name": "0(i+)" + }, + { + "value": "21900-6", + "name": "0(i+)" + } + ] + ] }, { "key": "0(i-)", "name": "0(i-)", "description": "0(i-)", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "0(i-)" - }, - { - "value": "21900-6", - "name": "0(i-)" - } - ] - ] + [ + { + "value": "21906-3", + "name": "0(i-)" + }, + { + "value": "21900-6", + "name": "0(i-)" + } + ] + ] }, { "key": "0(mol+)", "name": "0(mol+)", "description": "0(mol+)", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "0(mol+)" - }, - { - "value": "21900-6", - "name": "0(mol+)" - } - ] - ] + [ + { + "value": "21906-3", + "name": "0(mol+)" + }, + { + "value": "21900-6", + "name": "0(mol+)" + } + ] + ] }, { "key": "0(mol-)", "name": "0(mol-)", "description": "0(mol-)", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "0(mol-)" - }, - { - "value": "21900-6", - "name": "0(mol-)" - } - ] - ] + [ + { + "value": "21906-3", + "name": "0(mol-)" + }, + { + "value": "21900-6", + "name": "0(mol-)" + } + ] + ] }, { "key": "1", "name": "1", "description": "1", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "1" - }, - { - "value": "21900-6", - "name": "1" - } - ] - ] + [ + { + "value": "21906-3", + "name": "1" + }, + { + "value": "21900-6", + "name": "1" + } + ] + ] }, { "key": "1a", "name": "1a", "description": "1a", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "1a" - }, - { - "value": "21900-6", - "name": "1a" - } - ] - ] + [ + { + "value": "21906-3", + "name": "1a" + }, + { + "value": "21900-6", + "name": "1a" + } + ] + ] }, { "key": "1b", "name": "1b", "description": "1b", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "1b" - }, - { - "value": "21900-6", - "name": "1b" - } - ] - ] + [ + { + "value": "21906-3", + "name": "1b" + }, + { + "value": "21900-6", + "name": "1b" + } + ] + ] }, { "key": "1c", "name": "1c", "description": "1c", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "1c" - }, - { - "value": "21900-6", - "name": "1c" - } - ] - ] + [ + { + "value": "21906-3", + "name": "1c" + }, + { + "value": "21900-6", + "name": "1c" + } + ] + ] }, { "key": "1mi", "name": "1mi", "description": "1mi", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "1mi" - }, - { - "value": "21900-6", - "name": "1mi" - } - ] - ] + [ + { + "value": "21906-3", + "name": "1mi" + }, + { + "value": "21900-6", + "name": "1mi" + } + ] + ] }, { "key": "2", "name": "2", "description": "2", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "2" - }, - { - "value": "21900-6", - "name": "2" - } - ] - ] + [ + { + "value": "21906-3", + "name": "2" + }, + { + "value": "21900-6", + "name": "2" + } + ] + ] }, { "key": "2a", "name": "2a", "description": "2a", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "2a" - }, - { - "value": "21900-6", - "name": "2a" - } - ] - ] + [ + { + "value": "21906-3", + "name": "2a" + }, + { + "value": "21900-6", + "name": "2a" + } + ] + ] }, { "key": "2b", "name": "2b", "description": "2b", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "2b" - }, - { - "value": "21900-6", - "name": "2b" - } - ] - ] + [ + { + "value": "21906-3", + "name": "2b" + }, + { + "value": "21900-6", + "name": "2b" + } + ] + ] }, { "key": "2c", "name": "2c", "description": "2c", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "2c" - }, - { - "value": "21900-6", - "name": "2c" - } - ] - ] + [ + { + "value": "21906-3", + "name": "2c" + }, + { + "value": "21900-6", + "name": "2c" + } + ] + ] }, { "key": "3", "name": "3", "description": "3", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "3" - }, - { - "value": "21900-6", - "name": "3" - } - ] - ] + [ + { + "value": "21906-3", + "name": "3" + }, + { + "value": "21900-6", + "name": "3" + } + ] + ] }, { "key": "3a", "name": "3a", "description": "3a", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "3a" - }, - { - "value": "21900-6", - "name": "3a" - } - ] - ] + [ + { + "value": "21906-3", + "name": "3a" + }, + { + "value": "21900-6", + "name": "3a" + } + ] + ] }, { "key": "3b", "name": "3b", "description": "3b", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "3b" - }, - { - "value": "21900-6", - "name": "3b" - } - ] - ] + [ + { + "value": "21906-3", + "name": "3b" + }, + { + "value": "21900-6", + "name": "3b" + } + ] + ] }, { "key": "3c", "name": "3c", "description": "3c", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "3c" - }, - { - "value": "21900-6", - "name": "3c" - } - ] - ] + [ + { + "value": "21906-3", + "name": "3c" + }, + { + "value": "21900-6", + "name": "3c" + } + ] + ] }, { "key": "X", "name": "X", "description": "X", "aggregatedValue": [ - [ - { - "value": "21906-3", - "name": "X" - }, - { - "value": "21900-6", - "name": "X" - } - ] - ] + [ + { + "value": "21906-3", + "name": "X" + }, + { + "value": "21900-6", + "name": "X" + } + ] + ] } ] }, @@ -19362,190 +19361,190 @@ "name": "0", "description": "0", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "0" - }, - { - "value": "21901-4", - "name": "0" - } - ] - ] + [ + { + "value": "21907-1", + "name": "0" + }, + { + "value": "21901-4", + "name": "0" + } + ] + ] }, { "key": "1", "name": "1", "description": "1", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "1" - }, - { - "value": "21901-4", - "name": "1" - } - ] - ] + [ + { + "value": "21907-1", + "name": "1" + }, + { + "value": "21901-4", + "name": "1" + } + ] + ] }, { "key": "1a", "name": "1a", "description": "1a", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "1a" - }, - { - "value": "21901-4", - "name": "1a" - } - ] - ] + [ + { + "value": "21907-1", + "name": "1a" + }, + { + "value": "21901-4", + "name": "1a" + } + ] + ] }, { "key": "1b", "name": "1b", "description": "1b", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "1b" - }, - { - "value": "21901-4", - "name": "1b" - } - ] - ] + [ + { + "value": "21907-1", + "name": "1b" + }, + { + "value": "21901-4", + "name": "1b" + } + ] + ] }, { "key": "1c", "name": "1c", "description": "1c", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "1c" - }, - { - "value": "21901-4", - "name": "1c" - } - ] - ] + [ + { + "value": "21907-1", + "name": "1c" + }, + { + "value": "21901-4", + "name": "1c" + } + ] + ] }, { "key": "1d", "name": "1d", "description": "1d", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "1d" - }, - { - "value": "21901-4", - "name": "1d" - } - ] - ] + [ + { + "value": "21907-1", + "name": "1d" + }, + { + "value": "21901-4", + "name": "1d" + } + ] + ] }, { "key": "1e", "name": "1e", "description": "1e", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "1e" - }, - { - "value": "21901-4", - "name": "1e" - } - ] - ] + [ + { + "value": "21907-1", + "name": "1e" + }, + { + "value": "21901-4", + "name": "1e" + } + ] + ] }, { "key": "0(i-)", "name": "0(i-)", "description": "0(i-)", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "0(i-)" - }, - { - "value": "21901-4", - "name": "0(i-)" - } - ] - ] + [ + { + "value": "21907-1", + "name": "0(i-)" + }, + { + "value": "21901-4", + "name": "0(i-)" + } + ] + ] }, { "key": "0(i+)", "name": "0(i+)", "description": "0(i+)", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "0(i+)" - }, - { - "value": "21901-4", - "name": "0(i+)" - } - ] - ] + [ + { + "value": "21907-1", + "name": "0(i+)" + }, + { + "value": "21901-4", + "name": "0(i+)" + } + ] + ] }, { "key": "0(mol-)", "name": "0(mol-)", "description": "0(mol-)", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "0(mol-)" - }, - { - "value": "21901-4", - "name": "0(mol-)" - } - ] - ] + [ + { + "value": "21907-1", + "name": "0(mol-)" + }, + { + "value": "21901-4", + "name": "0(mol-)" + } + ] + ] }, { "key": "0(mol+)", "name": "0(mol+)", "description": "0(mol+)", "aggregatedValue": [ - [ - { - "value": "21907-1", - "name": "0(mol+)" - }, - { - "value": "21901-4", - "name": "0(mol+)" - } - ] - ] + [ + { + "value": "21907-1", + "name": "0(mol+)" + }, + { + "value": "21901-4", + "name": "0(mol+)" + } + ] + ] } ] -}, + }, { "key": "42030-7", "name": "TNM-m-Symbol", @@ -19558,156 +19557,156 @@ "name": "Kennzeichnet Vorhandensein multipler Primärtumoren in einem Bezirk", "description": "Kennzeichnet Vorhandensein multipler Primärtumoren in einem Bezirk", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "m" - }, - { - "value": "59479-6", - "name": "m" - } - ] - ] + [ + { + "value": "59479-6", + "name": "m" + }, + { + "value": "59479-6", + "name": "m" + } + ] + ] }, { "key": "2", "name": "(2) simultaner Tumoren", "description": "(2) simultaner Tumoren", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "2" - }, - { - "value": "59479-6", - "name": "2" - } - ] - ] + [ + { + "value": "59479-6", + "name": "2" + }, + { + "value": "59479-6", + "name": "2" + } + ] + ] }, { "key": "3", "name": "(3) simultaner Tumoren", "description": "(3) simultaner Tumoren", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "3" - }, - { - "value": "59479-6", - "name": "3" - } - ] - ] + [ + { + "value": "59479-6", + "name": "3" + }, + { + "value": "59479-6", + "name": "3" + } + ] + ] }, { "key": "4", "name": "(4) simultaner Tumoren", "description": "(4) simultaner Tumoren", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "4" - }, - { - "value": "59479-6", - "name": "4" - } - ] - ] + [ + { + "value": "59479-6", + "name": "4" + }, + { + "value": "59479-6", + "name": "4" + } + ] + ] }, { "key": "5", "name": "(5) simultaner Tumoren", "description": "(5) simultaner Tumoren", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "5" - }, - { - "value": "59479-6", - "name": "5" - } - ] - ] + [ + { + "value": "59479-6", + "name": "5" + }, + { + "value": "59479-6", + "name": "5" + } + ] + ] }, { "key": "6", "name": "(6) simultaner Tumoren", "description": "(6) simultaner Tumoren", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "6" - }, - { - "value": "59479-6", - "name": "6" - } - ] - ] + [ + { + "value": "59479-6", + "name": "6" + }, + { + "value": "59479-6", + "name": "6" + } + ] + ] }, { "key": "7", "name": "(7) simultaner Tumoren", "description": "(7) simultaner Tumoren", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "7" - }, - { - "value": "59479-6", - "name": "7" - } - ] - ] + [ + { + "value": "59479-6", + "name": "7" + }, + { + "value": "59479-6", + "name": "7" + } + ] + ] }, { "key": "8", "name": "(8) simultaner Tumoren", "description": "(8) simultaner Tumoren", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "8" - }, - { - "value": "59479-6", - "name": "8" - } - ] - ] + [ + { + "value": "59479-6", + "name": "8" + }, + { + "value": "59479-6", + "name": "8" + } + ] + ] }, { "key": "9", "name": "(9) simultaner Tumoren", "description": "(9) simultaner Tumoren", "aggregatedValue": [ - [ - { - "value": "59479-6", - "name": "9" - }, - { - "value": "59479-6", - "name": "9" - } - ] - ] + [ + { + "value": "59479-6", + "name": "9" + }, + { + "value": "59479-6", + "name": "9" + } + ] + ] } ] -}, + }, { "key": "59479-6", "name": "TNM-y-Symbol", @@ -19720,17 +19719,17 @@ "name": "Klassifikation erfolgte während oder nach initialer multimodaler Therapie", "description": "Klassifikation erfolgte während oder nach initialer multimodaler Therapie", "aggregatedValue": [ - [ - { - "value": "21983-2", - "name": "y" - }, - { - "value": "21983-2", - "name": "y" - } - ] - ] + [ + { + "value": "21983-2", + "name": "y" + }, + { + "value": "21983-2", + "name": "y" + } + ] + ] } ] }, @@ -19746,17 +19745,17 @@ "name": "Klassifikation erfolgte zur Beurteilung eines Rezidivs", "description": "Klassifikation erfolgte zur Beurteilung eines Rezidivs", "aggregatedValue": [ - [ - { - "value": "21983-2", - "name": "r" - }, - { - "value": "21983-2", - "name": "r" - } - ] - ] + [ + { + "value": "21983-2", + "name": "r" + }, + { + "value": "21983-2", + "name": "r" + } + ] + ] } ] } @@ -20172,7 +20171,19 @@ { "key": "tumor-tissue-ffpe", "name": "Gewebe FFPE", - "description": "Tumorgewebe (FFPE)" + "description": "Tumorgewebe (FFPE)", + "aggregatedValue": [ + [ + { + "value": "sample_kind", + "name": "tumor-tissue-ffpe" + }, + { + "value": "histology", + "name": "tumor-tissue-ffpe" + } + ] + ] }, { "key": "tumor-tissue-frozen", diff --git a/packages/lib/src/cql-translator-service/ast-to-cql-translator.ts b/packages/lib/src/cql-translator-service/ast-to-cql-translator.ts index 386b3afc..494be428 100644 --- a/packages/lib/src/cql-translator-service/ast-to-cql-translator.ts +++ b/packages/lib/src/cql-translator-service/ast-to-cql-translator.ts @@ -119,6 +119,7 @@ const getSingleton = (criterion: AstBottomLayerValue): string => { if (myCQL) { switch (myCriterion.type) { case "gender": + case "histology": case "conditionValue": case "conditionBodySite": case "conditionLocalization": diff --git a/packages/lib/src/cql-translator-service/cqlquery-mappings.ts b/packages/lib/src/cql-translator-service/cqlquery-mappings.ts index 2659a147..4e164c0e 100644 --- a/packages/lib/src/cql-translator-service/cqlquery-mappings.ts +++ b/packages/lib/src/cql-translator-service/cqlquery-mappings.ts @@ -191,11 +191,16 @@ export const cqltemplate = new Map([ "uiccstadium", "(exists ([Observation: Code '21908-9' from loinc] O where O.value.coding.code contains '{{C}}')) or (exists ([Observation: Code '21902-2' from loinc] O where O.value.coding.code contains '{{C}}'))", ], + [ + "histology", + "exists from [Observation: Code '59847-4' from loinc] O\n", + ], ]); export const criterionMap = new Map( [ ["gender", { type: "gender" }], + ["histology", { type: "histology", alias: ["loinc"] }], ["diagnosis", { type: "conditionValue", alias: ["icd10"] }], ["bodySite", { type: "conditionBodySite", alias: ["bodySite"] }], [ From 4f5f8d5e4e8ed5afe07051f9cc8f8def104e0cd7 Mon Sep 17 00:00:00 2001 From: Mats Johansen Date: Mon, 19 Feb 2024 12:26:24 +0100 Subject: [PATCH 04/14] feat(styles): add style export --- package-lock.json | 12 +++++ package.json | 5 +- packages/demo/src/AppCCP.svelte | 2 - .../demo/src/AppFragmentDevelopment.svelte | 3 -- packages/demo/src/ccp.css | 10 +--- packages/demo/src/fragment-development.css | 48 +---------------- packages/demo/src/main.ts | 10 ++-- packages/lib/index.ts | 2 + .../default => lib/src/styles}/catalogue.css | 0 packages/lib/src/styles/index.css | 51 ++++++++++++++++++ .../src/styles}/info-button.css | 0 .../src/styles}/negotiate-button.css | 0 .../src/styles}/result-chart.css | 0 .../src/styles}/result-table.css | 0 .../src/styles}/results-overview.css | 0 .../src/styles}/search-button.css | 0 .../src/styles}/search-modified-display.css | 0 .../default => lib/src/styles}/searchbars.css | 0 samply-lens-0.0.3-0.tgz | Bin 0 -> 326695 bytes vite.config.ts | 2 +- 20 files changed, 78 insertions(+), 67 deletions(-) rename packages/{demo/src/styles/default => lib/src/styles}/catalogue.css (100%) create mode 100644 packages/lib/src/styles/index.css rename packages/{demo/src/styles/default => lib/src/styles}/info-button.css (100%) rename packages/{demo/src/styles/default => lib/src/styles}/negotiate-button.css (100%) rename packages/{demo/src/styles/default => lib/src/styles}/result-chart.css (100%) rename packages/{demo/src/styles/default => lib/src/styles}/result-table.css (100%) rename packages/{demo/src/styles/default => lib/src/styles}/results-overview.css (100%) rename packages/{demo/src/styles/default => lib/src/styles}/search-button.css (100%) rename packages/{demo/src/styles/default => lib/src/styles}/search-modified-display.css (100%) rename packages/{demo/src/styles/default => lib/src/styles}/searchbars.css (100%) create mode 100644 samply-lens-0.0.3-0.tgz diff --git a/package-lock.json b/package-lock.json index 8347968f..c24a6afb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.3-0", "license": "MIT", "dependencies": { + "@samply/lens": "file:samply-lens-0.0.3-0.tgz", "chart.js": "^4.4.0", "svelte-dnd-action": "^0.9.26", "uuid": "^9.0.0" @@ -767,6 +768,17 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/@samply/lens": { + "version": "0.0.3-0", + "resolved": "file:samply-lens-0.0.3-0.tgz", + "integrity": "sha512-O9xi39oVIiSNFFDH61PqEKt0DrL78vS0oYz6485+G4QKY1VVQ4H4gCi7oS81KiU4zTgW8JeF9s1r1MlQ3sv7DQ==", + "license": "MIT", + "dependencies": { + "chart.js": "^4.4.0", + "svelte-dnd-action": "^0.9.26", + "uuid": "^9.0.0" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", diff --git a/package.json b/package.json index 9cc75ef1..4dc309cb 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "module": "dist/lens.js", "main": "dist/lens.umd.js", "types": "dist/types.d.ts", + "styles": "dist/style.css", "files": [ "dist" ], @@ -13,7 +14,8 @@ ".": { "import": "./dist/lens.js", "require": "./dist/lens.umd.js", - "types": "./dist/types.d.ts" + "types": "./dist/types.d.ts", + "styles": "./dist/style.css" } }, "license": "MIT", @@ -53,6 +55,7 @@ "vitest": "^0.34.2" }, "dependencies": { + "@samply/lens": "file:samply-lens-0.0.3-0.tgz", "chart.js": "^4.4.0", "svelte-dnd-action": "^0.9.26", "uuid": "^9.0.0" diff --git a/packages/demo/src/AppCCP.svelte b/packages/demo/src/AppCCP.svelte index 254c235a..0b96cb7f 100644 --- a/packages/demo/src/AppCCP.svelte +++ b/packages/demo/src/AppCCP.svelte @@ -1,6 +1,4 @@ - diff --git a/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte b/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte index aa586937..5f148d2e 100644 --- a/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte +++ b/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte @@ -19,6 +19,7 @@ import type { AutoCompleteItem, QueryItem } from "../../types/queryData"; import { v4 as uuidv4 } from "uuid"; import StoreDeleteButtonComponent from "../buttons/StoreDeleteButtonComponent.svelte"; + import InfoButtonComponent from "../buttons/InfoButtonComponent.wc.svelte"; import { addPercentageSignToCriteria } from "../../helpers/object-formaters"; import { catalogue } from "../../stores/catalogue"; @@ -320,6 +321,17 @@ {#each queryItem.values as value (value.queryBindId)} {value.name} + +   + + {#if queryItem.values.length > 1} { * @param topLayerItem - the next higher layer of the query store. Used to get the key, type and system of the current item * @returns AstElement */ -const returnNestedValues = ( +export const returnNestedValues = ( item: queryStoreItem | QueryItem[][], operand: "AND" | "OR" | null = null, topLayerItem: queryStoreItem | null = null, diff --git a/packages/lib/src/stores/negotiate.ts b/packages/lib/src/stores/negotiate.ts index a118c84b..b74f197d 100644 --- a/packages/lib/src/stores/negotiate.ts +++ b/packages/lib/src/stores/negotiate.ts @@ -39,7 +39,7 @@ export const getHumanReadableQuery = (): string => { * @param humanReadableQuery string to append to * @returns a human readable query string */ -const buildHumanReadableRecursively = ( +export const buildHumanReadableRecursively = ( queryLayer: AstElement, humanReadableQuery: string, ): string => { From eefd5b5a0361246d8d70b5c7e56ccf618df3b620 Mon Sep 17 00:00:00 2001 From: Zachariah Frank Date: Thu, 29 Feb 2024 12:41:53 +0100 Subject: [PATCH 13/14] Adjust types and add checks for undefined --- .../buttons/InfoButtonComponent.wc.svelte | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/packages/lib/src/components/buttons/InfoButtonComponent.wc.svelte b/packages/lib/src/components/buttons/InfoButtonComponent.wc.svelte index c2047e02..d45c4055 100644 --- a/packages/lib/src/components/buttons/InfoButtonComponent.wc.svelte +++ b/packages/lib/src/components/buttons/InfoButtonComponent.wc.svelte @@ -12,7 +12,7 @@