Skip to content

Commit

Permalink
Handle all variations of Treatment
Browse files Browse the repository at this point in the history
  • Loading branch information
haynescd committed Aug 27, 2024
1 parent 4ec81bc commit 1bcb80b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@
value AS treatment,
argMin(start_date, start_date) AS treatment_time_taken
FROM clinical_event_derived
WHERE event_type IN ('Treatment', 'TREATMENT')
AND key = 'AGENT'
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
<where>
Expand Down Expand Up @@ -231,7 +231,7 @@
<where>
<foreach item="patientTreatmentFilter" collection="andedPatientTreatmentFilters.getFilters()" open="(" separator=") OR ("
close=")">
event_type IN ('Treatment', 'TREATMENT')
lower(event_type) = 'treatment'
AND key = 'AGENT'
AND value = '${patientTreatmentFilter.treatment}'
</foreach>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
patient_unique_id
FROM clinical_event_derived
<where>
event_type IN ('Treatment', 'TREATMENT')
lower(event_type) = 'treatment'
AND key = 'AGENT'
AND
<include refid="applyStudyViewFilter">
Expand All @@ -465,7 +465,7 @@
count(DISTINCT patient_unique_id) AS count
FROM clinical_event_derived
<where>
event_type IN ('Treatment', 'TREATMENT')
lower(event_type) = 'treatment'
AND key = 'AGENT'
AND
<include refid="applyStudyViewFilter">
Expand Down Expand Up @@ -493,7 +493,7 @@
patient_unique_id
FROM clinical_event_derived
<where>
event_type IN ('Treatment', 'TREATMENT')
lower(event_type) = 'treatment'
AND key = 'AGENT'
AND
<include refid="applyStudyViewFilter">
Expand Down Expand Up @@ -537,7 +537,7 @@
argMin(start_date, start_date) AS treatment_time_taken
FROM clinical_event_derived
<where>
event_type IN ('Treatment', 'TREATMENT')
lower(event_type) = 'treatment'
AND key = 'AGENT'
</where>
GROUP BY patient_unique_id, value
Expand Down

0 comments on commit 1bcb80b

Please sign in to comment.