OBX-5 set of characters replacement

Homepage Clovertech Forums Read Only Archives Cloverleaf Tcl Library OBX-5 set of characters replacement

  • Creator
    Topic
  • #51925
    Ganesan Murali
    Participant

    In ORU we have single OBX segment.

    In OBX-5 we have some special RTF characters like .in+0 or .br or .in-0 should be replaced by “~” tilda character.

    .in+0  Should be replace as ~

    .br Should be replace as ~

    .in-0 Should be replace as ~

    Input:

    OBX|1|FT|Text||

    .in+0\.br1.Lung Fields are clear..br\.br2.Both Domes of Diaphragm appears normal..br\.br3.No fracture seen..br\.br4.The thoracic bony cage appears normal..br\.br5.The Visualized spines appears normal..br\.brImp: Normal Chest radiograph.br\.in-0 ||||||f|||||

    Output:

    OBX|1|FT|Text||

    ~~1.Lung Fields are clear.~~2.Both Domes of Diaphragm appears normal.~~3.No fracture seen.~~4.The thoracic bony cage appears normal.~~5.The Visualized spines appears normal.~~Imp: Normal Chest radiograph~~ ||||||f|||||

    Pls help how we can doit through tcl. ?

    Thanks in advance.

Viewing 2 reply threads
  • Author
    Replies
    • #72329

      I think the tcl string map command would do the trick. There are some good posts on Clovertech discussing string map.

      -- Max Drown (Infor)

    • #72330
      Ganesan Murali
      Participant

      pls help me how use the string map command in xlt . Don’t know how to use. Thanks in advance.

    • #72331
      Mark McDaid
      Participant

      You could do this:

      Code:

      set segment [string map {”\.in+0\” “~”} $segment]
      set segment [string map {”\.br\” “~”} $segment]
      set segment [string map {”\.in-0\” “~”} $segment]

      Because the character signifies an escape sequence, you must escape it with an additional .

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

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,290
Replies
34,422
Topic Tags
286
Empty Topic Tags
10