Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix profiling count issues in legacy #11105

Merged
merged 7 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
</if>
</if>
</where>
Group by clinical_event.EVENT_TYPE, patient.STABLE_ID
Group by clinical_event.EVENT_TYPE, patient.INTERNAL_ID
</select>

</mapper>
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<include refid="selectGenePanelData"/>
<include refid="fromGenePanelData"/>
WHERE
SAMPLE_ID IS NOT NULL AND
genetic_profile.STABLE_ID IN
<foreach item="item" collection="collection" open="(" separator="," close=")">
#{item}
Expand All @@ -132,6 +133,7 @@
<include refid="selectGenePanelData"/>
<include refid="fromGenePanelData"/>
<where>
SAMPLE_ID IS NOT NULL
<choose>
<when test="list == null or list.isEmpty()">
AND NULL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
SELECT * FROM (
<foreach item="ANDGroup" collection="studyViewFilterHelper.studyViewFilter.genomicProfiles" separator="INTERSECT">
SELECT sample_derived.sample_unique_id
FROM sample_profile
FROM sample_profile GYMP
JOIN genetic_profile gp ON sample_profile.genetic_profile_id = gp.genetic_profile_id
JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id
JOIN sample_derived on sample_profile.sample_id = sample_derived.internal_id
Expand All @@ -48,8 +48,10 @@
#{studyId}
</foreach>
AND
<foreach item="genomicProfileId" collection="ANDGroup" open="(" separator="OR" close=")">
gp.stable_id LIKE concat('%_', #{genomicProfileId})
<foreach item="studyId" collection="studyViewFilterHelper.studyViewFilter.studyIds" open="(" close=")" separator="OR">
<foreach item="genomicProfileId" collection="ANDGroup" open="(" separator=" OR " close=")">
gp.stable_id=concat(#{studyId}, '_', #{genomicProfileId})
</foreach>
</foreach>
</where>
</foreach>
Expand Down
Loading