Announcement

Collapse
No announcement yet.

Adding field to blank repeating segment

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

  • Adding field to blank repeating segment

    All I need to do is "loop" through FT1 and add a value to a null field. Below is my code. The code does not create any errors, but looks like it just skips the step. Any suggestions?

    for (var x=0; x<msg['FT1'].length(); x++ ) {
    var coding_system = msg['FT1'][x]['FT1.19']['FT1.19.3'].toString();
    }
    if (coding_system.length > 0){
    msg['FT1'][x]['FT1.19']['FT1.19.3'] = 'ICD10CM';
    }

  • #2
    try something like this

    for each(seg in msg..FT1){
    if(seg['FT1.19']['FT1.19.3'].toString().length > 0){
    seg['FT1.19']['FT1.19.3'] = "ICD10CM";
    }
    }
    Last edited by cward; 03-02-2016, 10:23 AM.

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎