We have an interface with MModal to receive transcription reports into CEMR. Most of the reports load into EMR successfully but rarely one of them is not picked up from Linklogic\Data\In folder. Subsequently Data\In folder queue just keeps building. The only way to have DTS back working again would be restart the DTS. GE support mentioned that the version of RTF might not be supported by the EMR. Apparently EMR supports version 1.3. So I am trying to get MModal to send us plain text format instead. I am wondering if any of you had similar issues.
BTW, CHUG was amazing. It was great meeting so many of you in person.
I'm sorry, I can't offer any help with your issue exactly. DTS seems to have many ways to hang up, to where closing it and restarting is the only way to resume processing. We have a monitoring script that alerts me if files start backing up in the data\in folder. Not as nice as prevention but it gets fixed quickly when it happens.
I have a question for you. Can you post an example of a de-identified HL7 message that has RTF in it? I'm trying to accomplish something similar and could really use any examples where it has worked with LinkLogic.
Thanks!
I'm surprised I didn't reply to this post previously.
If you believe RTF is the cause, you should be able to strip the RTF from the HL7 message before it goes to DTS without too much trouble. Disclaimer: I haven't had to manipulate HL7 containing RTF myself, so these suggestions are just a spot I would start.
If you use Mirth Connect, here is Javascript that purports to remove RTF formatting (source):
function stripRtf(str){
var basicRtfPattern = /\{\*?\\[^{}]+;}|[{}]|\\[A-Za-z]+\n?(?:-?\d+)?[ ]?/g;
var newLineSlashesPattern = /\\\n/g;
var ctrlCharPattern = /\n\\f[0-9]\s/g;//Remove RTF Formatting, replace RTF new lines with real line breaks, and remove whitespace
return str
.replace(ctrlCharPattern, "")
.replace(basicRtfPattern, "")
.replace(newLineSlashesPattern, "\n")
.trim();
}
A python script that removes RTF formatting: https://gist.github.com/gilsondev/7c1d2d753ddb522e7bc22511cfb08676
Incidentally we have a scheduled task to restart the DTS service once per hour in case the service hangs as well.
Thanks to both of you for replying to my question. I tried various methods to address this issue: But nearly all of them werent satisfactory. I tried a java library for RTF but it was truncating my message and the resulting message was getting stuck in the DTS folder and EMR wasnt picking it up and it wasnt going to linklogic errors either. After struggling with this I finally went to Mmodal and requested them to send plain text instead which they did. Now everything works great and formatting is very close to what we used to get with RTF. MModal added enough line breaks to make the text look pretty.
Would you both mind sharing the DTS monitoring and restarting scripts? That would be very useful for not just me but anyone else who is reading the post.
Sure. It's not the prettiest but it works well.
We initiate our batch file with a scheduled task. The >> redirects the output to a file called dts_restart.log. If we're ever having problems with a scheduled restart, we can see what happened in the dts_restart.log file.
C:\cliapps\dts_restart.bat >> "c:\cliapps\dts_restart.log" 2>&1
Here is the content of the dts_restart.bat file. The date and time simply add a timestamp to the log. The tasklist command logs if the service failed to stop after 50 seconds. We force kill ml3dts.exe in case it's still running, along with the service manager we use. Pause for 30 seconds to make sure all of the processes down, then we restart the service.
date /t
time /t
:stop_dts
echo "Stop DTS service"
net stop "LinkLogicDTS"
echo the service does not stop fast need to wait a bit
sleep 50
echo Starting DTS service
tasklist /FI "Imagename eq ml3dts.exe
taskkill /f /im ml3dts.exe
taskkill /f /im XYNTService.exe
sleep 30
:start_dts
net start "LinkLogicDTS"
Our DTS monitoring script is handled by the same software we use for Server monitoring which is called Paessler PTRG. It's free for up to 100 monitors, and it can watch network, disk space, memory, services, etc. and sends a text alert when something isn't right. There are many similar products out there used by IT departments, it really doesn't matter which product you use.
We use a custom script, but the simplest way to alert on a failure here is to have a scheduled task that runs every XX minutes (5), runs a directory listing on the IN folder, and saves that file somewhere. Then your monitoring software can just monitor the File Size and alert when the file grows beyond a set size.
For example: dir M:\data\in\*.* /b > M:\dts.txt
Then PRTG alerts if M:\dts.txt gets larger than 500 bytes. You can even set some of these monitoring packages (PRTG included) to restart a service, or run another script, when it finds a problem.
Thanks,
Wade
Thank you for the script. Does the script check if DTS is down prior to restarting it.
No it doesn't. We don't care either way.
If it's hung, it's still in the process list. If it's crashed, it isn't. Either way, we want to restart the service.
We do have a separate monitor that notifies us by email if the number of files in the DTS inbox exceeds a certain threshold, so if there is a problem we may restart it manually also. That's quite infrequent however.
It would be simple enough to have our monitoring script call the restart batch file as well I suppose. It's so infrequent we haven't bothered with it.
