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_browser] Now relying on getSetting->tblScanTypes for the New Data column #2912

Merged
merged 7 commits into from
Aug 30, 2017

Conversation

gluneau
Copy link
Contributor

@gluneau gluneau commented Jun 28, 2017

The new column is now in line with the tblScanTypes from the settings.

This removes hard coded AcquisitionProtocolID values from this module.

@gluneau gluneau added the Cleanup PR or issue introducing/requiring at least one clean-up operation label Jun 28, 2017
@gluneau gluneau added this to the 17.1 milestone Jun 28, 2017
@gluneau gluneau requested a review from driusan July 3, 2017 14:31
@@ -124,7 +124,8 @@ class NDB_Menu_Filter_Imaging_Browser extends NDB_Menu_Filter
as QCLastChangeTime FROM files
LEFT JOIN files_qcstatus USING (FileID)
WHERE OutputType='native' AND AcquisitionProtocolID
NOT IN (1, 2, 3, 52) GROUP BY files.SessionID) nd
IN (".
implode(",", array_keys($scan_id_types)) .") GROUP BY files.SessionID) nd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know where $scan_id_types comes from, but this doesn't seem safe.

It looks like it's all scan id types that exist, making this in clause appear pointless.

Given that AcquisitionProtocolID 1, 2, and 3 don't exist because of the stupid default schema, and 52 in the default schema is 'scout' (which should probably be excluded at the protocol level, not in an imaging browser query), couldn't the same thing by achieved by just taking out the AcquisitionProtocolID part of the where clause?

Copy link
Contributor Author

@gluneau gluneau Jul 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$scan_id_types comes from line 81 and got its values from the settings "tblScanTypes" at line 65

These are the protocols that are used, then its the ones that will be re-used here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is based on Louis request that he only want the protocols that are being QCed to show as new in the new column.

@johnsaigle
Copy link
Contributor

Moving this to 17.2 as it was stated in the LORIS meeting that Cleanup PRs should not be going to 17.1 this close to the release.

@johnsaigle johnsaigle modified the milestones: 17.2, 17.1 Jul 4, 2017
@gluneau
Copy link
Contributor Author

gluneau commented Jul 4, 2017

@johnsaigle This PR is important to the IBIS project since if it is merged in 17.1, this module will no longer need to be overridden. Thank you for considering projects requirements as well.

@johnsaigle johnsaigle modified the milestones: 17.1, 17.2 Jul 4, 2017
@johnsaigle
Copy link
Contributor

Cool works for me.

@xlecours xlecours added the Passed manual tests PR has been successfully tested by at least one peer label Jul 5, 2017
@xlecours
Copy link
Contributor

xlecours commented Jul 5, 2017

This is effectively filtering out the 2 dti files from the raisinbread dataset if the only tblScanTypes are t1 and t2. If I add 'dti' in the tblScanTypes config list, the files are shown.

@xlecours
Copy link
Contributor

xlecours commented Jul 5, 2017

@driusan I am moving this into the Senior dev review lane because it is your call :)

@MounaSafiHarab MounaSafiHarab removed the Passed manual tests PR has been successfully tested by at least one peer label Jul 5, 2017
@MounaSafiHarab
Copy link
Contributor

MounaSafiHarab commented Jul 5, 2017

@xlecours @gluneau

I removed the passed manual test because what @xlecours noted is indeed happening and it is not the intended behavior.

@gluneau

  1. if you select in the Imaging Module tab in Configuration a scan type type that you have no entries for in the files table for (for example, pick mrs or scout), this will remove all the "rows" in imaging browser (so something wrong with the query as a result of the addition of f.AcquisitionProtocolID IN ... statement)

(rows should not be impacted by what scan types you select; just columns)

  1. if you select no mri_scan_type at all; then you will get an "error loading data" in imaging browser (and an error in SQL in the error_log)

@MounaSafiHarab MounaSafiHarab added the State: Needs work PR awaiting additional work by the author to proceed label Jul 5, 2017
@gluneau gluneau removed the State: Needs work PR awaiting additional work by the author to proceed label Jul 6, 2017
@gluneau
Copy link
Contributor Author

gluneau commented Jul 6, 2017

@MounaSafiHarab @xlecours I've modified the code to allow for no selected scan type.

I've also removed the scan type from the where clause since we do not want to auto filter out stuff

@xlecours
Copy link
Contributor

@gluneau I am not sure what to test regarding the New Data column. The behaviour I see is an additional column in the table when a new tblScanTypes in the Configs.

@MounaSafiHarab
Copy link
Contributor

@gluneau

Let me know when the New Data column filter is implemented so I can re-test

@kongtiaowang kongtiaowang added Passed manual tests PR has been successfully tested by at least one peer and removed Passed manual tests PR has been successfully tested by at least one peer labels Jul 19, 2017
@MounaSafiHarab MounaSafiHarab added the State: Needs work PR awaiting additional work by the author to proceed label Jul 26, 2017
@sruthymathew123 sruthymathew123 self-assigned this Aug 7, 2017
@gluneau gluneau removed the State: Needs work PR awaiting additional work by the author to proceed label Aug 28, 2017
@MounaSafiHarab
Copy link
Contributor

It is all good, except if you choose no scan types at all where you get an error loading data (it is an unlikely/impractical situation)

@MounaSafiHarab MounaSafiHarab added Passed manual tests PR has been successfully tested by at least one peer Release: Add to release notes PR whose changes should be highlighted in the release notes Category: Feature PR or issue that aims to introduce a new feature and removed Cleanup PR or issue introducing/requiring at least one clean-up operation labels Aug 29, 2017
@MounaSafiHarab
Copy link
Contributor

tested it, and it works well now!
@driusan I added the new feature/add to release notes because projects somehow need to know that filtering for NEW now only returns session entries that have non-QC'ed imaging modalities coming from the Configuration module.

@driusan driusan merged commit f1ee1be into aces:17.1-dev Aug 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Feature PR or issue that aims to introduce a new feature Passed manual tests PR has been successfully tested by at least one peer Release: Add to release notes PR whose changes should be highlighted in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants