2 separate NTEs in same group combined into single NTE

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf 2 separate NTEs in same group combined into single NTE

  • Creator
    Topic
  • #54557
    Gregg Price
    Participant

      I’m having problems with an XLT for an ORU message from our lab system to EPIC.  The sending lab system has 2 NTE segments in the same group while the receiving system only has 1 NTE segment in that group (NTE segments can repeat).

      My expected solution is to combine the 2 inbound NTE segments into the 1 outbound NTE segment.

      Problem 1: Both NTE segments in that group appear to have the same designation, 1(0).0(0).NTE(0), so I’m having a problem copying both of them to the outbound.  If I try to copy only the first NTE, it copies the 2nd NTE instead even though I didn’t try to copy the 2nd.  Copying only the 2nd NTE works correctly.

      Problem 2: If I want to combine the NTE segments into 1 repeated NTE outbound segment, how do I iterate the outbound correctly?

      Pathcopy 1(%g1).0(0).NTE(%s1) => 1(%g1).0(0).0(0).NTE(%s1) should create the first set of outbound NTE segments(once the first problem is solved)

      Pathcopy 1(%g1).0(0).NTE(%s2) => 1(%g1).0(0).0(0).NTE(%s1+%s2)  ?????  

      I’m not sure how to index the 2nd group of NTE segments behind the 1st group.

      Server is 5.7PRev2

      Thanks

    Viewing 7 reply threads
    • Author
      Replies
      • #81955
        Jim Kosloskey
        Participant

          Gregg,

          Run the message through the HL/7 tester using the inbound variant. You should see the value in the parentheses follwoing the NTE change

          NTE(0) and NTE(1) <– for two NTE segments.

          If you do noot we will need to see the actual output from the tester.

          It is possiblle your variant and the data presented do not match.

          As for combiniing, the receiving system needs to tell you how they want these combined.

          Typically the meat of the NTE is NTE-3 which is a repeating field. So when NTE segmmments need to be combined frequently we just make each NTE segment’s NTE-3 value a repetition of the target NTE-3.

          However, if other NTE fields (like NTE-2 for instance) have importance in relationship to the values in NTE-3 then more work may nneed to be done.

          So how do the NTE segment need to combine into one?

          The notation you are tryig to use won’t work and I doubt a segment level PATHCOPY will be of much use.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #81956
          Gregg Price
          Participant

            Good idea on the HL7 Tester

            Here is what the actual inbound message contains in that section:

            ORC|RE|

            NTE|1||A copy of this report will be faxed to:  Dr. Parikh.br|||

            OBR|1|

            NTE|1||Please fax to Dr. Parikh 507-266-xxxx.br|||

            The attached file shows how the inbound format views the message – the first NTE segment is a copy of the 2nd NTE segment.  It does not recognize the first NTE.

            I’m trying to build the outbound to look like:

            ORC|RE|

            OBR|1|

            NTE|1||A copy of this report will be faxed to:  Dr. Parikh.br|||

            NTE|2||Please fax to Dr. Parikh 507-266-xxxx.br|||

          • #81957
            Jim Kosloskey
            Participant

              Gregg,

              OK now I see.

              Make either the ORC/NTE or the OBR/NTE pair a group within the group like this”

              {

               [

                 ORC

                 {[NTE]}

                ]

                OBR

                NTE

              .

              .

              .

              Now the two NTEs will be in different Groups and have different address paths.

              Of course this means the address paths are likely to change for everything so you may have some rework to do.

              Did you find out how you are supposed to combine into one? Also does the receiving system want the NTE after the OBR as is normal and noot one afteer the ORC (abbie normal)?

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #81958
              Gregg Price
              Participant

                I was worried the change would require a different group and corresponding changes to segments following that group.

                Thanks for your help.

              • #81959
                Gregg Price
                Participant

                  And, yes, the receiving system wants it after the OBR.

                • #81960
                  Jim Kosloskey
                  Participant

                    But how do they want the 2 NTE segment’s data combined into one?

                    email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

                  • #81961
                    Gregg Price
                    Participant

                      The receiving system wants the NTEs combined into one area of the message as multiple NTEs – not one NTE segment.

                      We’re checking to see if the sending system can put the first NTE group next to the second NTE group.

                    • #81962
                      Terry Kellum
                      Participant

                        The way I have approached this in the past, is to create an iterate over both segments of the NTE at the segment level, say S1 and S2.

                        When you get to S2, you set your BASIS to S2, and your TARGET to S1, and then use an ADD to increment S1 by one after you copy the segments.  You copy the fields and use S1 for the NTE[1] segment number and to point to your created NTE. You can also manage your own segment pointers as needed.  The idea is that the iterate moves anything that is there, and then the second iterate builds on top of that stack of NTEs.

                        That insures that you get whatever is there, and you add on whatever is below.   If these segments are nested in different groups, you will need to pay attention to the higher level iteration (Gx) variables and keep them straight as well.

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