Przeglądaj źródła

fixed care month claim auto suggestion

Josh 3 lat temu
rodzic
commit
6f22063d93

+ 7 - 6
resources/views/app/patient/care-month/_create-claim.blade.php

@@ -226,12 +226,13 @@
                 }, 'json')
             },
             getPrefillValues: function() {
-                this.payload.lines = [{
-                    cpt: '',
-                    dateOfService: '{{date('Y-m-d')}}',
-                    icds: JSON.parse(JSON.stringify(window.rmReasons)),
-                    numberOfUnits: 1
-                }];
+                @if(@$careMonth && !empty($careMonth->claim_suggestion_json))
+                    let csj = {!! $careMonth->claim_suggestion_json !!};
+                    if(csj && csj.lines && csj.lines.length) {
+                        this.payload.lines.splice(0, 1);
+                        this.payload.lines = csj.lines;
+                    }
+                @endif
             }
         },
         mounted: function () {