-
Notifications
You must be signed in to change notification settings - Fork 173
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
Replace Center_name in mri_protocol with CenterID from psc #7525
Conversation
@kongtiaowang @ridz1208 @driusan we can't figure out why the tests are failing here, could you help @vietdhoang resolve the test issues? Thanks! |
@cmadjar it seems like the mri violations module doesnt load at all. If it's not the case, @kongtiaowang could you debug the test ? |
3a43138
to
d4e62f4
Compare
@driusan @kongtiaowang the test failure does not seem related to the changes in the PR. Could you help us figure out what is going on? Note, the PR has been rebased today. |
…D. CenterID is a foreign key from the psc table and will be used to indentify the center that the MRI protocol belongs to. If the value is NULL, then the mri_protocol is valid everywhere.
…D field in mri_protocol and for the removal of Center_name
d4e62f4
to
23c6318
Compare
HALLELUIA!!! This is passing the tests! Quick, @driusan merge before it does not pass the tests anymore, LOL. Jokes aside, this one is now in your court. Thank you :). |
@driusan I restarted the jobs. The only thing I changed in the last commit was the CHANGELOG so it does not make sense that the tests are suddenly failing since it passed the commit before... |
@driusan passing the tests. Phew! Ready for you. |
Summary
From #646: Currently, when an mri_protocol is not being restricted for a specify Center_name, users enter either
ZZZZ
orAAAA
and it is understood that an mri_protocol withCenter_name
ZZZZ
orAAAA
is valid for all centres' scans.This PR fixes this 'hack' by replacing the
Center_name
field withCenterID
from thepsc
table.CenterID
is an integer and a unique indentifier for each center. When an mri_protocl is not restricted to a specific center, the default value isNULL
(instead ofZZZZ
/AAAA
).Testing instructions
It is recommended that everything should be tested using the RaisinBread dataset. To populate your database with RaisinBread data, run the script
tools/raisinbread_refresh.php
. WARNING: any previous data will be erased.Center_name
field has been replaced byCenterID
and that the default values (rows that used to containAAAA
orZZZZ
) are NULL.0000-00-00-schema.sql
work. First, reset the RaisinBread dataset usingtools/raisinbread_refresh.php
. This command will have to be done on a different branch where0000-00-00-schema.sql
has not been changed yet. Verify that the refreshedmri_protocol
table no longer has theCenterID
field from step 2.raisinbread_refresh.php
again. This script will source the0000-00-00-schema.sql
file that has been changed.CenterID
field has been added (step 2).