Ziehm C-arm RDSR import issues

Issue #769 resolved
Ed McDonagh created an issue

Reported by @rijkhorst via email as:

(openrem) dose@dose-processing:~$ openrem_rdsr.py 1ef9bf41-f930-41f4-ba59-541aefb18ecb.dcm
Traceback (most recent call last):
 File "/home/dose/openrem/bin/openrem_rdsr.py", line 24, in <module>
 File "/home/dose/openrem/local/lib/python2.7/site-packages/celery/local.py", line 191, in __call__
 return self._get_current_object()(*a, **kw)
 File "/home/dose/openrem/local/lib/python2.7/site-packages/celery/app/task.py", line 375, in __call__
 return self.run(*args, **kwargs)
 File "/home/dose/openrem/local/lib/python2.7/site-packages/openrem/remapp/extractors/rdsr.py", line 1559, in rdsr
 File "/home/dose/openrem/local/lib/python2.7/site-packages/openrem/remapp/extractors/rdsr.py", line 1423, in _rdsr2db
 _patientstudymoduleattributes(dataset, g)
 File "/home/dose/openrem/local/lib/python2.7/site-packages/openrem/remapp/extractors/rdsr.py", line 1162, in _patientstudymoduleattributes
 patientatt = PatientStudyModuleAttr.objects.create(general_study_module_attributes=g)
 File "/home/dose/openrem/local/lib/python2.7/site-packages/django/db/models/manager.py", line 127, in manager_method
 return getattr(self.get_queryset(), name)(*args, **kwargs)
 File "/home/dose/openrem/local/lib/python2.7/site-packages/django/db/models/query.py", line 348, in create
 obj.save(force_insert=True, using=self.db)
 File "/home/dose/openrem/local/lib/python2.7/site-packages/django/db/models/base.py", line 685, in save
 "unsaved related object '%s'." % field.name
ValueError: save() prohibited to prevent data loss due to unsaved related object 'general_study_module_attributes'.

This was for importing into 0.9.0.

Testing so far with import into current develop has no import errors, but failed to display the study detail page due to TypeError in generating the summary table of doses.

Comments (7)

  1. Ed McDonagh reporter

    Confirmed that import into 0.9.0 has error as reported, as does 0.9.1 - the current release. This has already been 'fixed' in one of the other changes present in develop, but the accumulated dose totals are not being recorded, and at first glance they are in the RDSR so further investigation is required.

  2. Ed McDonagh reporter

    Hi @rijkhorst

    Comparing the RDSR with an import to the current develop version suggests that all fields are being imported.

    It is a bit strange though - the RDSR describes one acquisition I think

    • The pulse width is 23 ms, no pulse rate, no number of pulses or frames at acquisition level - one frame at study level
    • But the exposure time is 1.63 s
    • There are no fluoroscopy exposures, no fluoro DAP or RP dose, but a Total fluoro exposure time of 1 s!
    • There is no total exposure time for acquisitions
    • There is a total RP dose at study level, along with an unusual but legal RP definition, but no RP dose information at exposure level
    • There is generally very little information about the exposure 😞

    Do you have a second example you could send me that has both fluoro and acquisition exposures in? Preferably with a description of what you expect the report to include!

    Thanks, Ed

  3. Log in to comment