root 3 anos atrás
pai
commit
b1fc178b42

+ 24 - 7
resources/views/app/patient/module-specific-summary-renderers/weight_loss_intake/plan.blade.php

@@ -79,6 +79,24 @@
     'comments'
 ]; ?>
 @if($points && count($points))
+    <?php
+        ob_start();
+        $j = 0;
+        foreach ($points as $point) {
+            $j++;
+            ?>
+            <tr>
+                <td class="font-weight-normal">
+                    @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                </td>
+                <td></td>
+            </tr>
+            <?php
+        }
+        $output = ob_get_contents();
+        ob_end_clean();
+    ?>
+    @if($output && !!trim(strip_tags($output)))
     <div class="d-flex border-bottom">
         <a class="mr-2 min-width-110px hide-if-note-signed"
             open-in-stag-popup
@@ -94,14 +112,13 @@
 
         <div class="flex-grow-1">
             <table class="table table-bordered table-xs table-cage mb-0">
-                <?php $j = 0; foreach ($points as $point): $j++; ?>
-                    <tr>
-                        <td>
-                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
-                        </td>
-                    </tr>
-                <?php endforeach; ?>
+                <?= $output ?>
             </table>
         </div>
     </div>
+<<<<<<< HEAD
 @endif
+=======
+    @endif
+@endif
+>>>>>>> 42ef3117ef8098c432c89c16352248e1f09ce236

+ 38 - 20
resources/views/app/patient/module-specific-summary-renderers/weight_loss_intake/subjective.blade.php

@@ -3,29 +3,47 @@
 ]; 
 ?>
 @if($points && count($points))
-    <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
-            open-in-stag-popup
-           href="/module-view/{{$note->uid}}/weight_loss_intake/edit"
-           mc-initer="edit-weight_loss_intake-container-{{$note->id}}"
-           title="Weight Loss Intake"
-           popup-style="stag-popup-md overflow-visible">
-            Weight Loss
-        </a>
-        <span class="mr-2 min-width-110px font-weight-bold show-if-note-signed">
+    <?php
+    ob_start();
+    $j = 0;
+    foreach ($points as $point) {
+    $j++;
+    ?>
+    <tr>
+        <td>
+            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+        </td>
+        <td></td>
+    </tr>
+    <?php
+    }
+    $output = ob_get_contents();
+    ob_end_clean();
+    ?>
+    @if($output && !!trim(strip_tags($output)))
+        <div class="d-flex border-bottom">
+            <a class="mr-2 min-width-110px hide-if-note-signed"
+               open-in-stag-popup
+               href="/module-view/{{$note->uid}}/weight_loss_intake/edit"
+               mc-initer="edit-weight_loss_intake-container-{{$note->id}}"
+               title="Weight Loss Intake"
+               popup-style="stag-popup-md overflow-visible">
+                Weight Loss
+            </a>
+            <span class="mr-2 min-width-110px font-weight-bold show-if-note-signed">
             Weight Loss
         </span>
 
-        <div class="flex-grow-1">
-            <table class="table table-bordered table-xs table-cage mb-0">
-                <?php $j = 0; foreach ($points as $point): $j++; ?>
-                    <tr>
-                        <td>
-                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
-                        </td>
-                    </tr>
-                <?php endforeach; ?>
-            </table>
+            <div class="flex-grow-1">
+                <table class="table table-bordered table-xs table-cage mb-0">
+                    <?= $output ?>
+                </table>
+            </div>
         </div>
+<<<<<<< HEAD
     </div>
 @endif
+=======
+    @endif
+@endif
+>>>>>>> 42ef3117ef8098c432c89c16352248e1f09ce236

+ 4 - 4
resources/views/app/patient/modules/weight_loss_intake/edit.blade.php

@@ -643,7 +643,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 					<div class="col-md-12 section bg-light py-2 mb-3">
 						<div class="c-pointer"
 							 open-in-stag-popup
-							 href="/note-segment-view-by-name/{{$note->uid}}/past_medical_history/edit" ,
+							 href="/note-segment-view-by-name/{{$note->uid}}/past_medical_history/edit"
 							 mc-initer="edit-univ_history_past_medical-container-{{$note->id}}"
 							 title="Past Medical History"
 							 update-parent
@@ -690,7 +690,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 					<div class="col-md-12 section bg-light py-2 mb-3">
 						<div class="c-pointer"
 						   open-in-stag-popup
-						   href="/note-segment-view-by-name/{{$note->uid}}/history_social/edit",
+						   href="/note-segment-view-by-name/{{$note->uid}}/history_social/edit"
 						   mc-initer="edit-univ_history_social-container-{{$note->id}}"
 						   title="Social History"
 						   popup-style="overflow-visible">
@@ -705,7 +705,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 					<div class="col-md-12 section bg-light py-2 mb-3">
 						<div class="c-pointer"
 							 open-in-stag-popup
-							 href="/note-segment-view-by-name/{{$note->uid}}/history_family/edit",
+							 href="/note-segment-view-by-name/{{$note->uid}}/history_family/edit"
 							 mc-initer="edit-univ_history_family-container-{{$note->id}}"
 							 title="Family History"
 							 popup-style="overflow-visible">
@@ -795,7 +795,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 					<div class="col-md-12 section bg-light py-2 mb-3">
 						<div class="c-pointer"
 							 open-in-stag-popup
-							 href="/note-segment-view-by-name/{{$note->uid}}/omega_ros/edit",
+							 href="/note-segment-view-by-name/{{$note->uid}}/omega_ros/edit"
 							 mc-initer="init-ros-{{$note->id}}"
 							 title="Review Of Systems"
 							 popup-style="overflow-visible">

+ 60 - 0
resources/views/app/patient/notes.blade.php

@@ -4,6 +4,66 @@
 
     <?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
 
+    <?php
+    $dateLastWeek = date_sub(date_create(), date_interval_create_from_date_string("14 days"));
+    $dateLastWeek = date_format($dateLastWeek, "Y-m-d");
+    $appointments = \App\Models\Appointment::where('client_id', $patient->id)
+        ->orderBy('raw_date', 'desc')->orderBy('raw_start_time', 'desc')
+        ->where('raw_date', '>=', $dateLastWeek)
+        ->get();
+    ?>
+    <div class="">
+        <div class="d-flex align-items-end pb-3">
+            <h4 class="font-weight-bold m-0 font-size-16">Appointments</h4>
+        </div>
+        <table class="table table-striped table-sm table-bordered mb-4">
+            @if($appointments && count($appointments))
+                <thead class="bg-light">
+                <tr>
+                    <th class="text-secondary border-bottom-0">Date & Time</th>
+                    <th class="text-secondary border-bottom-0">Pro</th>
+                    <th class="text-secondary border-bottom-0">Title</th>
+                    <th class="text-secondary border-bottom-0">Description</th>
+                    <th class="text-secondary border-bottom-0">Status</th>
+                    <th class="text-secondary border-bottom-0">Confirmation</th>
+                </tr>
+                </thead>
+                <tbody>
+                @foreach($appointments as $appointment)
+                    <tr>
+                        <td>
+                            <a href="/patients/view/{{$patient->uid}}/calendar/{{$appointment->uid}}" class="text-nowrap">
+                                {{friendly_date($appointment->raw_date) . ' ' . friendly_time($appointment->raw_start_time)}}
+                            </a>
+                        </td>
+                        <td>{{ $appointment->pro->displayName() }}</pre></td>
+                        <td>{{ $appointment->title }}</td>
+                        <td>{{ $appointment->description }}</td>
+                        <td>
+                            {{ $appointment->status }}
+                            @if($appointment->status_memo)
+                                <hr>
+                                {{$appointment->status_memo}}
+                            @endif
+                        </td>
+                        <td>
+                            @if($appointment->status !== 'CANCELLED' && $appointment->status !== 'COMPLETED')
+                                @include('app.patient.partials.appointment-confirmation')
+                            @endif
+                        </td>
+                    </tr>
+                @endforeach
+                </tbody>
+            @else
+                <tbody>
+                <tr>
+                    <td class="text-secondary p-3">No recent or upcoming appointments</td>
+                </tr>
+                </tbody>
+            @endif
+        </table>
+    </div>
+
     <div id="notes-list-{{$patient->id}}">
     <div class="pt-2 d-flex align-items-start">
         <h6 class="my-0 d-flex align-items-baseline w-100">