removing a sub -subfield

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf removing a sub -subfield

  • Creator
    Topic
  • #51231
    Cynthia Briscoe
    Participant

      I have a vendor who is sending data in a sub-subfield (tilde separated) that I have tried to write a translation to remove. Instead of removing the sub- subfield it removes the item before it.

      Here is how the segment looks:

      FT1|1|10||200910020850|200909300047|CH|36080023^TR LAP CHOLE^HL70132~50267^TR LAP CHOLE^HL70132|TR LAP CHOLE|TR LAP CHOLE|1|||0204420^^HL70049|||^^^M10||IP|||||2

      I am trying to remove the ~50267.

      I tried this in my xlate

      = >{0(0).FT1(0).00361.[2].[1]}

      When tested it removes everything in field 7 but the tilde and the number in this sub-subfield.

      I do not know the correct format for dealing with sub-subfields.  I know for just a subfield you utilize brackets [ but not sure what to use for sub-subfields.

    Viewing 4 reply threads
    • Author
      Replies
      • #69296
        Rob Parnell
        Participant

          The tilde is actually a repeating field identifier not a sub field delimiter.  You can set the field to not repeat in the variant

        • #69297
          Robert Milfajt
          Participant

            What Rob said, but it appears this is actually a repeating field to the vendor.  If that is the case, and you want to remove the second repeat altogether, I would iterate over the repeats and null out all subfields after the first iterate.

            Robert Milfajt
            Northwestern Medicine
            Chicago, IL

          • #69298
            Charlie Bursell
            Participant

              The simpliest method

              PATHCOPY @null => FT1.#7(1)

            • #69299
              Cynthia Briscoe
              Participant

                How do you set a FIELD to be non repeating.  In the version of cloverleaf that we have the only thing you can configure in the variant tool to be repeating or optional are segments not fields.

                For the xlate what would be the basis for the interate.  I made it a field but do not know what to put in basis.  It is part of the group numbered 1 but when I use this it does not work.

                I get the following error messages in the testing tool:

                0:TEST] Unable to get iteration basis address ‘1’.

                [0:TEST] Unable to compile XLT ‘DFT_SURG.xlt’.

              • #69300
                Cynthia Briscoe
                Participant

                  I tried the path copy method and it worked!  Thank you

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