One image from the same study cannot be uploaded to the system (version 1419)

  • Here with the error message: (some data masked)


    10/12/2020 9:35:15 AM [DICOM1] ***Failed SQLExecDirect : INSERT INTO DICOMStudies (StudyInsta, StudyDate, StudyTime, StudyID, StudyDescr, AccessionN, StudyModal, PatientNam, PatientBir, PatientSex, PatientID, AccessTime) VALUES ('1.2.826.0.1.3680043.6.49952.18092.20201012064348.2824.78.329653', '20201012', '092338', '2001048630F', 'Abdomen, Whole Abdomen (Appendix is not included)', '2001048630F', 'US', 'NGAN', '19760416', 'F', 'K112864A', 1602466496)

    10/12/2020 9:35:15 AM [DICOM1] ***Error: 2627: 23000: [Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'PK__DICOMStu__3B309566C4403DA2'. Cannot insert duplicate key in object 'dbo.DICOMStudies'. The duplicate key value is (1.2.826.0.1.3680043.6.49952.18092.20201012064348.2824.78.329653).

    10/12/2020 9:35:15 AM [DICOM1] ***Unable to DB.Add()

    10/12/2020 9:35:15 AM [DICOM1] ***SQL: INSERT INTO DICOMStudies (StudyInsta, StudyDate, StudyTime, StudyID, StudyDescr, AccessionN, StudyModal, PatientNam, PatientBir, PatientSex, PatientID, AccessTime) VALUES ('1.2.826.0.1.3680043.6.49952.18092.20201012064348.2824.78.329653', '20201012', '092338', '2001048630F', 'Abdomen, Whole Abdomen (Appendix is not included)', '2001048630F', 'US', 'NGAN', '19760416', 'F', 'K112864A', 1602466496)

    10/12/2020 9:35:15 AM [DICOM1] ***Error: 2627: 23000: [Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'PK__DICOMStu__3B309566C4403DA2'. Cannot insert duplicate key in object 'dbo.DICOMStudies'. The duplicate key value is (1.2.826.0.1.3680043.6.49952.18092.20201012064348.2824.78.329653).

    10/12/2020 9:35:15 AM [DICOM1] ***Error saving to SQL: K552864A\1.2.840.113663.1500.1.369996779.2.1.20201012.92339.31_0001_000001_160246651585c2.dcm



    2nd image and coming images for the same patient & study can save to the system.

  • I had checked from the database that there is no duplicate patient for same study. Is there anything else? It's strange that the second and fore-coming images for the same patient and same study can be uploaded successfully.

  • Ok,


    then this sounds like a race condition where images 1 and 2 are trying to create the same record at once. Are multiple images sent simultaneously? This has not been seen before and may be an issue specific for SQL server.


    Marcel

  • Hi,


    In mysql, sqlite and postgres the "Cannot insert duplicate key error" is caught and will not stop processing. The same should be done for SQL server. I do catch error 2601 which is intended to be this condition but there may be a change in SQL server. Can you find out what the error code is?


    Edit: I can get you a version of 1.4.19 or a version of 1.5.0b with the fix in if I am sure what the code is.


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!