Ver código fonte

Visit UI - Update all intake and plan sections as per new plan/review logic

Vijayakrishnan 3 anos atrás
pai
commit
d7b4d75926

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

@@ -20,6 +20,7 @@ $allergies = Point::getIntakePointsOfCategory($patient, 'ALLERGY', $note);
             <tr class="">
                 <th class="border-bottom-0">Allergy</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>
@@ -48,6 +49,12 @@ $allergies = Point::getIntakePointsOfCategory($patient, 'ALLERGY', $note);
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
+                    <td>
+                        <?php
+                        $point = $allergy;
+                        include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                        ?>
+                    </td>
                     <td>
                         <?php
                         $point = $allergy;

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

@@ -20,6 +20,7 @@ $careTeamMembers = Point::getIntakePointsOfCategory($patient, 'CARE_TEAM_MEMBER'
             <tr class="">
                 <th class="border-bottom-0">Care Team Member</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>
@@ -54,6 +55,12 @@ $careTeamMembers = Point::getIntakePointsOfCategory($patient, 'CARE_TEAM_MEMBER'
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
+                    <td>
+                        <?php
+                        $point = $careTeamMember;
+                        include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                        ?>
+                    </td>
                     <td>
                         <?php
                         $point = $careTeamMember;

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

@@ -20,6 +20,7 @@ $goals = Point::getIntakePointsOfCategory($patient, 'GOAL', $note);
             <tr class="">
                 <th class="border-bottom-0">Goal</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>
@@ -48,6 +49,12 @@ $goals = Point::getIntakePointsOfCategory($patient, 'GOAL', $note);
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
+                    <td>
+                        <?php
+                        $point = $goal;
+                        include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                        ?>
+                    </td>
                     <td>
                         <?php
                         $point = $goal;

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

@@ -21,6 +21,7 @@ $interventions = Point::getIntakePointsOfCategory($patient, 'INTERVENTION', $not
                 <th class="border-bottom-0">Category</th>
                 <th class="border-bottom-0">Intervention</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>
@@ -58,6 +59,12 @@ $interventions = Point::getIntakePointsOfCategory($patient, 'INTERVENTION', $not
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
+                    <td>
+                        <?php
+                        $point = $intervention;
+                        include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                        ?>
+                    </td>
                     <td>
                         <?php
                         $point = $intervention;

+ 8 - 1
resources/views/app/patient/segment-templates/intake_problems/edit.blade.php

@@ -20,6 +20,7 @@ $problems = Point::getIntakePointsOfCategory($patient, 'PROBLEM', $note);
             <tr class="">
                 <th class="border-bottom-0">Problem</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>
@@ -51,7 +52,13 @@ $problems = Point::getIntakePointsOfCategory($patient, 'PROBLEM', $note);
                 </td>
                 <td>
                     <?php
-                    $point = $problem;
+                        $point = $problem;
+                        include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                        ?>
+                    </td>
+                    <td>
+                        <?php
+                        $point = $problem;
                     include resource_path('views/app/patient/segment-templates/_child_review/edit-review.php');
                     ?>
                 </td>

+ 10 - 5
resources/views/app/patient/segment-templates/plan_allergies/edit.blade.php

@@ -11,6 +11,7 @@ use \App\Models\Segment;
 
 $allergies = Point::getPlanPointsOfCategory($patient, 'ALLERGY', $note);
 $intakeOrVisit = 'PLAN';
+
 ?>
 <div>
 
@@ -20,10 +21,12 @@ $intakeOrVisit = 'PLAN';
             <tr class="">
                 <th class="border-bottom-0">Allergy</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($allergies as $allergy): ?>
+                <?php $point = $allergy; ?>
                 <tr>
                     <td>
                         <div class="d-flex align-items-baseline">
@@ -35,7 +38,6 @@ $intakeOrVisit = 'PLAN';
                             <!-- common actions -->
                             <div class="ml-auto d-inline-flex align-items-baseline pr-2">
                                 <?php
-                                $point = $allergy;
                                 $label = 'Allergy';
                                 include resource_path('views/app/patient/segment-templates/_common_actions/remove-undo.php');
                                 ?>
@@ -44,14 +46,17 @@ $intakeOrVisit = 'PLAN';
                     </td>
                     <td>
                         <?php
-                        $point = $allergy;
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
                     <td>
                         <?php
-                        $point = $allergy;
-                        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_allergies/summary.blade.php

@@ -20,7 +20,11 @@ $allergies = Point::getPlanPointsOfCategory($patient, 'ALLERGY', $note);
             <?php if ($allergy->is_removed): ?>
                 <span class="ml-2 text-sm text-secondary">Removed during visit</span>
             <?php elseif ($allergy->added_in_note_id === $note->id): ?>
-                <span class="ml-2 text-sm text-success">* Added during visit</span>
+                <?php if ($allergy->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; ?>

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

@@ -21,10 +21,12 @@ $intakeOrVisit = 'PLAN';
             <tr class="">
                 <th class="border-bottom-0">Care Team Member</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($careTeamMembers as $careTeamMember): ?>
+                <?php $point = $careTeamMember; ?>
                 <tr>
                     <td>
                         <div class="d-flex align-items-baseline">
@@ -42,7 +44,6 @@ $intakeOrVisit = 'PLAN';
                             <!-- common actions -->
                             <div class="ml-auto d-inline-flex align-items-baseline pr-2">
                                 <?php
-                                $point = $careTeamMember;
                                 $label = 'Care Team Member';
                                 include resource_path('views/app/patient/segment-templates/_common_actions/remove-undo.php');
                                 ?>
@@ -51,14 +52,17 @@ $intakeOrVisit = 'PLAN';
                     </td>
                     <td>
                         <?php
-                        $point = $careTeamMember;
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
                     <td>
                         <?php
-                        $point = $careTeamMember;
-                        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>

+ 6 - 2
resources/views/app/patient/segment-templates/plan_care_team/summary.blade.php

@@ -24,9 +24,13 @@ $careTeamMembers = Point::getPlanPointsOfCategory($patient, 'CARE_TEAM_MEMBER',
                 <?= !!@($careTeamMember->data->date) ? 'Date: ' . @($careTeamMember->data->date) : '' ?>
             </div>
             <?php if ($careTeamMember->is_removed): ?>
-            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                <span class="ml-2 text-sm text-secondary">Removed during visit</span>
             <?php elseif ($careTeamMember->added_in_note_id === $note->id): ?>
-            <span class="ml-2 text-sm text-success">* Added during visit</span>
+                <?php if ($careTeamMember->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; ?>

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

@@ -20,10 +20,12 @@ $intakeOrVisit = 'PLAN';
             <tr class="">
                 <th class="border-bottom-0">Goal</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($goals as $goal): ?>
+                <?php $point = $goal; ?>
                 <tr>
                     <td>
                         <div class="d-flex align-items-baseline">
@@ -35,7 +37,6 @@ $intakeOrVisit = 'PLAN';
                             <!-- common actions -->
                             <div class="ml-auto d-inline-flex align-items-baseline pr-2">
                                 <?php
-                                $point = $goal;
                                 $label = 'Goal';
                                 include resource_path('views/app/patient/segment-templates/_common_actions/remove-undo.php');
                                 ?>
@@ -44,14 +45,17 @@ $intakeOrVisit = 'PLAN';
                     </td>
                     <td>
                         <?php
-                        $point = $goal;
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
                     <td>
                         <?php
-                        $point = $goal;
-                        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_goals/summary.blade.php

@@ -20,7 +20,11 @@ $goals = Point::getPlanPointsOfCategory($patient, 'GOAL', $note);
             <?php if ($goal->is_removed): ?>
                 <span class="ml-2 text-sm text-secondary">Removed during visit</span>
             <?php elseif ($goal->added_in_note_id === $note->id): ?>
-                <span class="ml-2 text-sm text-success">* Added during visit</span>
+                <?php if ($goal->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; ?>

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

@@ -22,11 +22,13 @@ $intakeOrVisit = 'PLAN';
                 <th class="border-bottom-0">Category</th>
                 <th class="border-bottom-0">Intervention</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 $previousCategory = null; ?>
             <?php foreach($interventions as $intervention): ?>
+                <?php $point = $intervention; ?>
                 <tr>
                     <td>
                         <?php if($previousCategory === $intervention->data->category): ?>
@@ -46,7 +48,6 @@ $intakeOrVisit = 'PLAN';
                             <!-- common actions -->
                             <div class="ml-auto d-inline-flex align-items-baseline pr-2">
                                 <?php
-                                $point = $intervention;
                                 $label = 'Intervention';
                                 include resource_path('views/app/patient/segment-templates/_common_actions/remove-undo.php');
                                 ?>
@@ -55,14 +56,17 @@ $intakeOrVisit = 'PLAN';
                     </td>
                     <td>
                         <?php
-                        $point = $intervention;
                         include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                         ?>
                     </td>
                     <td>
                         <?php
-                        $point = $intervention;
-                        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>

+ 6 - 2
resources/views/app/patient/segment-templates/plan_interventions/summary.blade.php

@@ -29,9 +29,13 @@ foreach($interventions as $intervention) {
                     <span class="text-secondary"><?= !!@($intervention->data->description) ? @($intervention->data->description) : '' ?></span>
                 </div>
                 <?php if ($intervention->is_removed): ?>
-                <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    <span class="ml-2 text-sm text-secondary">Removed during visit</span>
                 <?php elseif ($intervention->added_in_note_id === $note->id): ?>
-                <span class="ml-2 text-sm text-success">* Added during visit</span>
+                    <?php if ($intervention->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; ?>

+ 10 - 6
resources/views/app/patient/segment-templates/plan_problems/edit.blade.php

@@ -29,10 +29,12 @@ else {
                 <th class="border-bottom-0 width-100px text-info">Relevant to<br>this visit</th>
                 <th class="border-bottom-0">Problem</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($problems as $problem): ?>
+                <?php $point = $problem; ?>
             <tr>
                 <td>
                     <div class="d-flex align-items-center">
@@ -52,7 +54,6 @@ else {
                         <!-- common actions -->
                         <div class="ml-auto d-inline-flex align-items-baseline pr-2">
                             <?php
-                            $point = $problem;
                             $label = 'Problem';
                             include resource_path('views/app/patient/segment-templates/_common_actions/remove-undo.php');
                             ?>
@@ -61,16 +62,19 @@ else {
                 </td>
                 <td>
                     <?php
-                    $point = $problem;
                     include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                     ?>
                 </td>
                 <td>
-                    <?php
-                    $point = $problem;
-                    include resource_path('views/app/patient/segment-templates/_child_review/edit-review.php');
+                <?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>
             <?php endforeach; ?>
         </table>

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

@@ -36,7 +36,11 @@ $numRelevant = 0;
             <?php if ($problem->is_removed): ?>
                 <span class="ml-2 text-sm text-secondary">Removed during visit</span>
             <?php elseif ($problem->added_in_note_id === $note->id): ?>
-                <span class="ml-2 text-sm text-success">* Added during visit</span>
+                <?php if ($problem->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; ?>