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

Merged
merged 2 commits into from
Oct 30, 2020

Conversation

nicolasbrossard
Copy link
Contributor

@nicolasbrossard nicolasbrossard commented Oct 4, 2020

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:

  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 PR will ensure 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.

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 NULL PredefinedCommentID or a non NULL Comment (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.

@nicolasbrossard
Copy link
Contributor Author

@jesscall Hey Jess! If you have time to test this on the CCNA data set, that'd be great.

Copy link
Collaborator

@cmadjar cmadjar left a 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.

* 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* '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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@driusan pong

@driusan driusan merged commit ef76c0e into aces:main Oct 30, 2020
@ridz1208 ridz1208 added this to the 24.0.0 milestone Nov 27, 2020
AlexandraLivadas pushed a commit to AlexandraLivadas/Loris that referenced this pull request Jun 29, 2021
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).
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants