Need assistance with translation

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Need assistance with translation

  • Creator
    Topic
  • #52474
    Ian Morris
    Participant

      In the attached screenshot you can see we are doing some translation logic that helps us populate OBR 263.1.  The application owner has asked us to make an adjustment to the logic so that it does this instead:

      If obx 573.1 exists then copy obx 573.1 to obr 263.1

      If obx 573.1 does not exist then copy obx 573.0 to obr 263.1

      I’m not quite sure how to accomodate this request.  I’ve run into something like this in the past.  However, if I attempt to pull obx 573.1 and it doesn’t exist, then I get a translation error.

      I’m not sure how to pull a potentially non-existant obx 573.1 and have the translation still successfully complete.

    Viewing 2 reply threads
    • Author
      Replies
      • #74357
        Tom Rioux
        Participant

          Try performing an IF/ELSE statement to do this.   IF the IB value is what you need, then move .1 over to the destination, IF it isn’t what you need, then move the .0 over to the destination field.

          Hope this helps…

          Tom

        • #74358
          Jim Kosloskey
          Participant

            Ian,

            In order to check whether a field is populated (‘exists’) do an IF Action checking the field ne @null.

            If there is something in the field then thie above will evaluate true. Thne in your else you can do what you want if there is nothing in the field.

            No Tcl actually necessary (depending on Cloverleaf release since the IF action is not available in older releases).

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

          • #74359
            Ian Morris
            Participant

              Thanks for the tip.  I found this in another post…

              Code:


              Code:
              0(0).MSH(0).#10(0).[0]  eq @null

              It looks like what I’m after.

              Jim Kosloskey wrote:

              Ian,

              In order to check whether a field is populated (‘exists’) do an IF Action checking the field ne @null.

              If there is something in the field then thie above will evaluate true. Thne in your else you can do what you want if there is nothing in the field.

              No Tcl actually necessary (depending on Cloverleaf release since the IF action is not available in older releases).

              [/code]

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