Add tests for high total dose at RP and total DAP alerts for fluoroscopy

Issue #697 resolved
David Platten created an issue

I'd like these tests to be present before this code is released.

Need to test:

  • Total DAP flags when above alert level
  • Total dose at RP flags when above alert level
  • Cumulative DAP over time delta is correct, and flags when above alert level
  • Cumulative total dose at RP over time delta is correct, and flags when above alert level
  • For single- and bi-planar?

Comments (27)

  1. David Platten reporter

    Tests for correct cumulated DAP and dose at RP; tests for correct highlighting of cumulated and non-cumulated DAP and dose at RP. References issue #697

    → <<cset eb6dc86d0953>>

  2. David Platten reporter

    @edmcdonagh do you have a bi-planar fluoroscopy RDSR that can be added to the tests folder? I'd like to include a test on this.

  3. David Platten reporter

    I should also add some tests to confirm that the highlighting works in the rf_detail_view

  4. Ed McDonagh

    I don't have a biplane fluoro RDSR we can use - the only one I have is way too large. We could put out a request on the group? My cath labs that have RDSR are single plane so I can't generate one myself.

    Also, the last merge I did makes changes to the rfdetail.html template, just so you are aware...

  5. David Platten reporter

    I like the removal of JavaScript toPrecision(). I'll sync my test branch shortly and amend the test code.

  6. David Platten reporter

    @edmcdonagh we could merge in this branch, and then create a new issue for adding bi-planar tests.

  7. Ed McDonagh

    Hi @dplatten

    I'm getting failures on my local system with line 250 getting three red 0.00252 strings instead of one. Seems ok on bitbucket. Any ideas?

  8. David Platten reporter

    OK. I've worked out what's going on. My assumption was that when the two RDSRs are imported by the test routine that they would have specific private keys that would be the same for all of the tests. This is not the case (the "Warning! That study was not found" in your html above made me check). When the test routine reaches the point that you had the problem the pks were 7 and 8 for the two studies.

    I need to change the tests so that I obtain the appropriate private key for the study I want to test by filtering GeneralStudyModuleAttr, rather than assuming that the private keys are fixed values.

    This reopens #697.

  9. David Platten reporter
    • changed status to open

    Need to improve test routines so that the correct private keys are used for tests on specific studies.

  10. David Platten reporter

    Explicitly obtaining private keys of the two test studies rather than making assumptions about what the private keys might be. This only matters for tests involving the detail view; the summary view shows both studies. References issue #697

    → <<cset 56a5db09e9ee>>

  11. David Platten reporter

    Merged in issue697improveFluoroHighDoseAlertTests (pull request #257)

    Explicitly obtaining private keys of the two test studies rather than making assumptions about what the private keys might be. This only matters for tests involving the detail view; the summary view shows both studies. References issue #697

    Approved-by: Ed McDonagh ed@mcdonagh.org.uk

    Fixes issue #697

    → <<cset dd5bc7a39c46>>

  12. David Platten reporter

    Merged in issue697improveFluoroHighDoseAlertTests (pull request #257)

    Explicitly obtaining private keys of the two test studies rather than making assumptions about what the private keys might be. This only matters for tests involving the detail view; the summary view shows both studies. References issue #697

    Approved-by: Ed McDonagh ed@mcdonagh.org.uk

    Fixes issue #697

    → <<cset dd5bc7a39c46>>

  13. David Platten reporter

    Added language override to the fluoro high dose alert tests. The tests now work regardless of the language code set in local_settings.py. References issue #665 and issue #697

    → <<cset 64c258f20b69>>

  14. Log in to comment