Concatenate parenthesis with a variable

Homepage Clovertech Forums Cloverleaf Concatenate parenthesis with a variable

  • Creator
    Topic
  • #114999
    Rich
    Participant

    Team,

    I need to pull the value from PID.13.6, put it into a variable, then concatenate it with parenthesis around it.  I’d like to use an XLT for this.

    1. How do I pull the value, and put it into a variable?
    2. How do I use concat to “(” + variablename + “)” ?

    Thank you!

Viewing 1 reply thread
  • Author
    Replies
    • #115000
      Rob Abbott
      Keymaster

      COPY PID.13.6 -> @variable

      CONCAT =( @variable =) -> @variable

      on the CONCAT operation, make sure each element is on a separate line in the input box, e.g.

      =(

      @variable

      =)

      Rob Abbott
      Cloverleaf Emeritus

      • #115004
        Rich
        Participant

        Thank you for the quick reply!

        When I copy @ac back to pid, I get the literal value “@ac” in my HL7 message.  What did I do wrong?

    • #115001
      James Cobane
      Participant

      You should be able to CONCAT your input value with the parentheses directly into your output field.  Let’s assume you want to CONCAT your PID:13.6 value.  In your input (source) list of the CONCAT statement it would be:

      =(
      0(0).PID(0).#13(0).[5]
      =)

      • This reply was modified 4 years, 8 months ago by James Cobane.
      • This reply was modified 4 years, 8 months ago by James Cobane.
      • #115005
        Rich
        Participant

        That worked perfectly, thank you!

Viewing 1 reply thread
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,447
Topic Tags
288
Empty Topic Tags
10