浏览代码

CM setup info patients list

Vijayakrishnan 3 年之前
父节点
当前提交
9e769b3357
共有 2 个文件被更改,包括 15 次插入0 次删除
  1. 5 0
      app/Models/Client.php
  2. 10 0
      resources/views/app/patients.blade.php

+ 5 - 0
app/Models/Client.php

@@ -623,6 +623,11 @@ class Client extends Model
             ->orderBy('code', 'ASC');
     }
 
+    public function cmSetupNote()
+    {
+        return $this->hasOne(Note::class, 'id', 'cm_setup_note_id');
+    }
+
     public function defaultMcpCompanyPro()
     {
         return $this->hasOne(CompanyPro::class, 'id', 'default_mcp_company_pro_id');

+ 10 - 0
resources/views/app/patients.blade.php

@@ -68,6 +68,7 @@
                     <th class="border-0">Patient</th>
                     <th class="border-0 px-1">OB</th>
                     <th class="border-0">Signed<br>Notes</th>
+                    <th class="border-0">CM<br>Setup</th>
                     <th class="border-0">Created At</th>
 		            <th class="border-0">Address</th>
                     @if($showProgramsColumn)<th class="border-0">Program(s)</th>@endif
@@ -108,6 +109,15 @@
                                 {{$numSignedNotes ? $numSignedNotes :'-'}}
                             </span>
                         </td>
+                        <td>
+                            @if($patient->has_cm_setup_been_performed)
+                                <i class="fa fa-check text-secondary on-hover-opaque"></i>
+                                <br>
+                                <a href="{{route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $patient->cmSetupNote])}}">Note</a>
+                            @else
+                                -
+                            @endif
+                        </td>
                         <td>
                             {{ friendly_date_time_short_with_tz($patient->created_at, true, 'EASTERN') }}
                             <hr>