-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fixes and improvements for the CouchDB_MRI_Importer. #7082
Conversation
@jesscall Hey Jess! If you have time to test this on the CCNA data set, that'd be great. |
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.
LGTM. Did not test though.
@nicolasbrossard one tiny typo to fix in one comment.
tools/CouchDB_MRI_Importer.php
Outdated
* are the numerous checkboxes that you find on the feedback panel. For | ||
* example, for comments of type 'Dominant Direction Artifact (DWI ONLY)', you | ||
* have predefined comments 'red artifact', 'green artifact' and | ||
* 'blue artifact'. These are either turned on of off via a checkbox to |
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.
* 'blue artifact'. These are either turned on of off via a checkbox to | |
* 'blue artifact'. These are either turned on or off via a checkbox to |
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.
@nicolasbrossard ping
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.
@driusan pong
This fixes a bug in the way that the data dictionary entries associated to MRI comments were named. Every kind of information that be entered via the MRI feedback panel has to go into the data dictionary. The MRI feedback panel allows a user to enter various types of comments for a given scan. For each of these comment types (listed in table feedback_mri_comment_types), we have: 1. A comment status field (column CommentStatusField in table feedback_mri_comment_types) which can have a fixed set of values. For example, for comments of types 'Dominant Direction Artifact (DWI ONLY)' the status field is 'Color_Artifact' and can have values "Good", "Fair", "Poor" or "Unacceptable" 2. A free form text comment that can be entered for that comment type (these go into column Comment of table feedback_mri_comments). On the feedback panel, you enter these in the various multi-line text fields, one for each comment type. 3. Various predefined comments associated to that comment type (these are defined infeedback_mri_predefined_comment_types). These are the numerous checkboxes that you find on the feedback panel. For example, for comments of type 'Dominant Direction Artifact (DWI ONLY)', you have predefined comments 'red artifact', 'green artifact' and blue artifact'. These are either turned on of off via a checkbox to indicate whether that predefined comment applies to that comment type. This changes ensures that: - anything in category 1 will be named <statusFieldName>_<scan_type>, where <scan_type> is the type of scan the data dictionary entry is associated with. For example the status field name for comment type Dominant Direction Artifact (DWI ONLY) is Color_Artifact so the data dictionary entry for this entity when it is associated to scans of type t1w will be named Color_Artifact_t1w. - anything in category 2 will be named Comment_<statusFieldName>_<scan_type>, where <scan_type> is the type of scan the data dictionary entry is associated with. For example the status field name for comment type Dominant Direction Artifact (DWI ONLY) is Color_Artifact so the data dictionary entries for these types of comments when they relate to scans of type t1w will be Comment_Color_Artifact_t1w. - anything in category 3 will be named PredefinedComment_<CommentText>_<scan_type>, where <scan_type> is the type of scan the data dictionary entry is associated with. For example there is currently a predefined comment on the raisin bread database with text red artifact. The data dictionary entries for these types of predefined comments when they relate to scans of type t1w will be PredefinedComment_red artifact_t1w. This also corrects the contents of table feedback_mri_comments on raisin bread: all records in that table either have to have a non NULL PredefinedCommentID or a non NULL Comment (or both).
Brief summary of changes
This PR fixes a bug in the way that the data dictionary entries associated to MRI comments were named.
A little background first:
Every kind of information that be entered via the MRI feedback panel has to go into the data dictionary. The MRI feedback panel allows a user to enter various types of comments for a given scan. For each of these comment types (listed in table feedback_mri_comment_types), we have:
CommentStatusField
in tablefeedback_mri_comment_types
) which can have a fixed set of values. For example, for comments of types 'Dominant Direction Artifact (DWI ONLY)' the status field is 'Color_Artifact' and can have values "Good", "Fair", "Poor" or "Unacceptable"Comment
of tablefeedback_mri_comments
). On the feedback panel, you enter these in the various multi-line text fields, one for each comment type.feedback_mri_predefined_comment_types
). These are the numerous checkboxes that you find on the feedback panel. For example, for comments of type 'Dominant Direction Artifact (DWI ONLY)', you have predefined comments 'red artifact', 'green artifact' and blue artifact'. These are either turned on of off via a checkbox to indicate whether that predefined comment applies to that comment type.This PR will ensure that:
<statusFieldName>_<scan_type>
, where<scan_type>
is the type of scan the data dictionary entry is associated with. For example the status field name for comment typeDominant Direction Artifact (DWI ONLY)
isColor_Artifact
so the data dictionary entry for this entity when it is associated to scans of typet1w
will be namedColor_Artifact_t1w
.Comment_<statusFieldName>_<scan_type>
, where<scan_type>
is the type of scan the data dictionary entry is associated with. For example the status field name for comment typeDominant Direction Artifact (DWI ONLY)
isColor_Artifact
so the data dictionary entries for these types of comments when they relate to scans of typet1w
will beComment_Color_Artifact_t1w
.PredefinedComment_<CommentText>_<scan_type>
, where<scan_type>
is the type of scan the data dictionary entry is associated with. For example there is currently a predefined comment on the raisin bread database with textred artifact
. The data dictionary entries for these types of predefined comments when they relate to scans of typet1w
will bePredefinedComment_red artifact_t1w
.Note: this PR also corrects the contents of table
feedback_mri_comments
on raison bread: all records in that table either have to have a non NULLPredefinedCommentID
or a non NULLComment
(or both).Testing instructions (if applicable)
Try to run
tools/CouchDB_MRI_Imported.php
on the raisin bread data setr (or your project's data set). Make sure there are no errors and that the data dictionary entries are named correctly.