Browse Source

Merge branch 'dev' of rav.triplestart.com:jmudaka/stagfe2 into dev

Samson Mutunga 3 years ago
parent
commit
42583215bd

+ 1 - 1
resources/views/app/patient/dashboard.blade.php

@@ -28,7 +28,7 @@
         <?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
 
         <?php $nonCoreVisitNotes = $patient->nonCoreVisitNotes; ?>
-        <?php $disallowPointEdits = $nonCoreVisitNotes && count($nonCoreVisitNotes); ?>
+        <?php $disallowPointEdits = true; // $nonCoreVisitNotes && count($nonCoreVisitNotes); ?>
 
 	    <div class="row client-single-dashboard">
             <div class="col-6">

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

@@ -22,8 +22,8 @@ list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDI
                 <th class="border-bottom-0 text-secondary text-center width-30px">Rel.</th>
                 @endif
                 <th class="border-bottom-0 text-secondary">Name</th>
-                <th class="border-bottom-0 text-secondary w-25">Review</th>
                 <th class="border-bottom-0 text-secondary w-25">Directions/Plan</th>
+                <th class="border-bottom-0 text-secondary w-25">Review</th>
                 <th class="border-bottom-0 text-secondary">Active?</th>
                 <th class="border-bottom-0 text-secondary">Started</th>
                 <th class="border-bottom-0 text-secondary">Ended</th>
@@ -55,8 +55,7 @@ list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDI
                         <div class="d-flex align-items-start">
                             <div class="flex-grow-1">
                                 <?php
-                                $point = $medication;
-                                include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
+                                include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
                                 ?>
                             </div>
                             <div class="d-inline-flex flex-nowrap">
@@ -64,10 +63,16 @@ list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDI
                                    native target="_blank"
                                    open-in-stag-popup
                                    popup-style="stag-popup-md"
-                                   title="Review log<?= !!@($medication->data->name) ? ' for ' . @($medication->data->name) : '' ?>"
-                                   href="/point/review-log/<?= $medication->uid ?>?popupmode=1">
+                                   title="Plan log<?= !!@($medication->data->name) ? ' for ' . @($medication->data->name) : '' ?>"
+                                   href="/point/plan-log/<?= $medication->uid ?>?popupmode=1">
                                     <i class="fa fa-history"></i>
                                 </a>
+                                <?php
+                                /*$segment = $note->getSegmentByInternalName('plan_medications');
+                                if($segment) {
+                                    include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan.php');
+                                }*/
+                                ?>
                             </div>
                         </div>
                     </td>
@@ -75,7 +80,8 @@ list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDI
                         <div class="d-flex align-items-start">
                             <div class="flex-grow-1">
                                 <?php
-                                include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                                $point = $medication;
+                                include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                                 ?>
                             </div>
                             <div class="d-inline-flex flex-nowrap">
@@ -83,16 +89,10 @@ list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDI
                                    native target="_blank"
                                    open-in-stag-popup
                                    popup-style="stag-popup-md"
-                                   title="Plan log<?= !!@($medication->data->name) ? ' for ' . @($medication->data->name) : '' ?>"
-                                   href="/point/plan-log/<?= $medication->uid ?>?popupmode=1">
+                                   title="Review log<?= !!@($medication->data->name) ? ' for ' . @($medication->data->name) : '' ?>"
+                                   href="/point/review-log/<?= $medication->uid ?>?popupmode=1">
                                     <i class="fa fa-history"></i>
                                 </a>
-                                <?php
-                                /*$segment = $note->getSegmentByInternalName('plan_medications');
-                                if($segment) {
-                                    include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan.php');
-                                }*/
-                                ?>
                             </div>
                         </div>
                     </td>

+ 4 - 4
resources/views/app/patient/note/plan-log.blade.php

@@ -1,10 +1,10 @@
-<div class="p-3">
+<div class="px-3 pb-3">
     <?php $numPlans = 0; ?>
     @foreach($point->childPlans as $record)
         @if(@$record->data)
             <?php $numPlans++; ?>
-            <div class="border mb-3">
-                <div class="border-bottom p-2">
+            <div class="border mt-3">
+                <div class="border-bottom p-2 bg-light">
                     <span class="text-secondary text-sm">Created on </span>
                     @if($record->client->core_note_id !== $record->note->id)
                         <a native target="_blank" class="text-sm"
@@ -17,7 +17,7 @@
                         <span class="text-sm"><?= friendlier_date_time($record->created_at) ?> from the patient's chart</span>
                     @endif
                 </div>
-                <div class="p-2">
+                <div class="p-2 inline-html-container">
                     <?php
                     if (file_exists(resource_path('views/app/patient/segment-templates/_plan/' . strtolower($record->parent_category) . '/view.php'))) {
                         $plan = json_decode($record->data);

+ 4 - 4
resources/views/app/patient/note/review-log.blade.php

@@ -1,10 +1,10 @@
-<div class="p-3">
+<div class="px-3 pb-3">
     <?php $numReviews = 0; ?>
     @foreach($point->childReviews as $record)
         @if(@$record->data)
             <?php $numReviews++; ?>
-            <div class="border mb-3">
-                <div class="border-bottom p-2">
+            <div class="border mt-3">
+                <div class="border-bottom p-2 bg-light">
                     <span class="text-secondary text-sm">Updated on </span>
                     @if($record->client->core_note_id !== $record->note->id)
                         <a native target="_blank" class="text-sm"
@@ -15,7 +15,7 @@
                         <span class="text-sm"><?= friendlier_date_time($record->created_at) ?> from the patient's chart</span>
                     @endif
                 </div>
-                <div class="p-2">
+                <div class="p-2 inline-html-container">
                     <?php
                         $review = json_decode($record->data);
                         echo @($review->value) ? $review->value : '-';

+ 4 - 0
resources/views/app/patient/wizard-partials/common-script.blade.php

@@ -173,6 +173,10 @@ parentSegment.find('#frm-add-{{$label}}')
             if(form.find('[name="isRemoved"][value="0"]').is(':checked')) {
                 form.find('[name="additionReasonCategory"]').attr('required', 'required');
             }
+            else if(form.find('[name="isRemoved"][value="1"]').is(':checked')) {
+                form.find('[name="additionReasonCategory"]').removeAttr('required');
+                form.find('[name="additionReasonCategory"][value="ON_INTAKE"]').prop('checked', true); // make ON_INTAKE if in-active
+            }
         }
 
         // require removalReasonCategory if not active