Suppressing Segments

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Suppressing Segments

  • Creator
  • #50570
    Sandi Meyers

    I am fairly new to this and to this forum so have mercy on me if this question has been asked before or is fairly simple.

    I am trying to build an xlate to suppress an OBX segment if the OBX 5 is null.  The inbound HL7 is 2.4 so the OBX is a ‘supposed’ nonrepeating segment within a repeating group, within a higher repeating group.

    I built an iterate on the outside group, an iterate on the inside group, an IF statement on the inside iterate , if OBX5 is not null, and then a pathcopy.  It is suppressing the OBX5 field but allowing the rest of the segment.

    Any ideas what I am doing wrong? 😕   😳

Viewing 7 reply threads
  • Author
    • #66646
      Tom Rioux

      Are you using a bulkcopy in your xlate?  Do you have any other pathcopy’s for an OBX segment anywhere else in your xlate?  It sounds like your IF logic may be working out of sync with some other logic in your xlate.  Can you post some of your xlate?

    • #66647
      Sandi Meyers

      Actually yes I am using a Bulkcopy.  The original xlate worked but the receiving system had problems with blank OBX 5 segments.  So I am using the original xlate and added the iterates at the top.

      I am not sure if I added this correctly.  I am using the GUI versionof building an xlate so I copied the file.

    • #66648
      Jim Kosloskey


      First of all there is no need to apologize.

      We have all been exactly where you are at and this forum is here to help you matriculate.

      If your PATHCOPY does not reference the segment as the target but rather a field in the segment, you will see only the field targetted removed and not the whole segment.

      I think that is what you are experienceing (that is the segment is still there but one field is nulled).

      Another thing to make sure is the OBX segment in the outbound variant is configured as optional (it probably is but make sure).

      If a segment is not defined as optional (it is required) then it will get generated by the Xlate even if you never populate any fields.


    • #66649
      Sandi Meyers

      I double checked and as far as I can see I am referencing the whole segment and not the field.

      Yes the segment is there but the field is not.

      And the OBX is optional.

      I thought maybe I had the iterate reference wrong.

      On the IF statement I have  1.(0).1(%g1).1(0).OBX.#5(0) ne @null

      and on the Pathcopy I have


    • #66650
      Tom Rioux


      You mentioned something about an iterate on the “inside” group and and iterate on the “outside” group.  I’m assuming these are nested group iterates (an iterate inside an iterate).  If this is the case, then your reference is probably missing a group iterate variable.  It should look something similar to this (depending on your variant structure):

      1.(0).1(%g1).1(%g2).OBX.#5(0) ne @null

      Then your pathcopy should be something like:


      Hope this helps….

      Tom Rioux

      Baylor Health Care Systems

    • #66651
      John Zalesak

      I had a problem in a similar situation.

      “It” would not let me just not copy it if I did not want it.  I had to copy a null to the output to make it work.  Not sure what the difference is.  When I copied the null to the output, nothing showed up there, which is what I wanted.

      It was one of those where you really don’t know why, you just tried enough different things to finally find one that works and you just move on.

      Hope this helps.  If not, just keep asking.  Eventually the problem, whatever it is, can be solved.

    • #66652
      Jim Kosloskey


      If you are using BULKCOPY in your Xlate all fields, segments, etc in the inbound message will be copied to the outbound BEFORE you do anything else.

      In that case the segment you do not want is already there and you need to get rid of it.

      If you do NOT use BULKCOPY, then any optional segment you do not populate every field WILL NOT be created.

      Personally I rarely use BULKCOPY.


    • #66653
      Sandi Meyers

      There were two problems.

      The BULKCOPY was the biggest.  As soon as I removed that I got better results.  I also had to fix the the reference on the iterate.

      Thanks all for your great help.  It was my first solo xlate without the help of paid support.


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

Forum Statistics

Registered Users
Topic Tags