Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsJohansen87 committed Oct 24, 2023
2 parents ca755d9 + 5c65aa3 commit 0eaa0c9
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 23 deletions.
25 changes: 20 additions & 5 deletions packages/demo/public/catalogues/catalogue-dktk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
{
"key": "patient",
"name": "Patient",
"description": "Hier könnte ihre Werbung stehen!",
"childCategories": [
{
"key": "gender",
"name": "Geschlecht",
"system": "",
"fieldType": "single-select",
"type": "EQUALS",
"description": "Hier ebenfalls!",
"criteria": [
{
"key": "male",
Expand Down Expand Up @@ -39,6 +37,10 @@
"name": "Vitalstatus",
"system": "http://dktk.dkfz.de/fhir/onco/core/CodeSystem/VitalstatusCS",
"fieldType": "single-select",
"infoButtonText": [
"\"verstorben\": ein Todesdatum ist dokumentiert oder das aktuelle Lebensalter ist größer 123 Jahre.",
"\"lebend\": wird angenommen, wenn kein Todesdatum dokumentiert ist oder das aktuelle Lebensalter nicht 123 Jahre überschritten hat."
],
"type": "EQUALS",
"criteria": [
{
Expand All @@ -58,6 +60,7 @@
{
"key": "tumor_entity",
"name": "Tumorentität",
"infoButtonText": ["Ausgewählte Tumorentitäten, die nach Diagnosen (ICD-10-GM Version 2015) und Morphologien (ICD-O-3 Erste Revision 2014) in klinisch relevante Gruppen zusammengefasst sind."],
"childCategories": [
{
"key": "gliom_all_groups",
Expand Down Expand Up @@ -7204,6 +7207,7 @@
"system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm",
"fieldType": "autocomplete",
"type": "EQUALS",
"infoButtonText": ["Eine Suche mit dem Platzhalter (%) schließt Untergruppen in die Suche ein, z.B. C34.% sucht nach allen Untergruppen für C34."],
"criteria": [
{
"key": "C97",
Expand Down Expand Up @@ -11360,6 +11364,7 @@
{
"key": "urn:oid:2.16.840.1.113883.6.43.1",
"name": "Lokalisation ICD-O-3",
"infoButtonText": ["Eine Suche mit dem Platzhalter (%) schließt Untergruppen in die Suche ein, z.B. C34.% sucht nach allen Untergruppen für C34."],
"system": "http://fhir.de/CodeSystem/bfarm/icd-10-gm",
"fieldType": "autocomplete",
"type": "EQUALS",
Expand Down Expand Up @@ -17891,6 +17896,7 @@
{
"key": "21908-9",
"name": "UICC Stadium",
"infoButtonText": ["Kriterien beziehen sich auf die klinische oder pathologische TNM-Klassifikation."],
"childCategories": [
{
"key": "21908-9",
Expand Down Expand Up @@ -18081,7 +18087,8 @@
},
{
"key": "tnm",
"name": "TNM(c)",
"name": "TNM",
"infoButtonText": ["Kriterien beziehen sich auf die klinische oder pathologische TNM-Klassifikation."],
"childCategories": [
{
"key": "21905-5",
Expand Down Expand Up @@ -18748,6 +18755,7 @@
{
"key": "therapy_of_tumor",
"name": "Therapie des Tumors",
"infoButtonText": ["Gibt an, ob für den Patienten ausgewählte Therapien dokumentiert wurden."],
"system": "",
"fieldType": "single-select",
"type": "EQUALS",
Expand All @@ -18769,7 +18777,7 @@
},
{
"key": "IM",
"name": "Immunotherapie",
"name": "Immuntherapie",
"description": ""
},
{
Expand All @@ -18779,21 +18787,23 @@
},
{
"key": "KM",
"name": "Knochentransplantation",
"name": "Knochenmarktransplantation",
"description": ""
}
]
},
{
"key": "response_to_therapy",
"name": "Ansprechen auf Therapie",
"infoButtonText": ["Beurteilung der Erkrankung im Verlauf"],
"childCategories": [
{
"key": "21976-6",
"name": "Ansprechen im Verlauf",
"system": "",
"fieldType": "single-select",
"type": "EQUALS",
"infoButtonText": ["Gesamtbeurteilung des Tumorstatus"],
"criteria": [
{
"key": "V",
Expand Down Expand Up @@ -18848,6 +18858,7 @@
"system": "",
"fieldType": "single-select",
"type": "EQUALS",
"infoButtonText": ["Beurteilung der Situation im Primärtumorbereich"],
"criteria": [
{
"key": "K",
Expand Down Expand Up @@ -18897,6 +18908,7 @@
"system": "",
"fieldType": "single-select",
"type": "EQUALS",
"infoButtonText": ["Beurteilung der Situation im Bereich der regionären Lymphknoten."],
"criteria": [
{
"key": "K",
Expand Down Expand Up @@ -18946,6 +18958,7 @@
"system": "",
"fieldType": "single-select",
"type": "EQUALS",
"infoButtonText": ["Beurteilung der Situation im Bereich der Fernmetastasen."],
"criteria": [
{
"key": "K",
Expand Down Expand Up @@ -18999,13 +19012,15 @@
{
"key": "biosamples",
"name": "Bioproben",
"infoButtonText": ["Bioprobentypen der Patienten gemäß der ausgewählten Kriterien. Es werden auch Einträge angezeigt, die ggfs. außerhalb der Suchkriterien liegen."],
"childCategories": [
{
"key": "sample_kind",
"name": "Probenart",
"system": "",
"fieldType": "single-select",
"type": "EQUALS",
"infoButtonText": ["Materialtyp der Bioprobe"],
"criteria": [
{
"key": "tumor-tissue-ffpe",
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/ccp.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ footer {
border: solid 1px var(--lightest-gray);
background-color: var(--white);
grid-row: 1/-1;
overflow: scroll;
overflow-y: scroll;
height: 100vh;
position: sticky;
top: 0;
Expand Down
16 changes: 10 additions & 6 deletions packages/demo/src/styles/default/catalogue.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ lens-catalogue::part(toggle-button-open-icon) {
transform: rotate(180deg);
}


lens-catalogue::part(data-tree-element) {
position: relative;
}

lens-catalogue::part(data-tree-element-name) {
font-size: var(--font-size-m);
color: var(--dark-gray);
Expand Down Expand Up @@ -63,15 +68,13 @@ lens-catalogue::part(data-tree-element-toggle-icon-open) {


lens-catalogue::part(info-button) {
position: relative;
cursor: pointer;
background-color: var(--white);
border: none;
padding: 0;
}

lens-catalogue::part(info-button-icon) {
position: absolute;
bottom: var(--gap-xxs);
width: 16px;
height: 16px;
Expand All @@ -82,13 +85,14 @@ lens-catalogue::part(info-button-dialogue) {
border: none;
background-color: var(--white);
width: max-content;
max-width: 80vw;
max-width: 200px;
z-index: 100;
padding: var(--gap-xs);
top: 0;
left: var(--gap-xxs);
padding: var(--gap-s);
top: var(--gap-m);
left: var(--gap-s);
border: solid 1px var(--light-blue);
border-radius: var(--border-radius-small);
text-align: left;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { iconStore } from "../../stores/icons";
import { getHumanReadableQuery } from "../../stores/negotiate";
export let message: string = "";
export let message: string[] = [];
export let noQueryMessage: string = "Search for all results";
export let showQuery: boolean = false;
export let infoIconUrl: string | null = null;
Expand All @@ -35,7 +35,7 @@
const displayQueryInfo = () => {
if(showQuery){
message = getHumanReadableQuery().length > 0 ? getHumanReadableQuery() : noQueryMessage;
message = getHumanReadableQuery().length > 0 ? [getHumanReadableQuery()] : [noQueryMessage];
}
tooltipOpen = !tooltipOpen;
};
Expand All @@ -52,7 +52,9 @@
{/if}
{#if tooltipOpen}
<div part="info-button-dialogue">
{message}
{#each message as msg}
<div part="info-button-dialogue-message">{msg}</div>
{/each}
</div>
{/if}
</button>
12 changes: 7 additions & 5 deletions packages/lib/src/components/catalogue/DataTreeElement.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
/**
* toggles the open state of the subcategorys
* watches the open tree nodes store to update the open state of the subcategorys
*/
let open: boolean = false;
Expand All @@ -42,8 +42,10 @@
}
const toggleChildren = () => {
/**
* adds and removes the subcategorys from the open tree nodes store
*/
const toggleChildren = (): void => {
openTreeNodes.update((store) => {
let storeTreeNode = store.get(element.key);
Expand Down Expand Up @@ -167,8 +169,8 @@
{/if}
{'subCategoryName' in element && element.subCategoryName ? element.subCategoryName : element.name}
</button>
{#if element.description}
<InfoButtonComponent message={element.description} />
{#if element.infoButtonText}
<InfoButtonComponent message={element.infoButtonText} />
{/if}

{#if open}
Expand Down
5 changes: 2 additions & 3 deletions packages/lib/src/types/treeData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ export type Category = {
key: string;
name: string;
childCategories?: Category[];
// TODO: Discuss naming with Mats, as this has another meaning than descrtiption in criteria
description?: string;
infoButtonText?: string[];
subCategoryName?: string;
} | {
key: string;
Expand All @@ -15,7 +14,7 @@ export type Category = {
type: 'EQUALS' | 'BETWEEN';
criteria: | Criteria[];
description?: string;

infoButtonText?: string[];
}

export type Criteria = {
Expand Down

0 comments on commit 0eaa0c9

Please sign in to comment.