浏览代码

Visit UI - support for older version notes

Vijayakrishnan 3 年之前
父节点
当前提交
a27764e603
共有 1 个文件被更改,包括 15 次插入4 次删除
  1. 15 4
      resources/views/app/patient/note/dashboard.blade.php

+ 15 - 4
resources/views/app/patient/note/dashboard.blade.php

@@ -10,14 +10,17 @@
 
     <?php
     $hasBills = false;
-    if($note->bills->count()) {
+    if ($note->bills->count()) {
         foreach ($note->bills as $bill) {
-            if(!$bill->is_cancelled) {
+            if (!$bill->is_cancelled) {
                 $hasBills = true;
                 break;
             }
         }
     }
+
+    // is based on visit template
+    $isVisitTemplateBased = !!$note->visitTemplate;
     ?>
 
     {{--
@@ -434,6 +437,7 @@
         </div>
         <div class="card-body p-0">
             <div class="note-container">
+                @if($isVisitTemplateBased)
                 <div class="note-lhs-tree" id="note-lhs-tree">
                     <?php
                     $previousHeading = null;
@@ -477,6 +481,7 @@
                     }
                     ?>
                 </div>
+                @endif
                 <div class="note-rhs-content">
             <div>
                 <div class="">
@@ -503,7 +508,11 @@
                         $latestSectionTS = 0;
                         ?>
                         <div class="{{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }}">
-                            @include('app.patient.note.note-segment-list')
+                            @if($isVisitTemplateBased)
+                                @include('app.patient.note.note-segment-list')
+                            @else
+                                @include('app.patient.note.note-section-list')
+                            @endif
                         </div>
                     </div>
                 </div>
@@ -2218,7 +2227,8 @@
     <div class="note-templates-underlay"></div>
     @include('app.patient.note.dashboard_script')
     @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'rx', 'class' => 'wide', 'noEditLink' => true])
-        <script>
+    @if($isVisitTemplateBased)
+    <script>
         (function() {
             function init() {
                 fixTreeTopAndHeight();
@@ -2259,4 +2269,5 @@
             addMCInitializer('note-tree', init, '#note-lhs-tree');
         })();
     </script>
+    @endif
 @endsection