|
@@ -1,5 +1,5 @@
|
|
<div class="mb-2">
|
|
<div class="mb-2">
|
|
- <span class="font-weight-bold">Is this {{$label}} active?</span>
|
|
|
|
|
|
+ <span class="font-weight-bold">Is this {{$label}} currently active?</span>
|
|
<div class="d-flex align-items-baseline mt-1">
|
|
<div class="d-flex align-items-baseline mt-1">
|
|
<label class="my-0 d-inline-flex align-items-center">
|
|
<label class="my-0 d-inline-flex align-items-center">
|
|
<input type="radio" name="isRemoved" required value="0" {{!$point || !$point->is_removed ? 'checked' : ''}}>
|
|
<input type="radio" name="isRemoved" required value="0" {{!$point || !$point->is_removed ? 'checked' : ''}}>
|
|
@@ -79,32 +79,34 @@
|
|
<div {{@$point ? 'if-not-entry-error class="d-none"' : ''}}>
|
|
<div {{@$point ? 'if-not-entry-error class="d-none"' : ''}}>
|
|
<div if-addition-or-removal-on-intake-or-during-visit class="d-none">
|
|
<div if-addition-or-removal-on-intake-or-during-visit class="d-none">
|
|
<div class="row mb-2">
|
|
<div class="row mb-2">
|
|
- <div class="col-6 pr-0">
|
|
|
|
|
|
+ <div class="col-3 pr-0">
|
|
<label class="text-sm mb-0 font-weight-bold">Start Date</label>
|
|
<label class="text-sm mb-0 font-weight-bold">Start Date</label>
|
|
<input type="date"
|
|
<input type="date"
|
|
data-name="start_date"
|
|
data-name="start_date"
|
|
value="{{@$point->data ? @$point->data->start_date : ''}}"
|
|
value="{{@$point->data ? @$point->data->start_date : ''}}"
|
|
class="form-control form-control-sm min-width-unset">
|
|
class="form-control form-control-sm min-width-unset">
|
|
</div>
|
|
</div>
|
|
- <div class="col-6">
|
|
|
|
|
|
+ <div class="col-3 pr-0">
|
|
<label class="text-sm mb-0 font-weight-bold">{{@$addVerbPT ? ucwords($addVerbPT) : 'Added'}} By</label>
|
|
<label class="text-sm mb-0 font-weight-bold">{{@$addVerbPT ? ucwords($addVerbPT) : 'Added'}} By</label>
|
|
<input type="text"
|
|
<input type="text"
|
|
data-name="prescriber"
|
|
data-name="prescriber"
|
|
value="{{@$point->data ? @$point->data->prescriber : ''}}"
|
|
value="{{@$point->data ? @$point->data->prescriber : ''}}"
|
|
class="form-control form-control-sm min-width-unset">
|
|
class="form-control form-control-sm min-width-unset">
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <div if-not-active class="d-none">
|
|
|
|
- <div if-removal-on-intake-or-during-visit class="d-none">
|
|
|
|
- <div class="row mb-2">
|
|
|
|
- <div class="col-6 pr-0">
|
|
|
|
|
|
+ <div class="col-3 pr-0">
|
|
|
|
+ <div if-not-active class="d-none">
|
|
|
|
+ <div if-removal-on-intake-or-during-visit class="d-none">
|
|
<label class="text-sm mb-0 font-weight-bold">End Date</label>
|
|
<label class="text-sm mb-0 font-weight-bold">End Date</label>
|
|
<input type="date"
|
|
<input type="date"
|
|
name="removalEffectiveDate"
|
|
name="removalEffectiveDate"
|
|
value="{{@$point->removal_effective_date}}"
|
|
value="{{@$point->removal_effective_date}}"
|
|
class="form-control form-control-sm min-width-unset">
|
|
class="form-control form-control-sm min-width-unset">
|
|
</div>
|
|
</div>
|
|
- <div class="col-6">
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-3">
|
|
|
|
+ <div if-not-active class="d-none">
|
|
|
|
+ <div if-removal-on-intake-or-during-visit class="d-none">
|
|
<label class="text-sm mb-0 font-weight-bold">Removal By/Memo</label>
|
|
<label class="text-sm mb-0 font-weight-bold">Removal By/Memo</label>
|
|
<input type="text"
|
|
<input type="text"
|
|
name="removalReasonMemo"
|
|
name="removalReasonMemo"
|
|
@@ -121,61 +123,77 @@
|
|
<div if-active-or-not-active class="d-none">
|
|
<div if-active-or-not-active class="d-none">
|
|
|
|
|
|
@if(1 || $patient->core_note_id !== $note->id) {{-- allow review/plan from core note --}}
|
|
@if(1 || $patient->core_note_id !== $note->id) {{-- allow review/plan from core note --}}
|
|
- <div class="row mb-2">
|
|
|
|
- @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);
|
|
|
|
- if (@($parsedReview->value)) {
|
|
|
|
- $previousValue = $parsedReview->value;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- $previousChildReview = \App\Models\Point::where('parent_point_id', $point->id)
|
|
|
|
|
|
+
|
|
|
|
+ {{-- pre-existing plan (coreChildPlan) - show only when-adding OR when-editing-from-created-note --}}
|
|
|
|
+ <div if-active-and-pre-existing-or-not-active class="mb-2 d-none">
|
|
|
|
+ <?php
|
|
|
|
+ $currentValue = '';
|
|
|
|
+ if (@$point && $point->coreChildPlan) {
|
|
|
|
+ $parsedPlan = json_decode($point->coreChildPlan->data);
|
|
|
|
+ $currentValue = @($parsedPlan->value) ? $parsedPlan->value : '';
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ <label class="text-sm mb-0 font-weight-bold">Pre-existing {{@$planLabel ? $planLabel : 'Plan'}} (before this visit)</label>
|
|
|
|
+ <div note-rte
|
|
|
|
+ class="form-group mb-2 rte-holder bg-white border rounded"
|
|
|
|
+ data-field-name="corePlanValue"><?= $currentValue ?></div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ @if(!@$noReview)
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <?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('category', 'REVIEW')
|
|
|
|
+ ->where('parent_point_id', $point->id)
|
|
->orderBy('id', 'DESC')
|
|
->orderBy('id', 'DESC')
|
|
->first();
|
|
->first();
|
|
if ($previousChildReview && $previousChildReview->data) {
|
|
if ($previousChildReview && $previousChildReview->data) {
|
|
$parsedReview = json_decode($previousChildReview->data);
|
|
$parsedReview = json_decode($previousChildReview->data);
|
|
- if (@$parsedReview->value) {
|
|
|
|
|
|
+ if (@($parsedReview->value)) {
|
|
$previousValue = $parsedReview->value;
|
|
$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;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- ?>
|
|
|
|
- <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>
|
|
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ <label class="text-sm mb-0 font-weight-bold">{{@$reviewLabel ? $reviewLabel : 'Review'}}</label>
|
|
|
|
+ <div note-rte
|
|
|
|
+ class="form-group mb-2 rte-holder bg-white border rounded"
|
|
|
|
+ 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>
|
|
- <div class="d-none disallow-if-review-same-as" compare-width="reviewValue"><?= str_compact($previousValue) ?></div>
|
|
|
|
- <?php endif; ?>
|
|
|
|
|
|
+ <div class="p-2 bg-light border inline-html-container click-to-copy"><?= $previousValue ?></div>
|
|
</div>
|
|
</div>
|
|
- @endif
|
|
|
|
- <div class="col-{{!@$noReview ? '6' : '12'}}">
|
|
|
|
- @if(!@$noPlan)
|
|
|
|
|
|
+ <div class="d-none disallow-if-review-same-as" compare-width="reviewValue"><?= str_compact($previousValue) ?></div>
|
|
|
|
+ <?php endif; ?>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ @if(!@$noPlan)
|
|
|
|
+ <div class="mb-2">
|
|
<?php
|
|
<?php
|
|
$currentValue = '';
|
|
$currentValue = '';
|
|
$previousValue = '';
|
|
$previousValue = '';
|
|
@@ -205,9 +223,9 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
- <label class="text-sm mb-1 font-weight-bold">{{@$planLabel ? $planLabel : 'Plan'}}</label>
|
|
|
|
|
|
+ <label class="text-sm mb-0 font-weight-bold">Changes to {{@$planLabel ? $planLabel : 'Plan'}} during this visit (as part of my plan)</label>
|
|
<div note-rte
|
|
<div note-rte
|
|
- class="form-group mb-2 border-left border-right rte-holder bg-white"
|
|
|
|
|
|
+ class="form-group mb-2 rte-holder bg-white border rounded"
|
|
data-field-name="planValue"><?= $currentValue ?></div>
|
|
data-field-name="planValue"><?= $currentValue ?></div>
|
|
<?php if($previousValue): ?>
|
|
<?php if($previousValue): ?>
|
|
<div class="mb-2">
|
|
<div class="mb-2">
|
|
@@ -218,9 +236,9 @@
|
|
</div>
|
|
</div>
|
|
<div class="d-none disallow-if-plan-same-as" compare-width="planValue"><?= str_compact($previousValue) ?></div>
|
|
<div class="d-none disallow-if-plan-same-as" compare-width="planValue"><?= str_compact($previousValue) ?></div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
- @endif
|
|
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ @endif
|
|
|
|
+
|
|
@endif
|
|
@endif
|
|
|
|
|
|
</div>
|
|
</div>
|