Quellcode durchsuchen

Note na bill: conditional billing up to 60 minutes

Vijayakrishnan vor 3 Jahren
Ursprung
Commit
eda0fa348e

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

@@ -39,7 +39,11 @@
     </div>
 @endif
 <div class="mb-2">
-    <?php $maxMinutes = 240; ?>
+    <?php
+    if(!@$maxMinutes) {
+        $maxMinutes = 240;
+    }
+    ?>
     <label for="" class="text-secondary text-sm">Minutes</label>
     <div class="mb-2">
         <select name="numberOfUnits" class="form-control form-control-sm"

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

@@ -20,6 +20,20 @@
                         maxNumberOf5Minutes = Math.ceil(maxNABillableAmount / amountPer5Minutes),
                         maxHours = (maxNumberOf5Minutes * 5) / 60,
                         unitsSelect = $(_trigger).closest('form').find('[name="numberOfUnits"]');
+
+                    // CRITERIA TO BILL UP TO 60 MINS. is note.hcp_pro_id == client.mcp_pro_id AND note.wasCmSetupPerformed IS TRUE
+                    $('.cm-setup-alert').remove();
+                    @if(@$note && @$patient && $note->hcp_pro_id === $patient->mcp_pro_id && $note->was_cm_setup_performed)
+                    maxHours = 1;
+                    @endif
+                    @if(@$note && @$patient && $note->hcp_pro_id === $patient->mcp_pro_id && !$note->was_cm_setup_performed)
+                    $('<div/>')
+                        .addClass('alert alert-warning my-2 cm-setup-alert border border-warning p-2')
+                        .html('<div class="mb-2">CCM setup may have been performed, but has not been marked as such in the note.</div>' +
+                            'Please ask the HCP if they need to do that, and then you can bill up to 60 mins. because patient needs education re: CM')
+                        .insertAfter(unitsSelect);
+                    @endif
+
                     unitsSelect.find('option').each(function () {
                         if (this.value) {
                             if (+this.value > maxHours) {