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

[Utility] Refactor getVisitInstruments function #7514

Merged

Conversation

jesscall
Copy link
Contributor

Brief summary of changes

Comment in Utility Class

 * @note    Function comment written by Dave, not the author of this function.
 *       The return value format seems weird. Should possibly be refactored.
 * @note    Used in:
 *      - behavioural_qc/php/NDB_Form_behavioural_qc.class.inc
 *      - behavioural_qc/ajax/GetInstruments.php
 * @cleanup

I should mention that the files mentioned in the comment no longer exist and as far as I can tell there are no other uses of this function in the code base.

Testing instructions (if applicable)

  1. Use the utility somewhere and make sure the output is in the form of an array: [$Test_name => $Full_name]

@jesscall jesscall added Cleanup PR or issue introducing/requiring at least one clean-up operation php Pull requests that update Php code labels Jul 28, 2021
*/
static function getVisitInstruments(string $visit_label): array
{
$factory = \NDB_Factory::singleton();
$DB = $factory->database();

if ($DB->ColumnExists('test_battery', 'Test_name_display')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test_name_display is not in the test_battery table or schema

@jesscall
Copy link
Contributor Author

@kongtiaowang can you help with the unit testing?

@ridz1208 ridz1208 self-assigned this Mar 3, 2022
@ridz1208 ridz1208 removed their assignment Mar 9, 2022
@driusan
Copy link
Collaborator

driusan commented May 24, 2022

@jesscall can you rebase this to trigger the tests to run? I'm not sure why they're all stuck at "Expected"

jesscall and others added 7 commits June 6, 2022 11:22
Co-authored-by: Rida Abou-Haidar <ridz1208@users.noreply.github.com>
Co-authored-by: Rida Abou-Haidar <ridz1208@users.noreply.github.com>
@jesscall jesscall force-pushed the 2021_07_28_fix_utility_getVisitInstruments branch from 163c92e to 74fce5c Compare June 6, 2022 15:22
@jesscall
Copy link
Contributor Author

jesscall commented Jun 6, 2022

@driusan rebased!

@driusan driusan merged commit 5096c46 into aces:main Jun 6, 2022
@ridz1208 ridz1208 added this to the 25.0.0 milestone Jun 9, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Cleanup PR or issue introducing/requiring at least one clean-up operation php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants