-
Notifications
You must be signed in to change notification settings - Fork 174
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
[CouchDB] Unset Testdate and ORDER BY SessionID #2812
Conversation
tools/CouchDB_MRI_Importer.php
Outdated
@@ -102,7 +102,7 @@ function _generateCandidatesQuery($ScanTypes) | |||
LEFT JOIN feedback_mri_comments fmric | |||
ON (fmric.CommentTypeID=7 AND fmric.SessionID=s.ID) | |||
WHERE c.Entity_type != 'Scanner' AND c.PSCID NOT LIKE '%9999' | |||
AND c.Active='Y' AND s.Active='Y' AND c.CenterID <> 1"; | |||
AND c.Active='Y' AND s.Active='Y' AND c.CenterID <> 1 ORDER BY s.ID"; |
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.
I don't think this is the right place to add an ORDER BY
to fix the problem of document's fields being out of order. It's the query in getScanTypes() that is being inconsistent (as far as I can tell) which is causing it to generate different documents for the same data depending on MySQL's mood. The order in which sessions are processed is irrelevant.
I think this looks good now. @jstirling91 can you double check that it fixes the issue? |
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.
This looks good to me, I'm just not sure on the ordering but there's nothing saying that its not an improvement
The import scripts were adding data which was not in the datadictionary, such as the "Testdate" timestamp from instruments, and not providing an explicit ordering for scans. This resulted in unnecessary rebuilds when the data available to the user was semantically equivalent, but the encoded JSON was in a different order, or the timestamp was changed but no visible data was modified. This addresses both these issues.
The import scripts were adding data which was not in the datadictionary, such as the "Testdate" timestamp from instruments, and not providing an explicit ordering for scans. This resulted in unnecessary rebuilds when the data available to the user was semantically equivalent, but the encoded JSON was in a different order, or the timestamp was changed but no visible data was modified. This addresses both these issues.
This updates the function signature of NDB_BVL_Instrument to fix PHP warnings introduced by #2812. Developers of instruments should update their own code accordingly, to ensure they don't generate their own errors about mismatched signature types.
Removes Testdate that is not wanted to data querying