Jelajahi Sumber

Visit UI - medications logic fixes

Vijayakrishnan 3 tahun lalu
induk
melakukan
e014874291

+ 7 - 0
resources/views/app/patient/segment-templates/intake_medications/edit.blade.php

@@ -20,6 +20,7 @@ $medications = Point::getIntakePointsOfCategory($patient, 'MEDICATION', $note);
             <tr class="">
                 <th class="border-bottom-0">Medication</th>
                 <th class="border-bottom-0">Last Review</th>
+                <th class="border-bottom-0">Last Plan</th>
                 <th class="border-bottom-0">Review Today</th>
             </tr>
             </thead>
@@ -50,6 +51,12 @@ $medications = Point::getIntakePointsOfCategory($patient, 'MEDICATION', $note);
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
+                    <td>
+                        <?php
+                        $point = $medication;
+                        include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                        ?>
+                    </td>
                     <td>
                         <?php
                         $point = $medication;

+ 9 - 5
resources/views/app/patient/segment-templates/plan_medications/edit.blade.php

@@ -21,10 +21,12 @@ $intakeOrVisit = 'PLAN';
             <tr class="">
                 <th class="border-bottom-0">Medication</th>
                 <th class="border-bottom-0">Last Review</th>
-                <th class="border-bottom-0">Review Today</th>
+                <th class="border-bottom-0">Last Plan</th>
+                <th class="border-bottom-0">Plan Today</th>
             </tr>
             </thead>
             <?php foreach($medications as $medication): ?>
+                <?php $point = $medication; ?>
                 <tr>
                     <td>
                         <div class="d-flex align-items-baseline">
@@ -38,7 +40,6 @@ $intakeOrVisit = 'PLAN';
                             <!-- common actions -->
                             <div class="ml-auto d-inline-flex align-items-baseline pr-2">
                                 <?php
-                                $point = $medication;
                                 $label = 'Medication';
                                 include resource_path('views/app/patient/segment-templates/_common_actions/remove-undo.php');
                                 ?>
@@ -47,14 +48,17 @@ $intakeOrVisit = 'PLAN';
                     </td>
                     <td>
                         <?php
-                        $point = $medication;
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
                     <td>
                         <?php
-                        $point = $medication;
-                        include resource_path('views/app/patient/segment-templates/_child_review/edit-review.php');
+                        include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                        ?>
+                    </td>
+                    <td>
+                        <?php
+                        include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan.php');
                         ?>
                     </td>
                 </tr>

+ 5 - 1
resources/views/app/patient/segment-templates/plan_medications/summary.blade.php

@@ -22,7 +22,11 @@ $medications = Point::getPlanPointsOfCategory($patient, 'MEDICATION', $note);
             <?php if ($medication->is_removed): ?>
                 <span class="ml-2 text-sm text-secondary">Removed during visit</span>
             <?php elseif ($medication->added_in_note_id === $note->id): ?>
-                <span class="ml-2 text-sm text-success">* Added during visit</span>
+                <?php if ($medication->addition_reason_category === 'DURING_VISIT'): ?>
+                    <span class="ml-2 text-sm text-success">* Added during visit</span>
+                <?php else: ?>
+                    <span class="ml-2 text-sm text-info">* Added on intake</span>
+                <?php endif;?>
             <?php endif; ?>
         </div>
     <?php endforeach; ?>