We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Schedule csv notes extraction



  • RCHENURCHENU Posts: 207 ✭✭
    Christian, can you explain what you mean by "make your vm accessible for download?"
    All the other extractions (datasets, audit log, casebook...) seem to work properly.

  • haenselhaensel Posts: 602 ✭✭✭
    RCHENU said:

    Yes it's a vm with ...

    It sounds like you're using a virtual machine and maybe it is possible to find the error if I can get my hands onto this vm (with pseudo data).


  • RCHENURCHENU Posts: 207 ✭✭
    Thank a lot Christian for your help and your proposition.
    I'm gonna try first to reindex the database and then come back to you.
    Thanks again,

  • RCHENURCHENU Posts: 207 ✭✭
    Hello Christian,

    To keep you up-to-date, Reindexing both databases didn't help.
    Gerben found that the issue was already reported on jira https://jira.openclinica.com/browse/OC-7850
    I hope that a solution will comes up very soon !!

  • haenselhaensel Posts: 602 ✭✭✭
    It looks like the issue is there since OC-3.2.
  • RCHENURCHENU Posts: 207 ✭✭
    Hi Gerben,

    I don't know if you remember but I'm using the vbs script below to extract notes on daily basis. I recently had a case where a note had some russian characters and the following line threw an error:
    objFile.Write objHTTP.responseText

    Do you have any idea what I should add to the script to authorize any characters ?

    Thanks a lot,


    Hi Romain,
    The following vbs-script should do the trick. You can schedule it on a (windows) machine by ceating a scheduled job with two parameters: username and password.
    The main part is of course the URL, for example
    [your domain]//[your oc]/DiscrepancyNoteOutputServlet?fmt=csv&studyIdentifier=[your study]&discNoteType=-1&fileName=dnotes0_defaultstudy
    You can look at the source of the normal dialog window to see which parameters can be set. In general -1 is used for "all".
    Kind regards,
    Gerben Rienk
    Option explicit
    Dim objHTTP
    Dim strURLStart
    Dim strURL
    Dim strReq

    'the next 3 variables are for writing the output to disk
    Dim outFile
    Dim objFSO
    Dim objFile

    Set objFSO=CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.CreateTextFile(outFile,True)

    If WScript.Arguments.Count <> 2 then
    WScript.Echo "Missing parameters. This script needs: "_
    & VbNewLine & "username and password "_
    & VbNewLine & "to run correctly."
    Set objHTTP = CreateObject("MSXML2.XMLHTTP")
    'change this to match your situation
    strURLStart = "http://www.tds-edc.com/oc311/"
    strURL = strURLStart & "j_spring_security_check?j_username=" & WScript.Arguments(0)
    strURL = strURL & "&j_password=" & WScript.Arguments(1)
    objHTTP.Open "POST", strURL, False

    'modify the next line for another study or dn_type or status, etc.
    strURL = strURLStart & "DiscrepancyNoteOutputServlet?fmt=csv&studyIdentifier=defaultstudy&discNoteType=-1&fileName=dnotes0_defaultstudy"

    'send the request
    objHTTP.Open "GET", strURL, False
    'and write the result to disk
    objFile.Write objHTTP.responseText

    End if

Sign In or Register to comment.