Jelajahi Sumber

Highlight for reviews/plans added during same note

Vijayakrishnan 3 tahun lalu
induk
melakukan
b34fd43b28

+ 3 - 0
public/css/style.css

@@ -41,6 +41,9 @@
 .text-warning-mellow {
     color: #d8a714!important;
 }
+.bg-warning-mellow {
+    background-color: #ffc10777 !important;
+}
 .text-link {
     color: rgb(13, 89, 175) !important;
 }

+ 12 - 10
resources/views/app/patient/segment-templates/_child_plan/last-plan.php

@@ -1,15 +1,17 @@
 <?php if ($point->lastChildPlan): ?>
     <?php $parsedPlan = json_decode($point->lastChildPlan->data); ?>
-    <div><?= $parsedPlan->value ?></div>
-    <div class="text-secondary text-sm"></div>
-    <?php if ($point->last_child_plan_point_scoped_note_id === $note->id): ?>
-        <span class="text-secondary text-sm">(added on this note)</span>
-    <?php else: ?>
-        <a native target="_blank"
-           href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $point->lastChildPlanNote]) ?>">
-            <?= friendlier_date_time($point->last_child_plan_effective_date) ?>
-        </a>
-    <?php endif; ?>
+    <div class="mb-2 <?= $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div><?= $parsedPlan->value ?></div>
+        <div class="text-secondary text-sm"></div>
+        <?php if ($point->last_child_plan_point_scoped_note_id === $note->id): ?>
+            <span class="text-sm">(added on this note)</span>
+        <?php else: ?>
+            <a native target="_blank"
+               href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $point->lastChildPlanNote]) ?>">
+                <?= friendlier_date_time($point->last_child_plan_effective_date) ?>
+            </a>
+        <?php endif; ?>
+    </div>
 <?php else: ?>
     <span class="text-secondary text-sm">None</span>
 <?php endif; ?>

+ 11 - 10
resources/views/app/patient/segment-templates/_child_review/last-review.php

@@ -1,15 +1,16 @@
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div><?= @$parsedReview->value ?></div>
-    <div class="text-secondary text-sm"></div>
-    <?php if ($point->last_child_review_point_scoped_note_id === $note->id): ?>
-        <span class="text-secondary text-sm">(reviewed on this note)</span>
-    <?php else: ?>
-        <a native target="_blank"
-           href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $point->lastChildReviewNote]) ?>">
-            <?= friendlier_date_time($point->last_child_review_effective_date) ?>
-        </a>
-    <?php endif; ?>
+    <div class="mb-2 <?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div><?= @$parsedReview->value ?></div>
+        <?php if ($point->last_child_review_point_scoped_note_id === $note->id): ?>
+            <span class="text-sm">(reviewed on this note)</span>
+        <?php else: ?>
+            <a native target="_blank"
+               href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $point->lastChildReviewNote]) ?>">
+                <?= friendlier_date_time($point->last_child_review_effective_date) ?>
+            </a>
+        <?php endif; ?>
+    </div>
 <?php else: ?>
     <span class="text-secondary text-sm">None</span>
 <?php endif; ?>

+ 2 - 2
resources/views/app/patient/segment-templates/_review/problem/last-review.php

@@ -3,9 +3,9 @@
     $review = json_decode($point->lastChildReview->data);
     include resource_path('views/app/patient/segment-templates/_review/problem/view.php');
     ?>
-    <div class="mb-2">
+    <div class="mb-2 <?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2' : '' ?>">
         <?php if ($point->last_child_review_point_scoped_note_id === $note->id): ?>
-            <span class="text-secondary text-sm">(reviewed on this note)</span>
+            <span class="text-sm">(reviewed on this note)</span>
         <?php else: ?>
             <span class="text-sm">Reviewed on:</span>
             <a native target="_blank" class="text-sm"