Browse Source

Create-claim popup - dont show empty icd line at the end

Vijayakrishnan 3 years ago
parent
commit
061a8b29f6
1 changed files with 8 additions and 0 deletions
  1. 8 0
      resources/views/app/patient/note/_create-claim.blade.php

+ 8 - 0
resources/views/app/patient/note/_create-claim.blade.php

@@ -242,6 +242,14 @@
                         this.payload.lines.splice(0, 1);
                         this.payload.lines = csj.lines;
                     }
+                    // clear empty icds
+                    for(let i=0; i<this.payload.lines.length; i++) {
+                        for (let j = this.payload.lines[i].icds.length - 1; j >=0; j--) {
+                            if(!this.payload.lines[i].icds[j].code && !this.payload.lines[i].icds[j].description) {
+                                this.payload.lines[i].icds.splice(j, 1);
+                            }
+                        }
+                    }
                 @endif
             }
         },