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

Using a cross-reference file

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

  • Using a cross-reference file

    I'm trying to replace a custom translation interface I wrote in C# with Mirth. Mirth is amazing, though I'm having to get used to JavaScript syntax vs C#.

    In the existing interface, one system sends a text identifier in IN1.3. The receiving Lab system identifies the insurances by a created account number instead, so it needs that number in IN1.3. In the Lab system, Medicare may be identifed by 1000, Qualchoice by 3987.

    The beginning of some IN1 segments from the sending system look like:

    IN1|0|1|MEDI|MEDICARE|PO BOX ...
    IN1|1|1|QCA|QUALCHOICE|PO BOX ....

    I'm using a cross reference text file I created to change the IN1 segments. The cross reference file looks like:

    MEDI,1000
    QCA,3987
    BCBS,5424 etc...

    The existing interface does a regex search on the contents of IN1.3, and when it finds a match takes the second value and replaces IN1.3 with it. The above examples would be re-written as:

    IN1|0|1|1000|MEDICARE|PO BOX ...
    IN1|1|1|3987|QUALCHOICE|PO BOX ....

    I'm trying to figure out how to do the same thing with Mirth:

    1. Initialize a variable with the contents of IN1.3
    2. Do a regex search of a reference file until a match is found
    3. Replace the variable value with the replacement string.

    Any ideas? My existing (undesireable) option is to write an if statement for every insurance.

    Thanks,

    ...Joey

  • #2
    Re:Using a cross-reference file

    Nevermind. :-)

    I see that instead of maintaining a cross-reference file, I'd be maintaining a set of String Replacement rules in a Mapper to IN1.3.

    Thanks for looking...next. :-)

    ...Joey

    Comment


    • #3
      Re:Using a cross-reference file

      Nevermind. :-)

      I see that instead of maintaining a cross-reference file, I'd be maintaining a set of String Replacement rules in a Mapper to IN1.3.

      Thanks for looking...next. :-)

      ...Joey

      Comment

      Working...
      X