Dear team,
After a misconfiguration of a coersion rule, one of my archive seems to have created many duplicated patient identities, which results in many duplicate key exceptions in the logs (see below), and more annoyingly, it blocks the HL7 service from reconsciliating and storing any received HL7 object for these duplicated patients.
[org.dcm4chee.arc.store.impl.StoreServiceImpl] (EE-ManagedExecutorService-default-Thread-5) MSH|^~\&|XXX|XXX|XXX|XXX|202201071208||ORU^R01|XXXXXXXXXXXX|P|2.4||||||8859/15: Failed to update DB caused by org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_31gvi9falc03xs94m8l3pgoid" Detail: Key (pat_id, issuer_fk)=(100051205, 465162) already exists. - retry
I understand it is related to some ID constraints in the patient_id table and I wonder what are my options to fix the situation ? Is there an option in the archive configuration I can setup to resolve the issue ? Else, any SQL/REST request that can help to sort out these conflicts in batches ?
Many thanks for your help,
Best regards
JP