Loris
Loris copied to clipboard
Add unique keys and new MRICandidateErrors columns to default schema
Brief summary of changes
This adds some unique key constraint to the MRI violation tables to avoid having the same violation reported multiple times in the table.
It also adds the two new fields added to all other MRI tables that determine a unique file (aka: SeriesUID, EchoTime, EchoNumber and PhaseEncodingDirection, see https://github.com/aces/Loris/pull/8152).
Link(s) to related issue(s)
- Related to https://github.com/aces/Loris-MRI/issues/890
@cmadjar does this need an integrity script to make sure none already exist before running the patch?
Thanks @cmadjar! Here is what was printed during execution:
Click me
$ tarchiveLoader.pl -profile prod -uploadID 77 /data/data-raisinbread/tarchive/2018/DCM_2018-01-01_ImagingUpload-10-43-QrnTPO.tar PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1
--> The minc file cannot be registered since unknown does not exist in prod or it did not pass the extra_file_checks PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1
--> The minc file cannot be registered since unknown does not exist in prod or it did not pass the extra_file_checks PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1 PSCID is: DCC292 CandID id: 676061 visit_label is: V1
No Mincs inserted
Here what is displayed on the MRI violation front-end after insertion:
Click me
When running the script a second time, there are no duplication.
Thought, there are some data from the same patient further in the table:
Click me
LGTM
@cmadjar this has the needs work tag. Is that still true?
@driusan I did not have any update on this one. @cmadjar still needs work?
I think it still needs work but to be honest, I don't remember exactly.
One thing I can think of is how applying those patches on tables with existing duplicates will behave. I am not sure and a little worried about this. I can't remember anything else that needs work though...