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

csv notes extraction


I'm using this vbs script to automatically download the notes in a csv file. It works well except when there is a special character in one of the notes. In that case, the csv is created but there are no notes in it.

Downloading manually the notes still works.
If a note contains a special character, it is displayed normaly in OpenClinica and also in the database.
To make the script work again, I have to update the corresponding note directly in the database.

So it is really about the script. Could you tell me what I should change to make it works with any characters ?

Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(outFile,True)
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
strURLStart = "https://.../OpenClinica/"
strURL = strURLStart & "j_spring_security_check?j_username=XXX"
strURL = strURL & "&j_password=XXX"
objHTTP.Open "POST", strURL, False
strURL = strURLStart & "DiscrepancyNoteOutputServlet?fmt=csv&studyIdentifier=XXX&discNoteType=-1&fileName=dnotes0_XXX&discrepancyNoteBean.disType=Query"
objHTTP.Open "GET", strURL, False
objFile.Write objHTTP.responseText


Sign In or Register to comment.