Pulling date from rtf

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Pulling date from rtf

  • Creator
    Topic
  • #49892
    Gary Atkinson
    Participant

      Any suggestions on how to pull the date out this segment?

      OBX|52||||* MERGEFORMAT }}{Efldrslt {Efs22Elang1024Elangfe1024Enoproof 02/27/2008}}}{Efs22

      The message is an MDM^T02 and the OBX:5 contain the rtf in question.  The procedure date always occurs in 52nd OBX.  I need to see if I can grab this date and copy it to TXA:4.  I am not sure how to single out just the date 😕

    Viewing 1 reply thread
    • Author
      Replies
      • #64025
        Tom Rioux
        Participant

          I’ve never worked with rtf data so maybe I’m over-simplifying this but would this work once you have your OBX-5 data:

          set a [string first / $obx5]

          set rtf_date [string range $a [expr $a -2] [expr $a +7]]

          It seems to work for me in hcitcl but not sure how it may work for you in what you are attempting to do.

          Tom Rioux

        • #64026
          Gary Atkinson
          Participant

            Thanks Thomas for Tcl code.  The issue is the receiving system wants the procedure date in time in TXA:4.  This is the most accurate date, since the doctors dictate days after the actual procedure.  In the 52nd OBX is where I is see the procedure date and time.  So, my theory is I can iterate through the OBXs, find the 52nd one, put the date in a temp variable and then copy to TXA:4.  I haven’t tried doing something like this before, so I welcome any suggestions or comments.  Thanks again for you help  ðŸ˜€

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