Browse Source

Note: guide Na through the process once note is signed by np

Vijayakrishnan 3 years ago
parent
commit
4359765dce
2 changed files with 36 additions and 0 deletions
  1. 5 0
      app/Models/Note.php
  2. 31 0
      resources/views/app/patient/note/dashboard.blade.php

+ 5 - 0
app/Models/Note.php

@@ -49,6 +49,11 @@ class Note extends Model
             ->where('status', '<>', 'CANCELLED');
     }
 
+    public function naGenericBill()
+    {
+        return $this->hasOne(Bill::class, 'id', 'na_generic_bill_id')->where('is_cancelled', false)->where('is_cancelled_by_administrator', false);
+    }
+
     // Signed/Billed/Verified/Processed/Cancelled
     public function overallStatus()
     {

+ 31 - 0
resources/views/app/patient/note/dashboard.blade.php

@@ -739,6 +739,37 @@ use App\Models\Handout;
 
             </div>
         </div>
+
+        @if($note->ally_pro_id === $pro->id && $note->is_signed_by_hcp)
+            <div class="card-header px-3 py-2 border-bottom rounded-0">
+                <i class="fa fa-check text-success mr-1"></i>
+                This visit has been <b>successfully coordinated</b>.
+                @if(!$note->is_signed_by_ally)
+                    <span class="ml-1">
+                        Please review and
+                        <span moe class="d-inline">
+                            <a class="font-weight-bold" href="" show start>sign</a>
+                            <form url="/api/note/signAsAlly">
+                                <input type="hidden" name="uid" value="{{$note->uid}}">
+                                <p>Sign this NA?</p>
+                                <div class="mb-0">
+                                    <button class="btn btn-success btn-sm" submit>Sign</button>
+                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                </div>
+                            </form>
+                        </span>
+                        the note.
+                    </span>
+                @endif
+                @if(!$note->naGenericBill)
+                    <span class="">
+                        To bill for your services,
+                        <a native="" target="_top" class="font-weight-bold" data-non-segment-target="NA Bills" href="#">click here</a>.
+                    </span>
+                @endif
+            </div>
+        @endif
+
         <div class="card-body p-0">
             <div class="note-container note_template_{{$note->visitTemplate ? $note->visitTemplate->internal_name : ''}}">
                 @if(!$hasRightSegments)