Replace caret ^ with pipe

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Replace caret ^ with pipe

  • Creator
    Topic
  • #50743
    Amol Kulkarni
    Participant

    This is a strange request but has anyone replaced the sub field deliminators from {^} to {|}  [ caret to pipe) within a filed.

    I have a request from the TDS group (TDS 7000) that in order to file an update to a specific field i should replace the caret to pipe in the PID.3 field.

    PID.3 = MRN^HOSP ID^PDF NO^EPISODE NO to |MRN|HOSP ID|PDF NO|EPISODE NO|PID.4 field.|

    Any ideas and thank you all for the help and tips that you creative clovertechies provide.

    Amol

    Mount Sinai Med Ctr

    New York

Viewing 5 reply threads
  • Author
    Replies
    • #67327

      I think you need to dig a little deeper into what they actually need. It does not make sense for them to all of a sudden, for one particular field, ask you to ignore the HL7 field and subfield delimiters.

      If it turns out that you have to replace the ^ for pipes in this case, you will most likely need to use an xlate post-proc.

      Can you paste an inbound sample message and a correct outbound sample message?

      -- Max Drown (Infor)

    • #67328
      Jim Kosloskey
      Participant

      Amol,

      I agree with Max that this makes no sense.

      Once you make the carets in this one field vertical pipes, PID-3 no longer becomes PID-3 it now becomes PID-3, PID-4, through PID-6 and your original PID-4 becomes PID-7.

      I suspect that should throw everything in the PID off and possibly you will lose some of the fields at the end of the PID.

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

    • #67329
      Amol Kulkarni
      Participant

      Max and Jim,

      Totally agree with you, takes away from the standard.

      I did follow up with TDS group, and the answer was too easy.

      All they wanted was to take the sub fields and map these data elements to the next field, i.e MRN = PID3, the hosp ID = PID.4 and so on.

    • #67330
      Bala Pisupati
      Participant

      Amol,

      I had a similar case where I had to change the ~ to ^, you can do this two ways, you can either write a tcl or if you have an xlate you can write a small tcl on the field.

      ex:

      set var $xlateInVals

      regsub -all

    • #67331
      Tom Rioux
      Participant

      Bala,

      Be careful when doing manipulation such as that using the HL7 encoding characters.  Remember that the regsub you mentioned with the tilde and caret affects the subfields within a particular field.   If you were to attempt to regsub either of those with a pipe, then you affect the whole structure of the entire segment, as Jim pointed out.

      Thanks…Tom

    • #67332
      Bala Pisupati
      Participant

      Thanks for the info I was not aware of that.

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

Forum Statistics

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