Searching Smatfiles

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Searching Smatfiles

  • Creator
    Topic
  • #51920
    David Harrison
    Participant

      I archive my smatfiles every week. On numerous occasions I get queries from users of interfaced systems complaining about missing patients. It is rarely down to Cloverleaf but, as the man in the middle, I have to prove that we sent a message and received an acknowledgement from the receiving system.

      I have written a tcl proc to trawl through smatfiles for HL7 messages for particular patients and write them to a separate file. I can extract the messages ok but I also want to extract the corresponding HL7 ACK message from the ack smatfile so I have a complete audit trail in a single file.

      What I need to know is how to extract the complete ack message using the message Id. I could do it by reading the file line by line but I

    Viewing 8 reply threads
    • Author
      Replies
      • #72292
        Jim Kosloskey
        Participant

          Dave,

          With most structured messages (such as HL/7) there is a place for some sort of Control ID. With the standards expressed (such as HL/7) there is a place in the Acknowledgment for the Control ID of the message being acknowledged.

          In HL/7 the Control ID of the message being sent is in MSH-10, in the acknowledgment of that message the message being acknowledged’s Control ID is placed in the acknowledgment’s MSA-2 (the acknowledgment actually has its own Control ID in its MSH-10.

          Assuming the message being sent has a Control ID in MSH-10 and the receiving system echos that Control ID in MSA-2, you should be able to search the acknowledgments for an MSA-2 that matches a given original message’s MSH-10.

          If this is some sort of other standards based structured message there should be a correspondence to HL/7. If this is a proprietary message structure, then it all depends on the contents.

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

        • #72293
          David Harrison
          Participant

            Jim,

            Yes I

          • #72294
            Jim Kosloskey
            Participant

              Dave,

              What I would do is to use the .idx file in order to read through the .msg file. As I read each message, I check the MSA-2 to see if it matches the Control ID(s) I retrieved from the original message.

              Are you familiar with the content of the .idx file?

              email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

            • #72295
              David Harrison
              Participant

                OK Jim I’ll give that a try.

                Thanks

              • #72296
              • #72297
                Richard Hart
                Participant

                  This is the usage for the SMAT processing we use.  I  have probably posted an older version a few years ago and can post again.

                  Usage: /hci/InfoHEALTH/bin/smatList.sh  [-v] [-h] [-p] [-fp] [-a] [-fa] [-m] [-fm] [-c] -o [file2] …

                  Where -h          help!

                       -v          verbose mode

                       -idx        use the ‘idx’ file to determine the messages. See Note below

                       -quirk      use some processing on the message to remove ‘quirks’. Useful for old HL7 SMAT files

                       -o    the output file. See Note below

                       -c   modify the number of messages in the output file – default 1000. See Note below

                       -len10      use the len10 output format, the default is a new line

                       -p  the Patient Code (MRN). This can be repeated

                       -fp   a file containing Patient Codes (MRN), one per line

                       -a  the Account Number. This can be repeated

                       -fa   a file containing Account Numbers, one per line

                       -m  the Medical Staff ID or GP Code (for Master File Updates). This can be repeated

                       -fm   a file containing Medical Staff codes, one per line

                       file1       is a Cloverleaf SMAT file, compressed or uncompressed

                      The output file supplied will have a suffix _xxx.dat, where

                          xxx is the file number in the range 1 through 999.

                      Each file will contain a maximum of 1000 records in ‘len10’ or newline format,

                      the ‘-c’ option can be used to change the maximum number of records in an output file

                      with ‘-1’ unlimited.

                      The ‘idx’ processing is useful for non HL7 SMAT files

                • #72298
                  David Harrison
                  Participant

                    Richard,

                    I’d like to take a look at your code if you are willing to post it.

                    Thanks,

                    Dave

                  • #72299
                    Russ Ross
                    Participant

                      FYI – you can search clovertech for things like smatList.

                      Here is the URL I use for searching clovertech.

                      <a href="https://usspvlclovertch2.infor.com/search.php&#8221; class=”bbcode_url”>https://usspvlclovertch2.infor.com/search.php

                      However, the search capability in my opinion is not all that good so be patient and forgiving with it.

                      Here is a clovertech URL of the smatList code posted back on February 2008 I found by searching clovertech for smatList:

                      <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=2573&#8243; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=2573

                      Russ Ross
                      RussRoss318@gmail.com

                    • #72300
                      David Harrison
                      Participant

                        Got it. Thanks a lot.

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