Java TPS

  • Creator
    Topic
  • #51239
    Kyley Jex
    Participant

      I’ve got a Java TPS in which I’m trying to modify a field within a message (convert OBX-5 from RTF to TEXT).  I do this by creating an Hl7M from the incomming Message.  Then I get the text from the field, convert it and set the field with the converted data.  I then create a new Message from the Hl7M.  However, when I try and KILL the original message and then CONTINUE the new message it creates an error in the Error DB and a message within the Recovery DB.  If I KILL the new message and CONTINUE the original message everything works OK — except my logging of the outbound data is the original Message and not the modified Message.

      Any ideas of what I’m not doing right?

      Cheers,

      Kyley

    Viewing 0 reply threads
    • Author
      Replies
      • #69316
        Kyley Jex
        Participant

          Apparently, a Message is not allowed to be created within an protocol write TPS.  Doing so resulted in the following Error (Message ignored – cannot create messages inside protocol write TPS).

          Therefore, I resolved to replacing the data within the original message.  So now I create the Hl7M from the Message, get the Observation Value (OBX-5), convert RTF to TXT, search for index of the data within the original message content, and simply replace it.

          Code:

          msg.setContent(txtData, index, rtfData.length());

          This works, but is this the correct way?

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