Add export format for PHE (UK) CT Survey

Issue #737 resolved
Ed McDonagh created an issue

Public Health England is conducting a CT Survey in the UK. They have published an Excel spreadsheet proforma. It would be useful for OpenREM to be able to export with the right column format to make it easy to copy and paste.

Comments (63)

  1. Ed McDonagh reporter

    Auto code reformat before trying to work out how to add specifying number of axial/helical series to condition dataset before PHE export. Refs #737

    → <<cset 90834c291175>>

  2. Ed McDonagh reporter

    @dplatten - I'd appreciate your opinion on this branch. Basically, you filter your data for one of the exams PHE 2019 CT survey wants, then use the new specific number of event types drop downs to make sure you don't have any exams where an extra series has been added in, then use the new export button.

    Export columns are as per the template, with topograms ignored. Spiral, Axial and Stationary will be exported. The assumption is that there are four events or fewer (not including topograms), but not checked for. Yet.

    The data can then be copied and pasted into the template.

  3. Ed McDonagh reporter

    Not sure why the test failed. Will need to look into it. Don't let that stop you from trying it though - at worst the specific event type numbers filter won't get there right result!

  4. David Platten

    Hmmm

    [2019-03-27 16:37:11,549: ERROR/MainProcess] Task remapp.exports.ct_export.ct_phe_2019[18ef67da-81fe-47f9-b983-87066fda31b2] raised unexpected: IndexError('list index out of range',)
    Traceback (most recent call last):
      File "c:\pythonvirtualenvs\openrem-dev\lib\site-packages\celery\app\trace.py", line 240, in trace_task
        R = retval = fun(*args, **kwargs)
      File "c:\pythonvirtualenvs\openrem-dev\lib\site-packages\celery\app\trace.py", line 438, in __protected_call__
        return self.run(*args, **kwargs)
      File "c:\pythonvirtualenvs\openrem-dev\lib\site-packages\openrem\remapp\exports\ct_export.py", line 561, in ct_phe_2019
        kv = source_parameters[0].kvp
      File "c:\pythonvirtualenvs\openrem-dev\lib\site-packages\django\db\models\query.py", line 201, in __getitem__
        return list(qs)[0]
    IndexError: list index out of range
    
  5. David Platten

    I've just exported 21473 studies from a several month period - no further hitches encountered with the export. I haven't tested the filters yet.

  6. Ed McDonagh reporter

    Not sure why the third filter, stationary, is tripping up the third and fourth tests, and difficult to troubleshoot as it works fine locally.

    Still to do:

    • If more than four series are exported, leave a couple of cells for Total DLP and comment, then carry on
    • Work out if there are other cells that could be usefully filled in
    • Add documentation
    • Consider making exports configurable (as in which ones are presented) - almost certainly a future feature request though
    • Fix this issue!
  7. Log in to comment