Removing the decimal point in the Diagnosis Code

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Removing the decimal point in the Diagnosis Code

  • Creator
    Topic
  • #51167
    Kevin Wade
    Participant

    OK, I plead ignorance when it comes to TCL code. I have just been informed that the Diagnosis Codes that are being sent to Quest need to have the decimal point removed from the code. The code is listed in DG1-3 and so the decimal pioint will need to be removed and the code sent without it. I can remember from class that there is a way to find the DG1 segment (could be more than 1) and then DG1-3 and strip out the decimal. I remember something similar with SSN’s and the dashes. Unfortunately my laptop crashed and I have lost a lot of the TCL code that we produced in class (should have backed up). Can anyone help me get this setup or has anyone else had to do this?

Viewing 2 reply threads
  • Author
    Replies
    • #69015

      Here’s how I would do it, although I’m sure Charlie and Jim and others will have other ways, too.

      I would use a tcl fragment in the xlate like this:

      Code:

      regsub -all {.} [lindex $xlateInVals 0] “” tmp; set xlateOutVals [list $tmp]

      Obviously, there are other perfectly good ways to do it, like string map.

      -- Max Drown (Infor)

    • #69016
      Jim Kosloskey
      Participant

      Kevin,

      If you are using an Xlate, ITERATE through the GT1 segment (or group depending on your message structure).

      Then at the appropriate field COPY Action (inside the ITERATE) reference a Tcl proc or insert Tcl code to remove the period. You could use string map or regsub Tcl command.

      If you want a proc for doing a regsub, email me and I will send it to you for use or reference.

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

    • #69017
      Jim Kosloskey
      Participant

      Max,

      In my case, not necessarily ‘better’ just ‘different’ and ‘preference’.

      There are a lot of ways to solve each problem. Everyone needs to determine what they prefer to do.

      Seeing differnt potential solutions provides us with options – options are good.

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

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

Forum Statistics

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