Copying A04 into A02

Homepage Clovertech Forums Cloverleaf Copying A04 into A02

Tagged: , , ,

  • Creator
    Topic
  • #111504
    Amy Dubon
    Participant

    Hello,

    I have a downstream system that is only expecting A02, with same visit number  PV1.19. I would liked for Cloverleaf to make a copy of an A04 and convert it into an A02 anytime it sees the same PID.18 on a previous A08.

     

    Would anyone had an idea on how to build  a translation capable of doing this?

Viewing 1 reply thread
  • Author
    Replies
    • #111516
      Robert Kersemakers
      Participant

      So many questions…

       

      Turning an A04 into an A02 is not that difficult: just change MSH-9 and remove any segments that are not used in A02, like NK1.

      The challenge lies in the fact that you only want to do this, if PID-18 (account number) is the same in this A04 as in a previous A08. You can’t do this in a translation, as it only uses exactly one message, while you want to know something about a previous one. So you will need a proc that saves this information (message type and PID-18) in a global variable. Once your current message is an A04, you need to check whether the previous message was an A08 (global variable) and whether PID-18 of the current message matches the PID-18 stored in the global variable; if true you can then turn the A04 into an A02, or punt an indicator in a certain field so you can do this in a translation.

       

      Questions:

      • Downstream system only expects A02. What? Only transfers?
      • How can you get an A08 message before an A04, with the same account (=same patient)?
      • An A04 (at least with us) normally doesn’t have information about an admittance (although PV1 is required, never understood that), while an A02 is a transfer, so admittance required. So how do you fill the A02 with the right information?

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #111560
      Charlie Bursell
      Participant

      Keeping prior A08 data in a global may not be a good idea.  What if the thread or process is stopped?

      I would recommend a file or, preferably, a sqllite database.  Put entries in with a timestamp and delete them after so long if not used.

      Remember, Murphy was an optimist 🙂

Viewing 1 reply thread
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,290
Replies
34,422
Topic Tags
286
Empty Topic Tags
10