From 3127ca80b741b166f002ba3dcc4e9f46d228e2d4 Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 29 Oct 2024 13:32:18 +0100 Subject: [PATCH] feat: initial therapy response by variant table (#858) * feat: initial therapy response by variant table * fix: typing of component --- ...MQuerySummaryTherapyResponsesByVariant.vue | 91 +++++++++++++++++++ packages/mtb/src/runtime/domains/query/api.ts | 7 +- .../mtb/src/runtime/domains/query/types.ts | 7 ++ .../pages/query/[id]/index/summary.vue | 3 + .../summary/therapy-responses-by-variant.vue | 57 ++++++++++++ 5 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 packages/mtb/src/runtime/components/core/MQuerySummaryTherapyResponsesByVariant.vue create mode 100644 packages/mtb/src/runtime/pages/query/[id]/index/summary/therapy-responses-by-variant.vue diff --git a/packages/mtb/src/runtime/components/core/MQuerySummaryTherapyResponsesByVariant.vue b/packages/mtb/src/runtime/components/core/MQuerySummaryTherapyResponsesByVariant.vue new file mode 100644 index 00000000..684a5909 --- /dev/null +++ b/packages/mtb/src/runtime/components/core/MQuerySummaryTherapyResponsesByVariant.vue @@ -0,0 +1,91 @@ + + + diff --git a/packages/mtb/src/runtime/domains/query/api.ts b/packages/mtb/src/runtime/domains/query/api.ts index 491eb6ac..d1b44c6f 100644 --- a/packages/mtb/src/runtime/domains/query/api.ts +++ b/packages/mtb/src/runtime/domains/query/api.ts @@ -12,7 +12,7 @@ import type { QuerySessionCreate, QuerySummaryMedication, QuerySummaryTumorDiagnostics, - QueryTherapyResponse, + QueryTherapyResponse, QueryTherapyResponseByVariant, } from './types'; export class QueryAPI extends BaseAPI { @@ -106,6 +106,11 @@ export class QueryAPI extends BaseAPI { return response.data; } + async getTherapyResponsesByVariant(queryId: string, query?: URLQueryRecord) : Promise> { + const response = await this.client.get(`mtb/queries/${queryId}/therapy-responses-by-variant${this.buildRequestQueryString(query)}`); + return response.data; + } + async getTumorDiagnostics(queryId: string, query?: URLQueryRecord) : Promise { const response = await this.client.get(`mtb/queries/${queryId}/tumor-diagnostics${this.buildRequestQueryString(query)}`); return response.data; diff --git a/packages/mtb/src/runtime/domains/query/types.ts b/packages/mtb/src/runtime/domains/query/types.ts index 9a1267b9..9119ebc6 100644 --- a/packages/mtb/src/runtime/domains/query/types.ts +++ b/packages/mtb/src/runtime/domains/query/types.ts @@ -112,3 +112,10 @@ export type QueryTherapyResponse = { supportingVariants: string[], responseDistribution: DistributionConceptsCount }; + +export type QueryTherapyResponseByVariant = { + medicationClasses: Coding[], + medications: Coding[], + supportingVariant: string, + responseDistribution: DistributionConceptsCount +}; diff --git a/packages/mtb/src/runtime/pages/query/[id]/index/summary.vue b/packages/mtb/src/runtime/pages/query/[id]/index/summary.vue index 111b5a41..d5ad44ef 100644 --- a/packages/mtb/src/runtime/pages/query/[id]/index/summary.vue +++ b/packages/mtb/src/runtime/pages/query/[id]/index/summary.vue @@ -41,6 +41,9 @@ export default defineNuxtComponent({ { id: 'therapyResponses', name: 'Therapie Responses', icon: 'fas fa-comment-medical', urlSuffix: '/therapy-responses', }, + { + id: 'therapyResponsesByVariant', name: 'Therapie Responses By Variant', icon: 'fas fa-comment-medical', urlSuffix: '/therapy-responses-by-variant', + }, { id: 'survivalReport', name: 'Überlebensbericht', icon: 'fas fa-book-open', urlSuffix: '/survival-report', }, diff --git a/packages/mtb/src/runtime/pages/query/[id]/index/summary/therapy-responses-by-variant.vue b/packages/mtb/src/runtime/pages/query/[id]/index/summary/therapy-responses-by-variant.vue new file mode 100644 index 00000000..e3c9f796 --- /dev/null +++ b/packages/mtb/src/runtime/pages/query/[id]/index/summary/therapy-responses-by-variant.vue @@ -0,0 +1,57 @@ + + +