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

C202302 - Move source record to tumour record #124

Open
infotel4iarc opened this issue Jan 27, 2023 · 3 comments
Open

C202302 - Move source record to tumour record #124

infotel4iarc opened this issue Jan 27, 2023 · 3 comments
Assignees

Comments

@infotel4iarc
Copy link
Collaborator

Allow to move / copy a source from one tumour to another tumour.

  • Add a button on the GUI named 'Move Source' that would allow a Source Record to be moved to another Tumor record for the same patient.
  • Develop the functionality described for this button.
@cchenginfotel
Copy link

Readme.md file has been updated with instructions on how to install the project.
A troubleshooting section has been put in to add any additional installation issues and their solution for future installation.
https://github.com/infotel4iarc/CanReg5/tree/documentation_installation

@cchenginfotel
Copy link

cchenginfotel commented Feb 20, 2023

button has been added to the patient "source information" section
When clicking the button, a dialog window will be displayed so the user can select where to move the selected source.
After making the decision, the user clicks the "OK" button. This will close the dialog window and move the source to the previously selected tumour.
If the user selects the current tumour or clicks the "close window" button, the dialog window will be closed and nothing happen.

Unfortunately, the "move source" button only works on the user interface side. Meaning once the user moved the source, it will disappear from the original tumour and appear on the selected tumour. After reopening the "patient page", the previously "moved" source will be present on both the original tumour and the selected tumour.
This is because the "move source" button is using the "delete source" feature, which hasn't been activated.
The "delete source" feature has been commented out of the "CanRegDAO.java" file since it's not working properly. After a few tests, I noticed it deletes all previously saved sources instead of the selected one.
As a result of this failing feature, the "move source" button can only act as a "Copy source" button

https://github.com/infotel4iarc/CanReg5/tree/documentation_installation

@cchenginfotel
Copy link

  • The "Move source" button has been renamed to "Copy source" button. Once the "delete source" issue is solved, it will act as a "Move source" button.
  • The dialog window has been reworked to hold more information about the target tumour (incidence date, tumour behaviour, morphology, topography). As some texts can't be fully displayed on the standard display, a tooltip has been added to each cell containing the complete text.

To get the additional information added to the dialog window, I've added an enum to RecordEditorSourceSelectorInternalFrame.java to track which ID corresponds to which dictionary. This is not an ideal solution as it can raise potential issues with the feature if the dictionary IDs are changed.
An example of an error it can lead to would be if the dictionary IDs from morphology and topography are swapped. All information from these two dictionaries wouldn't be retrieved in the dialog window unless the enum is edited to match the dictionaries ID correctly again.

To solve this issue, it would be best to not rely on the database structure and create a model within the code so the data structure would be immutable. But this would lead to a lot of refactoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants