does the scanned file name have to be unique?

Discussion in 'Bugs & Issues' started by qilin, Feb 8, 2007.

  1. qilin

    qilin Member

    My secretary added two files to a patient's result tab, However, when she tried to view the two files, clicking both results give her the same pdf file. When logged in as a MD, however, I could view them correctly.

    I thought the reason this happened is that she didn't have time to rename the files so both were "document.pdf" before uploading to the server - they were scanned at separate times. Synpase didn't complain. When I checked the server, the second file wasnamed "document(1).pdf" (by Synapse?), however when viewing in internet explorer, both were showing as "document.pdf" in the explorer window.

    Does this mean the patient's file names need to be unique before uploading to the server?
  2. Graham

    Graham Developer Staff Member

    Synapse Server automatically renames files if there is a name clash. As you noted, it adds a [n] to the name if there is a clash.

    Not sure what the secretary's problem was .. she might still be looking in her local cache.

  3. Graham

    Graham Developer Staff Member

    Ok, CS has turned my text into an emoticon !

    filename.doc => patientid-filename[ a digit ] .doc

  4. qilin

    qilin Member

    I told them to rename the files - so this is not necessary. Then how can you tell Synapse on her PC not to look in her local cache? I didn't know how to fix it - I thought there was a problem on server side, so I deleted both entry and re-uploaded.
  5. Graham

    Graham Developer Staff Member

    If you can reproduce the problem for me, then I will see if I can fix it.

    If you want to stop synapse looking at the cache, just delete everything in her www directory.

  6. samlock

    samlock New Member

    Graham: I'm experimenting withscanned images.

    First: Is the following accurate ??

    The scanned images are stored in directory: c:\emr\Server\Cache-listener\
    The files are named with the &ldquo;Patient Record #-<orig filename>&rdquo;
    Eg. 68-sample_referral.pdf where 68 is Patient record # within Synapse

    The original image file was in C:\uploadtemp\

    After I linked the image as a Result, I went to my uploadtemp\ directory, and purposely renamed the file.
    However, when I tried to link the renamed image again, Synapse won't allow, saying image is already linked
    to another patient.

    How is Synapse detecting duplicate image ?

    Also, if we are running multiple synapse databases on one server, how are the saved images differentiated, since they are kept in a common c:\emr\Server\Cache-listener\, while the indiviual REMR.FDBs are kept in

    C:\emr\data\
    C:\emr\data2\
    etc


    The original image file was in C:\uploadtemp\

    After I linked the image as a Result, I went to my uploadtemp\ directory, and purposely renamed the file.
    However, when I tried to link the renamed image again, Synapse won't allow, saying image is already linked
    to another patient.

    How is Synapse detecting duplicate image ?

    Also, if we are running multiple synapse databases on one server, how are the saved images differentiated, since they are kept in a common c:\emr\Server\Cache-listener\, while the indiviual REMR.FDBs are kept in

    C:\emr\data\
    C:\emr\data2\
    etc
  7. Graham

    Graham Developer Staff Member

    Sam,

    At present, there must be a unique instance of synapse-server for each installation (PITA) as the cache-listener is created in the same directory.
    Now, if you run multiple servers using the one instance, then scanned images from different servers will end up in the same cache-listener directory. Not good if you want to separate them out again.

    There is a files database which holds the scanned file filename, and the md5 for the file. So, if you try to upload the same image with a different filename, Synapse server knows that the md5 already exists and prevents you. This is to stop users from inadvertently uploading the same file more than once.



  8. Jason

    Jason Developer / Handyman Staff Member

    MD5 checksums ! Cool eh !


    Why would you want to do that ?
  9. samlock

    samlock New Member

    We (Zybex) are a software house, and we offer our product as ASP service, so we have multiple clients on one server. Our product fully integrates with Synapse. As our clients start adopting SYNAPSE, they'll also be on same server.
  10. Jason

    Jason Developer / Handyman Staff Member

    Oh I see what you are trying to do.

    :)
  11. Graham

    Graham Developer Staff Member

    Maybe that we will offer a command line option to specify where the data is to be kept, but my fear is that someone will specify the wrong directory, and files from one doc ends up in the directory of another's.

    So, in a way, it's a safeguard.

  12. qilin

    qilin Member

    This happened again yesterday: clicking two result entries showed the same pdf file ininternet exploerer. I cleaned up the www subfolder for local cache and everything then workd fine.
    Not sure how to avoid this.
  13. Graham

    Graham Developer Staff Member

    Perhaps you can detail the exact steps to reproduce the problem and I will see what can be done.

  14. qilin

    qilin Member

    Confirmed. This behaviour is caused by duplicate file names. I reproduced the same problem: uploadedone PDF file followed by another file with the same file name. The server renamed the second file. When viewing from IE immediately afterwards, clicking both items resulted display of the same first PDF. Deleting the related files from www cache folder fixes the problem. Viewing from another computer has no problem.
  15. Graham

    Graham Developer Staff Member

    My scanner automatically generates unique filenames in sequence. Can you fix the software to do that for you?

  16. Jason

    Jason Developer / Handyman Staff Member

    PaperPort will generate files with 001 002 etc.

    Problem is, when you clear the directory .. it starts again at 001.
  17. qilin

    qilin Member

    Right. Paperport generates unique names during scanning. But after uploading to Synapse, we tell Synapse to delete uploaded files locally. If we then scan again for the same patient, duplicate names will occur unless we manually rename the files.
  18. Jason

    Jason Developer / Handyman Staff Member

    qilin - are you certain this results in problems (unless you rename) ?

    Graham, if so ... could Synapse rename the files so they don't crash ?
  19. Graham

    Graham Developer Staff Member

    Is one of the files that Synapse deletes responsible for maintaining the file counter?

    My HP3015 keeps incrementing even if I delete all the files in the scan directory.

  20. Jason

    Jason Developer / Handyman Staff Member

    Sort of. Deleting files is needed to know what files have been imported and what has not.

    PaperPort does not do this.

Share This Page