瀏覽代碼

Last review/plan - text update when viewed directly from the chart

Vijayakrishnan 3 年之前
父節點
當前提交
48c16e35db

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

@@ -3,14 +3,20 @@
     <div class="<?= $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 if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
+            <span class="text-sm">(added on the patient's chart)</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 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; ?>
         <?php endif; ?>
+
     </div>
 <?php else: ?>
     <span class="text-secondary text-sm">None</span>

+ 12 - 6
resources/views/app/patient/segment-templates/_child_review/last-review.php

@@ -2,14 +2,20 @@
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= $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 if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
+            <span class="text-sm">(reviewed on the patient's chart)</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 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; ?>
         <?php endif; ?>
+
     </div>
 <?php else: ?>
     <span class="text-secondary text-sm">None</span>