-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added option to also re-insert #179
Conversation
tools/deletemincsqlwrapper.pl
Outdated
@@ -8,27 +8,36 @@ | |||
use Term::ANSIColor qw(:constants); | |||
use NeuroDB::DBI; | |||
|
|||
my $profile = "prod"; | |||
my $profile = "null_grads"; # "prod"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be hard coded; so maybe separate into 2 pull requests
tools/deletemincsqlwrapper.pl
Outdated
or (pf.ParameterTypeID=333 and pf.`VALUE` like '%0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.%') | ||
or (pf.ParameterTypeID=334 and pf.`VALUE` like '%0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.%') | ||
or (pf.ParameterTypeID=343 and pf.`VALUE` like '%0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.%')) | ||
ORDER BY f.FileID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all these hard coded parameter TypeID won't work for other projects; same for SeriesUID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
hardcoded parameter type IDs and seriesUID
-
a script description/usage would be helpful since you are adding an argument (it is not very clear how to run the script)
-
since there is an option to insert deleted files, I am not sure the filename deletemincsqlwrapper.pl is still accurate.
@MounaSafiHarab Please check the requested changes. |
|
I tested it and I ran into a couple of issues:
|
tools/deletemincsqlwrapper.pl
Outdated
@@ -69,5 +76,11 @@ | |||
my $minc_delete_log = `$minc_delete_cmd`; | |||
print $minc_delete_log . "\n"; | |||
|
|||
if ($insertminc) { | |||
my $tar_loader_cmd = "../uploadNeuroDB/tarchiveLoader -profile " . $profile . " -seriesuid " . $fF->{'SeriesUID'} . " -verbose -globLocation " . $fF->{'ArchiveLocation'}; | |||
print $tar_loader_cmd . "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gluneau
not sure where the ArchiveLocation is coming from. You need to join on the tarchive table to get this location.
(running this with the insertminc
option gives the error:
...
usage: ../uploadNeuroDB/tarchiveLoader </path/to/DICOM-tarchive> [options]
../uploadNeuroDB/tarchiveLoader -help to list options
ERROR: You must specify a valid tarchive and an existing profile.
closed but same changes were merged under this pull request: |
It deletes, the re-inserts
By calling the script with the insertminc argument, the minc will be inserted as well.
tools/deletemincsqlwrapper.pl -profile prod -insertminc