瀏覽代碼

RHs sidebar - bring in key points from MRV

Vijayakrishnan 3 年之前
父節點
當前提交
91c6963aba

+ 5 - 3
app/Helpers/fdb.php

@@ -421,10 +421,12 @@ if(!function_exists('drugDrugInteractionSinglePair')) {
         }
 
         if (count($activeCatches)) {
-            $output[] = "<b>{$_rx2->data->name}</b> interacts with one or more active ingredients in <b>{$_rx1->data->name}</b>.";
+            $t = "<b>{$_rx2->data->name}</b> interacts with one or more active ingredients in <b>{$_rx1->data->name}</b>.";
+            $output[] = "<span class='events-all' title=\"" . strip_tags(str_replace('"', '', $t)) . "\">" . $t . "</span>";
         }
         if (count($inactiveCatches)) {
-            $output[] = "<b>{$_rx2->data->name}</b> interacts with one or more inactive ingredients in <b>{$_rx1->data->name}</b>.";
+            $t = "<b>{$_rx2->data->name}</b> interacts with one or more inactive ingredients in <b>{$_rx1->data->name}</b>.";
+            $output[] = "<span class='events-all' title=\"" . strip_tags(str_replace('"', '', $t)) . "\">" . $t . "</span>";
         }
 
         // TODO: find out and show the names of the actual ingredients causing interaction
@@ -539,7 +541,7 @@ if(!function_exists('duplicate_therapy_info')) {
         if(!count($matches)) return '';
 
         return "<ol class='pl-0 ml-3 mb-0'>" . implode("", array_map(function ($_x) {
-                return "<li class='mb-1'>" . $_x . "</li>";
+                return "<li class='mb-1 events-all' title=\"" . strip_tags(str_replace('"', '', $_x)) . "\">" . $_x . "</li>";
             }, $matches)) . "</ol>";
     }
 }

+ 12 - 0
public/css/style.css

@@ -620,6 +620,18 @@ body [note-rte][data-field-name="planValue"] .ql-editor[contenteditable] {
 .events-none {
     pointer-events: none;
 }
+.events-all {
+    pointer-events: all !important;
+}
+body .no-bold-children * {
+    font-weight: normal !important;
+}
+.mrv-sidebar ol>li {
+    margin-bottom: 0 !important;
+    /*white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;*/
+}
 .blocking-overlay {
     opacity: 0 !important;
     cursor: default;

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

@@ -51,6 +51,9 @@
         @endif
     </div>
 
+    <!-- MRV DT & DDI -->
+    @include('app.patient.segment-templates.medrisk_vigilence.dt_ddi_short', ['note' => $note, 'patient' => $patient, 'segment' => $note->coreSegment])
+
     <?php
     $allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
     $medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
@@ -61,7 +64,7 @@
     $tracker = \App\Models\Point::getGlobalSingletonOfCategory($patient, 'NO_KNOWN_TRACKER');
     ?>
     <div id="active-allergies"
-         class="p-2 border-bottom c-pointer on-hover-aliceblue {{$note->is_signed_by_hcp ? 'events-none' : ''}}"
+         class="p-2 border-bottom c-pointer on-hover-aliceblue"
          open-in-stag-popup
          mc-initer="allergies-center-{{$note->id}}"
          title="Allergies Center"

+ 48 - 0
resources/views/app/patient/segment-templates/medrisk_vigilence/dt_ddi_short.blade.php

@@ -0,0 +1,48 @@
+<?php
+
+// info from patient chart
+$drugsMRV = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
+
+// filter out drugs without fdb info on them
+$drugsMRV = $drugsMRV->filter(function($_drug) {
+    return @$_drug->data &&
+        $_drug->data->name &&
+        $_drug->data->medId &&
+        $_drug->data->routedMedId &&
+        $_drug->data->routedDosageFormMedId &&
+        $_drug->data->gcnSeqno;
+});
+
+// dpt
+$dptInfo = duplicate_therapy_info($drugsMRV);
+
+// ddi
+$ddi = drug_drug_interaction_info($drugsMRV);
+
+?>
+@if(!!$dptInfo || !!$ddi)
+
+    <div native target="_blank"
+         class="p-2 border-bottom c-pointer on-hover-aliceblue {{$note->is_signed_by_hcp ? 'events-none' : ''}} mrv-sidebar"
+         open-in-stag-popup
+         title="Medrisk Vigilence"
+         popup-style="overflow-visible mrv-content"
+         href="/mrv-summary/{{$note->uid}}">
+
+        @if(!!$dptInfo)
+            <p class="font-weight-bold mb-2">Duplicate Therapy</p>
+            <div class="my-2 text-sm text-nowrap mw-100 text-ellipsis no-bold-children">
+                {!! $dptInfo !!}
+            </div>
+        @endif
+
+        @if(!!$ddi)
+            <p class="font-weight-bold mb-2">Drug-Drug Interaction</p>
+            <div class="mt-2 text-sm text-nowrap mw-100 text-ellipsis no-bold-children">
+                {!! $ddi !!}
+            </div>
+        @endif
+
+    </div>
+
+@endif