copy command

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf copy command

  • Creator
    Topic
  • #54999
    RUDY RAMOS
    Participant

      Hi, I am trying to copy

      TXA12, TXA10.1 and TXA10.2 into TXA16

      I already have an Xlate, but when I use the copy command below it only copies TXA12, but not TXA10 into TXA16.  I am separating the fields by a space. I also tried the CONCAT and it did the same thing. Please assist

      ource                                                                        Destination

      COPY 0(0).TXA(0).#12(0).[0] 0(0).TXA(0).#10(0).[0] 0(0).TXA(0).#10(0).[1]     0(0).TXA(0).#16(0)

      Rudy Ramos

      480-495-9024

    Viewing 16 reply threads
    • Author
      Replies
      • #83735
        Jim Kosloskey
        Participant

          The TXA-10 field can be 60 characteers long and the TXA-12 an be 30 characters long but the TXA-16 is only defined to hold 30 characters.

          Is the length of the data in the source fields when added together longer than 30?

          If so you will need to modify your variant to make TXA-16 bigger.

          Oh and you wil need to use CONCAT I think – I don’t think COPY will work in this case.

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

        • #83736
          RUDY RAMOS
          Participant

            I did use the concat command, but it still only place TXA12 into TXA16

            I don’t mind if it truncates once it gets into TXA16, but I do need to place as much data as possible into TXA16. Why is it only copying TXA12, and not TXA10?

            Source

            Concat

            0(0).TXA(0).#12(0).[0]

            0(0).TXA(0).#10(0).[0]

            0(0).TXA(0).#10(0).[1]

            Destination

            0(0).TXA(0).#16(0)

          • #83737
            RUDY RAMOS
            Participant

              is there a way to specify, say 8 characters from field txa12, 7 characters from TXA10.1 and 15 characters from TXA10.2?

            • #83738
              Jim Kosloskey
              Participant

                Is the data in TXA-12 equal to or greater than 30 characters? If so there is your answer.

                TXA-12 and TXA-10 are multiple component fields, TXA-16 is a String (single component). Do the TXA-12 and TXA-10 fields in your input actuallly have more than one component?

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

              • #83739
                RUDY RAMOS
                Participant

                  TXA Segment

                  TXA|1|2||||20160217111900|20160217111942||123456^TEST^DOCTOR ONE|123456^TEST^DOCTOR ONE|01343^MINUTEMAID^DEBRA^S|64587||||64587|PA

                  TXA12 Value=64587

                  TXA10.1 =123456

                  TXA10.2 = TEST

                  The onlything that is placing on TXA16 is TXA12(64587)

                  I need to place all three into TXA16.

                • #83740
                  Jim Kosloskey
                  Participant

                    Interesting.

                    What release of Cloverleaf?

                    Can you target the CONCAT to a temp variable and then COPY that to TXA-16 and does that give you what you want?

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

                  • #83741
                    Jim Kosloskey
                    Participant

                      Also have you tried

                      0(0).TXA(0).#16(0).[0]  for the destination (note the component notation).

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

                    • #83742
                      RUDY RAMOS
                      Participant

                        Version 5.8

                      • #83743
                        RUDY RAMOS
                        Participant

                          Yes, I just tried the destination notation below and I get the same result on TXA16 (only TXA12 included in TXA16

                          0(0).TXA(0).#16(0).[0]

                        • #83744
                          Jim Kosloskey
                          Participant

                            Have you tried CONCAT to a temp variable then COPY the temp variable to TXA-16?

                            Do you knoow what patch level of 5.8? I think the best patch level to be at on that release is 5.8.5. I am not sure you can even get that anymore.

                            Probably past time to consideer an upgrade..

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

                          • #83745
                            RUDY RAMOS
                            Participant

                              I used copy temp variables

                              copy txa12.0 into @docid

                              copy txa10.0 into @physid

                              copy txa10.1 into @physname

                              CONCAT

                              @docid

                              =-

                              @physid

                              =-

                              @physname

                              DEST

                              TXA16.0

                              Output Below,it still copies only txa12

                              TXA|1|2||||20160217111900|20160217111942||123456^TEST^DOCTOR ONE|123456^TEST^DOCTOR ONE|01343^MINUTEMAID^DEBRA^S|64587||||64587- – |PA

                            • #83746
                              Jim Kosloskey
                              Participant

                                CONCAT

                                TXA-12[0]

                                TXA-10[0]

                                TXA-10[1]

                                Destination

                                @myvar

                                then

                                COPY

                                @myvar –> TXA-16.

                                Try the above.

                                Also check to make sure there are no Xlate Actions following this work which put anything in TXA-16 as that will overwrite what you are doing here.

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

                              • #83747
                                RUDY RAMOS
                                Participant

                                  I just realize that my original concat command would have worked, my issue was that I was copying TXA9 into TXA10, so I was trying from the inbound message, but the inbound TXA10 was empty only the outbound TXA10 field was populated. I should have used the outbound TXA field as the source so that it should have worked. Hope it helps anyone who is trying to do the same thing.

                                • #83748
                                  Russ Ross
                                  Participant

                                    Your test outcome of

                                    |64587- – |

                                    makes me suspicious your HL7 path definition for TXA-10.1 and TXA-10.1 might be off or nothing exists in those locations.

                                    Try running 3 separate tests of a straight copy for each item you want to eventually concat to make certain you get that working first before trying to concat them.

                                    Russ Ross
                                    RussRoss318@gmail.com

                                  • #83749
                                    Russ Ross
                                    Participant

                                      Well I see by the time I got around to posting you figured it out.

                                      I was looking for a very old proc I thought I wrote to squeeze/caoncat multiple fields into a trimmed down version but it took me a while to realize I started it but never finished.

                                      Russ Ross
                                      RussRoss318@gmail.com

                                    • #83750
                                      RUDY RAMOS
                                      Participant

                                        Russ, thanks for your response.

                                        I was cpturing data from the inbound message, instead of grabbing the already change data from the outbound message.

                                        TXA10 from inbound message was blank, but TXA10 from outbound message was populated.

                                        Thanks for your assistance.

                                      • #83751
                                        Jim Kosloskey
                                        Participant

                                          So the bottom line is the CONCAT was working properly and no need for Tcl in this case.

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

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