web stats
Mirth Community - View Single Post - count of segments
View Single Post
  #8  
Old 02-15-2013, 05:11 PM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

Quote:
Originally Posted by mlucero2013 View Post
sorry I do not speak your language, attached my channel, I would like to know how to apply the counter, is to add a counter only at the end of ZDS Segment Message.
currently gives me this:
OID.Year.Month.Day.Hour.Minute.Second.Milliseconds

I need send by HL7 this:
OID.Year.Month.Day.Hour.Minute.Second.Milliseconds . (Countunique)
as I apply???
thank you very much
I'm still not quite sure what you're asking, but if you want to add a counter to the end of your Message Builder step's Mapping value that increments once for each message, you can do that by putting a variable in the global channel map in the deploy script:

Code:
$gc('count',new Number(0));
$gc('next',function(){$gc('count',new Number($gc('count')+1));return $gc('count')});
Then just append the following to the Mapping field in the Message Builder step:

Code:
+'.'+$gc('next')()
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote