Extract only A08 messages from SMAT for certain Pt Type

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Extract only A08 messages from SMAT for certain Pt Type

  • Creator
    Topic
  • #48671
    Paul Johnston
    Participant

    Hello ,

    Is it possible to extract all A08 messages CONTAINING a certain patient type ( ie LCS) from SMAT logs (using GUI or tcl) .

    This is not for the purpose of resending the messages.

    Thanks

    Paul

Viewing 4 reply threads
  • Author
    Replies
    • #59352
      James Cobane
      Participant

      Paul,

      You could do it in a couple of steps; first ‘Add specified messages to view’ and use LCS as your contents. This would give you all the messages that contian LCS. (If the value ‘LCS’ is within a specific field, you could specify |LCS| as your contents). Then you could do a ‘remove specfied messages from view’ and check the ‘not’ option and use ‘ADT^A08’ as the contents.  That should essentially leave only ADT^A08 messages containing ‘LCS’ in your view.

      Hope this helps.

      Jim Cobane

      Henry Ford Health

    • #59353
      Paul Johnston
      Participant

      Hi Jim ,

      How are you ?

      I did think of this solution but it didn’t seem to work for me.

      I loaded 1718 messages using GUI SMAT. I first select all LCS and got 78

      messages in the View.  I then tried to REmove specific message NOT inlcuding the A08. It selected 1079 messages from the View.

      I am not sure how it got 1079 when there were only 78 messages in the VIEW.

      Thoughts ?

      Paul

    • #59354
      Paul Johnston
      Participant

      Jim ,

      Actually , I think the solution does work. !!

      The SMAT file I had loaded never had any A08 messages .

      I tried another file it I was able to isolate the A08 and LCS messages.

      The GUI SMAT is a little misleading with the message count it displays.

      Or is it my interpretation.

      Paul

    • #59355
      Steven Spain
      Participant

      Or, for UNIX/Linux, using perl, from the command line:

      cp message_file.msg some_file

      perl -pi -ne ‘s/MSH/nMSH/g’ some_file

      grep A08 some_file |grep LCS > file.tst

      file.tst should contain newline messages that contain A08 and also LCS . . . might take some tweaking, but it gets around the GUI, or hcismat, esp. if the .msg file is very large.

      Steven . . .

    • #59356
      Alan James
      Participant

      Paul – the SMAT counts are a bit confusing, but not necessarily misleading.  The searches you specify are carried out against the entire file being viewed, not just those you have “selected”.  So, when you select 78 out of 1000 messages, and add them to your view, and then want to further filter them, SMAT carries out your instructions against the 1000 messages, not just against your selected 78 messages.

      Takes a little getting used to…

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

Forum Statistics

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