Skip to content

Commit

Permalink
use case-insensitive ILIKE instead of case-sensitive LIKE when lookin…
Browse files Browse the repository at this point in the history
…g for sample acquisition and specimen (#11143)
  • Loading branch information
onursumer authored Oct 30, 2024
1 parent 73b410d commit 260a75a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@
ced.patient_unique_id AS patient_unique_id,
min(ced.start_date) AS time_taken,
ced.cancer_study_identifier AS cancer_study_identifier
FROM clinical_event_derived ced
<where>
key = 'SAMPLE_ID'
AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN')
</where>
GROUP BY patient_unique_id, ced.value, cancer_study_identifier
FROM clinical_event_derived ced
<where>
key = 'SAMPLE_ID'
AND (event_type ILIKE 'Sample Acquisition' OR event_type ILIKE 'SPECIMEN')
</where>
GROUP BY patient_unique_id, ced.value, cancer_study_identifier
) ced
INNER JOIN (
<!-- Nested sub query to grab all treatments group by patients-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@
FROM clinical_event_derived ced
<where>
AND key = 'SAMPLE_ID'
AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN')
AND (event_type ILIKE 'Sample Acquisition' OR event_type ILIKE 'SPECIMEN')
AND
concat(ced.cancer_study_identifier, '_', ced.value) IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>)
AND
Expand Down Expand Up @@ -611,7 +611,7 @@
FROM clinical_event_derived ced
<where>
key = 'SAMPLE_ID'
AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN')
AND (event_type ILIKE 'Sample Acquisition' OR event_type ILIKE 'SPECIMEN')
</where>
GROUP BY patient_unique_id, ced.value, cancer_study_identifier
),
Expand Down

0 comments on commit 260a75a

Please sign in to comment.