When data collection groups are shown, the total dose is displayed by summing the dose for each data collection. But when you filter the view by "Auto Integrated", the extra joins to AutoProcIntegration etc mean extra rows are summed.
Changes:
Join to a subquery of simply dataCollectionGroupId and sum(totalAbsorbedDose) for each data collection group
Use the number from the subquery
To test:
Go to /samples/sid/5653602, look at the first data collection, the Total Dose should be 21.75MGy
Click the Auto Integrated filter, the total dose should not change
Check the same is true for the Data Collections and Full Collections filters
Go to /samples/sid/5653041 and check the Phasing filter
Go to /dc/visit/mx35120-12, look at the top data collection, check the Total Dose doesn't change with the Auto Integrated filter on/off
Go to /dc/visit/mx35120-12/dcg/12149523, check the dose for each data collection says 10.88MGy and doesn't change with the Auto Integrated filter on/off
JIRA ticket: LIMS-1368
Summary:
When data collection groups are shown, the total dose is displayed by summing the dose for each data collection. But when you filter the view by "Auto Integrated", the extra joins to AutoProcIntegration etc mean extra rows are summed.
Changes:
To test: