Ver código fonte

Delete child plan/review feature impl

Vijayakrishnan 3 anos atrás
pai
commit
deb530f1b3

+ 2 - 2
resources/views/app/patient/allergies-center.blade.php

@@ -128,7 +128,7 @@ $numActiveItems = Point::getNumPointsOfCategory($patient, 'ALLERGY');
                             include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                             ?>
                         </div>
-                        <div class="d-inline-flex flex-nowrap">
+                        <div class="d-inline-flex flex-column ml-1">
                             <a class="px-1 view-review-log"
                                native target="_blank"
                                open-in-stag-popup
@@ -153,7 +153,7 @@ $numActiveItems = Point::getNumPointsOfCategory($patient, 'ALLERGY');
                             include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
                             ?>
                         </div>
-                        <div class="d-inline-flex flex-nowrap">
+                        <div class="d-inline-flex flex-column ml-1">
                             <a class="px-1 view-review-log"
                                native target="_blank"
                                open-in-stag-popup

+ 2 - 2
resources/views/app/patient/careteam-center.blade.php

@@ -159,7 +159,7 @@ list($careTeamMembers, $counts) = Point::getPointsOfCategoryExtended($patient, '
                             include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                             ?>
                         </div>
-                        <div class="d-inline-flex flex-nowrap">
+                        <div class="d-inline-flex flex-column ml-1">
                             <a class="px-1 view-review-log"
                                native target="_blank"
                                open-in-stag-popup
@@ -184,7 +184,7 @@ list($careTeamMembers, $counts) = Point::getPointsOfCategoryExtended($patient, '
                             include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
                             ?>
                         </div>
-                        <div class="d-inline-flex flex-nowrap">
+                        <div class="d-inline-flex flex-column ml-1">
                             <a class="px-1 view-review-log"
                                native target="_blank"
                                open-in-stag-popup

+ 2 - 2
resources/views/app/patient/goals-center.blade.php

@@ -105,7 +105,7 @@ list($goals, $counts) = Point::getPointsOfCategoryExtended($patient, 'GOAL', $no
                             include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                             ?>
                         </div>
-                        <div class="d-inline-flex flex-nowrap">
+                        <div class="d-inline-flex flex-column ml-1">
                             <a class="px-1 view-review-log"
                                native target="_blank"
                                open-in-stag-popup
@@ -130,7 +130,7 @@ list($goals, $counts) = Point::getPointsOfCategoryExtended($patient, 'GOAL', $no
                             include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
                             ?>
                         </div>
-                        <div class="d-inline-flex flex-nowrap">
+                        <div class="d-inline-flex flex-column ml-1">
                             <a class="px-1 view-review-log"
                                native target="_blank"
                                open-in-stag-popup

+ 2 - 2
resources/views/app/patient/medications-center.blade.php

@@ -126,7 +126,7 @@ $numActiveItems = Point::getNumPointsOfCategory($patient, 'MEDICATION');
                                 include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                                 ?>
                             </div>
-                            <div class="d-inline-flex flex-nowrap">
+                            <div class="d-inline-flex flex-column ml-1">
                                 <a class="px-1 view-review-log"
                                    native target="_blank"
                                    open-in-stag-popup
@@ -151,7 +151,7 @@ $numActiveItems = Point::getNumPointsOfCategory($patient, 'MEDICATION');
                                 include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
                                 ?>
                             </div>
-                            <div class="d-inline-flex flex-nowrap">
+                            <div class="d-inline-flex flex-column ml-1">
                                 <a class="px-1 view-review-log"
                                    native target="_blank"
                                    open-in-stag-popup

+ 2 - 2
resources/views/app/patient/problems-center.blade.php

@@ -143,7 +143,7 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
                             include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                             ?>
                         </div>
-                        <div class="d-inline-flex flex-nowrap">
+                        <div class="d-inline-flex flex-column ml-1">
                             <a class="px-1 view-review-log"
                                native target="_blank"
                                open-in-stag-popup
@@ -168,7 +168,7 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
                             include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
                             ?>
                         </div>
-                        <div class="d-inline-flex flex-nowrap">
+                        <div class="d-inline-flex flex-column ml-1">
                             <a class="px-1 view-review-log"
                                native target="_blank"
                                open-in-stag-popup

+ 19 - 2
resources/views/app/patient/segment-templates/_child_plan/edit-plan.php

@@ -27,7 +27,7 @@ else {
 }
 ?>
 <div visit-moe large class="d-inline">
-    <a start show href="#">
+    <a start show href="#" class="px-1 text-center d-block" title="<?= !empty($currentValue) ? 'Edit Plan' : 'Add Plan'?>">
         <i class="fa <?= !empty($currentValue) ? 'fa-pencil-alt' : 'fa-plus-square'?>"></i>
     </a>
     <form url="/api/visitPoint/upsertChildPlan" class="mcp-theme-1" left>
@@ -60,4 +60,21 @@ else {
             <button cancel class="btn btn-sm btn-default border">Cancel</button>
         </div>
     </form>
-</div>
+</div>
+<?php if(!empty($currentValue)): ?>
+    <div visit-moe relative class="d-inline">
+        <a start show href="#" class="px-1 text-center d-block" title="Delete Plan">
+            <i class="fa fa-trash-alt text-danger on-hover-opaque"></i>
+        </a>
+        <form url="/api/visitPoint/destroyCurrentChildPlan" class="mcp-theme-1" right>
+            <input type="hidden" name="uid" value="<?= $point->uid ?>">
+
+            <p class="mb-2">Delete this plan?</p>
+
+            <div>
+                <button submit class="btn btn-sm btn-danger mr-2">Delete</button>
+                <button cancel class="btn btn-sm btn-default border">Cancel</button>
+            </div>
+        </form>
+    </div>
+<?php endif; ?>

+ 20 - 2
resources/views/app/patient/segment-templates/_child_review/edit-review.php

@@ -31,7 +31,7 @@ else {
 }
 ?>
 <div visit-moe large relative class="d-inline">
-    <a start show href="#">
+    <a start show href="#" class="px-1 text-center d-block" title="<?= !empty($currentValue) ? 'Edit Subjective' : 'Add Subjective'?>">
         <i class="fa <?= !empty($currentValue) ? 'fa-pencil-alt' : 'fa-plus-square'?>"></i>
     </a>
     <form url="/api/visitPoint/upsertChildReview" class="mcp-theme-1" right>
@@ -65,4 +65,22 @@ else {
             <button cancel class="btn btn-sm btn-default border">Cancel</button>
         </div>
     </form>
-</div>
+</div>
+<?php if(!empty($currentValue)): ?>
+    <div visit-moe relative class="d-inline">
+        <a start show href="#" class="px-1 text-center d-block" title="Delete Subjective">
+            <i class="fa fa-trash-alt text-danger on-hover-opaque"></i>
+        </a>
+        <form url="/api/visitPoint/destroyCurrentChildReview" class="mcp-theme-1" right>
+            <input type="hidden" name="uid" value="<?= $point->uid ?>">
+
+            <p class="mb-2">Delete this subjective?</p>
+
+            <div>
+                <button submit class="btn btn-sm btn-danger mr-2">Delete</button>
+                <button cancel class="btn btn-sm btn-default border">Cancel</button>
+            </div>
+        </form>
+    </div>
+<?php endif; ?>
+

+ 2 - 2
resources/views/app/patient/supplements-center.blade.php

@@ -113,7 +113,7 @@ list($supplements, $counts) = Point::getPointsOfCategoryExtended($patient, 'SUPP
                                 include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                                 ?>
                             </div>
-                            <div class="d-inline-flex flex-nowrap">
+                            <div class="d-inline-flex flex-column ml-1">
                                 <a class="px-1 view-review-log"
                                    native target="_blank"
                                    open-in-stag-popup
@@ -132,7 +132,7 @@ list($supplements, $counts) = Point::getPointsOfCategoryExtended($patient, 'SUPP
                                 include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
                                 ?>
                             </div>
-                            <div class="d-inline-flex flex-nowrap">
+                            <div class="d-inline-flex flex-column ml-1">
                                 <a class="px-1 view-review-log"
                                    native target="_blank"
                                    open-in-stag-popup