فهرست منبع

Dx wiz - remove "HPI" from add/edit forms

Vijayakrishnan 3 سال پیش
والد
کامیت
0fb6bb3769

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

@@ -191,7 +191,7 @@ $ccSegment = $note->getSegmentByInternalName('chief_complaint');
 
                             @endif
 
-                            @include('app.patient.wizard-partials.common-fields', ['label' => 'problem', 'point' => $problem, 'reviewLabel' => 'HPI', 'addVerbPT' => 'Diagnosed'])
+                            @include('app.patient.wizard-partials.common-fields', ['label' => 'problem', 'point' => $problem, 'reviewLabel' => 'HPI', 'addVerbPT' => 'Diagnosed', 'noReview' => true])
 
                             <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>
@@ -242,7 +242,7 @@ $ccSegment = $note->getSegmentByInternalName('chief_complaint');
                             </div>
 
                             <?php $point = null; ?>
-                            @include('app.patient.wizard-partials.common-fields', ['label' => 'problem', 'reviewLabel' => 'HPI', 'addVerbPT' => 'Diagnosed'])
+                            @include('app.patient.wizard-partials.common-fields', ['label' => 'problem', 'reviewLabel' => 'HPI', 'addVerbPT' => 'Diagnosed', 'noReview' => true])
 
                         </div>
                         <div class="col-4 border-left">

+ 41 - 39
resources/views/app/patient/wizard-partials/common-fields.blade.php

@@ -122,55 +122,57 @@
 
     @if($patient->core_note_id !== $note->id)
         <div class="row mb-2">
-            <div class="col-6 pr-0">
-                <?php
-                $currentValue = '';
-                $previousValue = '';
-                $previousChildReview = null;
-                if (@$point) {
-                    if ($point->lastChildReview && $point->last_child_review_point_scoped_note_id === $note->id) {
-                        $parsedReview = json_decode($point->lastChildReview->data);
-                        if (@$parsedReview->value) {
-                            $currentValue = $parsedReview->value;
-                            $previousChildReview = \App\Models\Point::where('id', '<', $point->lastChildReview->id)
+            @if(!@$noReview)
+                <div class="col-6 pr-0">
+                    <?php
+                    $currentValue = '';
+                    $previousValue = '';
+                    $previousChildReview = null;
+                    if (@$point) {
+                        if ($point->lastChildReview && $point->last_child_review_point_scoped_note_id === $note->id) {
+                            $parsedReview = json_decode($point->lastChildReview->data);
+                            if (@$parsedReview->value) {
+                                $currentValue = $parsedReview->value;
+                                $previousChildReview = \App\Models\Point::where('id', '<', $point->lastChildReview->id)
+                                    ->where('category', 'REVIEW')
+                                    ->where('parent_point_id', $point->id)
+                                    ->orderBy('id', 'DESC')
+                                    ->first();
+                                if ($previousChildReview && $previousChildReview->data) {
+                                    $parsedReview = json_decode($previousChildReview->data);
+                                    $previousValue = $parsedReview->value;
+                                }
+                            }
+                        } else {
+                            $previousChildReview = \App\Models\Point::where('parent_point_id', $point->id)
                                 ->where('category', 'REVIEW')
-                                ->where('parent_point_id', $point->id)
                                 ->orderBy('id', 'DESC')
                                 ->first();
                             if ($previousChildReview && $previousChildReview->data) {
                                 $parsedReview = json_decode($previousChildReview->data);
-                                $previousValue = $parsedReview->value;
-                            }
-                        }
-                    } else {
-                        $previousChildReview = \App\Models\Point::where('parent_point_id', $point->id)
-                            ->where('category', 'REVIEW')
-                            ->orderBy('id', 'DESC')
-                            ->first();
-                        if ($previousChildReview && $previousChildReview->data) {
-                            $parsedReview = json_decode($previousChildReview->data);
-                            if (@$parsedReview->value) {
-                                $previousValue = $parsedReview->value;
+                                if (@$parsedReview->value) {
+                                    $previousValue = $parsedReview->value;
+                                }
                             }
                         }
                     }
-                }
-                ?>
-                <label class="text-sm mb-1 font-weight-bold">{{@$reviewLabel ? $reviewLabel : 'Review'}}</label>
-                <div note-rte
-                     class="form-group mb-2 border-left border-right rte-holder bg-white"
-                     data-field-name="reviewValue"><?= $currentValue ?></div>
-                <?php if($previousValue): ?>
-                <div class="mb-2">
-                    <div class="d-flex align-items-baseline mb-1">
-                        <span class="text-sm text-secondary">Previous {{@$reviewLabel ? $reviewLabel : 'Review'}} / <?= friendlier_date($previousChildReview->created_at) ?> (click to copy)</span>
+                    ?>
+                    <label class="text-sm mb-1 font-weight-bold">{{@$reviewLabel ? $reviewLabel : 'Review'}}</label>
+                    <div note-rte
+                         class="form-group mb-2 border-left border-right rte-holder bg-white"
+                         data-field-name="reviewValue"><?= $currentValue ?></div>
+                    <?php if($previousValue): ?>
+                    <div class="mb-2">
+                        <div class="d-flex align-items-baseline mb-1">
+                            <span class="text-sm text-secondary">Previous {{@$reviewLabel ? $reviewLabel : 'Review'}} / <?= friendlier_date($previousChildReview->created_at) ?> (click to copy)</span>
+                        </div>
+                        <div class="p-2 bg-light border inline-html-container click-to-copy"><?= $previousValue ?></div>
                     </div>
-                    <div class="p-2 bg-light border inline-html-container click-to-copy"><?= $previousValue ?></div>
+                    <div class="d-none disallow-if-review-same-as" compare-width="reviewValue"><?= str_compact($previousValue) ?></div>
+                    <?php endif; ?>
                 </div>
-                <div class="d-none disallow-if-review-same-as" compare-width="reviewValue"><?= str_compact($previousValue) ?></div>
-                <?php endif; ?>
-            </div>
-            <div class="col-6">
+            @endif
+            <div class="col-{{!@$noReview ? '6' : '12'}}">
                 <?php
                 $currentValue = '';
                 $previousValue = '';