Prechádzať zdrojové kódy

Note UI - prev template compat updates

Vijayakrishnan 3 rokov pred
rodič
commit
e078896dd2

+ 15 - 10
public/css/style.css

@@ -2150,6 +2150,8 @@ body.in-iframe .main-row > .sidebar {
     align-items: start;
 }
 .note-container .note-lhs-tree {
+    min-width: 220px;
+    max-width: 220px;
     align-self: stretch;
     border-right: 1px solid #ddd;
     padding-top: 0.85rem;
@@ -2157,6 +2159,8 @@ body.in-iframe .main-row > .sidebar {
     overflow: hidden;
     max-height: calc(100vh - 55px);
     background-color: #fff;
+}
+.note-container.note_template_soap_visit .note-lhs-tree {
     width: 0 !important;
     opacity: 0 !important;
 }
@@ -2171,11 +2175,11 @@ body.in-iframe .main-row > .sidebar {
     z-index: 1;
 }
 .note-container .note-lhs-tree.fixed ~ .note-rhs-content {
-    /*margin-left: 220px;*/
-    /*margin-right: 40vw;*/
+    margin-left: 220px;
+    margin-right: 180px;
 }
 .note-container .note-lhs-tree.fixed-left ~ .note-rhs-content {
-    /*margin-left: 220px;*/
+    margin-left: 220px;
 }
 .note-container .note-lhs-tree .note-tree-node.note-tree-heading>a {
 
@@ -2249,19 +2253,20 @@ body.in-iframe .main-row > .sidebar {
     padding-left: 4rem;
 }
 
-/*.note-container .note-rhs-sidebar {
-    min-width: 40vw;
-    max-width: 40vw;
+.note-container:not(.note_template_soap_visit) .note-rhs-sidebar {
+    min-width: 180px;
+    max-width: 180px;
     align-self: stretch;
     border-right: 1px solid #ddd;
+    height: 300px;
     overflow: hidden;
     max-height: calc(100vh - 55px);
     background-color: #fff;
 }
-.note-container .note-rhs-sidebar:hover {
+.note-container:not(.note_template_soap_visit) .note-rhs-sidebar:hover {
     overflow: overlay;
 }
-.note-container .note-rhs-sidebar.fixed {
+.note-container:not(.note_template_soap_visit) .note-rhs-sidebar.fixed {
     position: fixed;
     top: 55px;
     right: 0;
@@ -2269,9 +2274,9 @@ body.in-iframe .main-row > .sidebar {
     height: calc(100vh - 55px) !important;
     z-index: 1;
 }
-.note-container .note-rhs-sidebar.fixed ~ .note-rhs-content {
+.note-container:not(.note_template_soap_visit) .note-rhs-sidebar.fixed ~ .note-rhs-content {
     margin-right: 180px;
-}*/
+}
 .spot-highlight {
     background: aliceblue !important;
 }

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

@@ -40,7 +40,7 @@
     endforeach;
 
     ?>
-    <div id="note-single-header" class="pb-3 d-flex align-items-start screen-only zero-height">
+    <div id="note-single-header" class="pb-3 d-flex align-items-start screen-only zero-height note_template_{{$note->visitTemplate ? $note->visitTemplate->internal_name : ''}}">
         <h6 class="my-0 text-secondary d-flex align-items-center w-100">
             <a href="/patients/view/{{ $patient->uid }}/notes" class="small text-decoration-none mr-3">
                 <i class="fa fa-chevron-left"></i>
@@ -454,14 +454,14 @@
             </div>
         </div>
         <div class="card-body p-0">
-            <div class="note-container">
-                @if($isVisitTemplateBased && !$doesVisitTemplateUiConfigExist)
+            <div class="note-container note_template_{{$note->visitTemplate ? $note->visitTemplate->internal_name : ''}}"">
+                @if($isVisitTemplateBased && !$doesVisitTemplateUiConfigExist && $note->visitTemplate->internal_name !== 'soap_visit')
                     @include('app.patient.note.lhs-tree')
                 @endif
                 <div class="note-rhs-content">
                 <div>
                 <div class="border-bottom pb-3">
-                    <div class="d-flex align-items-stretch">
+                    <div class="{{$isVisitTemplateBased && $note->visitTemplate->internal_name === 'soap_visit' ? 'd-flex align-items-stretch' : ''}}">
                         <?php
                         $shortCutsObject = [];
                         foreach ($pro->allShortcuts() as $shortcut) {
@@ -531,7 +531,7 @@
                         $shortcuts = "";
                         $latestSectionTS = 0;
                         ?>
-                        <div class="{{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }} w-50">
+                        <div class="{{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }} {{$isVisitTemplateBased && $note->visitTemplate->internal_name === 'soap_visit' ? 'w-50' : ''}}">
                             @if($isVisitTemplateBased && $doesVisitTemplateLayoutExist)
                                 @include($visitLayoutPath)
                             @elseif($isVisitTemplateBased && !$doesVisitTemplateUiConfigExist)
@@ -542,12 +542,14 @@
                                 @include('app.patient.note.note-section-list')
                             @endif
                         </div>
+                        @if($isVisitTemplateBased && $note->visitTemplate->internal_name === 'soap_visit')
                         <div class="w-50 border-left">
                             @if($isVisitTemplateBased && !$note->is_signed_by_hcp)
                                 {{--@include('app.patient.note.rhs-sidebar')--}}
                                 @include('app.patient.note.note-segment-list-rhs')
                             @endif
                         </div>
+                        @endif
                     </div>
                 </div>
 
@@ -2545,6 +2547,9 @@
                     @endif
 
                 </div>
+                @if($isVisitTemplateBased && !$note->is_signed_by_hcp && $note->visitTemplate->internal_name !== 'soap_visit')
+                    @include('app.patient.note.rhs-sidebar')
+                @endif
             </div>
         </div>
     </div>
@@ -2557,9 +2562,11 @@
     <script>
         (function() {
             function init() {
-                /*fixTreeTopAndHeight();
+                @if($note->visitTemplate->internal_name !== 'soap_visit')
+                fixTreeTopAndHeight();
                 $(window).on('resize', fixTreeTopAndHeight);
-                $(window).on('scroll', fixTreeTopAndHeight);*/
+                $(window).on('scroll', fixTreeTopAndHeight);
+                @endif
                 $('.note-tree-node>a[data-segment-uid]')
                     .off('click.scroll-to-segment')
                     .on('click.scroll-to-segment', function() {

+ 1 - 2
resources/views/app/patient/note/lhs-tree.blade.php

@@ -1,5 +1,4 @@
 <div class="note-lhs-tree pb-4" id="note-lhs-tree">
-<?php /*
     <?php
     $previousHeading = null;
     $previousSubHeading = null;
@@ -70,5 +69,5 @@
     @if($note->is_signed_by_hcp)
         <div class="note-tree-node mb-3"><a native="" target="_top" data-non-segment-target="Addendums" href="#">Addendums</a></div>
     @endif
-*/ ?>
+
 </div>

+ 9 - 3
resources/views/app/patient/note/note-segment-list.blade.php

@@ -23,9 +23,15 @@
             $previousHeading = $segment->heading;
         }
         ?>
-        <div class="{{in_array($segment->segmentTemplate->internal_name, config('app.note_lhs_segments')) ? '' : 'd-none'}}">
-            @include('app.patient.note.segment')
-        </div>
+		@if($note->visitTemplate->internal_name !== 'soap_visit')
+			<div class="{{$segment->segmentTemplate->internal_name === 'medrisk_vigilence' ? 'd-none' : ''}}">
+				@include('app.patient.note.segment')
+			</div>
+		@else
+			<div class="{{in_array($segment->segmentTemplate->internal_name, config('app.note_lhs_segments')) ? '' : 'd-none'}}">
+				@include('app.patient.note.segment')
+			</div>
+		@endif
     @endforeach
     <?php
     if (!empty($previousHeading)) {

+ 1 - 1
resources/views/app/patient/note/rhs-sidebar.blade.php

@@ -1,4 +1,4 @@
-<div class="note-rhs-sidebar" id="note-rhs-sidebar">
+<div class="note-rhs-sidebar {{$note->visitTemplate && $note->visitTemplate->internal_name === 'soap_visit' ? '' : 'border-left'}}" id="note-rhs-sidebar">
     <?php
     $allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
     $medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");