Segment Label

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Segment Label

  • Creator
    Topic
  • #48898
    Ricci Graham
    Participant

      Does anyone know of a way to change the “segment” label?

      Here is my situation. I am bringing in a standard HL7 ADT record, but the system I am sending it to, wants the record to come in with the “header record” named HDR insteaed of MSH and the “Patient record” named PAT instead of PID, etc. So does anyone know how do to this?

      Any suggestions would be greatly appreciated.

      Ricci

    Viewing 2 reply threads
    • Author
      Replies
      • #60038
        Anonymous
        Participant

          Here is something quick and dirty to place in the Outbound TPS:

          run {

               keylget args MSGID mh

              set msg [msgget $mh]

              set msg [replaceHL7Field $msg “MSH” 0 HDR]

              set msg [replaceHL7Field $msg “PID” 0 PAT]

              msgset $mh $msg

             set dispList “{CONTINUE $mh}”

                   }

          return $dispList

          Hope this helps…..

          Tom Rioux

        • #60039
          Russ Ross
          Participant

            My first thought would be to copy the inbound HL7 variant that you are using to a new outbound HL7 variant.

            Then use a copy of the MSH segment to create a new segment HDR segment in your case.

            Do the same with the PID to create the new PAT segment.

            Then use the Xlate to copy all the fields from the MSH segement to the HDR segment.

            Do the same to Xlate the PID fields to the PAT segment.

            etc… until you have copied across all the segments/fields that you will need.

            If Cloverleaf does not have any built in assumptions I think this will work.

            If Cloverleaf does have built in assumption then you might have a challenge with the MSH segment.

            I would have to try it before I know if such assumptions exist that might get in the way.

            Here is an example of how I would do this quickly if I was using the standard HL7 2.3 as my input varinat and xcelra_adt as my outbound variant in a site called test_xcelera.

            First use the IDE to create the new HL7 2.3 xcelera_adt variant, then close the IDE

            At the AIX command line do the following

            Code:

            cd $HCIROOT/formats/hl7/2.3/segments
            cp MSH $HCIROOT/test_xcelera/formats/hl7/2.3/xcelera_adt/segments/HDR
            cp PID $HCIROOT/test_xcelera/formats/hl7/2.3/xcelera_adt/segments/PAT
            #ect…

            Sorry time for another meeting, I’ve got to go but you get the idea.

            Russ Ross
            RussRoss318@gmail.com

          • #60040
            Ricci Graham
            Participant

              Thanks for both suggestions. I actually used a suggestion from Jim Kosloskey very similar to your’s Russ (imagine that) 😆

              I have the Variant and Xlate all written, but when I try to test the Xlate with my Charge file, I am getting an error back that says the following:

              MESSAGE 1

              [0:TEST] [mid:0x1551668] The #1 segment encounterd ‘PID’ is out of order for message type ‘DFT_P03’. Segment ignored.

              [0:TEST] [mid:0x1551668] The #2 segment encounterd ‘PV1’ is out of order for message type ‘DFT_P03’. Segment ignored.

              [0:TEST] [mid:0x1551668] The #3 segment encounterd ‘FT1’ is out of order for message type ‘DFT_P03’. Segment ignored.

              [0:TEST] [mid:0x1551668] The #4 segment encounterd ‘FT1’ is out of order for message type ‘DFT_P03’. Segment ignored.

              [0:TEST] [mid:0x1551668] The #5 segment encounterd ‘FT1’ is out of order for message type ‘DFT_P03’. Segment ignored.

              [0:TEST] [mid:0x1551668] The #6 segment encounterd ‘FT1’ is out of order for message type ‘DFT_P03’. Segment ignored.

              0(0).MSH(0) : >|^~&|||||||DFT||P|2.3< 0(0).HDR(0) : >300|IBEX|19691231|ED|2.5|2006111116161|200611111616< 0(0).PID(0) : >< 0(0).VIS(0) : >< 0(0).CHG(0) : >< I am planning on stripping the MSH segment out with a TLC proc on the outbount thread. Can anyone shed some light on this for me. When I have gotten this before it has usually been because the sender of the file has had a CRLF between each segment instead of just a CR. This file did have that, but I removed the LF’s with a hex editor except for the last one, so now it has a CR after each segment and CRLF at the end and I am still getting this error. What am I missing? Thanks, Ricci

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