Преглед изворни кода

Dx wiz - revert to plain RTE hpi/review

Vijayakrishnan пре 3 година
родитељ
комит
e26c7fb929

+ 16 - 1
app/Http/Controllers/NoteController.php

@@ -116,7 +116,22 @@ class NoteController extends Controller
 
 
             $summaryHtml = view('app.patient.segment-templates.' . $segmentTemplate->internal_name . '/summary', $data)->render();
-            $editHtml = view('app.patient.segment-templates.' . $segmentTemplate->internal_name . '/edit', $data)->render();
+
+            $wizardPowered = [
+                'intake_medications',
+                'plan_medications',
+                'intake_problems',
+                'plan_problems',
+                'intake_goals',
+                'plan_goals',
+                'intake_allergies',
+                'plan_allergies',
+                'intake_care_team',
+                'plan_care_team'
+            ];
+            if(!in_array($segmentTemplate->internal_name, $wizardPowered)) {
+                $editHtml = view('app.patient.segment-templates.' . $segmentTemplate->internal_name . '/edit', $data)->render();
+            }
 
         } catch (\Throwable $e) {
             return response()->json([

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

@@ -18,7 +18,7 @@
                 <div class="p-2">
                     <?php
                         $review = json_decode($record->data);
-                        echo $review->value;
+                        echo @($review->value) ? $review->value : '-';
                     ?>
                 </div>
             </div>

+ 15 - 0
resources/views/app/patient/note/segment.blade.php

@@ -170,9 +170,24 @@
         {!! $segment->summary_html !!}
     </div>
 
+    <?php
+    $wizardPowered = [
+        'intake_medications',
+        'plan_medications',
+        'intake_problems',
+        'plan_problems',
+        'intake_goals',
+        'plan_goals',
+        'intake_allergies',
+        'plan_allergies',
+        'intake_care_team',
+        'plan_care_team'
+    ];
+    if(!in_array($iName, $wizardPowered)) { ?>
     <div class="d-none if-edit edit-container">
         {!! $segment->edit_html !!}
     </div>
+    <?php } ?>
 
     <?php endif ?>
 

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

@@ -69,12 +69,25 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
                 </td>
                 <td>
                     <div class="d-flex align-items-start">
-                        {{--<div class="flex-grow-1">
+                        <div class="flex-grow-1">
                             <?php
                             $point = $problem;
                             include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
                             ?>
-                        </div>--}}
+                        </div>
+                        <div class="d-inline-flex flex-nowrap">
+                            <a class="pl-2 view-review-log"
+                               native target="_blank"
+                               open-in-stag-popup
+                               popup-style="stag-popup-md"
+                               title="Review log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
+                               href="/point/review-log/<?= $problem->uid ?>?popupmode=1">
+                                <i class="fa fa-history"></i>
+                            </a>
+                        </div>
+                    </div>
+                    {{--
+                    <div class="d-flex align-items-start">
                         <div class="flex-grow-1">
                             @include('app.patient.note.last-hpi')
                         </div>
@@ -103,6 +116,7 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
                             </div>
                         </div>
                     </div>
+                    --}}
                 </td>
                 <td>
                     <div class="d-flex align-items-start">
@@ -111,7 +125,7 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
                             include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
                             ?>
                         </div>
-                        <div class="">
+                        <div class="d-inline-flex flex-nowrap">
                             <a class="pl-2 view-review-log"
                                native target="_blank"
                                open-in-stag-popup
@@ -120,14 +134,6 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
                                href="/point/plan-log/<?= $problem->uid ?>?popupmode=1">
                                 <i class="fa fa-history"></i>
                             </a>
-                            <div class="pl-2">
-                            <?php
-                            $segment = $note->getSegmentByInternalName('plan_problems');
-                            if($segment && $patient->core_note_id !== $note->id) {
-                                include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan.php');
-                            }
-                            ?>
-                            </div>
                         </div>
                     </div>
                 </td>
@@ -200,7 +206,7 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
 
                             @endif
 
-                            @include('app.patient.wizard-partials.common-fields', ['label' => 'problem', 'point' => $problem, 'reviewLabel' => 'HPI', 'addVerbPT' => 'Diagnosed', 'noReview' => true, 'noPlan' => true])
+                            @include('app.patient.wizard-partials.common-fields', ['label' => 'problem', 'point' => $problem, 'reviewLabel' => 'HPI', 'addVerbPT' => 'Diagnosed'])
 
                             <div class="mt-3 pt-2 d-flex align-items-center border-top">
                                 <button type="submit" class="btn-save-problem btn btn-sm btn-primary mr-2">Save</button>
@@ -251,7 +257,7 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
                             </div>
 
                             <?php $point = null; ?>
-                            @include('app.patient.wizard-partials.common-fields', ['label' => 'problem', 'reviewLabel' => 'HPI', 'addVerbPT' => 'Diagnosed', 'noReview' => true, 'noPlan' => true])
+                            @include('app.patient.wizard-partials.common-fields', ['label' => 'problem', 'reviewLabel' => 'HPI', 'addVerbPT' => 'Diagnosed'])
 
                         </div>
                         <div class="col-4 border-left">

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

@@ -41,12 +41,7 @@ $numRelevant = 0;
             <?php if(!!$hpi): ?>
             <div class="pl-3 mt-1">
                 <div class="text-secondary font-weight-bold">HPI</div>
-                <?php
-                $point = $problem;
-                if(!@$template) $template = 'hpi/core.json';
-                $data = $hpi ? $hpi->data : null;
-                ?>
-                @include('app.dq-engine.read', compact('template', 'note', 'patient', 'point', 'data'))
+                <div>{!! $hpi->data && @($hpi->data->value) ? $hpi->data->value : '-' !!}</div>
             </div>
             <?php elseif($rel): ?>
             <div class="relevant-without-review block-signing text-danger mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Review missing</div>

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

@@ -61,12 +61,7 @@ $numRelevantWithICD = 0;
             <?php if(!!$hpi): ?>
             <div class="pl-3 mt-1">
                 <div class="text-secondary font-weight-bold">HPI</div>
-                <?php
-                $point = $problem;
-                if(!@$template) $template = 'hpi/core.json';
-                $data = $hpi ? $hpi->data : null;
-                ?>
-                @include('app.dq-engine.read', compact('template', 'note', 'patient', 'point', 'data'))
+                <div>{!! $hpi->data && @($hpi->data->value) ? $hpi->data->value : '-' !!}</div>
             </div>
             <?php elseif($rel): ?>
             <div class="relevant-without-review block-signing text-danger text-sm mt-1" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>">

+ 5 - 3
resources/views/app/patient/wizard-partials/common-fields.blade.php

@@ -131,7 +131,7 @@
                     if (@$point) {
                         if ($point->lastChildReview && $point->last_child_review_point_scoped_note_id === $note->id) {
                             $parsedReview = json_decode($point->lastChildReview->data);
-                            if (@$parsedReview->value) {
+                            if (@($parsedReview->value)) {
                                 $currentValue = $parsedReview->value;
                                 $previousChildReview = \App\Models\Point::where('id', '<', $point->lastChildReview->id)
                                     ->where('category', 'REVIEW')
@@ -140,7 +140,9 @@
                                     ->first();
                                 if ($previousChildReview && $previousChildReview->data) {
                                     $parsedReview = json_decode($previousChildReview->data);
-                                    $previousValue = $parsedReview->value;
+                                    if (@($parsedReview->value)) {
+                                        $previousValue = $parsedReview->value;
+                                    }
                                 }
                             }
                         } else {
@@ -181,7 +183,7 @@
                 if (@$point) {
                     if ($point->lastChildPlan && $point->last_child_plan_point_scoped_note_id === $note->id) {
                         $parsedPlan = json_decode($point->lastChildPlan->data);
-                        $currentValue = $parsedPlan->value;
+                        $currentValue = @($parsedPlan->value) ? $parsedPlan->value : '';
                         $previousChildPlan = \App\Models\Point::where('id', '<', $point->lastChildPlan->id)
                             ->where('category', 'PLAN')
                             ->where('parent_point_id', $point->id)