Skip to content
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

[Imaging Uploader] Replace 'MINC' string by 'Files' in the imaging uploader column since imaging files created and inserted are not necessarily MINC files anymore #8205

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions modules/imaging_uploader/jsx/ImagingUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class ImagingUploader extends Component {
}

if (cell === 'Success') {
const created = row['Number Of MINC Created'];
const inserted = row['Number Of MINC Inserted'];
const created = row['Number Of Files Created'];
const inserted = row['Number Of Files Inserted'];
return (
<td style={cellStyle}>
{cell} ({inserted} out of {created})
Expand Down Expand Up @@ -164,7 +164,7 @@ class ImagingUploader extends Component {
);
}

if (column === 'Number Of MINC Inserted') {
if (column === 'Number Of Files Inserted') {
if (cell > 0) {
const url = loris.BaseURL
+ '/imaging_browser/viewSession/?sessionID='
Expand All @@ -177,11 +177,12 @@ class ImagingUploader extends Component {
}
}

if (column === 'Number Of MINC Created') {
if (column === 'Number Of Files Created') {
let violatedScans;
if (row['Number Of MINC Created'] - row['Number Of MINC Inserted'] > 0) {
// eslint-disable-next-line max-len
if (row['Number Of Files Created'] - row['Number Of Files Inserted'] > 0) {
let numViolatedScans =
row['Number Of MINC Created'] - row['Number Of MINC Inserted'];
row['Number Of Files Created'] - row['Number Of Files Inserted'];

let patientName = row.PatientName;
violatedScans = <a
Expand Down
16 changes: 8 additions & 8 deletions modules/imaging_uploader/php/imaging_uploader.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class Imaging_Uploader extends \NDB_Menu_Filter_Form
'UploadDate AS Upload_Date',
'UploadedBy AS Uploaded_By',
'mu.TarchiveID AS Tarchive_Info',
'number_of_mincCreated AS Number_of_MINC_Created',
'number_of_mincInserted AS Number_of_MINC_Inserted',
'number_of_mincCreated AS Number_of_Files_Created',
'number_of_mincInserted AS Number_of_Files_Inserted',
'ta.PatientName',
's.ID AS SessionID',
];
Expand Down Expand Up @@ -408,9 +408,9 @@ class Imaging_Uploader extends \NDB_Menu_Filter_Form
$updateFile = isset($args['values']['overwrite'])
? (boolean) $args['values']['overwrite'] : false;
$id = $db->pselectOne(
"SELECT
IF (InsertionComplete=0 AND
(ISNULL(Inserting) OR Inserting=0), UploadID, NULL) as UploadID
"SELECT
IF (InsertionComplete=0 AND
(ISNULL(Inserting) OR Inserting=0), UploadID, NULL) as UploadID
FROM mri_upload WHERE UploadLocation LIKE :ul",
['ul' => "%$file_name"]
);
Expand Down Expand Up @@ -557,9 +557,9 @@ class Imaging_Uploader extends \NDB_Menu_Filter_Form
// wildcard for files that were uploaded to a random temp path.
$fileName = $file->fileInfo['name'];
$id = $db->pselectOne(
"SELECT
IF (InsertionComplete=0 AND
(ISNULL(Inserting) OR Inserting=0), UploadID, NULL) as UploadID
"SELECT
IF (InsertionComplete=0 AND
(ISNULL(Inserting) OR Inserting=0), UploadID, NULL) as UploadID
FROM mri_upload WHERE UploadLocation LIKE :ul",
['ul' => "%$fileName"]
);
Expand Down