fli-iam / shanoir-ng

Shanoir (SHAring iN vivO Imaging Resources)
GNU General Public License v3.0
19 stars 21 forks source link

Show import date of exam and user who did the import #2224

Open pierrehenri-dauvergne opened 1 month ago

pierrehenri-dauvergne commented 1 month ago

The idea is to trace the importing user and the date and display it somewhere in the model/pages. Demand of CG. Also consider #1796 Hi @jcomedouteau, do you think you could specify this and think of where to put the information?

michaelkain commented 1 month ago

Hi @pierrehenri-dauvergne, could you please provide a specification, what we could do to implement this feature+ #1796.

jcomedouteau commented 1 month ago

On dataset entity, we have creation date field which corresponds to examination date. This should not be the case probably. This is already displayed in shanoir on dataset detail: image We need to update it to correct #1796 We have to change it here: image

In dataset microservice, we have no link to user (nothing in DB), I don't know if it's a good idea to specifically display it on dataset page.

On an other hand, I was thinking of something like displaying an "history" based on either an object or a study. We could imagine having a "History" tab in study detail, displaying all the events linked to this study (and thus "sub" objects linked to this study) Then we would be able to look for a specific event on a specific ID or something like this. We need to check that this does not overwhelm events table (and create adapted indexs)

jcomedouteau commented 4 weeks ago

After discussion with Michael, here is what we've reached:

Not mandatory:

update dataset_acquisition a set user = (select username from users.user u where u.id = (select user_id from users.events ev where ev.event_type = "importDataset.event" and ev.object_id = a.examination_id))

Another issue will be created for study history