replace ~ with a –

Homepage Clovertech Forums Read Only Archives Cloverleaf Tcl Library replace ~ with a –

  • Creator
    Topic
  • #51509
    Steven Lindsey
    Participant

    I’m a newbie at this.  I have an Xlate already and I was going to add a tclproc to the OBR_44 to remove ~ to a -.  What is the best way to do this?  Here is an example.

Viewing 5 reply threads
  • Author
    Replies
    • #70554

      The ~ is actually the repeating field delimiter (probably). You could do a concatenation in the xlate to get the desire results. Holler if you need more detail.

      -- Max Drown (Infor)

    • #70555
      Steven Lindsey
      Participant

      i need more detail.  Im not sure what you mean

    • #70556

      In HL7, fields can repeat. Do you see a ~ in MSH.02? If so, then the tilda is the repeating field delimiter.

      ZFL|ONE^TWO^THREE~ABC^DEF^GHI|||||

      So in the ZFL segment that I just made up, ZFL.01 repeats. ZFL.01(0) is “ONE^TWO^THREE” and ZFL.01(1) is “ABC^DEF^GHI”.

      In your xlate, you can iterate over the field (OBR.44).

      -- Max Drown (Infor)

    • #70557
      Steven Lindsey
      Participant

      I still can

    • #70558
      David Barr
      Participant

      You probably need nested iterates: one for the group and one for the field. I could be wrong–I rarely use translations.

    • #70559
      Jim Kosloskey
      Participant

      Normally OBR-44 is not a repeating field (probably why the receiving system needs the change).

      Having said that, you will indeed need nested iterations. Also your basis for the OBR Group Iteration might be incorrect

      Inside the OBR Iteration, you will need a field ITERATE for OBR-44.

      Then inside that iteratin you will need a CONCAT that references the current occurrence of the OBR group AND the OBR-44 field as well as the outbound OBR-44 field (repetition 0 (1).

      Something like this:

      ITERATE – OBR Group

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

Viewing 5 reply threads
  • The forum ‘Tcl Library’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,296
Replies
34,439
Topic Tags
287
Empty Topic Tags
10