cutright / DVH-Analytics

A DICOM Database Application for Radiation Oncology
Other
82 stars 30 forks source link

Editing ROI Map not updating previous imports #142

Closed cutright closed 3 years ago

cutright commented 3 years ago

When applying changes in the ROI Map module, it does not appear to apply to previously imported data. May be related to the ROI Map changes in v0.9.1? Feature was originally added in v0.8.3.

cutright commented 3 years ago

I think this is the culprit (at least one of them). The code below is essentially looking for which rows in the DVHs table to update.

The original DICOM ROIName tag is stored in roi_name column in the DVHs table. But variation from the ROI Map is the output from dvha.tools.roi_name_manager.clean_name(roi_name).

https://github.com/cutright/DVH-Analytics/blob/b9f1798f42e848e41f87cb2b75bf93c8905d4f4e/dvha/models/roi_map.py#L1420-L1423

cutright commented 3 years ago

Correction: the roi_name in the database is the output of clean_name, but variation did not pass through clean_name. Definitely some other issues, still debugging.

cutright commented 3 years ago

Will be in v0.9.5 release later today.

Verified you can now add or remove variations and physician ROIs, with the database properly updating.

Also added a fix so that the "Uncategorized" and "Ignored" lists get updated in the after you save the ROI Map. I should maybe highlight this better in the docs, but this little section is very helpful. It will find any DVHs in your database that are not categorized, for the physician you've selected. The intent of "Ignored" is simply to keep the "Uncategorized" list slim and easy to manage. So if you don't care to categorize a DVH, move it to ignored so you know anything in Uncategorized needs to be addressed.

Screen Shot 2021-02-13 at 11 07 28 AM