Question
· Aug 25, 2023

Writing multiple records to record mapper in DTL from a single DFT with multiple FT1's

Trying to write multiple records to a file via Record Mapper from a single inbound DFT transaction with multiple FT1 segments.  DTL with HL7 DFT inbound and Record Mapper outbound checks field values in both FT1 segment and PV1 segment within a "foreach" loop, and if criteria are met for a particular FT1 then the target fields in the record map are set with values from multiple segments (MSH, PID, PV1, and FT1).  Currently in this setup, only the last qualifying FT1 segment's fields will write to the file (if there is more than one qualifying FT1 segment)....How can I set it up so that a new record is written for each qualifying FT1 instead of only the last qualifying FT1?

Thanks,

Dave Lancaster

Roswell Park Comprehensive Cancer Center

Buffalo, NY

Product version: IRIS 2021.1
$ZV: IRIS for Windows (x86-64) 2021.1.3 (Build 389U) Wed Feb 15 2023 14:50:06 EST [HealthConnect:3.3.0] [HealthConnect:3.3.0]
Discussion (2)2
Log in or sign up to continue

Are you attempting to do this in a routing rule foreach or a DTL?

You're much better off working with a Business Process/BPL for this sort of thing. You would:

  • Create a context variable for the FT1 segment counter (ex. FT1counter)
  • use that as the key in a Foreach action, with request.{FT1()} as the property.
  • In the loop:
    • Add a Transform action to use a DTL to map the required PID/PV1/etc. fields to the record map, specifying the current FT1 segment values using source.{FT1(context.FT1counter):Fieldname} to select the current segment's fields.
    • Add a Call action for invoking the operation in the same loop, and you're done.
  • Save, add it to your production, and point the service at it.

Here's what we've done:

1. BS presents HL7 DFT w/multiple FT1s

2. BP routes this HL7 through a DTL that loops through each FT1,  and writes a single custom Record Mapper 'dummy' segment (which contains patient values and charge details in a single record) for a single file (which can accumulate 1 message, then close...although can also accumulate daily files, if your charge process permits).

3. BO outputs files created in step 2.

3. Record Mapper BS reads this file in, loops through each record, sending to a BP, which

4. passes this single charge through a DTL that creates an HL7 DFT for each record from the input file, sending to the final stage of

5. BO (sending 1 HL7 DFT per FT1 in original message)

So, for this approach you need: 

1.BS (HL7 tcp/ip)

2. BP (w/ HL7->RecMap DTL)

3. BO (RecMap file adapter)

4. BS (RecMap file adapter)

5. BP (w/ RecMap-> DTL) 

6. BO (HL7 tcp/ip)

Which is a little more work that a BPL, unless you're already experienced with both HL7 and Record Mapper, in which case you can create these and get them all working together in half a day.  We took this approach as an 'How To' for folks not yet up to speed on BPL.