Provider ID

  • Creator
    Topic
  • #50356
    Scott Smith
    Participant

    I am looking for the syntax for reading only the provider ID from OBR 16.  I cannot seem to remember the syntax for getting only value before ^.  Anyone?

Viewing 4 reply threads
  • Author
    Replies
    • #65733
      James Cobane
      Participant

      Scott,

      Within in an Xlate, you just need to map at the component level; i.e.

      COPY 1(0).1(0).0(0).OBR(0).00539(0).[0] –> 1(0).1(0).0(0).OBR(0).00539(0).[0]

      where [0] gets you the first component of the field….

      If you are doing this via tcl, then once you’ve split the segment into fields, you now need to split the field into components based on the component separator.

      Hope this helps.

      Jim Cobane

      Henry Ford Health

    • #65734
      Scott Smith
      Participant

      Jim,

      Actually I doing thru TCL.  I thought I found a piece of code, but it is still pulling the whole field instead of data before first separator.  Here is what I have so far:

               # get the field separator from the hl7 message

                 set fieldSeparator [crange $msg 3 3]

                 # get the field from the hl7 message

                 set OBRsegment [getHL7Segment $msg OBR]

                 set drNumber [getHL7Field $OBRsegment 16 $fieldSeparator]

      set obrFlds [split $OBRsegment $fieldSeparator]

                  set obr16 [lindex $obrFlds 16]

      echo $obr16

         set drNumber [crange $drNumber 0 3]

        set drNumberList $drNumber

      echo drNum:<$drNumber>

      Any help?

    • #65735
      Elizabeth Wilson
      Participant

      Scott;

      You need to also define subfieldseparator:

      set sfs [cindex $msg 4]

      and then split the field 16 on sfs.

    • #65736
      Michael Hertel
      Participant

      Quick & Easy:

      set drNumber [lindex [split [getHL7Field $OBRsegment 16 $fieldSeparator] ^] 0]

    • #65737
      Scott Smith
      Participant

      Thanks Mike.  worked like a charm.

Viewing 4 reply threads
  • The forum ‘Cloverleaf’ 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