tcl script help

  • Creator
    Topic
  • #50996
    Dennis Shirk
    Participant

    I don’t know tcl yet and I need this fast. Can someone write me a simple tcl script to stop and start a thread. the site name is cloverleaftest. The thread name is also cloverleaftest . Here are the commands I think I need…

    hcicmd -p cloverleaftest

    Medent_IN pstop

    Medent_IN pstart

    Also if I have a tcl script to run this can I shedule when I want the script to run using windows schedule tasks or some other method?

    Thanks all.

Viewing 14 reply threads
  • Author
    Replies
    • #68329
      Ron Archambault
      Participant

      You should be able to use the following in tcl.

      THREADCTL pstop

    • #68330
      Ron Archambault
      Participant

      It’s been a while since I’ve run on windows, but this worked in the past.

    • #68331
      Dennis Shirk
      Participant

      If I am sending a txt file to an OB tcp thread it will only send when the thread is started correct? If so can I use this proc to make it stop and restart the thread every hour?

    • #68332
      Jerry Tilsley
      Participant

      A better way would be to just use the advanced schedule tab of the inbound thread.  Set it to just pick up every hour at which ever time during the hour.  See the documentation for this.  It would be a lot cleaner than using a script to stop and start the thread all the time.

    • #68333
      Dennis Shirk
      Participant

      I did see that in the help file about how to configure advanced scheduling however I am using the protocol:file on the inbound thread. Because of this there is not a tab to setup scheduling.

    • #68334
      Jerry Tilsley
      Participant

      What about using the protocol Fileset-local?  I use this most the time, even if I need to just pick up one file just because of the scheduling part.  What I do is use an IB Directory Parse TPS script and filter the files so that only the file(s) I want come are picked up.  Or you could put the file you want into its on directory and just use the fileset-local without any scripts attached.

      Just a couple ideas.

    • #68335
      Dennis Shirk
      Participant

      Can I then use  tcp/ip on the outbound thread?

    • #68336
      Ron Archambault
      Participant

      There might be a better way for this, what’s your objective?

    • #68337
      Dennis Shirk
      Participant

      I have a file that is put on the cloverleaf box every hour at a quarter after the hour. It goes into it’s own folder.I need to take this txt file and send the hl7 messages to a company called MedEnt every hour at half past the hour. So I was hoping to be able to “pick” up the file 8:30,9:30 etc and send it to MedEnt via tcp if possible.

    • #68338
      Ron Archambault
      Participant

      Then, as Jerry said you should use fileset-local and advanced scheduling.

      It’s pretty easy to configure, just like cron.

    • #68339
      Dennis Shirk
      Participant

      I just configured it. I used advanced sheduling and set the minutes to 30. According to the help file this should send the messages at 30minutes and 0 seconds after the hour. I left an asterisk in the other fields. Is this correct? Thanks for all your help.

    • #68340
      Ron Archambault
      Participant

      You got it.

    • #68341
      William Rowley
      Participant

      You may want to set the advanced scheduling seconds to a value (like 0 or 1) as well. If it is just asterisk then the task will try to run every second of the specified minute – probably not what you want.

    • #68342
      Dennis Shirk
      Participant

      Thank you William. I did notice that in the help file and I set it to the following.

      Seconds 0

      Minutes 30

      Hours 0-23(I guess I probably don’t need that one)

      Day of month 1-7(again probably don’t need but wasn’t sure so I addeded it)

    • #68343
      Dennis Shirk
      Participant

      Ok I have the file going over but the receiving system is only receiving the MSH segments like so.

      MSH|^~&|MHYORK|01||MEDENT|200906241149||ORU^R01|17544480|T|2.2^M^^M

      It is not getting the rest of the segments between the MSH messages like pid, pd1 orc obr etc. The gentlemen at Medent told me the ^M^^M needs to be in the last line of the last segment before the next MSH segment. I am not sure where the ^M^^M is coming from. Any ideas. Thanks again for helping out.

Viewing 14 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10