From b36bffb5618a29825eb0635bf03f211a219e85de Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:51:28 -0400 Subject: [PATCH] =?UTF-8?q?Update=20Treatment=20Endpoint=20to=20handle=20e?= =?UTF-8?q?vent=5Ftype=20TREATMENT,=20previously=20=E2=80=A6=20(#10959)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update Treatment Endpoint to handle event_type TREATMENT, previously only searched on Treatment * Handle all variations of Treatment --- .../mybatisclickhouse/StudyViewFilterMapper.xml | 4 ++-- .../persistence/mybatisclickhouse/StudyViewMapper.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index c0b2909cd53..f2ce040188e 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -189,7 +189,7 @@ value AS treatment, argMin(start_date, start_date) AS treatment_time_taken FROM clinical_event_derived - WHERE event_type = 'Treatment' + WHERE lower(event_type) = 'treatment' AND key = 'AGENT' GROUP BY patient_unique_id, value ) ced_inner ON ced_inner.patient_unique_id = ced.patient_unique_id @@ -231,7 +231,7 @@ - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' AND value = '${patientTreatmentFilter.treatment}' diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index e94d466f6f0..5af781dfeb0 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -442,7 +442,7 @@ patient_unique_id FROM clinical_event_derived - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' AND @@ -465,7 +465,7 @@ count(DISTINCT patient_unique_id) AS count FROM clinical_event_derived - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' AND @@ -493,7 +493,7 @@ patient_unique_id FROM clinical_event_derived - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' AND @@ -537,7 +537,7 @@ argMin(start_date, start_date) AS treatment_time_taken FROM clinical_event_derived - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' GROUP BY patient_unique_id, value