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

Permanent deletion of patients/studies/series/instances does not consider only external retrievable instances (=no location records) #4069

Open
gunterze opened this issue May 26, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@gunterze
Copy link
Member

Permanent deletion of patients/studies/series/instances does not consider only external retrievable instances (=no location records), causing failures like

2023-05-26 10:37:30,311 WARN  [org.dcm4chee.arc.delete.impl.DeletionServiceImpl] (default task-4) Failed to delete Patient[pk=14, id=[-1252886998], name=PAPAYA^P] from database:
: javax.ejb.EJBTransactionRolledbackException: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
...
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "patient" violates foreign key constraint "fk_e3fdaqhw7u60trs5aspf4sna9" on table "study"
  Detail: Key (pk)=(14) is still referenced from table "study".
        at org.postgresql@42.4.1//org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
        at org.postgresql@42.4.1//org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
        at org.postgresql@42.4.1//org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
        at org.postgresql@42.4.1//org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
        at org.postgresql@42.4.1//org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
        at org.postgresql@42.4.1//org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:181)
        at org.postgresql@42.4.1//org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:149)
        at org.jboss.ironjacamar.jdbcadapters@1.5.3.Final//org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:537)
        at org.hibernate@5.3.28.Final//org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)

@gunterze gunterze added the bug Something isn't working label May 26, 2023
@gunterze gunterze added this to the 5.31.0 milestone May 26, 2023
@gunterze gunterze self-assigned this May 26, 2023
@gunterze gunterze modified the milestones: 5.31.0, 5.31.1 Aug 23, 2023
@gunterze gunterze modified the milestones: 5.31.1, 5.31.2 Nov 3, 2023
@gunterze gunterze modified the milestones: 5.31.2, 5.31.3 Dec 21, 2023
@gunterze gunterze modified the milestones: 5.32.0, 5.32.1 Apr 19, 2024
@gunterze gunterze modified the milestones: 5.33.0, 5.33.1 Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant