"Error saving to SQL" message on sending particular dcm

  • Hi,


    One of imaging system gives dicom images, which on sending to Conquest gives following error-


    One of the file has been mailed to you.
    NOTE: kindly note that the first dcm file gets imported, and on importing the next file error is generated.


    ============


    [CONQUESTPACS5] ***Truncated SOPInstanc from 68 to 64 chars in file: 015772\1.2.840.1009.Ganpati MRI & CT Scan Center.016165.8.2014050218394_0008_000004_13993654290000.dcm
    [CONQUESTPACS5] ***Truncated SeriesInst from 66 to 64 chars in file: 015772\1.2.840.1009.Ganpati MRI & CT Scan Center.016165.8.2014050218394_0008_000004_13993654290000.dcm
    [CONQUESTPACS5] ***Error saving to SQL: 015772\1.2.840.1009.Ganpati MRI & CT Scan Center.016165.8.2014050218394_0008_000004_13993654290000.dcm
    [CONQUESTPACS5] ***[AddImageFile] Error entering object into server: C:\Users\Administrator\Downloads\Ganpati MRI DICOM\Ganpati MRI DICOM\016165_8_4.dcm


    ==============


    Kindly suggest,


    Thanks.

  • Hi Marcel,


    These images are directly outputted from Equipment, and does not have any intermediate processing as far as we know.


    Is it possible to assign a new UID while importing to Conquest or remove the unwanted characters from the file.


    Please let us know.


    Thanks.

  • Example (please see the manual and dozens of posts and lua string tutorials on web) for more ideas):


    [lua]
    ImportConverter0 = Data.StudyInstanceUID = string.gsub(Data.StudyInstanceUID, "Ganpati MRI & CT Scan Center.", "")
    ImportConverter1 = Data.SeriesInstanceUID = string.gsub(Data.SeriesInstanceUID, "Ganpati MRI & CT Scan Center.", "")
    ImportConverter2 = Data.SOPInstanceUID = string.gsub(Data.SOPInstanceUID, "Ganpati MRI & CT Scan Center.", "")


    Marcel

  • Hi Marcel,


    Added following in dicom.ini file, but still same error occurred-


    [lua]
    ImportConverter0 = Data.StudyInstanceUID = string.gsub(Data.StudyInstanceUID, "Ganpati MRI & CT Scan Center.", "")
    ImportConverter1 = Data.SeriesInstanceUID = string.gsub(Data.SeriesInstanceUID, "Ganpati MRI & CT Scan Center.", "")
    ImportConverter2 = Data.SOPInstanceUID = string.gsub(Data.SOPInstanceUID, "Ganpati MRI & CT Scan Center.", "")


    Could you help me with this.


    Thanks.

  • Hi,


    I added some print statements. What is the exact error now?


    [lua]
    ImportConverter0 = Data.StudyInstanceUID = string.gsub(Data.StudyInstanceUID, "Ganpati MRI & CT Scan Center.", ""); print("study =", Data.StudyInstanceUID)
    ImportConverter1 = Data.SeriesInstanceUID = string.gsub(Data.SeriesInstanceUID, "Ganpati MRI & CT Scan Center.", ""); print("series =", Data.SeriesInstanceUID )
    ImportConverter2 = Data.SOPInstanceUID = string.gsub(Data.SOPInstanceUID, "Ganpati MRI & CT Scan Center.", ""); print("sop =", Data.SOPInstanceUID )


    Marcel

  • Hi Marcel,


    I tried to run the new code but same error occurred-


    ==============
    [CONQUESTPACS10] ***Truncated SOPInstanc from 68 to 64 chars in file: 015772\1.2.840.1009.Ganpati MRI & CT Scan Center.016165.8.2014050218394_0008_000009_14006706130035.dcm
    [CONQUESTPACS10] ***Truncated SeriesInst from 66 to 64 chars in file: 015772\1.2.840.1009.Ganpati MRI & CT Scan Center.016165.8.2014050218394_0008_000009_14006706130035.dcm
    [CONQUESTPACS10] ***Error saving to SQL: 015772\1.2.840.1009.Ganpati MRI & CT Scan Center.016165.8.2014050218394_0008_000009_14006706130035.dcm
    [CONQUESTPACS10] ***[AddImageFile] Error entering object into server: C:\appniq\pacs\dicomserver1417d\data\printer_files\1.2.826.0.1.3680043.2.135.735310.66559255.6.1400670613.132.2\Ganpati MRI DICOM\016165_8_9.dcm
    ===================


    I think lua code is not getting executed. Do i need to follow any other steps also to associate lua with conquest server, other than adding the code in dicom.ini file?


    Kindly let me know.


    Thanks.

  • Hi Marcel,


    ImportConverter are each in a line as follows-


    [lua]
    ImportConverter0 = Data.StudyInstanceUID = string.gsub(Data.StudyInstanceUID, "Ganpati MRI & CT Scan Center.", "");
    ImportConverter1 = Data.SeriesInstanceUID = string.gsub(Data.SeriesInstanceUID, "Ganpati MRI & CT Scan Center.", "");
    ImportConverter2 = Data.SOPInstanceUID = string.gsub(Data.SOPInstanceUID, "Ganpati MRI & CT Scan Center.", "");


    Also, the Conquest Folder consist of a folder named 'clibs'. The 'clibs' folder has only a single txt file. Do we need to add any other files also in it?


    Kindly suggest.


    Thanks.

  • No,


    these scripts are correct and work if I run them in a default install. clibs is for scripting extensions. Please add the print statements (on th same line) and try again. Or post the full dicom.ini


    Marcel

  • # This file contains configuration information for the DICOM server
    # Do not edit unless you know what you are doing


    [sscscp]
    MicroPACS = sscscp
    Edition = Personal


    # Network configuration: server name and TCP/IP port#
    MyACRNema = CONQUESTPACS10
    TCPPort = 5690


    # Reference to other files: known dicom servers; database layout; sops
    ACRNemaMap = acrnema.map
    kFactorFile = dicom.sql
    SOPClassList = dgatesop.lst


    # Host, database, username and password for MySql database
    SQLHost = localhost
    SQLServer =
    Username =
    Password =
    MySql = 1
    DoubleBackSlashToDB = 1
    UseEscapeStringConstants = 0


    # Configure database
    TruncateFieldNames = 10
    MaxFieldLength = 254
    MaxFileNameLength = 255
    FixPhilips = 0
    FixKodak = 0
    KeepAlive = 0
    LargeFileSizeKB = 4096
    PrintSquareLandscape = 0
    UseKpacsDecompression = 1
    ZipTime = 05:
    UIDPrefix =
    EnableReadAheadThread = 1
    PatientQuerySortOrder =
    StudyQuerySortOrder =
    SeriesQuerySortOrder =
    ImageQuerySortOrder =
    EnableComputedFields = 1
    IndexDBF = 1
    PackDBF = 0
    LongQueryDBF = 1000
    TCPIPTimeOut = 300
    FailHoldOff = 60
    RetryDelay = 100
    RetryForwardFailed = 0
    ImportExportDragAndDrop = 0
    QueueSize = 128
    WorkListMode = 0
    WorkListReturnsISO_IR_100 = 1
    DebugLevel = 0
    Prefetcher = 0
    LRUSort =
    AllowTruncate =
    DecompressNon16BitsJpeg = 1
    UseBuiltInJPEG = 1
    LossyQuality = 95
    IgnoreOutOfMemoryErrors = 0
    NoDICOMCheck = 0
    PadAEWithZeros = 0
    AllowEmptyPatientID = 0
    FileNameSyntax = 4


    # Configuration of compression for incoming images and archival
    DroppedFileCompression = un
    IncomingCompression = un
    ArchiveCompression = as


    # Names of the database tables
    PatientTableName = DICOMPatients
    StudyTableName = DICOMStudies
    SeriesTableName = DICOMSeries
    ImageTableName = DICOMImages
    WorkListTableName = DICOMWorkList
    DMarkTableName = DICOMAccessUpdates
    RegisteredMOPDeviceTable = RegisteredMOPIDs
    UIDToMOPIDTable = UIDToMOPID
    UIDToCDRIDTable = UIDToCDRID


    # Banner and host for debug information
    PACSName = CONQUESTPACS10
    OperatorConsole = 127.0.0.1


    # Configure email of error messages
    MailHost =
    MailPort = smtp
    MailSignon =
    MailFromName =
    MailRcptName1 =
    MailCollectTime = 1
    MailWaitTime = 10


    # Configuration of disk(s) to store images
    MAGDeviceThreshhold = 0
    MAGDeviceFullThreshHold = 30
    IgnoreMAGDeviceThreshold = 0
    MAGDevices = 1
    MAGDevice0 = C:\appniq\pacs\dicomserver1417d\data\
    NightlyCleanThreshhold = 0



    [lua]
    ImportConverter0 = Data.StudyInstanceUID = string.gsub(Data.StudyInstanceUID, "Ganpati MRI & CT Scan Center.", "") print("study =", Data.StudyInstanceUID);
    ImportConverter1 = Data.SeriesInstanceUID = string.gsub(Data.SeriesInstanceUID, "Ganpati MRI & CT Scan Center.", "") print("series =", Data.SeriesInstanceUID);
    ImportConverter2 = Data.SOPInstanceUID = string.gsub(Data.SOPInstanceUID, "Ganpati MRI & CT Scan Center.", "") print("sop =", Data.SOPInstanceUID);

  • Hi Marcel,


    Below in the complete dicom.ini text-


    ====
    # This file contains configuration information for the DICOM server
    # Do not edit unless you know what you are doing


    [sscscp]
    MicroPACS = sscscp
    Edition = Personal


    # Network configuration: server name and TCP/IP port#
    MyACRNema = CONQUESTPACS10
    TCPPort = 5690


    # Reference to other files: known dicom servers; database layout; sops
    ACRNemaMap = acrnema.map
    kFactorFile = dicom.sql
    SOPClassList = dgatesop.lst


    # Host, database, username and password for MySql database
    SQLHost = localhost
    SQLServer = conquest10
    Username = root
    Password = **
    MySql = 1
    DoubleBackSlashToDB = 1
    UseEscapeStringConstants = 0


    # Configure database
    TruncateFieldNames = 10
    MaxFieldLength = 254
    MaxFileNameLength = 255
    FixPhilips = 0
    FixKodak = 0
    KeepAlive = 0
    LargeFileSizeKB = 4096
    PrintSquareLandscape = 0
    UseKpacsDecompression = 1
    ZipTime = 05:
    UIDPrefix = 1.2.826.0.1.3680043.2.135.735310.66559255
    EnableReadAheadThread = 1
    PatientQuerySortOrder =
    StudyQuerySortOrder =
    SeriesQuerySortOrder =
    ImageQuerySortOrder =
    EnableComputedFields = 1
    IndexDBF = 1
    PackDBF = 0
    LongQueryDBF = 1000
    TCPIPTimeOut = 300
    FailHoldOff = 60
    RetryDelay = 100
    RetryForwardFailed = 0
    ImportExportDragAndDrop = 0
    QueueSize = 128
    WorkListMode = 0
    WorkListReturnsISO_IR_100 = 1
    DebugLevel = 0
    Prefetcher = 0
    LRUSort =
    AllowTruncate =
    DecompressNon16BitsJpeg = 1
    UseBuiltInJPEG = 1
    LossyQuality = 95
    IgnoreOutOfMemoryErrors = 0
    NoDICOMCheck = 0
    PadAEWithZeros = 0
    AllowEmptyPatientID = 0
    FileNameSyntax = 4


    # Configuration of compression for incoming images and archival
    DroppedFileCompression = un
    IncomingCompression = un
    ArchiveCompression = as


    # Names of the database tables
    PatientTableName = DICOMPatients
    StudyTableName = DICOMStudies
    SeriesTableName = DICOMSeries
    ImageTableName = DICOMImages
    WorkListTableName = DICOMWorkList
    DMarkTableName = DICOMAccessUpdates
    RegisteredMOPDeviceTable = RegisteredMOPIDs
    UIDToMOPIDTable = UIDToMOPID
    UIDToCDRIDTable = UIDToCDRID


    # Banner and host for debug information
    PACSName = CONQUESTPACS10
    OperatorConsole = 127.0.0.1


    # Configure email of error messages
    MailHost =
    MailPort = smtp
    MailSignon =
    MailFromName =
    MailRcptName1 =
    MailCollectTime = 1
    MailWaitTime = 10


    # Configuration of disk(s) to store images
    MAGDeviceThreshhold = 0
    MAGDeviceFullThreshHold = 30
    IgnoreMAGDeviceThreshold = 0
    MAGDevices = 1
    MAGDevice0 = C:\appniq\pacs\dicomserver1417d\data\
    NightlyCleanThreshhold = 0



    [lua]
    ImportConverter0 = Data.StudyInstanceUID = string.gsub(Data.StudyInstanceUID, "Ganpati MRI & CT Scan Center.", "") print("study =", Data.StudyInstanceUID);
    ImportConverter1 = Data.SeriesInstanceUID = string.gsub(Data.SeriesInstanceUID, "Ganpati MRI & CT Scan Center.", "") print("series =", Data.SeriesInstanceUID);
    ImportConverter2 = Data.SOPInstanceUID = string.gsub(Data.SOPInstanceUID, "Ganpati MRI & CT Scan Center.", "") print("sop =", Data.SOPInstanceUID);
    =========


    Kindly, let me know if i need to make any changes in it.


    Thanks.

Participate now!

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