ORM Msg has OBX need help with iteration

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ORM Msg has OBX need help with iteration

  • Creator
    Topic
  • #52534
    Femina Jaffer
    Participant

      Hello,

      I am having a very hard time with an ORM message that needs to remove the OBX segment if the OBX 5 fld is “**”.  However, I am not getting the iterationt o work.  It is only displaying the first OBX.  The output file has the OBX set to optional.  Please advise.

      Iteration basis:

      group

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

      variable = %g1

      ->IF 2(0).1(0).1(0).0(%g1).OBX(0).#5 eq @tmp

      —>PATHCOPY @null


      >1(0).1(0).1(%g1).OBX

      Any assitance would be very appreciated!

      Thanks

      Femina

    Viewing 4 reply threads
    • Author
      Replies
      • #74598
        Femina Jaffer
        Participant

          I forgot to include would the output looks like( only 1 OBX is displayed when there should be several).

          MESSAGE 1

          0(0).MSH(0)  :  >|^~&|SUNQUEST|FOSQ|POWERPATH||20110610104057||ORM^O01|20111610000001|T|2.2<

          1(0).PID(0)  :  >|||AAAA2242^^^1|123654|TEST^ALPHA^JOY||19550101|F||||||||||222L714^22420610<

          1(0).PV1(0)  :  >||O|CORE||||520C|C||||||||||OP|22420610<

          2(0).0(0).ORC(0)  :  >|NW|||||||||||520C^HLIS DEPARTMENT|ISTEST<

          2(0).1(0).0(0).OBR(0)  :  >|1|F16604||PAPFP^PAP Focal Point|||201106101037|||106||||201106101040||520C^HLIS DEPARTMENT||||F16604||||SCYL||PAPFP^PAPFP|^^^^^R<

          2(0).1(0).1(0).0(0).OBX(0)  :  >|1|ST|REFHPV^Reflex HPV**|1.1|NO||||||F<

        • #74599
          Levy Lazarre
          Participant

            Hello, Femina

            I believe that your issue is caused by the use of BULKCOPY followed by PATHCOPY @null.

            Typically, you should refrain from using BULKCOPY when the input and output segment paths are different, like in the case of your OBX segments. PATHCOPY is a better choice, for more granular control.

            If you notice, the path for your outbound OBX segments is 1(0).1(0).1(%g1).OBX, yet your sample output is showing 2(0).1(0).1(0).0(0).OBX(0), which is not the expected path. I suspect that the PATHCOPY @null is copying @null to all the remaining OBX segments.

            If I were you, I would remove the BULKCOPY copy statement and rather do a specific PATHCOPY for each segment (MSH, EVN, PID

          • #74600
            Femina Jaffer
            Participant

              Thanks Levy and Jim K!

              Jim K pointed out the BULKCOPY and another glitch in the variant we were using.  That corrected the problem.

              Thanks again Levy and Jim K !  I really do appreciate your help.

            • #74601
              Femina Jaffer
              Participant

                Hello again,

                With the same Xlate and within the same IF statement I have added an OR (||; however, when I add the OR logic the statement does work.   It is working perfectly before the extra criteria that is requested.  Please advise.

                2(0).1(0).1(%g1).0(0).OBX(0).#5(0) ne @tmp  || 2(0).1(0).1(%g1).0(0).OBX(0).#5(0) ne =NOT GIVEN

                Thanks!

                Femina

              • #74602
                Levy Lazarre
                Participant

                  Hello Femina,

                  I think you should place the second string (=NOT GIVEN) in a variable as well (say @tmp2) then use that variable in the IF statement, the same way you did for @tmp. It appears that the Cloverleaf parser works better that way.

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