|
@@ -121,98 +121,99 @@
|
|
<div if-active-or-not-active class="d-none">
|
|
<div if-active-or-not-active class="d-none">
|
|
|
|
|
|
@if($patient->core_note_id !== $note->id)
|
|
@if($patient->core_note_id !== $note->id)
|
|
- <?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')
|
|
|
|
- ->orderBy('id', 'DESC')
|
|
|
|
- ->first();
|
|
|
|
- if ($previousChildReview && $previousChildReview->data) {
|
|
|
|
- $parsedReview = json_decode($previousChildReview->data);
|
|
|
|
- if (@$parsedReview->value) {
|
|
|
|
- $previousValue = $parsedReview->value;
|
|
|
|
|
|
+ <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)
|
|
|
|
+ ->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;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1">{{@$reviewLabel ? $reviewLabel : 'Review'}}</label>
|
|
|
|
- <?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">{{@$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>
|
|
- <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>
|
|
- <div class="d-none disallow-if-review-same-as" compare-width="reviewValue"><?= str_compact($previousValue) ?></div>
|
|
|
|
- <?php endif; ?>
|
|
|
|
- <div note-rte
|
|
|
|
- class="form-group mb-2 border-left border-right rte-holder bg-white"
|
|
|
|
- data-field-name="reviewValue"><?= $currentValue ?></div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <?php
|
|
|
|
- $currentValue = '';
|
|
|
|
- $previousValue = '';
|
|
|
|
- $previousChildPlan = null;
|
|
|
|
- if (@$point) {
|
|
|
|
- if ($point->lastChildPlan && $point->last_child_plan_point_scoped_note_id === $note->id) {
|
|
|
|
- $parsedPlan = json_decode($point->lastChildPlan->data);
|
|
|
|
- $currentValue = $parsedPlan->value;
|
|
|
|
- $previousChildPlan = \App\Models\Point::where('id', '<', $point->lastChildPlan->id)
|
|
|
|
- ->where('category', 'PLAN')
|
|
|
|
- ->where('parent_point_id', $point->id)
|
|
|
|
- ->orderBy('id', 'DESC')
|
|
|
|
- ->first();
|
|
|
|
- if ($previousChildPlan && $previousChildPlan->data) {
|
|
|
|
- $parsedPlan = json_decode($previousChildPlan->data);
|
|
|
|
- $previousValue = $parsedPlan->value;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- $previousChildPlan = \App\Models\Point::where('parent_point_id', $point->id)
|
|
|
|
- ->where('category', 'PLAN')
|
|
|
|
- ->orderBy('id', 'DESC')
|
|
|
|
- ->first();
|
|
|
|
- if ($previousChildPlan && $previousChildPlan->data) {
|
|
|
|
- $parsedPlan = json_decode($previousChildPlan->data);
|
|
|
|
- $previousValue = $parsedPlan->value;
|
|
|
|
|
|
+ <div class="col-6">
|
|
|
|
+ <?php
|
|
|
|
+ $currentValue = '';
|
|
|
|
+ $previousValue = '';
|
|
|
|
+ $previousChildPlan = null;
|
|
|
|
+ if (@$point) {
|
|
|
|
+ if ($point->lastChildPlan && $point->last_child_plan_point_scoped_note_id === $note->id) {
|
|
|
|
+ $parsedPlan = json_decode($point->lastChildPlan->data);
|
|
|
|
+ $currentValue = $parsedPlan->value;
|
|
|
|
+ $previousChildPlan = \App\Models\Point::where('id', '<', $point->lastChildPlan->id)
|
|
|
|
+ ->where('category', 'PLAN')
|
|
|
|
+ ->where('parent_point_id', $point->id)
|
|
|
|
+ ->orderBy('id', 'DESC')
|
|
|
|
+ ->first();
|
|
|
|
+ if ($previousChildPlan && $previousChildPlan->data) {
|
|
|
|
+ $parsedPlan = json_decode($previousChildPlan->data);
|
|
|
|
+ $previousValue = $parsedPlan->value;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $previousChildPlan = \App\Models\Point::where('parent_point_id', $point->id)
|
|
|
|
+ ->where('category', 'PLAN')
|
|
|
|
+ ->orderBy('id', 'DESC')
|
|
|
|
+ ->first();
|
|
|
|
+ if ($previousChildPlan && $previousChildPlan->data) {
|
|
|
|
+ $parsedPlan = json_decode($previousChildPlan->data);
|
|
|
|
+ $previousValue = $parsedPlan->value;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1">Plan</label>
|
|
|
|
- <?php if($previousValue): ?>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="text-sm text-secondary">Previous Plan / <?= friendlier_date($previousChildPlan->created_at) ?>) (click to copy)</span>
|
|
|
|
|
|
+ ?>
|
|
|
|
+ <label class="text-sm mb-1">Plan</label>
|
|
|
|
+ <div note-rte
|
|
|
|
+ class="form-group mb-2 border-left border-right rte-holder bg-white"
|
|
|
|
+ data-field-name="planValue"><?= $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 Plan / <?= friendlier_date($previousChildPlan->created_at) ?> (click to copy)</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="p-2 bg-light border inline-html-container click-to-copy"><?= $previousValue ?></div>
|
|
</div>
|
|
</div>
|
|
- <div class="p-2 bg-light border inline-html-container click-to-copy"><?= $previousValue ?></div>
|
|
|
|
|
|
+ <div class="d-none disallow-if-plan-same-as" compare-width="planValue"><?= str_compact($previousValue) ?></div>
|
|
|
|
+ <?php endif; ?>
|
|
</div>
|
|
</div>
|
|
- <div class="d-none disallow-if-plan-same-as" compare-width="planValue"><?= str_compact($previousValue) ?></div>
|
|
|
|
- <?php endif; ?>
|
|
|
|
- <div note-rte
|
|
|
|
- class="form-group mb-2 border-left border-right rte-holder bg-white"
|
|
|
|
- data-field-name="planValue"><?= $currentValue ?></div>
|
|
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
|
|
|