Kaynağa Gözat

When NA bills as generic - add checkboxes to confirm work was done (wip)

Vijayakrishnan 3 yıl önce
ebeveyn
işleme
0fc66ad657

+ 23 - 0
resources/views/app/generic-bills/add-bill-form/Note.blade.php

@@ -8,6 +8,29 @@
         </div>
     @else
         @include('app.generic-bills.add-bill-form._default-fields')
+        <div class="mb-2 border px-2 pt-2 generic-bill-actions">
+            <p class="text-sm mb-2 text-secondary font-weight-bold">Please indicate the activities time was spent on:</p>
+            <input type="hidden" name="genericDescription" value="">
+            <label class="d-flex align-items-center">
+                <input type="checkbox" class="mr-2 my-0 generic-bill-action"
+                       data-action="Note reviewed."
+                       onchange="return updateGenericBillAction(this)">
+                <span>Note reviewed.</span>
+            </label>
+            <label class="d-flex align-items-center">
+                <input type="checkbox" class="mr-2 my-0 generic-bill-action"
+                       data-action="Care coordinated."
+                       onchange="return updateGenericBillAction(this)">
+                <span>Care coordinated.</span>
+            </label>
+            <label class="d-flex align-items-center">
+                <input type="checkbox" class="mr-2 my-0 generic-bill-action"
+                       data-action="Admin. support for follow-up."
+                       onchange="return updateGenericBillAction(this)">
+                <span>Admin. support for follow-up.</span>
+            </label>
+        </div>
+        @include('app.generic-bills.add-bill-form._default-actions')
     @endif
 </form>
 @include('app.generic-bills.add-bill-form._default-script')

+ 4 - 0
resources/views/app/generic-bills/add-bill-form/_default-actions.blade.php

@@ -0,0 +1,4 @@
+<div class="">
+    <button class="btn btn-primary btn-sm" submit>Submit</button>
+    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+</div>

+ 7 - 9
resources/views/app/generic-bills/add-bill-form/_default-fields.blade.php

@@ -1,4 +1,4 @@
-<div class="mb-2">
+<div class="mb-2 min-width-300px">
     <label for="" class="text-secondary text-sm">Pro</label>
     <input type="text" class="form-control form-control-sm" value="{{$genericPro->displayName()}}" readonly>
 </div>
@@ -50,15 +50,13 @@
     </div>
     <div class="mb-2" calculated-generic-amount></div>
 </div>
-<div class="mb-2">
-    <label for="" class="text-secondary text-sm">Description</label>
-    <input type="text" name="genericDescription" class="form-control form-control-sm" value="">
-</div>
+@if($entityType !== 'Note')
+    <div class="mb-2">
+        <label for="" class="text-secondary text-sm">Description</label>
+        <input type="text" name="genericDescription" class="form-control form-control-sm" value="">
+    </div>
+@endif
 <div class="mb-2">
     <label for="" class="text-secondary text-sm">Effective Date</label>
     <input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{date('Y-m-d')}}" required>
 </div>
-<div class="">
-    <button class="btn btn-primary btn-sm" submit>Submit</button>
-    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
-</div>

+ 9 - 1
resources/views/app/generic-bills/add-bill-form/_default-script.blade.php

@@ -47,7 +47,15 @@
                 reimbursable = hours * selectedGenericRate;
             if(isNaN(reimbursable)) reimbursable = 0;
             amountTarget.html('<b>Reimbursable:</b> $' + reimbursable.toFixed(2));
-        }
+        };
+        window.updateGenericBillAction = function(_trigger) {
+            let actions = [];
+            $(_trigger).closest('.generic-bill-actions').find('.generic-bill-action:checked').each(function() {
+                actions.push($(this).attr('data-action'));
+            });
+            $(_trigger).closest('.generic-bill-actions').find('[name="genericDescription"]').val(actions.join("\n"));
+            return false;
+        };
         @if($genericRates && count($genericRates) && count($genericRates) === 1)
             switchGenericRate($('[name="code"][data-entity-type]'));
         @endif

+ 1 - 0
resources/views/app/generic-bills/add-bill-form/default.blade.php

@@ -2,6 +2,7 @@
 <?php $genericRates = $genericPro->genericRates(); ?>
 <form url="/api/bill/createForGeneric">
     @include('app.generic-bills.add-bill-form._default-fields')
+    @include('app.generic-bills.add-bill-form._default-actions')
 </form>
 @include('app.generic-bills.add-bill-form._default-script')
 

+ 1 - 1
resources/views/app/generic-bills/inline.blade.php

@@ -75,7 +75,7 @@ $genericBills = genericBills($pro, @$patient, @$entityType, @$entityUid);
                         @endif
                         <td>{{$bill->code}}
                             @if($bill->generic_description)
-                                <div class="text-sm text-secondary font-italic">{{$bill->generic_description}}</div>
+                                <pre class="mb-0 text-sm text-secondary font-italic">{{$bill->generic_description}}</pre>
                             @endif
                         </td>
                         <td class="">