Bladeren bron

Make cancelling signed notes a big deal

Vijayakrishnan 4 jaren geleden
bovenliggende
commit
32010aee09

+ 23 - 0
resources/views/app/patient/note/_cancel-signed-note.blade.php

@@ -0,0 +1,23 @@
+@if(!$note->is_cancelled && $note->is_signed_by_hcp)
+    <span class="mx-2 text-secondary">|</span>
+    <span moe relatve
+         class="{{ $hasBills ? 'moe-disabled' : '' }}"
+         title="{{ $hasBills ? 'Cannot cancel note since it has un-cancelled bills in it' : '' }}">
+        <a class="text-danger font-weight-bold" href="" show start>
+            <i class="fa fa-exclamation-triangle"></i>
+            Cancel Signed Note
+        </a>
+        <form url="/api/note/cancel">
+            <input type="hidden" name="uid" value="{{$note->uid}}">
+            <p class="small mb-1 font-weight-bold">This note has been already signed by the HCP.</p>
+            <p class="mb-2">Do you still want to cancel this note?</p>
+            <div class="mb-2">
+                <textarea name="memo" id="" cols="30" rows="5" placeholder="Memo (required to cancel signed note)" class="memo-textarea form-control form-control-sm" required></textarea>
+            </div>
+            <div class="d-flex align-items-center">
+                <button class="btn btn-sm btn-danger mr-2" submit>Yes</button>
+                <button class="btn btn-sm btn-default mr-2 border" cancel>No</button>
+            </div>
+        </form>
+    </span>
+@endif

+ 7 - 2
resources/views/app/patient/note/dashboard.blade.php

@@ -197,7 +197,7 @@
             </div>
 
             <div class="ml-auto d-flex align-items-start">
-                <div class="pr-2">
+                <div class="">
                     <div>
                         @if($note->is_signed_by_hcp)
                             <span class="text-secondary">
@@ -221,7 +221,8 @@
                         @endif
                     </div>
                 </div>
-                <div class="pl-2 border-left">
+                @if($note->is_cancelled || (!$note->is_cancelled && !$note->is_signed_by_hcp))
+                <div class="ml-2 pl-2 border-left">
                     <div class="d-flex justify-content-end">
                         @if(!$note->is_cancelled)
                         <div moe relatve
@@ -245,6 +246,8 @@
                         @endif
                     </div>
                 </div>
+                @endif
+
             </div>
         </div>
         <div class="card-body p-0">
@@ -282,6 +285,7 @@
                         <div class="d-flex align-items-center mb-2">
                             <p class="font-weight-bold text-secondary m-0">Bills</p>
                             @include('app/patient/note/_create-bill')
+                            @include('app/patient/note/_cancel-signed-note')
                         </div>
                         <table class="table table-sm tabe-striped mb-3 border-left border-right border-bottom">
                             <thead class="bg-light">
@@ -375,6 +379,7 @@
                     <div class="my-3 px-3 d-flex">
                         <p class="font-weight-bold mb-0 text-secondary">No bills in this note</p>
                         @include('app/patient/note/_create-bill')
+                        @include('app/patient/note/_cancel-signed-note')
                     </div>
                 @endif