Announcement

Collapse
No announcement yet.

XML to HL7: behavior with non tagged fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • XML to HL7: behavior with non tagged fields

    Let's say I delete the IN1 segment and then attempt to rebuild it with field data from scratch. i.e.,

    Code:
    delete msg['IN1'];
    msg['IN1']['IN1.44']['IN1.44.5'] = '12345';
    I would expect that the parser would take the XML and generate something like:

    Code:
    MSH| ...
    ...
    IN1||||||||||||||||||||||||||||||||||||||||||||^^^^12345
    but instead it gives me

    Code:
    MSG| ...
    ...
    IN1|12345
    Is there a way I can force it XML to HL7 function to "fill in the blanks?"

    - Jeremy

    Post edited by: rods, at: 08/24/2007 12:46

  • #2
    Re:XML to HL7: behavior with non tagged fields

    Not in the current release, however the parser will be updated soon to automatically handle this.
    Chris Lang

    Comment


    • #3
      Re:XML to HL7: behavior with non tagged fields

      Ok. Looking forward to it in the next release.

      Here's my Javascript workaround:

      Code:
              
              // create fields prior to IN1.45
      	for (var j = 1; j <= 44; j++) { 
      		var field = "msg['IN1']['IN1." + j + "'] = '';";
      		eval(field);
      	}
      	// create subfields prior to IN1.44.5
      	for (var j = 1; j <= 4; j++) { 
      		var subfield = "msg['IN1']['IN1.44']['IN1.44." + j + "'] = '';";
      		eval(subfield);
      	}
      	msg['IN1']['IN1.44']['IN1.44.5'] = '12345';

      BTW: Keep up the awesome work. Mirth Rocks! I can't wait to create some plugins.

      Post edited by: rods, at: 08/24/2007 13:54

      Comment

      Working...
      X