Kaynağa Gözat

Auto-fill ICDs in create-claim form

Vijayakrishnan 4 yıl önce
ebeveyn
işleme
e8d3c7d755

+ 2 - 12
resources/views/app/patient/note/_create-claim.blade.php

@@ -79,12 +79,7 @@
                     {
                         cpt: '',
                         dateOfService: '{{date('Y-m-d')}}',
-                        icds: [
-                            {
-                                code: '',
-                                description: '',
-                            }
-                        ]
+                        icds: window.noteReasons
                     }
                 ]
             }
@@ -94,12 +89,7 @@
                 this.payload.lines.push({
                     cpt: '',
                     dateOfService: '{{date('Y-m-d')}}',
-                    icds: [
-                        {
-                            code: '',
-                            description: '',
-                        }
-                    ]
+                    icds: window.noteReasons
                 });
                 Vue.nextTick(() => {
                     this.initICDAutoSuggest();

+ 12 - 1
resources/views/app/patient/note/_create-note-reason.blade.php

@@ -1,3 +1,14 @@
+<script>
+    window.noteReasons = [];
+    @if(count($note->reasons))
+        @foreach($note->reasons as $reason)
+        window.noteReasons.push({
+            code: '{{$reason->code}}',
+            description: '{{$reason->description}}'
+        });
+        @endforeach
+    @endif
+</script>
 <div moe wide class="">
     <a class="" href="" show start><i class="fa fa-edit"></i></a>
     <form url="/api/note/update-note-reasons">
@@ -101,4 +112,4 @@
         }
 
     })();
-</script>
+</script>