Charts: no data shown when some DAP values blank
For a particular room there is missing DAP data for some studies. Median DAP values are not shown in the chart where this is the case. Needs investigating. Maybe blank DAP fields prevents the median value from calculating?
Comments (9)
-
reporter -
How is deleting all the zero dose data from the database different from having frequency plots that disregard them?
I do think that it makes sense to disregard 0 values in means and medians for DAP - they are not 'real' values after-all.
-
reporter At the moment the zero dose studies are making the displayed mean and median chart values incorrect, so I need to do something. I think I have three options:
-
Ignore zero dose events when calculating mean and median but include them in frequency calculation. The chart calculation code would need to be rewritten.
-
Ignore zero dose events when calculating any chart data. Requires a calculation code change to exclude all zero-dose events.
-
Delete all of my zero dose studies from the database. No code change is required, but if zero-dose studies appear again and I don't notice then my mean and median values in the charts will be "wrong".
The zeros are effectively errors and shouldn't have made it into the system in the first place: the rooms that were sending blank values were incorrectly set up. These rooms are being configured to send DAP values.
My preference is for option 2.
-
-
I agree
-
reporter Added code to exclude zero-value data from chart calculations. This fixes the problem that I was having. References issue
#494→ <<cset b872e2370b87>>
-
reporter - changed status to resolved
Fixed by commit b872e23
-
reporter Fixing conflicts with the changes files when syncing this branch with develop. References issue
#494→ <<cset b2492c6eace1>>
-
reporter Updated charts documentation to make it clear how zero or blank dose values are treated when calculating chart data. References issue
#494→ <<cset b8befcc3e47e>>
-
reporter Updated changes files and documentation for new charts. Also clarified the text on issue
#494in the changes files. Still need to update the chart options screenshot. References issue#529and issue#494→ <<cset 1aebe64ef0f2>>
- Log in to comment
There is a value being displayed, but it is too small to show up... The studies with a blank DAP have the value 0E-12 stored in the database (0.000000000000). These zero DAP studies are included in the calculation of the mean or median DAP, making the mean or median very, very small.
I could exclude the zero dose values from the calculation of mean or median in average_chart_inc_histogram_data in chart_functions.py by excluding zero dose items from the query:
The problem with this is that it also excludes the zero dose studies from the calculation of the number of studies, messing up the frequency plots.
Perhaps I should just accept that the zero dose items are included in the calculation of mean and median (most of this zero-dose data is from radiographic rooms that weren't sending DAP, but are sending it now). I could even delete all of the zero-dose data from my database.
Any thoughts on this @edmcdonagh?