Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Filter to delete segment not working

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

  • Filter to delete segment not working

    I'm using a filter to correctly route a message containing routing information in a custom Z segment.

    I'm able to set up the destinations to route it correctly but I'm unable to strip the Z segment off of the message before sending it on.

    The filters correctly filter the messages per destination, but the Z segment isn't being removed despite a call to 'delete'.

    Any ideas?????

    The message looks like:
    Code:
    MSH|^~\&|SomeLab|LA01||R|200803260939|RESULTR01OUT|ORU^R01|080860346541|P|2.3|||AL|NE
    PID|1|03845779|1813759^^^R^MR~1813759^^^B^MR~03845779^^^ST02^PI||ORDERS^KAREN||196505150000|F||||||||||0733730002^^^R|968741100
    PV1|1|I||P|||12354^IMM^AMY|19901^PACK^CURTIS||MED|||||||12354^IMM^AMY|||U||||||||||||||||T||||||||200712030751|200803241708
    ORC|RE|08080092029^LA01|08080092029^LA01|R0808000084^LA01|D||1^^^200803200924^^R||200803200924|DKG108||12354^IMM^AMY|RMH||200803260939|C_COLL^C: Collection error|3H^^SF
    OBR|1|08080092029^LA01|08080092029^LA01|45958^IgG, IgA, IgM Immunoglobulins^RLA^45958^^LA01|R||200803200924|||DKG108||||200803200924|BLD&Blood^^^^^GOLD2&Gold2|12354^IMM^AMY||LR||||200803260939||IMU|F||1^^^200803200924^^R||||^^I9
    OBX|1|ST|IGG^IgG^LA01|1|CANCELED|mg/dL^mg/dL|||||C||||||N
    NTE|1|L|The released value 1500 was canceled by DKG108 on 03/26/2008 09:39
    OBX|2|ST|IGM^IgM^LA01|1|CANCELED|mg/dL^mg/dL|||||C||||||N
    NTE|1|L|The released value 200 was canceled by DKG108 on 03/26/2008 09:39
    OBX|3|ST|IGA^IgA^LA01|1|CANCELED|mg/dL^mg/dL|||||C||||||N
    NTE|1|L|The released value 150 was canceled by DKG108 on 03/26/2008 09:39
    ZRT|12354^Imm^Amy^A^^^MD^A~12354^Imm^Amy^A^^^MD^O~19901^Pack^Curtis^B^^^DO^F~19901^Pack^Curtis^B^^^DO^R
    And my filter looks like this:
    Code:
    if (msg['ZRT'].toString().indexOf("Imm"«») != -1)
    {
    delete msg['ZRT'];
    return true;
    }
    else
    {
    return false;
    }
    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.

  • #2
    Re:Filter to delete segment not working

    Oh hell, this is why I shouldn't work from home.

    Changes to the message should be done in the transformer and NOT the filter.

    D'oh!! :whistle:
    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
      why don't you just use a single statement below on the transformed destination?

      delete msg['ZRT'];

      Comment

      Working...
      X