NULL values in remapp_generalstudymoduleattr for Enhanced SR

Issue #463 resolved
Tim de Wit created an issue

Enhanced SR's, not coming from a GE CT, and not being a dose report, result in empty lines (NULL/FALSE everywhere) in table "remapp_generalstudymoduleattr", causing the displayed number of studies in the database to be incorrect. In our database it's roughly 50% of all studies. Anonymized sample data attached.

Comments (21)

  1. Ed McDonagh

    Thanks for the report and the sample file. Can I add it to the test_files please?

    I need to improve the identification of GE Enhanced SR objects, shouldn't be difficult to do.

  2. Ed McDonagh

    In the mean time, if you are comfortable working your way around the models, you might like to do something similar to these instructions on how to delete everything, but instead find some value that enables you to isolate all the false studies.

    Something like:

    from remapp.models import GeneralStudyModuleAttr
    a = GeneralStudyModuleAttr.objects.all()
    b = a.filter(generalequipmentmoduleattr__stationname__exact='yourstationname')
    b.count()
    b.delete()
    

    Usual provisos apply - do a backup first!

  3. Log in to comment