Alert on ErrorDB – parse ErrorDB and extract MSH-10 value

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Alert on ErrorDB – parse ErrorDB and extract MSH-10 value

  • Creator
    Topic
  • #54842
    Erik Mueller
    Participant

      Hi,

      I’m using Cloverleaf 6.1.1 and having successfully managed to create an alert to trigger on when there are new entries on the ErrorDB.

      I have written some tcl commands, that are executed upon the alert triggering and update an external database indicating there are new entries on the ErrorDB.

      However, I also want to update the external database with the HL7 message ID (i.e. the value in MSH-10), of the message(s) in the ErrorDB.

      Has anybody written a TCL that dumps the ErrorDB, parses the HL7 message(s), extracts the MSH-10 value(s), or something similar along those lines?

      Ideally if possible, I would also like to have the reason why the message went to the ErrorDB i.e. the message state, but that is not essential.

      Any advice would be appreciated.

      Thanks,

      Erik

    Viewing 2 reply threads
    • Author
      Replies
      • #83191
        James Cobane
        Participant

          Hi Erik,

          If the messages are hitting the Error database as a result of NAKs or other tcl code that is putting them there (i.e. state 201), you may want to actually incorporate the code to do this within those procs, rather than trying to use the ‘hcidbdump’ commands to extract this info.  Just a thought.

          Jim Cobane

          Henry Ford Health

        • #83192
          Erik Mueller
          Participant

            James Cobane wrote:

            Hi Erik,

            If the messages are hitting the Error database as a result of NAKs or other tcl code that is putting them there (i.e. state 201), you may want to actually incorporate the code to do this within those procs, rather than trying to use the ‘hcidbdump’ commands to extract this info.

          • #83193
            James Cobane
            Participant

              What we have done with Error DB alerts is to simply execute the hcidbdump command and e-mail the output of the command to our team; i.e. we have the alert configured so that it execs the following command:

              hcidbdump -e -O i | mail -s “$HCISITE: %A” youremail@somewhere.org

              You could add the -L to dump the actual message data which would then show up in the body of the e-mail.

              Jim Cobane

              Henry Ford Health

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