web stats
Mirth Community - View Single Post - Extract data from a single OBX segment based on word separators
View Single Post
Old 10-29-2013, 02:03 PM
narupley's Avatar
narupley narupley is offline
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

You can do this:

for each (obx in msg.OBX) {
	var obsVal = new java.lang.String(obx['OBX.5']['OBX.5.1'].toString());
	if (obsVal.startsWith('EXAM:')) {
		for each (exam in obsVal.substring(5).split('and|\\\\T\\\\')) {
			// Do something with exam.trim()
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