segment not showing up in certain messages.

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf segment not showing up in certain messages.

  • Creator
    Topic
  • #52146
    Kevin Crist
    Participant

      We had to create a new segment, ZCQ, for a custom question in all adts. This works in all adts except the A02, A03. We havent done anything different for these 2 than the others. The xlate is simple , has a bulkcopy in it (attached). We tried pathcopy and copying field by field just reaching.

      Any ideas welcomed.

      We are using the same variant for IB and OB. (not my preference but dont have time to change and test).

      Here is the variant for A01 – works.

      MSH

      EVN

      PID

      [ PD1 ]

      [{ NK1 } ]

      PV1

      [ PV2 ]

      [{ DB1 } ]

      [{ OBX } ]

      [{ AL1 } ]

      [{ DG1 } ]

      [ DRG ]

      [

        {

           PR1

           [{ ROL } ]

        }

      ]

      [{ GT1 } ]

      [

        {

           IN1

           [ IN2 ]

           [ IN3 ]

        }

      ]

      [ ACC ]

      [ UB1 ]

      [ UB2 ]

      [{ ZAD } ]

      [{ Z01 } ]

      [{ ZCQ } ]

      Here is the variant for the A02 and A03

      A02 — doesnt work

      MSH

      EVN

      PID

      [ PD1 ]

      PV1

      [ PV2 ]

      [{ DB1 } ]

      [{ OBX } ]

      [{ ZAD } ]

      [{ Z01 } ]

      [{ ZCQ } ]

      A03 — doesnt work

      MSH

      EVN

      PID

      [ PD1 ]

      PV1

      [ PV2 ]

      [{ DB1 } ]

      [{ DG1 } ]

      [ DRG ]

      [

        {

           PR1

           [{ ROL } ]

        }

      ]

      [{ OBX } ]

      [{ ZAD } ]

      [{ Z01 } ]

      [{ ZCQ } ]

    Viewing 14 reply threads
    • Author
      Replies
      • #73212
        Jim Kosloskey
        Participant

          Kevin,

          A dumb question perhaps but did you do a reconfigure in all the Xlates?

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

        • #73213
          Kevin Crist
          Participant

            Well , this is the first Xlate it goes through right out of the HIS so we havent gotten that far yet. In the reconfigure screen it is set as A01. I can see the segment in thread A but when it passes through to the Xlate to thread B it gets cutoff. I havent seen this problem before.

            thanks.

          • #73214
            Keith McLeod
            Participant

              On the A02 nd the A03 are your translates set for A02 inbound and A02 outbound, ie. a matched set.  If the paths vary, bulkcopy is only as good as the consistent paths.

            • #73215
              Kevin Crist
              Participant

                ok, so i reconfigured the xlate to say A02, like attachment. When i tested this the A02 worked with this segment while the A01 now does not. Neither the A03. So how do i configure the Xlate so all adts work. I always thought that you use A01 cause thats how our others are. This xlate handles ADT_A(01|02|03|04|05|06|07|08|11|13|28|31|38).

              • #73216
                Robert Kersemakers
                Participant

                  Hi Kevin,

                  What I did to handle this a long time ago is to make a generic message called ‘ADT’ inside the variant. This message contains all the segments that I need to translate all know ADT messages. For example it contains an optional MRG segment, so I can handle A18 messages.

                  Try make a copy of your ‘ADT_A01’ message to ‘ADT’ and then reconfigure the translation, so it translates from ADT to ADT. This should work.

                  Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                • #73217
                  Kevin Crist
                  Participant

                    ok, i’ll give that a whirl and let you know how that works. Thanks.

                  • #73218
                    Kevin Crist
                    Participant

                      Man, i really thought that would work but i didnt have any luck. Here’s the adt variant i copied over to use:

                      Do i maybe have some parenthesis wrong or something?

                      Variant for generic ADT

                      MSH

                      EVN

                      PID

                      [ PD1 ]

                      [{ NK1 } ]

                      PV1

                      [ PV2 ]

                      [{ DB1 } ]

                      [{ OBX } ]

                      [{ AL1 } ]

                      [{ DG1 } ]

                      [ DRG ]

                      [

                        {

                           PR1

                           [{ ROL } ]

                        }

                      ]

                      [{ GT1 } ]

                      [

                        {

                           IN1

                           [ IN2 ]

                           [ IN3 ]

                        }

                      ]

                      [ ACC ]

                      [ UB1 ]

                      [ UB2 ]

                      [{ ZAD } ]

                      [{ Z01 } ]

                      [{ ZCQ } ]

                    • #73219
                      Robert Kersemakers
                      Participant

                        Are you sure that your A02 or A03 have a ZCQ segment in them? Have you tested the incoming message with the HL7 testing tool; no errors there?

                        Come to think of it: if you test the incoming message, the testing tool will decide (based on MSH-9) what message type to use. It will verify the incoming message against message ADT_A02 or ADT_A03, not ADT. So you will need to include this ZCQ segment into every message.

                        Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                      • #73220
                        Kevin Crist
                        Participant

                          We have the ZCQ in the A02, A03 segments. We have ran this in the xlate testing tool and we also have to xlate setup in test and actually doing testing from our HIS. I have purged caches and restarted process, brought the whole site down then back up.

                          A02

                          MSH

                          EVN

                          PID

                          [ PD1 ]

                          PV1

                          [ PV2 ]

                          [{ DB1 } ]

                          [{ OBX } ]

                          [{ ZAD } ]

                          [{ Z01 } ]

                          [{ ZCQ } ]

                          A03

                          MSH

                          EVN

                          PID

                          [ PD1 ]

                          PV1

                          [ PV2 ]

                          [{ DB1 } ]

                          [{ DG1 } ]

                          [ DRG ]

                          [

                            {

                               PR1

                               [{ ROL } ]

                            }

                          ]

                          [{ OBX } ]

                          [{ ZAD } ]

                          [{ Z01 } ]

                          [{ ZCQ } ]

                        • #73221
                          Robert Kersemakers
                          Participant

                            So the xlate test doesn’t show the ZCQ segment, but what is the result when you use the ‘HL7 testing tool’ with the same message(s)?

                            You will need to do this step by step. First confirm that the incoming message contains the ZCQ segment and is a valid HL7 message. If there are no problems there, then test with the Xlate tool. If the result of this is that there is no ZCQ in the outgoing message, while there is one in the incoming message, then something is going wrong in your Xlate.

                            We have too little information to really get into this. Posting the incoming message and the xlate would help!

                            Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                          • #73222
                            Kevin Crist
                            Participant

                              Ask and you shall recieve…It’s a little lengthy, but mostly has to do with database and accts. Been in place for years. This isnt the first Z segment we have had to add and we have never ran across this situation before.

                              It’s just weird that the other ADTs with this are working like the A04,08,A06. Thanks for your time on this.

                              { { OP DATECOPYOPT }

                                 { ADDPREC 0 }

                                 { FABRICATE 1 }

                                 { USECURTM 1 }

                                 { RANGE {49 20 19} }

                                 { TMDEFS {01 01 00 00 00 0000 +0000} }

                                 { DELIMIT {/ :} }

                              }

                              { { OP BULKCOPY }

                                 { ERR 0 }

                              }

                              { { OP COMMENT }

                                 { COMMENT {When Affinity implements 10 digit account numbers (format will be >= 3000000000) this wilil be the flag} }

                              }

                              { { OP COMMENT }

                                 { COMMENT {ignore the gnu db.  Eventually, the gnu db storing the 10 digit code will no longer be needed.} }

                              }

                              { { OP IF }

                                 { ERR 0 }

                                 { COND { 0(0).PID.#18.[0].[0] < =3000000000} }

                                 { THENBODY {

                                     { { OP COPY }

                                         { ERR 0 }

                                         { PRE {

                                             set admityear [lindex $xlateInVals 0]

                                             set acctno [lindex $xlateInVals 1]

                                             set newacctno [string range $admityear 0 3]

                                             set newacctno $newacctno$acctno

                                             set xlateOutVals $newacctno

                                         }}

                                         { IN {0(0).PV1.00174 0(0).PID.00121} }

                                         { OUT @newacct }

                                     }

                                     { { OP COPY }

                                         { ERR 0 }

                                         { PRE {

                                             global env

                                             set xlateOutVals

                                           }}

                                           { IN @null }

                                           { OUT @dbname }

                                       }

                                       { { OP COPY }

                                           { ERR 0 }

                                           { PRE {

                                               lassign $xlateInVals Mrun Acctno

                                               set xlateOutVals “”

                                               set xlateOutVals $Mrun$Acctno

                                           }}

                                           { IN {0(0).PID.00106(0) 0(0).PID.00121} }

                                           { OUT @dbkey }

                                       }

                                       { { OP COPY }

                                           { ERR 0 }

                                           { IN =KEY_NOT_FOUND }

                                           { OUT @KEY_NOT_FOUND }

                                       }

                                       { { OP IF }

                                           { ERR 0 }

                                           { COND {0(0).EVN.00099 eq =A01 || 0(0).EVN.00099 eq =A04 || 0(0).EVN.00099 eq =A05} }

                                           { THENBODY {

                                               { { OP COMMENT }

                                                   { COMMENT {If the transaction is an A01, A04 or A05 then do the following} }

                                               }

                                               { { OP IF }

                                                   { ERR 0 }

                                                   { COND { 0(0).EVN.00099 eq =A01 ||  0(0).EVN.00099 eq =A04} }

                                                   { THENBODY {

                                                       { { OP IF }

                                                           { ERR 0 }

                                                           { COND { 0(0).PV1.00174  < =20071003000000} }

                                                           { THENBODY {

                                                               { { OP COMMENT }

                                                                   { COMMENT {If the A01 or A04 has an admit date of before 10/03/2007 (live date for 10 digit acct#) then this is a push and should not be written to file with new acct #.} }

                                                               }

                                                               { { OP COPY }

                                                                   { ERR 0 }

                                                                   { IN 0(0).PID.00121 }

                                                                   { OUT 0(0).PID.00121 }

                                                               }

                                                           }}

                                                           { ELSEBODY {

                                                               { { OP COMMENT }

                                                                   { COMMENT {TODO: Insert new actions here} }

                                                               }

                                                               { { OP COMMENT }

                                                                   { COMMENT {If the transacation is an A01 or A04 then read the file to see if an A05 was run earlier.  

                                } }

                                                               }

                                                               { { OP COPY }

                                                                   { ERR 0 }

                                                                   { PRE {

                                                                       xltGnuDbFetch

                                                                   }}

                                                                   { IN {@dbname @dbkey} }

                                                                   { OUT @dbdata }

                                                               }

                                                               { { OP IF }

                                                                   { ERR 0 }

                                                                   { COND {@dbdata eq @KEY_NOT_FOUND} }

                                                                   { THENBODY {

                                                                       { { OP COMMENT }

                                                                           { COMMENT {If an A05 was not run then write the new acct no. to the database.} }

                                                                       }

                                                                       { { OP COPY }

                                                                           { ERR 0 }

                                                                           { IN @newacct }

                                                                           { OUT 0(0).PID.00121 }

                                                                       }

                                                                       { { OP COPY }

                                                                           { ERR 0 }

                                                                           { IN @newacct }

                                                                           { OUT @dbdata }

                                                                       }

                                                                       { { OP COPY }

                                                                           { ERR 0 }

                                                                           { PRE {

                                                                               xltGnuDbStore

                                                                           }}

                                                                           { IN {@dbname @dbkey @dbdata} }

                                                                           { OUT @dbsuccess }

                                                                       }

                                                                   }}

                                                                   { ELSEBODY {

                                                                       { { OP COMMENT }

                                                                           { COMMENT {If the A05 was created then use the Acct no. from the database.} }

                                                                       }

                                                                       { { OP COPY }

                                                                           { ERR 0 }

                                                                           { IN @dbdata }

                                                                           { OUT 0(0).PID.00121 }

                                                                       }

                                                                   }}

                                                               }

                                                           }}

                                                       }

                                                   }}

                                                   { ELSEBODY {

                                                       { { OP IF }

                                                           { ERR 0 }

                                                           { COND { 0(0).PV1.00174  < =20071003000000} }

                                                           { THENBODY {

                                                               { { OP COMMENT }

                                                                   { COMMENT {If the A05 has an admit date of before 10/03/2007 (live date for 10 digit acct#) then this is a push and should not be written to file with new acct #.} }

                                                               }

                                                               { { OP COPY }

                                                                   { ERR 0 }

                                                                   { IN 0(0).PID.00121 }

                                                                   { OUT 0(0).PID.00121 }

                                                               }

                                                           }}

                                                           { ELSEBODY {

                                                               { { OP COMMENT }

                                                                   { COMMENT {If the transaction is an A05 then write the new acct no. to the database.} }

                                                               }

                                                               { { OP COPY }

                                                                   { ERR 0 }

                                                                   { IN @newacct }

                                                                   { OUT 0(0).PID.00121 }

                                                               }

                                                               { { OP COPY }

                                                                   { ERR 0 }

                                                                   { IN @newacct }

                                                                   { OUT @dbdata }

                                                               }

                                                               { { OP COPY }

                                                                   { ERR 0 }

                                                                   { PRE {

                                                                       xltGnuDbStore

                                                                   }}

                                                                   { IN {@dbname @dbkey @dbdata} }

                                                                   { OUT @dbsuccess }

                                                               }

                                                           }}

                                                       }

                                                   }}

                                               }

                                           }}

                                           { ELSEBODY {

                                               { { OP COMMENT }

                                                   { COMMENT {Retreive Acct no from database.} }

                                               }

                                               { { OP COPY }

                                                   { ERR 0 }

                                                   { PRE {

                                                       xltGnuDbFetch

                                                   }}

                                                   { IN {@dbname @dbkey} }

                                                   { OUT @dbdata }

                                               }

                                               { { OP IF }

                                                   { ERR 0 }

                                                   { COND {@dbdata eq @KEY_NOT_FOUND} }

                                                   { THENBODY {

                                                       { { OP COMMENT }

                                                           { COMMENT {If not A01, A04 or A05 and not in database then write with origional acct #. } }

                                                       }

                                                       { { OP COPY }

                                                           { ERR 0 }

                                                           { IN 0(0).PID.00121 }

                                                           { OUT 0(0).PID.00121 }

                                                       }

                                                   }}

                                                   { ELSEBODY {

                                                       { { OP COMMENT }

                                                           { COMMENT {If the A05 was created then use the Acct no. from the database.} }

                                                       }

                                                       { { OP COPY }

                                                           { ERR 0 }

                                                           { IN @dbdata }

                                                           { OUT 0(0).PID.00121 }

                                                       }

                                                   }}

                                               }

                                           }}

                                       }

                                   }}

                                   { ELSEBODY {

                                   }}

                                }

                                { { OP COMMENT }

                                   { COMMENT {To address 90% of records with Baby/Mother Link, this code was added.  It will not handle if Mother was admitted} }

                                }

                                { { OP COMMENT }

                                   { COMMENT {prior to the 10/03/2007 cutover date for IM 10 digit acct or if a baby is admitted in the year following mother’s } }

                                }

                                { { OP COMMENT }

                                   { COMMENT {admit year (year end).  Code is only applied if mother acct field is loaded and < 1000000 (6 digits).} }

                                }

                                { { OP IF }

                                   { ERR 0 }

                                   { COND {0(0).PID.#21(0).[0].[0] != @null  &&  0(0).PID.#21(0).[0].[0] < =1000000} }

                                   { THENBODY {

                                       { { OP COPY }

                                           { ERR 0 }

                                           { PRE {

                                               set admityear [lindex $xlateInVals 0]

                                               set acctno [lindex $xlateInVals 1]

                                               set newacctno [string range $admityear 0 3]

                                               set newacctno $newacctno$acctno

                                               set xlateOutVals $newacctno

                                           }}

                                           { IN {{0(0).PV1.#44.[0]} {0(0).PID.#21(0).[0].[0]}} }

                                           { OUT {{0(0).PID.#21(0).[0].[0]}} }

                                       }

                                   }}

                                   { ELSEBODY {

                                   }}

                                }

                            • #73223
                              Robert Kersemakers
                              Participant

                                Sorry Kevin, but I can’t make anything of this. I tried your xlate (had to remove the database-references) and it seems to work just fine. Doesn’t do weird things with segments.

                                Somewhere/somehow the segment is being removed. Problem is: where does it go wrong? Can’t determine that from here.

                                I now see a thread though about master sites: https://usspvlclovertch2.infor.com/viewtopic.php?t=4937. Could this have something to do with your problem?

                                Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                              • #73224
                                Robert Milfajt
                                Participant

                                  Here is something to try, then I have an idea, if it works.  Take an A01 message, edit the MSH/EVN segments to make it A02 and/or A03.  Send through testing tool and see if ZCQ magically appears.

                                  If so, the problem isn’t with the routing, but the message content.  Then my guess would be that since these messages do not have any of the intervening groups (1(0); PR1, 2(0); GT1 or 3(0); IN1), the ZCQ segment is being seen as group 0, i.e., 0(0).ZCQ, instead of 4(0).ZCQ like it is in the other messages.

                                  If that’s the case, that is why Bulkcopy fails, and you may want to copy your generic ADT definition into the message definitiosn for the HL7 variant for A02 and A03.

                                  Hope this helps,

                                  Robert Milfajt
                                  Northwestern Medicine
                                  Chicago, IL

                                • #73225
                                  Kevin Crist
                                  Participant

                                    Thanks for the reply. I tried this but had no luck. I changed an A01 message to an A02 and the segment still wouldnt show.

                                  • #73226
                                    Robert Milfajt
                                    Participant

                                      Copy a literal to one of the fields in the ZCQ segment to see if you can force it to show?  I would try both 0(0).ZCQ and 4(0).ZCQ to see which one works.  I’m still hung up on the fact the groups are off and that is why the BULKCOPY fails.

                                      Robert Milfajt
                                      Northwestern Medicine
                                      Chicago, IL

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