Changing the value of PV1-4 based on on the table values

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Changing the value of PV1-4 based on on the table values

  • Creator
    Topic
  • #55555
    Albert Sinha
    Participant

      I need the following to happen:

      If PV1:4 is 4 then copy

    Viewing 6 reply threads
    • Author
      Replies
      • #85731
        Charlie Bursell
        Participant

          I don’t understand.  It looks like you have defined a bi-directional table when only one is required.  Note in/out the same.  Also you have no default value.

          With the table properly configured it should be a simple Table Lookup in your Xlate.

        • #85732
          Albert Sinha
          Participant

            The table is only

            In  out

            4    N

            PVI-4  when  4 needs to be replaced by N

            Should I do

            TABLE   PVI#4 -> PV1#4

            or do a COPY    source =4   destination  pv1#4

            Thanks, really will appreciate anybody helping out

          • #85733
            Jim Kosloskey
            Participant

              If that is all you need to do I would use an IF Action.

              IF PV1-4 == =4

                 COPY =N –> PV1-4

              If you want PV1-4 to reflect what is in PV1-4 when PV1-4 is not equal to 4 then add an ELSE to the IF and COPY PV1-4 –> PV1-4.

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

            • #85734
              Albert Sinha
              Participant

                DATECOPYopt

                BULKCOPY

                 IF  PVI#4 == =4

                     COPY  N -> PV1#4

                ELSE  COPY PV1#4 -> PV1#4

                I am getting error message

                ‘  MSH header segment missing in HL7 message’

                Testing via the test tool

                Appreciate any help

              • #85735
                Robert Milfajt
                Participant

                  So not sure why you’re not using TABLE command here.  Use what you had, i.e., single entry in table to map 4 to N.  Check the radio button that says Use Original Value, then just have TABLE command in Xlate with PV1-4 going to PV1-4 using your table.  Should do what you want without any need for Boolean logic in your Xlate.

                  Hope this helps,

                  Robert Milfajt
                  Northwestern Medicine
                  Chicago, IL

                • #85736
                  Jim Kosloskey
                  Participant

                    Regarding your error message – I think your data is not correct. Could be improper segment end character or something else.

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

                  • #85737
                    Dustin Sayes
                    Participant

                      I agree with Jim.

                      Sounds like either a bad message or bad end of line characters.

                      You’ll need to set your testing tool to use New Line or Length Encoded, per your message requirements.

                      If you are not sure about your end of line characters; I use notepad++ to show all characters, then under the edit menu “EOL Conversion” select  “(CR)”. this will add a Carriage Return to the end of each line and a CRLF after the last line in the file – you’ll use “EOF Termination” in the testing tool.

                      Hope this helps…

                      Regarding your table lookup. If you only have 1 value to translate to, then just do an if statement in the xlate, else, if you have many values then use the lookup table.

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