web stats
Mirth Community - View Single Post - Message Generator Plugin - Can it create new messages?
View Single Post
  #6  
Old 12-14-2016, 07:42 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 832
siddharth is on a distinguished road
Default

I did a project once which would generate random ADT A04s, with MSH,PID,PV1,NK1, GT1 and IN1 segment. Completely different from one another.

If you want to simulate such a thing you need few static arrays, size 10 for good effect like first Name, last name, street1,street2,city,Provider last name, first name etc.

Then, you need Math.random() method that you can run over the indexes of each of these arrays and substitute in an HL7 message. For other thing like MRN, Policy ID, Date Of Birth you can generate randomly.

Hope it helps!
Reply With Quote