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

Studies with orphaned instances (= no location records) can't be deleted from archive #4441

Closed
vrindanayak opened this issue Mar 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@vrindanayak
Copy link
Member

vrindanayak commented Mar 13, 2024

Attention : Occurs and reproducible only for cases where archive is upgraded from 5.31.0 (and below) to 5.31.2+

Steps to Reproduce

  • Start archive 5.31.0
  • Store Study1 to Patient1
  • Store Study2 to Patient2
  • Using archive UI copy Study1 to Patient2, resulting in Study3 of Patient2
  • Set Allow Delete Study permanently to ALWAYS
  • Delete Study3 of Patient2 using UI (X icon - Delete Study Permanently)
  • Fails with message in logs javax.ejb.EJBException: java.lang.IllegalArgumentException: Removing a detached instance org.dcm4chee.arc.entity.UIDMap#2 and error displayed to user
  • User rejects Study3 of Patient2 with Retention Expired
  • User retries Delete Study3 of Patient2 using UI (X icon) from IOCM_EXPIRED view. Success message displayed in UI / Server logs, however study still visible in IOCM_EXPIRED view
  • User upgrades to 5.31.2 version
  • Study deletion permanently from IOCM_EXPIRED view still shows shows Success message in UI / Server logs, however study still visible in IOCM_EXPIRED view

Note : There is no external retrieve AET on any of the levels.

select study_iuid, study.rejection_state, series.rejection_state, modality,
       study.ext_retrieve_aet, series.ext_retrieve_aet, instance.ext_retrieve_aet from study
join series on study_fk=study.pk
join instance on series_fk=series.pk
--join location on instance_fk=instance.pk
where patient_fk=2;
study_iuid study.rejection_state series.rejection_state modality study.ext_retrieve_aet series.ext_retrieve_aet instance.ext_retrieve_aet
1.2.840.113674.1118.54.200 0 0 MR * null null
1.2.840.113674.1118.54.200 0 0 MR * null null
1.2.840.113674.1118.54.200 0 0 MR * null null
1.2.840.113674.1118.54.200 0 0 MR * null null
2.25.148946721412915086795778662337868896850 2 2 CT * null null
2.25.148946721412915086795778662337868896850 2 2 CT * null null

Related #4274, #4273, #4069

@vrindanayak vrindanayak added this to the 5.32.0 milestone Mar 13, 2024
@gunterze
Copy link
Member

gunterze commented Apr 8, 2024

Log deletion of instances without location in server.log, e.g.:

2024-04-08 11:35:55,063 INFO  [org.dcm4chee.arc.delete.impl.DeletionServiceImpl] (default task-3) Successfully delete 1 instances of Study[pk=4, uid=1.2.840.113674.514.212.200, id=1784] without locations from database

Related #4460

@vrindanayak vrindanayak added the enhancement New feature or request label Apr 8, 2024
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

No branches or pull requests

2 participants