浏览代码

Note - rhs sidebar - arch

Vijayakrishnan 3 年之前
父节点
当前提交
0c00febbed

+ 4 - 0
app/Http/Controllers/NoteController.php

@@ -334,6 +334,10 @@ class NoteController extends Controller
         ]);
     }
 
+    public function rhsSidebar(Request $request, Client $patient, Note $note) {
+        return view('app.patient.note.rhs-sidebar', compact('patient', 'note'));
+    }
+
     public function medicationsCenter(Request $request, Client $patient, Note $note) {
         return view('app.patient.medications-center', compact('patient', 'note'));
     }

+ 25 - 0
public/css/style.css

@@ -2100,6 +2100,31 @@ body.in-iframe .main-row > .sidebar {
 .note-container .note-rhs-content {
     flex-grow: 1;
 }
+.note-container .note-rhs-sidebar {
+    min-width: 220px;
+    max-width: 220px;
+    align-self: stretch;
+    border-right: 1px solid #ddd;
+    padding-top: 0.85rem;
+    height: 300px;
+    overflow: hidden;
+    max-height: calc(100vh - 55px);
+    background-color: #fff;
+}
+.note-container .note-rhs-sidebar:hover {
+    overflow: overlay;
+}
+.note-container .note-rhs-sidebar.fixed {
+    position: fixed;
+    top: 55px;
+    right: 0;
+    max-height: calc(100vh - 55px) !important;
+    height: calc(100vh - 55px) !important;
+    z-index: 1;
+}
+.note-container .note-rhs-sidebar.fixed ~ .note-rhs-content {
+    margin-right: 220px;
+}
 .spot-highlight {
     background: aliceblue !important;
 }

+ 3 - 0
public/js/mc.js

@@ -485,6 +485,9 @@ window.saveVisitForm = function(_trigger, _silent = false, _close = false, _done
             if(typeof window.updateAllSegmentsInResponse !== 'undefined' && noteSection.length) {
                 window.updateAllSegmentsInResponse(_data, true, _silent);
             }
+            if(typeof window.refreshRHSSidebar !== 'undefined') {
+                window.refreshRHSSidebar();
+            }
             if(!_silent) {
                 hideMask();
                 if(noteSection.length) {

+ 8 - 1
resources/views/app/patient/note/dashboard.blade.php

@@ -2391,6 +2391,9 @@
                     @endif
 
                 </div>
+                <div class="note-rhs-sidebar border-left" id="note-rhs-sidebar">
+                    @include('app.patient.note.rhs-sidebar')
+                </div>
             </div>
         </div>
     </div>
@@ -2453,16 +2456,20 @@
                     });
             }
             function fixTreeTopAndHeight() {
-                let tree = $('#note-lhs-tree'), noteCardHeader = $('#note-card-header');
+                let tree = $('#note-lhs-tree'), rhsSidebar = $('#note-rhs-sidebar'), noteCardHeader = $('#note-card-header');
                 if(!noteCardHeader.length) return;
                 let resultTop = (noteCardHeader.offset().top + noteCardHeader.outerHeight(true)) - $(window).scrollTop();
                 if(resultTop <= 55) {
                     tree.addClass('fixed');
+                    rhsSidebar.addClass('fixed');
                 }
                 else {
                     tree.removeClass('fixed');
                     tree.css('height', 'calc(100vh - ' + resultTop + 'px)');
                     tree.css('max-height', 'calc(100vh - ' + resultTop + 'px)');
+                    rhsSidebar.removeClass('fixed');
+                    rhsSidebar.css('height', 'calc(100vh - ' + resultTop + 'px)');
+                    rhsSidebar.css('max-height', 'calc(100vh - ' + resultTop + 'px)');
                 }
             }
             addMCInitializer('note-tree', init, '#note-lhs-tree');

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

@@ -0,0 +1,16 @@
+<div id="active-allergies" class="px-2">
+    Active Allergies
+</div>
+<div id="active-medications" class="px-2">
+    Active Medications
+</div>
+<div id="active-problems" class="px-2">
+    Active Problems
+</div>
+<div id="active-goals" class="px-2">
+    Active Goals
+</div>
+<div id="relevant-erx-orders" class="px-2">
+    ERx / Orders
+</div>
+{{date('h:i:s')}}

+ 10 - 0
resources/views/app/patient/note/segment_script.blade.php

@@ -9,6 +9,9 @@
                     updateSegmentByUid(_response.data.uid, _response.data.summaryHtml, _response.data.editHtml, _updateOnlySummary);
                 }
 
+                // refresh rhs-sidebar
+                window.refreshRHSSidebar();
+
                 // refresh listening segments
                 if(_updateListeners) {
                     if(_response.data && _response.data.listenerSegmentUids && _response.data.listenerSegmentUids.length) {
@@ -37,6 +40,10 @@
             }
         }
 
+        window.refreshRHSSidebar = function() {
+            $('#note-rhs-sidebar').load('/note-rhs-sidebar/{{$patient->uid}}/{{$note->uid}}');
+        };
+
         window.updateSegmentByUid = function(_uid, _summaryHtml, _editHtml, _updateOnlySummary) {
             let segment = $('.note-section[data-segment-uid="' + _uid + '"]');
             if(segment && segment.length) {
@@ -49,6 +56,9 @@
                     popupContainer.html(_editHtml);
                 }
 
+                // refresh rhs-sidebar
+                window.refreshRHSSidebar();
+
                 if(!_updateOnlySummary) {
                     initRTEs(segment);
                     initSegmentMoes(segment);

+ 1 - 0
routes/web.php

@@ -385,6 +385,7 @@ Route::middleware('pro.auth')->group(function () {
     Route::get('/segment-summary/{segment}', 'NoteController@segmentSummary')->name('segment-summary');
     Route::get('/note-segment-view/{patient}/{note}/{segment}/{segmentInternalName}/{view}', 'NoteController@noteSegmentView')->name('note-segment-view');
     Route::get('/chart-segment-view/{patient}/{segmentInternalName}/{view}', 'NoteController@chartSegmentView')->name('chart-segment-view');
+    Route::get('/note-rhs-sidebar/{patient}/{note}', 'NoteController@rhsSidebar')->name('note-rhs-sidebar');
     Route::get('/medications-center/{patient}/{note}', 'NoteController@medicationsCenter')->name('medications-center');
     Route::get('/medications-reconcile/{patient}/{note}', 'NoteController@medicationsReconcile')->name('medications-reconcile');
     Route::get('/problems-center/{patient}/{note}', 'NoteController@problemsCenter')->name('problems-center');