Prechádzať zdrojové kódy

Removed during intake/visit - logic fixes

Vijayakrishnan 3 rokov pred
rodič
commit
af8a3c6cae

+ 5 - 1
resources/views/app/patient/segment-templates/_common_actions/remove-undo.php

@@ -11,7 +11,11 @@ $epNotPart = ($intakeOrVisit === 'INTAKE') ? 'DuringVisit' : 'OnIntake';
     <?php if ($point->is_removed_due_to_entry_error): ?>
         <span class="font-weight-bold text-secondary mr-2 text-nowrap">Entry error</span>
     <?php else: ?>
-        <span class="font-weight-bold text-secondary mr-2 text-nowrap">Removed <?= $whenLabel ?></span>
+        <?php if($medication->removal_reason_category === 'DURING_VISIT'): ?>
+        <span class="ont-weight-bold text-secondary mr-2 text-nowrap">Removed during visit</span>
+        <?php elseif($medication->removal_reason_category === 'ON_INTAKE'): ?>
+        <span class="ont-weight-bold text-secondary mr-2 text-nowrap">Removed on intake</span>
+        <?php endif; ?>
     <?php endif; ?>
     <div visit-moe>
         <form show url="/api/visitPoint/undoMarkRemoved" class="mcp-theme-1">

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

@@ -19,7 +19,11 @@ $allergies = Point::getIntakePointsOfCategory($patient, 'ALLERGY', $note);
                     <?= !!@($allergy->data->description) ? '/&nbsp;' . @($allergy->data->description) : '' ?>
                 </div>
                 <?php if ($allergy->is_removed): ?>
-                    <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @if($allergy->removal_reason_category === 'DURING_VISIT')
+                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @elseif($allergy->removal_reason_category === 'ON_INTAKE')
+                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @endif
                 <?php elseif ($allergy->added_in_note_id === $note->id): ?>
                     <span class="ml-2 text-sm text-success">* Added on intake</span>
                 <?php endif; ?>

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

@@ -23,7 +23,11 @@ $careTeamMembers = Point::getIntakePointsOfCategory($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 on intake</span>
+                    @if($careTeamMember->removal_reason_category === 'DURING_VISIT')
+                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @elseif($careTeamMember->removal_reason_category === 'ON_INTAKE')
+                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @endif
                 <?php elseif ($careTeamMember->added_in_note_id === $note->id): ?>
                 <span class="ml-2 text-sm text-success">* Added on intake</span>
                 <?php endif; ?>

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

@@ -28,7 +28,11 @@ foreach($goals as $goal) {
                         <?= !!@($goal->data->goal) ? @($goal->data->goal) : '' ?>
                     </div>
                     <?php if ($goal->is_removed): ?>
-                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                        @if($goal->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($goal->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                        @endif
                     <?php elseif ($goal->added_in_note_id === $note->id): ?>
                         <span class="ml-2 text-sm text-success">* Added on intake</span>
                     <?php endif; ?>

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

@@ -29,7 +29,11 @@ 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 on intake</span>
+                        @if($intervention->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($intervention->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                        @endif
                     <?php elseif ($intervention->added_in_note_id === $note->id): ?>
                     <span class="ml-2 text-sm text-success">* Added on intake</span>
                     <?php endif; ?>

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

@@ -20,9 +20,13 @@ $medications = Point::getIntakePointsOfCategory($patient, 'MEDICATION', $note);
                     <?= !!@($medication->data->start_date) ? '/&nbsp;From ' . @($medication->data->start_date) : '' ?>
                 </div>
                 <?php if ($medication->is_removed): ?>
-                    <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @if($medication->removal_reason_category === 'DURING_VISIT')
+                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @elseif($medication->removal_reason_category === 'ON_INTAKE')
+                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @endif
                 <?php elseif ($medication->added_in_note_id === $note->id): ?>
-                    <span class="ml-2 text-sm text-success">* Added on intake</span>
+                <span class="ml-2 text-sm text-success">* Added on intake</span>
                 <?php endif; ?>
             </div>
             <?php $review = $medication->childReviewAddedInNote($note); ?>

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

@@ -20,7 +20,11 @@ $problems = Point::getIntakePointsOfCategory($patient, 'PROBLEM', $note);
                     <?= !!@($problem->data->description) ? '/&nbsp;' . @($problem->data->description) : '' ?>
                 </div>
                 <?php if ($problem->is_removed): ?>
-                    <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @if($problem->removal_reason_category === 'DURING_VISIT')
+                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @elseif($problem->removal_reason_category === 'ON_INTAKE')
+                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @endif
                 <?php elseif ($problem->added_in_note_id === $note->id): ?>
                     <span class="ml-2 text-sm text-success">* Added on intake</span>
                 <?php endif; ?>

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

@@ -37,7 +37,11 @@ $numRelevant = 0;
                     <?= !!@($allergy->data->description) ? '/&nbsp;' . @($allergy->data->description) : '' ?>
                 </div>
                 <?php if ($allergy->is_removed): ?>
-                    <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @if($allergy->removal_reason_category === 'DURING_VISIT')
+                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @elseif($allergy->removal_reason_category === 'ON_INTAKE')
+                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @endif
                 <?php elseif ($allergy->added_in_note_id === $note->id): ?>
                     <?php if ($allergy->addition_reason_category === 'DURING_VISIT'): ?>
                         <span class="ml-2 text-sm text-success">* Added during visit</span>

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

@@ -41,7 +41,11 @@ $numRelevant = 0;
                     <?= !!@($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>
+                    @if($careTeamMember->removal_reason_category === 'DURING_VISIT')
+                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @elseif($careTeamMember->removal_reason_category === 'ON_INTAKE')
+                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @endif
                 <?php elseif ($careTeamMember->added_in_note_id === $note->id): ?>
                     <?php if ($careTeamMember->addition_reason_category === 'DURING_VISIT'): ?>
                         <span class="ml-2 text-sm text-success">* Added during visit</span>

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

@@ -47,7 +47,11 @@ $numRelevant = 0;
                         <?= !!@($goal->data->goal) ? @($goal->data->goal) : '' ?>
                     </div>
                     <?php if ($goal->is_removed): ?>
-                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @if($goal->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($goal->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                        @endif
                     <?php elseif ($goal->added_in_note_id === $note->id): ?>
                         <?php if ($goal->addition_reason_category === 'DURING_VISIT'): ?>
                             <span class="ml-2 text-sm text-success">* Added during visit</span>

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

@@ -49,7 +49,11 @@ $numRelevant = 0;
                         <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>
+                        @if($intervention->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($intervention->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                        @endif
                     <?php elseif ($intervention->added_in_note_id === $note->id): ?>
                         <?php if ($intervention->addition_reason_category === 'DURING_VISIT'): ?>
                         <span class="ml-2 text-sm text-success">* Added during visit</span>

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

@@ -37,7 +37,11 @@ $numRelevant = 0;
                     <?= !!@($medication->data->frequency) ? '/&nbsp;' . @($medication->data->frequency) : '' ?>
                 </div>
                 <?php if ($medication->is_removed): ?>
-                    <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @if($medication->removal_reason_category === 'DURING_VISIT')
+                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @elseif($medication->removal_reason_category === 'ON_INTAKE')
+                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @endif
                 <?php elseif ($medication->added_in_note_id === $note->id): ?>
                     <?php if ($medication->addition_reason_category === 'DURING_VISIT'): ?>
                         <span class="ml-2 text-sm text-success">* Added during visit</span>

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

@@ -37,7 +37,11 @@ $numRelevant = 0;
                     <?= !!@($problem->data->description) ? '/&nbsp;' . @($problem->data->description) : '' ?>
                 </div>
                 <?php if ($problem->is_removed): ?>
-                    <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @if($problem->removal_reason_category === 'DURING_VISIT')
+                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                    @elseif($problem->removal_reason_category === 'ON_INTAKE')
+                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                    @endif
                 <?php elseif ($problem->added_in_note_id === $note->id): ?>
                     <?php if ($problem->addition_reason_category === 'DURING_VISIT'): ?>
                         <span class="ml-2 text-sm text-success">* Added during visit</span>