Standard acquisition name not always populated
For radiographic studies, if a DICOM image is imported that belongs to an existing study, the add_standard_names
code in extract_common.py
is never run, meaning that only the first radiographic acquisition in a study will have standard acquisition name entries on import.
I think this can be fixed by adding a line to a section of dx.py
:
if study_in_db:
sleep(
2.0
) # Give initial event a chance to get to save on _projectionxrayradiationdose
this_study = get_study_check_dup(dataset, modality="DX")
if this_study:
_irradiationeventxraydata(
dataset, this_study.projectionxrayradiationdose_set.get()
)
populate_dx_rf_summary(this_study)
this_study.number_of_events = (
this_study.projectionxrayradiationdose_set.get().irradeventxraydata_set.count()
)
this_study.save()
// New line to check for any matching standard acquisition names
add_standard_names(this_study)
else:
error = f"Study {study_uid.replace('.', '. ')} already in DB"
logger.error(error)
record_task_error_exit(error)
return
It is likely to also affect the mammography extractor as well.
Comments (5)
-
reporter -
reporter Added a test for standard acquisition name for a radiographic study that has multiple exposures, all of which should have a standard name. Refs issue
#1016→ <<cset d92544c98b70>>
-
reporter Updating changelog only so [skip ci]. Refs issue
#1016→ <<cset 1345016da6d0>>
-
reporter Merged in issue1016ensureStandardAcquisitionNameOnImport (pull request #595)
Added code to check for matching standard names when importing a radiographic or mammographic image into a study that already exists. Refs issue
#1016.Fixes issue
#1016Approved-by: Ed McDonagh
→ <<cset 0e259176bad7>>
-
reporter - changed status to resolved
Merged in issue1016ensureStandardAcquisitionNameOnImport (pull request #595)
Added code to check for matching standard names when importing a radiographic or mammographic image into a study that already exists. Refs issue
#1016.Fixes issue
#1016Approved-by: Ed McDonagh
→ <<cset 0e259176bad7>>
- Log in to comment
Added code to check for matching standard names when importing a radiographic or mammographic image into a study that already exists. I have tested this for radiographic images and can confirm it works. Untested for mammography, but no reason to suspect it will not work. Refs issue
#1016.→ <<cset caf4234013a8>>