Inria-Asclepios / medInria-public

Open-source part of the medInria software
https://med.inria.fr/
BSD 4-Clause "Original" or "Old" License
0 stars 9 forks source link

Use patient Id and study uid when importing #831

Closed fcollot closed 6 months ago

fcollot commented 7 months ago

When importing new data medInria uses the patient name, patient birthdate and study name to identify existing patients or studies. It should be using uids instead. This causes issues with data for which these fields are empty. This PR modifies the algorithm so that the patient and study uids are used in addition to the previous tags so as to handle all cases and be retrocompatible.

mathildemerle commented 6 months ago

I tested both PR with the 1068 one. Indeed there is no duplicated patient anymore. However, i've got a bugged behavior that needs to be checked:

fcollot commented 6 months ago

I have tried all these tests without any issues...

fcollot commented 6 months ago

what data are you testing this on?

mathildemerle commented 6 months ago

pact, the classic one, in compiled from scratch my build repo and music-plugins

fcollot commented 6 months ago

I've run the same tests on Ubuntu 20 (on the ci machine) without this bug either.

fcollot commented 6 months ago

can you detail exactly what you are doing: there are various ways to import (gui button, right-click on data, double-click on data).

fcollot commented 6 months ago

(and what OS)

mathildemerle commented 6 months ago

yes :

I tried on MUSICardio 3.3 i don't have the bug. I tried on medInria 3.4 with the same data and i don't have the bug

mathildemerle commented 6 months ago

So the bug happens for some data and not others

fcollot commented 6 months ago

I tested your data and it is the same as one I already have in my database except that the patientID and patient name have been modified, but not the series uid (and I have the same issue when importing it). It has not been properly anonymized. Two data belonging to two different patients should never have the same uid, and it is normal that this leads to unexpected behaviour. I will see if I can at least avoid the disappearance, but I think we shouldn't spend too much time on this issue which is caused by the data itself that is inconsistent.

mathildemerle commented 6 months ago

They have been renamed inside medInria/MUSICardio indeed (right click on the data -> Edit). Ok tell me if you have a way to handle these data, and it could be interesting to create an issue on medInria if there is a problem with the renaming feature

fcollot commented 6 months ago

The issue is indeed that medInria has been handling DICOM tags incorrectly. We can only "hack" to work around this if we don't want to change everything (and allow previously "corrupted" data to load correctly).

fcollot commented 6 months ago

PR updated