Vijayakrishnan 3 anni fa
parent
commit
eb702cd96b

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

@@ -324,6 +324,14 @@ class NoteController extends Controller
         return '<div class="mrv-content border-top px-3 pt-2 mt-3">' . @$segment->summary_html . '</div>';
     }
 
+    public function mrvSummary(Request $request, Note $note) {
+        return view('app.patient.segment-templates.medrisk_vigilence.summary', [
+            'note' => $note,
+            'patient' => $note->client,
+            'segment' => $note->coreSegment
+        ]);
+    }
+
     public function chartSegmentView(Request $request, Client $patient, $segmentInternalName, $view) {
         return view("app.patient.segment-templates.{$segmentInternalName}.{$view}", [
             'patient' => $patient,

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

@@ -2366,21 +2366,14 @@
                 @if($isVisitTemplateBased && !$note->is_signed_by_hcp)
                 <div class="position-sticky note-bottom-toolbar border-top border-info p-0 bg-aliceblue d-flex align-items-stretch screen-only">
                     <div class="nbt-container border-right border-info">
-                        <!-- render mrv segment here -->
-                        <?php $segment = null; ?>
-                        @foreach($note->segments as $segment)
-                            @if($segment->segmentTemplate->internal_name === 'medrisk_vigilence')
-                                <div native target="_blank"
-                                     class="d-block c-pointer mrv-trigger d-flex align-items-center px-2 py-1"
-                                     open-in-stag-popup
-                                     title="MedRisk Vigilance"
-                                     popup-style="stag-popup-md"
-                                     href="/segment-summary/{{$segment->uid}}">
-                                    <div class="text-info font-weight-bold text-center font-size-11">MRV</div>
-                                    {!! $segment->summary_html !!}
-                                </div>
-                            @endif
-                        @endforeach
+                        <div native target="_blank"
+                             class="c-pointer d-inline-flex align-items-center px-2 py-1"
+                             open-in-stag-popup
+                             title="Medrisk Vigilence"
+                             popup-style="medium-large overflow-visible mrv-content"
+                             href="/mrv-summary/{{$note->uid}}">
+                            <span>MRV</span>
+                        </div>
                     </div>
                     <div class="nbt-container border-right border-info d-inline-flex align-self-stretch">
                         <div native target="_blank"

+ 9 - 18
resources/views/app/patient/segment-templates/medrisk_vigilence/summary.blade.php

@@ -52,10 +52,12 @@ $hasMRVData = false;
 
 ?>
 
+<div class="px-3 pt-3 popup-content-container">
+
 @if(!!$dptInfo)
     <?php $hasMRVData = true; ?>
     <div class="mrv-badge ml-1 align-self-center on-trigger-only" title="Duplicate Therapy Notes"><span>DT</span></div>
-    <div class="p-3 mb-3 mt-2 border bg-white mr-0 on-content-only">
+    <div class="p-3 mb-3 border bg-white mr-0 on-content-only">
         <p class="font-weight-bold m-0 font-size-14 text-info">Duplicate Therapy Notes</p>
         <div class="mt-3 ml-3">
             {!! $dptInfo !!}
@@ -66,7 +68,7 @@ $hasMRVData = false;
 @if(!!$coadministration)
     <?php $hasMRVData = true; ?>
     <div class="mrv-badge ml-1 align-self-center on-trigger-only" title="Coadministration Notes"><span>CA</span></div>
-    <div class="p-3 mb-3 mt-2 border bg-white mr-0 on-content-only">
+    <div class="p-3 mb-3 border bg-white mr-0 on-content-only">
         <p class="font-weight-bold m-0 font-size-14 text-info">Coadministration Notes</p>
         <div class="mt-3 ml-3">
             {!! $coadministration !!}
@@ -77,7 +79,7 @@ $hasMRVData = false;
 @if(!!$dam)
     <?php $hasMRVData = true; ?>
     <div class="mrv-badge ml-1 align-self-center on-trigger-only" title="Drug Allergy Notes"><span>DA</span></div>
-    <div class="p-3 mb-3 mt-2 border bg-white mr-0 on-content-only">
+    <div class="p-3 mb-3 border bg-white mr-0 on-content-only">
         <p class="font-weight-bold m-0 font-size-14 text-info">Drug Allergy Notes</p>
         <div class="mt-3 ml-3">
             {!! $dam !!}
@@ -88,7 +90,7 @@ $hasMRVData = false;
 @if(!!$ddi)
     <?php $hasMRVData = true; ?>
     <div class="mrv-badge ml-1 align-self-center on-trigger-only" title="Drug-Drug Interaction Notes"><span>DI</span></div>
-    <div class="p-3 mb-3 mt-2 border bg-white mr-0 on-content-only">
+    <div class="p-3 mb-3 border bg-white mr-0 on-content-only">
         <p class="font-weight-bold m-0 font-size-14 text-info">Drug-Drug Interaction Notes</p>
         <div class="mt-3 ml-3">
             {!! $ddi !!}
@@ -99,7 +101,7 @@ $hasMRVData = false;
 @if(count($sideeffects))
     <?php $hasMRVData = true; ?>
     <div class="mrv-badge ml-1 align-self-center on-trigger-only" title="Side Effects"><span>SE</span></div>
-    <div class="p-3 mb-3 mt-2 border bg-white mr-0 on-content-only">
+    <div class="p-3 mb-3 border bg-white mr-0 on-content-only">
         <p class="font-weight-bold m-0 font-size-14 text-info">Side Effects</p>
         @foreach($sideeffects as $drug => $sideeffect)
             <div class="mt-3 ml-3">
@@ -117,7 +119,7 @@ $hasMRVData = false;
 @if(count($contraindications))
     <?php $hasMRVData = true; ?>
     <div class="mrv-badge ml-1 align-self-center on-trigger-only" title="Contraindications"><span>CI</span></div>
-    <div class="p-3 mb-3 mt-2 border bg-white mr-0 on-content-only">
+    <div class="p-3 mb-3 border bg-white mr-0 on-content-only">
         <p class="font-weight-bold m-0 font-size-14 text-info">Contraindications</p>
         @foreach($contraindications as $drug => $contraindication)
             <div class="mt-3 ml-3">
@@ -132,15 +134,4 @@ $hasMRVData = false;
     </div>
 @endif
 
-<script>
-    (function() {
-        window.segmentInitializers.<?= $segment->segmentTemplate->internal_name ?> = function() {
-            // this is incorrect - gets saved in summary html and always fires!
-            // toast should be shown "only" on actual refresh of MRV
-            {{--@if(!!$hasMRVData)
-            toastr.info('Medrisk Vigilance Updated', null, { timeOut: 10000 });
-            @endif--}}
-        };
-    }).call(window);
-</script>
-
+</div>

+ 1 - 0
routes/web.php

@@ -547,6 +547,7 @@ Route::middleware('pro.auth')->group(function () {
     Route::get('/note/ccm-agreement/{note}', 'NoteController@ccmAgreement')->name('ccm-agreement');
     Route::get('/note/rpm-agreement/{note}', 'NoteController@rpmAgreement')->name('rpm-agreement');
     Route::get('/segment-summary/{segment}', 'NoteController@segmentSummary')->name('segment-summary');
+    Route::get('/mrv-summary/{note}', 'NoteController@mrvSummary')->name('mrv-summary');
     Route::get('/note-segment-view/{patient}/{note}/{segment}/{segmentInternalName}/{view}', 'NoteController@noteSegmentView')->name('note-segment-view');
     Route::get('/note-segment-view-by-name/{note}/{segmentInternalName}/{view}', 'NoteController@noteSegmentViewByName')->name('note-segment-view-by-name');
     Route::get('/chart-segment-view/{patient}/{segmentInternalName}/{view}', 'NoteController@chartSegmentView')->name('chart-segment-view');