Announcement

Collapse
No announcement yet.

Filtering a message

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

  • Filtering a message

    I am new to mirth and trying to filter an HL7 message based on the below structure:

    MSH
    [SFT]
    EVN
    PID
    [PD1]
    [{ROL}]
    PV1
    [PV2]
    [{ROL}]
    DB1

    But I am not able to get the segment to repeat properly in the right order. I am using version 3.4.2

    Any help would really be appreciated
    Last edited by Thoughts_Shared; 12-11-2016, 08:33 PM.

  • #2
    I don't understand the question. Try rewording it and ask again.
    Best,

    Kirby

    Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

    Appliance Version 3.11.4
    Mirth Connect Version 3.8.0
    Java Version 1.6.0_45-b06
    Java (64 bit) Version 1.6.0_45-b06
    Java 7 (64 bit) Version 1.7.0_151-b15
    Java 8 (64 bit) Version 1.8.0_181-b13
    PostgreSQL Version 9.6.8

    Comment


    • #3
      Using the below code I am able to validate MSH EVN PID PV1 [PD1] or MSH EVN PID PV1 [ROL]. But still not able to validate MSH EVN PID PV1 [PD1] [{ROL}]

      var index = 0;
      var GroupIndex = 0;
      var rGroupIndex = 0;

      for each (seg in msg.children()) {
      var segName = seg.name().toString();
      if (index == 0 && segName != 'MSH' || index == 1 && segName != 'EVN' || index == 2 && segName != 'PID' || index == 3 && segName != 'PV1') {
      return false;
      } else if (index > 3 && index < msg.children().length() - 1) {
      if (GroupIndex == 0 && segName != 'PD1' || rGroupIndex == 0 && segName != 'ROL')
      GroupIndex++;
      return false;
      }
      index++;
      }
      return true;

      How do I validate a message for the format MSH EVN PID PV1 [PD1] [{ROL}]

      Comment

      Working...
      X