|
@@ -8,23 +8,26 @@ use App\Models\Pro;
|
|
|
/** @var Client $patient */
|
|
|
/** @var Note $note */
|
|
|
/** @var Pro $pro */
|
|
|
-
|
|
|
-list($problems, $counts) = Point::getPointsOfCategoryExtended($patient, 'PROBLEM', $note);
|
|
|
-$ccSegment = $note->getSegmentByInternalName('chief_complaint');
|
|
|
-$ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
|
|
|
-$favorites = $pro->favoritesByCategoryDecoded('problem');
|
|
|
-function isFavoriteProblem($_problem, $_favorites) {
|
|
|
- foreach($_favorites as $favorite) {
|
|
|
- if($favorite->data->name === $_problem->data->name) return $favorite->uid;
|
|
|
+/** @var $summaryView */
|
|
|
+
|
|
|
+list($problems, $counts) = Point::getPointsOfCategoryExtended($patient, 'PROBLEM', $note, !!@$summaryView);
|
|
|
+if(!@$summaryView) {
|
|
|
+ $ccSegment = $note->getSegmentByInternalName('chief_complaint');
|
|
|
+ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
|
|
|
+ $favorites = $pro->favoritesByCategoryDecoded('problem');
|
|
|
+ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
+ foreach($_favorites as $favorite) {
|
|
|
+ if($favorite->data->name === $_problem->data->name) return $favorite->uid;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
}
|
|
|
- return false;
|
|
|
}
|
|
|
?>
|
|
|
|
|
|
-<div class="mt-3 p-3 border-top min-height-500px" id="problems-center-{{$note->id}}">
|
|
|
+<div @if(!@$summaryView) class="mt-3 p-3 border-top" id="problems-center-{{$note->id}}" @else class="mt-2 pr-2" @endif>
|
|
|
<div class="point-table-container">
|
|
|
|
|
|
- @if($patient->core_note_id !== $note->id)
|
|
|
+ @if(!@$summaryView && $patient->core_note_id !== $note->id)
|
|
|
<div class="d-flex align-items-baseline">
|
|
|
<div class="mb-2 font-weight-bold font-size-14 text-secondary">Chief Complaint</div>
|
|
|
<span class="mx-2 text-secondary">|</span>
|
|
@@ -54,21 +57,26 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
<hr class="m-neg-3 my-3">
|
|
|
@endif
|
|
|
|
|
|
+ @if(!@$summaryView)
|
|
|
<div class="mb-2 font-weight-bold font-size-14 text-secondary">Problems</div>
|
|
|
- <table class="table table-sm table-bordered mb-0 bg-white mb-2 point-table read">
|
|
|
+ @endif
|
|
|
+
|
|
|
+ <table class="table table-sm table-bordered bg-white mb-2 point-table read">
|
|
|
<thead>
|
|
|
<tr class="">
|
|
|
<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/HPI</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>
|
|
|
</thead>
|
|
|
<?php $prevRowState = -1; ?>
|
|
|
<?php foreach($problems as $problem): ?>
|
|
|
<?php $point = $problem; ?>
|
|
|
- <?php $favoriteUid = isFavoriteProblem($problem, $favorites); ?>
|
|
|
+ @if(!@$summaryView)
|
|
|
+ <?php $favoriteUid = isFavoriteProblem($problem, $favorites); ?>
|
|
|
+ @endif
|
|
|
@if($prevRowState !== $problem->state)
|
|
|
@include('app.patient.wizard-partials.state-row', ['point' => $problem])
|
|
|
@endif
|
|
@@ -88,12 +96,8 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
<?= !!@($problem->data->icd) ? '/ ' . @($problem->data->icd) : '' ?>
|
|
|
</div>
|
|
|
@include('app.patient.wizard-partials.state-badge', ['point' => $problem, 'addedVerb' => 'Diagnosed'])
|
|
|
- @if($rel)
|
|
|
- <div class="mt-1">
|
|
|
- <span class="text-sm text-white bg-info rounded px-2 py-1 font-weight-bold">Visit reason</span>
|
|
|
- </div>
|
|
|
- @endif
|
|
|
</div>
|
|
|
+ @if(!@$summaryView)
|
|
|
<div class="ml-auto mr-1">
|
|
|
<div moe>
|
|
|
@if(!$favoriteUid)
|
|
@@ -118,8 +122,10 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
@endif
|
|
|
</div>
|
|
|
</div>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
</td>
|
|
|
+ @if(!@$summaryView)
|
|
|
<td>
|
|
|
<div moe huge relative>
|
|
|
<a start show href="#" title="Edit">Edit</a>
|
|
@@ -179,6 +185,7 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
</form>
|
|
|
</div>
|
|
|
</td>
|
|
|
+ @endif
|
|
|
<td>
|
|
|
<?php
|
|
|
$segment = $note->getSegmentByInternalName('intake_problems');
|
|
@@ -192,6 +199,7 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
|
|
|
?>
|
|
|
</div>
|
|
|
+ @if(!@$summaryView)
|
|
|
<div class="d-inline-flex flex-column ml-1">
|
|
|
<a class="px-1 view-review-log"
|
|
|
native target="_blank"
|
|
@@ -207,6 +215,7 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
}
|
|
|
?>
|
|
|
</div>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
</div>
|
|
|
<div if-edit-mode>
|
|
@@ -229,6 +238,7 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
|
|
|
?>
|
|
|
</div>
|
|
|
+ @if(!@$summaryView)
|
|
|
<div class="d-inline-flex flex-column ml-1">
|
|
|
<a class="px-1 view-review-log"
|
|
|
native target="_blank"
|
|
@@ -244,6 +254,7 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
}
|
|
|
?>
|
|
|
</div>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
</div>
|
|
|
<div if-edit-mode>
|
|
@@ -254,6 +265,7 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
?>
|
|
|
</div>
|
|
|
</td>
|
|
|
+ @if(!@$summaryView)
|
|
|
<td>
|
|
|
<div class="position-relative c-pointer stag-tooltip">
|
|
|
<i class="fa fa-info-circle"></i>
|
|
@@ -270,10 +282,12 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
+ @endif
|
|
|
</tr>
|
|
|
<?php endforeach; ?>
|
|
|
</table>
|
|
|
|
|
|
+ @if(!@$summaryView)
|
|
|
<div class="d-flex align-items-center">
|
|
|
<div class="mt-1 w-100 border p-3 bg-aliceblue border-info rounded">
|
|
|
<form action="/api/visitPoint/addTopLevel" class="mcp-theme-1 w-100" id="frm-add-problem" novalidate>
|
|
@@ -366,9 +380,11 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+@if(!@$summaryView)
|
|
|
<script>
|
|
|
(function() {
|
|
|
function init() {
|
|
@@ -473,4 +489,5 @@ function isFavoriteProblem($_problem, $_favorites) {
|
|
|
}
|
|
|
addMCInitializer('problems-center-{{$note->id}}', init, '#problems-center-{{$note->id}}');
|
|
|
}).call(window);
|
|
|
-</script>
|
|
|
+</script>
|
|
|
+@endif
|