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

[discussion] Extract MRI fields from session into a new table #9413

Open
maximemulder opened this issue Oct 17, 2024 · 0 comments
Open

[discussion] Extract MRI fields from session into a new table #9413

maximemulder opened this issue Oct 17, 2024 · 0 comments
Labels
Language: SQL PR or issue that update SQL code Proposal PR or issue suggesting an improvement that can be accepted, rejected or altered

Comments

@maximemulder
Copy link
Contributor

TO BE DISCUSSED AT THE NEXT IMAGING MEETING

This is a proposal I have for a database structure change. It reflects my understanding of the database but feel free to correct me if I am making mistakes.

Current architecture

Currently, the session table contains several fields related to MRI such as Scan_done, MRIQCStatus, MRIQCPending, MRIQCFirstChange, MRIQCLastChange, and MRICaveat (and maybe others I am forgetting). Some of these fields are nullable, and many imaging tables have foreign keys to the session table.

Proposal

There was a proposal to remove Scan_done a few weeks ago and instead check if the exists an MRI file linked to the session. I propose taking this proposal one step further and extract all MRI-related fields from session into a new table (probably mri_session). The imaging tables would also refer to mri_session instead of session directly. If possible, we could also extract some fields common between all MRI files of a single session to this table (notably scanner ID ?).

mri_session would have a foreign key linking it to its related session record, which provides information, which notably links it back to its candidate and visit. This foreign key should be nullable so that we can have MRI sessions not related to any candidate / visit session, which we want to clean up our phantoms implementation.

@maximemulder maximemulder added Proposal PR or issue suggesting an improvement that can be accepted, rejected or altered Language: SQL PR or issue that update SQL code labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language: SQL PR or issue that update SQL code Proposal PR or issue suggesting an improvement that can be accepted, rejected or altered
Projects
None yet
Development

No branches or pull requests

1 participant