Loris icon indicating copy to clipboard operation
Loris copied to clipboard

Add unique keys and new MRICandidateErrors columns to default schema

Open cmadjar opened this issue 2 years ago • 6 comments

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 avatar Feb 17 '23 20:02 cmadjar

@cmadjar does this need an integrity script to make sure none already exist before running the patch?

driusan avatar Mar 21 '23 17:03 driusan

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

image

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

image

regisoc avatar Mar 23 '23 14:03 regisoc

LGTM

regisoc avatar Mar 23 '23 15:03 regisoc

@cmadjar this has the needs work tag. Is that still true?

driusan avatar Mar 28 '23 12:03 driusan

@driusan I did not have any update on this one. @cmadjar still needs work?

regisoc avatar Dec 12 '23 16:12 regisoc

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...

cmadjar avatar Jan 10 '24 15:01 cmadjar