Q: I have a 3rd party DLL I need to reference in a script in ConnectR. Is there any secret to it?
From Galen Healthcare Solutions - Allscripts Enterprise EHR Wiki
Here is an example of a script which is used to convert RTF text to ASCII. It uses the AHSRTFUtility DLL (stored locally on the interface server at C:\Windows\System32\AHSRTFUtility.dll):
function convertRTFtoASCII(RTFText)
'declaration debug
dim Debug
Debug = "N"
If Debug = "Y" then
Set fsoDebug = CreateObject("Scripting.FileSystemObject")
Set filDebug = fsoDebug.OpenTextFile("c:\debugrtfasc.txt", 8, True)
End If
If Debug = "Y" then filDebug.Write rtftext & now() & vbcrlf
Dim oRTF
Set oRTF = CreateObject("AHSRTFUtility.RTFObject")
If Debug = "Y" then filDebug.Write "1" & now() & vbcrlf
oRTF.Value = RTFText
If Debug = "Y" then filDebug.Write "2" & now() & vbcrlf
convertRTFtoASCII= oRTF.Text
If Debug = "Y" then filDebug.Write "3" & now() & vbcrlf
set oRTF = nothing ' release object
If Debug = "Y" then filDebug.Write convertRTFtoASCII & now() & vbcrlf
'cleanup debug
IF Debug = "Y" then
filDebug.close
set filDebug = nothing
set fsoDebug = nothing
End If
end function
- Check to ensure that the most recent version of the .dll is the one that is registered.