Postby KISMITH » Wed Jun 26, 2013 10:44 am

I have a prescript that takes the sOriginalMessage and replaces "NTE|" with "NTE|delim||". Then, it splits the array on "|delim|". This all works as expected. The document interface that uses this script sometimes is missing the "Next Visit Date" in the message when it comes across. We have determined this missing information is due to 1 of 2 things: 1) User error. 2) the service that this message comes through does not have enought time between when the appointment is scheduled and when it sends the document. The vendor tells us there is no way to put a lag on their side. So, I am in the process of trying to figure out a way to populate this missing "Next Visit Date".

I was going to try to do a replace in the pre-script, but it would require me to quey the TW SQL database to find the next visit date for the patient. I didn't think that pre-scripts allowed us to make this connection. I was under the impression that pre-scripts would basically do find more of a find and replace or substitute. No connections to the TW database were allowed. Is that correct?

I also tried to write a script that would query the "Next Visit Date" to be used in the mapping. The script works fine when I just test (with the Test button) it. However, I could not get this to work either because I have a repeating field with a line feed. I was not allowed to use the "concatenate with line feed" in the mapping once I put the script on the field. My current mapping is in TranscribedText1: Sub(<LF>(NTE.1-[3]-Comment-NTE OBR), <10>, <13><10>)

Does anyone have any suggestions on how I could populated this next visit date when it is missing?

Posts: 25
Joined: Thu Apr 14, 2011 7:54 am

Return to Tools: Queries, Scripts

Who is online

Users browsing this forum: No registered users and 2 guests