ZPA segment to multiple OBX segments

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ZPA segment to multiple OBX segments

  • Creator
    Topic
  • #52008
    Bob Deemer
    Participant

      I have a new HIS system sending lab orders with a ZPA segment. The lab system cannot deal with Z-segments and I must convert to multiple OBX segments in an ORM message.

    Viewing 5 reply threads
    • Author
      Replies
      • #72678
        Jim Kosloskey
        Participant

          Bob,

          Is the ZPA segment repeating eithere as a part of a group or as a repeating segment?

          Do the ZPA generated OBX segments need to go at the end of existing OBX repetions on the outbound or some other position relative to the existing OBX?

          This is doable from within an Xlate without the need for Tcl depending on the answers to the above questions.

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

        • #72679
          Bob Deemer
          Participant

            Answer to your first question is that the ZPA segment does not repeat at the segment or field level.

            Second question: For every field populated in the ZPA there would need to be a corresponding OBX segment at the end of the ORM message. They would need to be sequentially numbered and the field # in the ZPA would need to be the variable data element identifier in the OBX.

            If this helps, the new HIS system being installed is McKesson’s Paragon going to a 3rd party lab system, Cerner Millenium.

          • #72680
            Jim Kosloskey
            Participant

              Bob,

              OK

              Does the message that contains the ZPA also contain OBX segments?

              If so, do the OBX segments generated by the ZPA need to go in any particular place in relationship to the existing OBX segments or can they just go at the end?

              If there are existing OBX segments and the ZPA generated OBX segments can follow them – you would ITERATE over te OBX segments inbound creating OBX segments outbound and keeping track of the iteration counter (say with something like %g99 – your counter) associated with the inbound OBX so you know where to start the ZPA generated OBX segments (both from a counter position and for sequence numbering) .

              Then you would have a set of COPYs for each of the ZPA fields that need to generate an OBX segment. Increment the %g99 counter and use it in the outbound OBX path to point to then proper OBX position and use %g99 (probably with a MATH ADD) to get the sequence number for each new OBX.

              If there are no inbound OBX segments, then just do the COPYs for each ZPA field as above again using something like %g99 as the counter but starting with zero.

              There are other discussions on this forum that talk about how to manage your own iteration counters but essentially you need a $ at the front ($%g99 for example) when referencing the counter in an Xlate Action (COPY, MATH, etc.) but no $ (%g99 for example) when using the counter in the address path of a field.

              If there are existing inbound OBX segments but the ZPA generated OBX segments want to go somewhere besides after the inbound OBX segments then the above logic will need to be adapted.

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

            • #72681
              Bob Deemer
              Participant

                Hi Jim,

                The ORM can have OBX segments and the ones generated by the ZPA would just follow the ones already in the message.  I will study this and play with it.  I’m fairly new to Cloverleaf and have not needed to do any complex Xlates to date.  I appreciate you help.

                Thanks again.

              • #72682
                Jim Kosloskey
                Participant

                  Feel free to email me if you need assistance.

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

                • #72683
                  Bob Deemer
                  Participant

                    Hi Jim,

                    I hope to have time tomorrow to work on this translation.  What is your email, incase I have questions.  My email is bdeemer@citrusmh.org.

                    Thanks

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