|
@@ -8,22 +8,26 @@ use App\Models\Pro;
|
|
/** @var Client $patient */
|
|
/** @var Client $patient */
|
|
/** @var Note $note */
|
|
/** @var Note $note */
|
|
/** @var Pro $pro */
|
|
/** @var Pro $pro */
|
|
|
|
+/** @var $summaryView */
|
|
|
|
|
|
-list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDICATION', $note);
|
|
|
|
|
|
+list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDICATION', $note, !!@$summaryView);
|
|
$numActiveItems = Point::getNumPointsOfCategory($patient, 'MEDICATION');
|
|
$numActiveItems = Point::getNumPointsOfCategory($patient, 'MEDICATION');
|
|
-$favorites = $pro->favoritesByCategoryDecoded('medication');
|
|
|
|
-function isFavoriteMedication($_medication, $_favorites) {
|
|
|
|
- foreach($_favorites as $favorite) {
|
|
|
|
- if($favorite->data->name === $_medication->data->name) return $favorite->uid;
|
|
|
|
|
|
+if(!@$summaryView) {
|
|
|
|
+ $favorites = $pro->favoritesByCategoryDecoded('medication');
|
|
|
|
+ function isFavoriteMedication($_medication, $_favorites) {
|
|
|
|
+ foreach($_favorites as $favorite) {
|
|
|
|
+ if($favorite->data->name === $_medication->data->name) return $favorite->uid;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
- return false;
|
|
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
|
|
|
|
-<div class="mt-3 p-3 border-top" id="medications-center-{{$note->id}}">
|
|
|
|
|
|
+<div @if(!@$summaryView) class="mt-3 p-3 border-top" id="medications-center-{{$note->id}}" @else class="mt-2 pr-2" @endif>
|
|
<div class="point-table-container">
|
|
<div class="point-table-container">
|
|
|
|
|
|
<?php $tracker = Point::getGlobalSingletonOfCategory($patient, 'NO_KNOWN_TRACKER'); ?>
|
|
<?php $tracker = Point::getGlobalSingletonOfCategory($patient, 'NO_KNOWN_TRACKER'); ?>
|
|
|
|
+ @if(!@$summaryView)
|
|
<textarea class="no_known_tracker d-none">{!! $tracker && @($tracker->data) ? json_encode($tracker->data) : '{}' !!}</textarea>
|
|
<textarea class="no_known_tracker d-none">{!! $tracker && @($tracker->data) ? json_encode($tracker->data) : '{}' !!}</textarea>
|
|
<div class="d-flex align-items-center mb-3">
|
|
<div class="d-flex align-items-center mb-3">
|
|
<label class="border border-info d-inline-flex align-items-center my-0 mr-3 p-2 rounded">
|
|
<label class="border border-info d-inline-flex align-items-center my-0 mr-3 p-2 rounded">
|
|
@@ -34,21 +38,28 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
<span>No Known Medications</span>
|
|
<span>No Known Medications</span>
|
|
</label>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
+ @else
|
|
|
|
+ @if($tracker && @($tracker->data->no_known_medications))
|
|
|
|
+ <div>• No Known Medications</div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
|
|
- <table class="table table-sm table-bordered mb-0 bg-white mb-2 point-table read">
|
|
|
|
|
|
+ <table class="table table-sm table-bordered bg-white mb-2 point-table read">
|
|
<thead>
|
|
<thead>
|
|
<tr class="">
|
|
<tr class="">
|
|
<th class="border-bottom-0 text-secondary">Name</th>
|
|
<th class="border-bottom-0 text-secondary">Name</th>
|
|
- <th class="border-bottom-0 text-secondary width-50px">Edit</th>
|
|
|
|
|
|
+ @if(!@$summaryView) <th class="border-bottom-0 text-secondary width-50px">Edit</th> @endif
|
|
<th class="border-bottom-0 text-secondary w-30">Subjective</th>
|
|
<th class="border-bottom-0 text-secondary w-30">Subjective</th>
|
|
<th class="border-bottom-0 text-secondary w-30">Plan</th>
|
|
<th class="border-bottom-0 text-secondary w-30">Plan</th>
|
|
- <th class="border-bottom-0 text-secondary width-30px"></th>
|
|
|
|
|
|
+ @if(!@$summaryView) <th class="border-bottom-0 text-secondary width-30px"></th> @endif
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<?php $prevRowState = -1; ?>
|
|
<?php $prevRowState = -1; ?>
|
|
<?php foreach($medications as $medication): ?>
|
|
<?php foreach($medications as $medication): ?>
|
|
<?php $point = $medication; ?>
|
|
<?php $point = $medication; ?>
|
|
- <?php $favoriteUid = isFavoriteMedication($medication, $favorites); ?>
|
|
|
|
|
|
+ @if(!@$summaryView)
|
|
|
|
+ <?php $favoriteUid = isFavoriteMedication($medication, $favorites); ?>
|
|
|
|
+ @endif
|
|
@if($prevRowState !== $medication->state)
|
|
@if($prevRowState !== $medication->state)
|
|
@include('app.patient.wizard-partials.state-row', ['point' => $medication])
|
|
@include('app.patient.wizard-partials.state-row', ['point' => $medication])
|
|
@endif
|
|
@endif
|
|
@@ -66,6 +77,7 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
<b><?= !!@($medication->data->name) ? @($medication->data->name) : '-' ?></b>
|
|
<b><?= !!@($medication->data->name) ? @($medication->data->name) : '-' ?></b>
|
|
@include('app.patient.wizard-partials.state-badge', ['point' => $medication, 'addedVerb' => 'Prescribed', 'removedVerb' => 'Discontinued'])
|
|
@include('app.patient.wizard-partials.state-badge', ['point' => $medication, 'addedVerb' => 'Prescribed', 'removedVerb' => 'Discontinued'])
|
|
</div>
|
|
</div>
|
|
|
|
+ @if(!@$summaryView)
|
|
<div class="ml-auto mr-1">
|
|
<div class="ml-auto mr-1">
|
|
<div moe>
|
|
<div moe>
|
|
@if(!$favoriteUid)
|
|
@if(!$favoriteUid)
|
|
@@ -88,8 +100,10 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ @endif
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
|
|
+ @if(!@$summaryView)
|
|
<td>
|
|
<td>
|
|
<div moe huge relative>
|
|
<div moe huge relative>
|
|
<a start show href="#" title="Edit">Edit</a>
|
|
<a start show href="#" title="Edit">Edit</a>
|
|
@@ -140,6 +154,7 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
|
|
+ @endif
|
|
<td>
|
|
<td>
|
|
<?php
|
|
<?php
|
|
$segment = $note->getSegmentByInternalName('intake_medications');
|
|
$segment = $note->getSegmentByInternalName('intake_medications');
|
|
@@ -153,6 +168,7 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
|
|
include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
|
|
?>
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
+ @if(!@$summaryView)
|
|
<div class="d-inline-flex flex-column ml-1">
|
|
<div class="d-inline-flex flex-column ml-1">
|
|
<a class="px-1 view-review-log"
|
|
<a class="px-1 view-review-log"
|
|
native target="_blank"
|
|
native target="_blank"
|
|
@@ -168,6 +184,7 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
+ @endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div if-edit-mode>
|
|
<div if-edit-mode>
|
|
@@ -190,6 +207,7 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
|
|
include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
|
|
?>
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
+ @if(!@$summaryView)
|
|
<div class="d-inline-flex flex-column ml-1">
|
|
<div class="d-inline-flex flex-column ml-1">
|
|
<a class="px-1 view-review-log"
|
|
<a class="px-1 view-review-log"
|
|
native target="_blank"
|
|
native target="_blank"
|
|
@@ -205,6 +223,7 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
+ @endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div if-edit-mode>
|
|
<div if-edit-mode>
|
|
@@ -215,6 +234,7 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
?>
|
|
?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
|
|
+ @if(!@$summaryView)
|
|
<td>
|
|
<td>
|
|
<div class="position-relative c-pointer stag-tooltip">
|
|
<div class="position-relative c-pointer stag-tooltip">
|
|
<i class="fa fa-info-circle"></i>
|
|
<i class="fa fa-info-circle"></i>
|
|
@@ -231,10 +251,12 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
|
|
+ @endif
|
|
</tr>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</table>
|
|
|
|
|
|
|
|
+ @if(!@$summaryView)
|
|
<div class="d-flex align-items-center">
|
|
<div class="d-flex align-items-center">
|
|
<div class="mt-1 w-100 border p-3 bg-aliceblue border-info rounded">
|
|
<div class="mt-1 w-100 border p-3 bg-aliceblue border-info rounded">
|
|
<!--<a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new medication, prescribed during this visit</a>-->
|
|
<!--<a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new medication, prescribed during this visit</a>-->
|
|
@@ -320,10 +342,12 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ @endif
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+@if(!@$summaryView)
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|
|
function init() {
|
|
function init() {
|
|
@@ -437,4 +461,5 @@ function isFavoriteMedication($_medication, $_favorites) {
|
|
}
|
|
}
|
|
addMCInitializer('medications-center-{{$note->id}}', init, '#medications-center-{{$note->id}}');
|
|
addMCInitializer('medications-center-{{$note->id}}', init, '#medications-center-{{$note->id}}');
|
|
}).call(window);
|
|
}).call(window);
|
|
-</script>
|
|
|
|
|
|
+</script>
|
|
|
|
+@endif
|