web stats
File Writer - Dynamically Build Outbound Template - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 05-07-2019, 06:55 AM
jcurry5 jcurry5 is offline
OBX.1 Kenobi
 
Join Date: May 2013
Posts: 48
jcurry5 is on a distinguished road
Question File Writer - Dynamically Build Outbound Template

Is there a way to dynamically build a portion of the outbound template?

Say for example I have 5 dx segments but only 2 dx segments are populated, to only output 2 lines:

<Dx Code="${dx1}" Pos="1"/>
<Dx Code="${dx2}" Pos="2"/>

Rather than have the 5 dx lines and wastefully fill in blanks if nothing is sent.

Dx code is part of a larger template:
Code:
<NPI ID="${ID}"
MedRecNo="${mrn}"
AcctNo="${acctno}"
<Dx Code="${dx1}"  Pos="1"/>
<Dx Code="${dx2}"  Pos="2"/>
<Dx Code="${dx3}"  Pos="3"/>
<Dx Code="${dx4}"  Pos="4"/>
<Dx Code="${dx5}"  Pos="5"/>
</NPI>
What I'm trying to figure out is to accomplish this:
Code:
<NPI ID="1234}"
MedRecNo="abc123"
AcctNo="xyz789"
<Dx Code="val1"  Pos="1"/>
<Dx Code="val2"  Pos="2"/>
</NPI>
Rather than this:
Code:
<NPI ID="1234}"
MedRecNo="abc123"
AcctNo="xyz789"
<Dx Code="val1"  Pos="1"/>
<Dx Code="val2"  Pos="2"/>
<Dx Code=""  Pos="3"/>
<Dx Code=""  Pos="4"/>
<Dx Code=""  Pos="5"/>
</NPI>
Thanks.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation