Deleting an unused segmant from a message

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Deleting an unused segmant from a message

  • Creator
    Topic
  • #51758
    Sebastien Bazile
    Participant

      Does anyone out there know how to delete the OBX segmant from the message. The company receiving the message has no use for that segmant which causing the message to error out when received. Your help would be greatly appreciated.

      thank you.

      sebastien

    Viewing 13 reply threads
    • Author
      Replies
      • #71636
        Gary Atkinson
        Participant

          Just setup up an IF statement and then copy the OBX segments off the IF.  It all depends on *what* in the OBX segment you are looking for.

        • #71637
          Russ Ross
          Participant

            Here is a URL that previously discussed what you are asking:

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

            Russ Ross
            RussRoss318@gmail.com

          • #71638
            Sebastien Bazile
            Participant

              Thanks for your reply Gary, but I’m new at this and no fully understanding how to set up the IF statement. Could you please elaborate more, thank you Gary.

            • #71639
              Gary Atkinson
              Participant

                Are you using the xlate tool or writing your own tcl?

              • #71640
                Sebastien Bazile
                Participant

                  Using the Xlate tool.

                • #71641
                  Gary Atkinson
                  Participant

                    Do you know how to use the xlate tool?

                  • #71642
                    Sebastien Bazile
                    Participant

                      Yes, a little bit but I can’t seem to figure this one out. I have a BULKCOPY at the beginning and a COPY for the EVEN at the bottom. I know the IF STATEMENT goes somewhere in the middle but really can’t figure it out. any help would be greatly appreciated.

                      thank you.

                    • #71643
                      Gary Atkinson
                      Participant

                        First I would get rid of the BULKCOPY and copy out only what you need.  Right before your OBX iteration, put an IF based on what you don’t want in the OBX.  Off the IF add your iteration of the OBX.  So only OBX segments will copied IF is true.

                      • #71644
                        Sebastien Bazile
                        Participant

                          I don’t want the OBX SEGMENT at all. The company receiving the message has no use for it, therefore each message with an OBX SEGMENT errors out. I need to receive the message and be able to take it and remove the OBX SEGMENT before sending to outbound company.

                          thanks.

                        • #71645
                          Gary Atkinson
                          Participant

                            Then just make your OBX segment optional in your variant and DON’T USE BULKCOPY  ðŸ˜†

                          • #71646
                            Keith McLeod
                            Participant

                              Without getting too detailed.  You will need 2 things for this to be handled in the XLate.

                              1) In your outbound variant, make the OBX segment optional.  This way you have not removed the integrity of the segment order of your variant.  This only needs to occur on the message types you are working on.

                              2) pathcopy @null –> 1(0).0(0).OBX (This needs to be your unique path depending on your variant.)  If your path ends up looking like 1(0).0(0).OBX(0), you can remove the trailing ‘(0)’ after the OBX.  You want to use as much of the path to satisfy what you want removed.  If you are using any group iterates you may need to replace some of the path to reflect this…

                              Hope this helps….

                            • #71647
                              Sebastien Bazile
                              Participant

                                I went with your guys ideas but only getting partial of the message with the pathcopy.

                                For Exam:

                                MESSAGE 1

                                [0:TEST] Illegal pathcopy from “0(0).OBX(0)” (segment) to “0(0).OBX” (segment with automatic iteration).

                                0(0).MSH(0)  :  >|^~&|||||||ADT^A08||P|2.4<

                                0(0).EVN(0)  :  >|A08<

                                0(0).PID(0)  :  ><

                                0(0).PV1(0)  :  ><

                                thank you.

                              • #71648
                                Gary Atkinson
                                Participant

                                  What does you test message look like?  Run it through the hl7tester and make sure your copying correctly with your variant(s).

                                • #71649
                                  Kevin Scantlan
                                  Participant

                                    Does the outbound thread have it’s own HL7 variant?  If so, then simply remove the OBX segment from the message type of that variant.  Now the BULKCOPY will work and not send the OBX because it’s not defined in the output.

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