ITERATE OVER OBR

  • Creator
    Topic
  • #50917
    Femina Jaffer
    Participant

    Hello Everyone,

    I am having difficulty changing the value of OBR 16.0 wtih a specific value from a table.  I have multiple OBR’s and I need to change each occurence of OBR16.0 (ID) with a value.  I have tried to do an iterate using a group or a segment, with no luck.  I can only change the first value.  

    Please advise???

    Here is my basis:

    2(0).1(0).0(0).OBR

    2(0).1(0).0(0).OBR(0)  :  >|1|2762^LAB||HBSAG^HEPATITIS B SURFACE ANTIGEN^L|||200905211346|||||||200905211346||19026^FITZGERALD^RICK^J^^^MD||||||||LAB|||^^^^^R< 2(0).1(0).0(0).OBR(1)  :  >|2|2762^LAB||HCVAB^HCV ANTIBODY^L|||200905211346|||||||200905211346||FITZRIC^FITZGERALD^RICK^J^^^MD||||||||LAB|||^^^^^R< 2(0).1(0).0(0).OBR(2)  :  >|3|2762^LAB||HBSABT^HEPATITIS B SURFACE ANTIBODY^L|||200905211346|||||||200905211346||FITZRIC^FITZGERALD^RICK^J^^^MD||||||||LAB|||^^^^^R< Thank you, Femina

Viewing 0 reply threads
  • Author
    Replies
    • #68000
      Keith McLeod
      Participant

      Ususally the OBR segment is part of the repeating group that contains your ORC segment as well.  To be able to determine where to iterate, you need to segments are contained within the group that repeats.

      If you open your variant to the message you are translating and work you way down by clicking on the open curly braces that surround more than one segment, it will highlight what is part of the group.  For instance in the following if you were to click on the curly brace under the SFT segment, it would highlight nearly all of the segments.  All the segments highlights are contained within group 1(lets call it that).  Your iterate would be

      Type: group

      Basis: 1

      Variable: %g1

      The next curly brace to click on would be right before the ORC grouping.  It would contain most of the segments below the ORC.  Your iterate would be:

      Type: group

      Basis: 1(%g1).1 (Note that the second group is contained inside the first group.)

      Variable: %g2

      Your OBR:16.0 statement would look something like:

      Using Table Command:

      1(%g1).1(%g2).0(0).OBR.#16.[0] –> 1(%g1).1(%g2).0(0).OBR.#16.[0]

      Disclaimer:  The actual path depend on your variant configuration.  This one is from a 2.5 variant.  The steps are basically the same for any vairant.

      If the curly braces only surround the segment name, then it is the segment that repeats.  The First OBX is part of a group where OBX is bundled with a repeating NTE segment.  i.e. each OBX can have multiple NTE segments.  The OBX grouping would be:

      Type: group

      Basis: 1(%g1).1(%g2).3(0).0 (Note that the OBX group is contained inside the ORC group.)

      Variable: %g3

      Your pathcopy statement would look like:

      1(%g1).1(%g2).3(0).0(%g3).OBX –> 1(%g1).1(%g2).3(0).0(%g3).OBX

      If you need to go inside the bundled NTE, the segment NTE repeats>

      Type: segment

      Basis: 1(%g1).1(%g2).3(0).0(%g3).NTE (Note that the NTE segment is contained inside the OBX group.)

      Variable: %s1

      Sample NTE:

      1(%g1).1(%g2).3(0).0(%g3).NTE(%s1).#1 –> 1(%g1).1(%g2).3(0).0(%g3).NTE(%s1).#1

      MSH

      [{ SFT } ]

      {

         [

            PID

            [ PD1 ]

            [{ NTE } ]

            [{ NK1 } ]

            [

               PV1

               [ PV2 ]

            ]

         ]

        {

             [ ORC ]

             OBR

             [{ NTE } ]

             [

                {

                    TQ1

                    [{ TQ2 } ]

                }

             ]

             [ CTD ]

             [

               {

                  OBX

                  [{ NTE } ]

                }

             ]

             [{ FT1 } ]

             [{ CTI } ]

             [

                 {

                     SPM

                     [{ OBX } ]

                 }

              ]

          }

      }

      [ DSC ]

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

Forum Statistics

Registered Users
5,074
Forums
28
Topics
9,252
Replies
34,241
Topic Tags
275