Announcement

Collapse
No announcement yet.

Testing and inserting for a segment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing and inserting for a segment

    Would I use a step in a transformer or use the pre-processor to test for a missing PV1 segment?.
    Our HL7 source generates PV1 segments only on select Results messages. I need to detect and generate PV1s on those without them.

    Thanks,
    Hugh
    Little Rock, Ar

  • #2
    Re:Testing and inserting for a segment

    hjohnson wrote:
    Would I use a step in a transformer or use the pre-processor to test for a missing PV1 segment?.
    Our HL7 source generates PV1 segments only on select Results messages. I need to detect and generate PV1s on those without them.

    Thanks,
    Hugh
    Little Rock, Ar
    You would actually want that in a FILTER. Your filter would simply check to see if msg['PV1'] is present. You should be able to do that with the filter builder and not need javascript.

    Your channel would have two destinations:

    1) If the message has a PV1 segment present where you would just pass the message on to some other system
    2) If the message has no PV1 segment where you would build a PV1 and then send the message on.
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:Testing and inserting for a segment

      Jeez, I hate to appear a total nobb. I did get the message containing the PV1 segment to pass it to a folder and Filter the one that doesn't have the PV1 segment, but the second Destination is never hit.

      Will keep experimenting.

      I am using the latest greatest 1.80 RC2 Mirth.

      Thanks,
      Hugh

      Comment


      • #4
        Re:Testing and inserting for a segment

        We all gotta start somewhere. Feel free to post your channel if you want a second opinion on it.
        Jon Bartels

        Zen is hiring!!!!
        http://consultzen.com/careers/
        Talented healthcare IT professionals wanted. Engineers to sales to management.
        Good benefits, great working environment, genuinely interesting work.

        Comment


        • #5
          Re:Testing and inserting for a segment

          Okay. I got it so I can filter and send or keep msgs based on the PV1 segment. I don't see how you can construct a PV1 segment if the needed info is embedded in the OBX segments. I can throw the msg to a folder and have another application extract the necessary data. What do you pros do.

          hugh

          Comment


          • #6
            Re:Testing and inserting for a segment

            Okay, I got everything to work but I had to use an outbound msg template and javascript. Do you think that will slow things down in real life?

            Comment


            • #7
              Re:Testing and inserting for a segment

              hjohnson wrote:
              Okay, I got everything to work but I had to use an outbound msg template and javascript. Do you think that will slow things down in real life?
              There is always room for optimization, but I have channels with outbound templates and JS with a fairly nasty timing component* that handle 10k messages a day minimum.

              If you are looking to optimize, most of that would likely be done in the JS and any DB queries. No different from classic development, tune your queries, make sure your loops are tight, and use well-tested libraries when they're available.

              As usual feel free to post code snippets or channel exports.

              *a call to Java sleep, don't ask.
              Jon Bartels

              Zen is hiring!!!!
              http://consultzen.com/careers/
              Talented healthcare IT professionals wanted. Engineers to sales to management.
              Good benefits, great working environment, genuinely interesting work.

              Comment

              Working...
              X