Enable update of existing patient height and mass data
Currently the import of patient height and mass data only updates data if the values are missing from the corresponding study. If there is already height and mass data present then the uploaded values are not used to update the data.
I have a situation in my live OpenREM installation where some cardiology studies have incorrect patient height or mass, incorrectly entered at the modality at the time of the study. These incorrect data cause issues with the calculated skin dose maps. For example, one patient had an erroneous height of 1.1 m and a mass of 86 kg. This resulted in a very "short" skin dose map where some of the irradiation missed the phantom.
I need to be able to import height and mass data in a way that will overwrite existing data.
Perhaps this could be implemented as a checkbox on the import view that if checked enables existing data to be overwritten. The box will be unchecked by default.
As it stands I have to manually change the database entry, which is not ideal.
Without looking, I think this would be a fairly easy change, and certainly worthwhile.
It would also be nice to edit/add these sort of values directly in the detail view...
Tidying up before making changes for ref
→ <<cset 5abebb202b2c>>
Fixing indent, conveting some to f-strings. Refs
→ <<cset 2fe2e6d2fc35>>
Refactoring so we can start adding tests... Refs
→ <<cset 338428dd8249>>
Updating views to nominally work, though actual h+w updates aren't. Refs
→ <<cset 43826552b308>>
Removing binary for csv file and log file. Refs
→ <<cset 904391c9618b>>
Adding more tests. Not sure if this works with CSVs with and without the BOM. Refs
→ <<cset f4a030bf5175>>
Tidying up size import related views. Refs
→ <<cset 9bc8dce5205f>>
Factored out Size related views to import views. Only down to 193K from 203K. Refs
→ <<cset 7e1423c9a35e>>
Another 4K down by moving DICOM related views to dicomviews.py. Refs
→ <<cset afd4a25be1ac>>
Cut views in half with new views_admin.py. New branch to test it. Refs
→ <<cset 796e4793fce7>>
Update reference to _create_admin_dict. Refs
→ <<cset 3f886afb901a>>
Update reference in tests to reset_dual. Refs
→ <<cset aa3314ddf129>>
Merged in issue826reduceViewsSize (pull request #364)
→ <<cset ca124795bace>>
PEP8 changes to variable names. Refs
→ <<cset b87ace3a2aee>>
Hopefully will now write log to database from shell, plus print to shell if verbose. Refs
→ <<cset 3bcf2c7e74d1>>
Changing script import to match other scripts, no functional change. Refs
→ <<cset 797a2b6fa728>>
Import of model when called from script can't be relative, must be remapp.models. Refs
→ <<cset 62275ecef6f4>>
Overwrite now available and working from command line. Needs docs. Need to add to web interface. Refs
→ <<cset a15ae776bcb2>>
Fixed tests and various missing data for web interface of previous upload logs. Refs
→ <<cset a90be550034b>>
Now works through the web interface too, could do with being prettier. Refs
→ <<cset ceacc7f53645>>
Changing the assignee… as I’ve now completed it
Bit of tidying up to do, otherwise complete.
Adding to changes and normalising name in different functions. Refs
→ <<cset b1286fba81ef>>
Codacy fixes, including refactor of passing the size variables. Refs
→ <<cset 600de4e2be87>>
Merged in issue744sizeimport (pull request #365)
→ <<cset 12d6250dbe3d>>
Updating version 1 upgrade database migration with current further models changes. Refs
#813, #824, #744
→ <<cset 00341d22eb42>>
Reverting changes to v1initial.py - it must be the release 0.10 database, but in Django 2.2 format. Upgrade process adds/alters all release 1.0 fields. Refs
#813, #824, #744
→ <<cset 4670a7152cd5>>