Ziehm C-arm RDSR import issues
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>
rdsr(filename)
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
_rdsr2db(dataset)
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)
-
reporter -
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
-
reporter Adding testing of the summary total DAP/RP dose/Time table in RF detail view before changing it to work with Ziehm data for ref
#769→ <<cset 4e389bc705ed>>
-
reporter Replaced @Luuk 's elegant
tuple(map(operator.add
function with a more basic version that can cope with addingNone
values. Refs#769→ <<cset a40574d40677>>
-
reporter Removed irrelevant PID setting from test. Refs
#769→ <<cset 7a4a31452fe1>>
-
reporter Adding ref
#769to changes.→ <<cset f7a42a92508b>>
-
reporter - changed status to resolved
Merged in issue769Ziehm (pull request #322)
Fixes
#769though more investigations into what the numbers in the RDSR refer to would be prudent.→ <<cset d0d72f73133d>>
- Log in to comment
Confirmed that import into
0.9.0
has error as reported, as does0.9.1
- the current release. This has already been 'fixed' in one of the other changes present indevelop
, but the accumulated dose totals are not being recorded, and at first glance they are in the RDSR so further investigation is required.