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

LIMS-1185: Fix incorrect total dose displayed #720

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Jan 26, 2024

JIRA ticket: LIMS-1185 and LIMS-1212

Summary:

The total dose displayed on data collection groups is incorrect, and also shown to a huge number of decimal places.

Changes:

  • Limit the totaldose field to 2 decimal places, as done for other fields
  • Use the totaldose returned from the backend, which does a sum of the total absorbed dose, rather than getting one value and multiplying by the number of data collections.
  • Also limit chi/phi/overlap to 1 decimal place

To test:

  • View a data collection group, eg /dc/visit/cm33903-5/dcg/10774174, check the dose displayed for each data collection is shown to 2 decimal places. Add together the total dose for the group (11.40MGy)
  • Find the same group on the parent view (eg dc/visit/cm33903-5/ty/ page 10), check the total dose displayed is correct (11.40MGy) with 2 decimal places

@gfrn
Copy link
Collaborator

gfrn commented Feb 5, 2024

The second test displays 12.96MGy, but I assume this is fine, since 12.96 MGy is the sum of total absorbed dose for all data collections in the data collection group in page 10 (1.5 + 1.0 + 4.0 + 6.46044). Does that check out?

@gfrn gfrn self-assigned this Feb 5, 2024
@ndg63276
Copy link
Collaborator Author

ndg63276 commented Feb 5, 2024

Yeah, looks like I messed up the link, was supposed to be /dc/visit/cm33903-5/ty/fc, page 10, 8th data collection down. It's a bit hard to link to as the actual permalink takes you inside the group, rather than showing the group summary.

Anyway, obviously it should work for any data collection group, as long as the Total Dose displayed on the main page matches the sum of the doses of each data collection, that's all that matters :-)

@ndg63276 ndg63276 merged commit b7f98d6 into prerelease Feb 5, 2024
2 checks passed
@ndg63276 ndg63276 deleted the fix/LIMS-1185/incorrect-total-dose-displayed branch February 5, 2024 16:07
gfrn pushed a commit that referenced this pull request Mar 5, 2024
* LIMS-1185: Fix incorrect total dose displayed

* LIMS-1212: Chi/Phi/Overlap should have only 1 decimal place

---------

Co-authored-by: Mark Williams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants