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

Establish database schema for pacsanini models #47

Closed
aachick opened this issue Sep 1, 2021 · 1 comment · Fixed by #49
Closed

Establish database schema for pacsanini models #47

aachick opened this issue Sep 1, 2021 · 1 comment · Fixed by #49
Assignees
Labels
enhancement New feature or request

Comments

@aachick
Copy link
Collaborator

aachick commented Sep 1, 2021

Is your feature request related to a problem? Please describe.
The objective of this task is to implement a database structure in relation to what is described in #46 .

Describe the solution you'd like
The implementation of this should be done using sqlalchemy. Utilities should be put into place in order to create the database as well.

Describe alternatives you've considered

Additional context

@aachick aachick added the enhancement New feature or request label Sep 1, 2021
@aachick aachick self-assigned this Sep 1, 2021
@aachick
Copy link
Collaborator Author

aachick commented Sep 1, 2021

The database schema will be created for the patients, studies, series, images, and studies_find tables using SQLAlchemy ORM classes. This should ensure that the code can be easily worked on in the future + be compatible with different drivers.

A sub-module should be created to convert a DICOM file into these ORM models.

A utils module inside the db module should be created to contain utility functions. In the beginning, this will only contain a method for initializing the database. In the future, this could contain functions that can ensure the migration of the db schema is alembic is ever used.

The crud methods will be updated to take consideration of the data being split up across multiple tables. This will probably not be implemented in the most optimal way but should be OK for now.

Implementation side note: because patient age will be stored in the studies table, a new converter will have to be written in order to convert DICOM AgeStrings to integers (the patient age in years).

aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
aachick added a commit that referenced this issue Sep 1, 2021
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
aachick added a commit that referenced this issue Sep 1, 2021
Adapt CRUD routines. refs #47

Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
aachick added a commit that referenced this issue Sep 1, 2021
Signed-off-by: Aurélien Chick <aurelien.chick@gmail.com>
@aachick aachick mentioned this issue Sep 2, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant