Browse Source

Weight loss intake - integrate with point based summaries + wizard triggers

Vijayakrishnan 3 years ago
parent
commit
55cd4c209f

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

@@ -640,46 +640,77 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                     <div class="col-md-12">
 						<h6 class="my-3"><b><u>Past medical history (check all that apply)</u></b></h6>
 					</div>
-					<div class="col-md-12 section bg-light pt-2 mb-3">
-						<div class="form-group">
-							<div class="unified-checks flex-basis-20">
-								<!-- Medical history fields -->
-							</div>
+					<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" ,
+							 mc-initer="edit-univ_history_past_medical-container-{{$note->id}}"
+							 title="Past Medical History"
+							 update-parent
+							 popup-style="overflow-visible">
+							@include('app.patient.segment-templates.omega_history_past_medical.summary')
 						</div>
 					</div>
 
                     <div class="col-md-12">
 						<h6 class="my-3"><b><u>Medications</u></b></h6>
 					</div>
-					<div class="col-md-12 section bg-light pt-2 mb-3">
-						<div class="form-group">
-							<label>(list all current medications, including over-the-counter medications, supplements, and herbs):</label>
+					<div class="col-md-12 section bg-light py-2 mb-3">
+						<div class="c-pointer"
+							 open-in-stag-popup
+							 href="/medications-center/{{$patient->uid}}/{{$note->uid}}"
+							 mc-initer="medications-center-{{$note->id}}"
+							 title="Medications Center"
+							 update-parent
+							 popup-style="overflow-visible">
+							@include('app.patient.segment-templates.omega_medications.active-linear-summary')
 						</div>
 					</div>
 
                     <div class="col-md-12">
-						<h6 class="my-3"><b><u>Alergies</u></b></h6>
-					</div>
-
-					<div class="col-md-12 section">
-						<!-- Alergies fields -->
+						<h6 class="my-3"><b><u>Allergies</u></b></h6>
+					</div>
+
+					<div class="col-md-12 section bg-light py-2 mb-3">
+						<div class="c-pointer"
+							 open-in-stag-popup
+							 href="/allergies-center/{{$patient->uid}}/{{$note->uid}}"
+							 mc-initer="allergies-center-{{$note->id}}"
+							 title="Allergies Center"
+							 update-parent
+							 popup-style="overflow-visible">
+							@include('app.patient.segment-templates.omega_allergies.active-linear-summary')
+						</div>
 					</div>
 
 					<div class="col-md-12">
 						<h6 class="my-3"><b><u>Social History</u></b></h6>
 					</div>
 
-					<div class="col-md-12 section bg-light pt-2 mb-3">
-						<!-- Social history fields -->
+					<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",
+						   mc-initer="edit-univ_history_social-container-{{$note->id}}"
+						   title="Social History"
+						   popup-style="overflow-visible">
+							@include('app.patient.segment-templates.omega_history_social.summary')
+						</div>
 					</div>
 
 					<div class="col-md-12">
 						<h6 class="my-3"><b><u>Family History</u></b></h6>
 					</div>
 
-					<div class="col-md-12 section">
-						<!-- Family history fields -->
-
+					<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",
+							 mc-initer="edit-univ_history_family-container-{{$note->id}}"
+							 title="Family History"
+							 popup-style="overflow-visible">
+							@include('app.patient.segment-templates.omega_history_family.summary')
+						</div>
 					</div>
 
 					<div class="col-md-12">
@@ -761,8 +792,15 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 						<h6 class="my-3"><b><u>System Review</u></b></h6>
 					</div>
 
-					<div class="col-md-12 section">
-						<!-- checkboxes for system review here -->
+					<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",
+							 mc-initer="init-ros-{{$note->id}}"
+							 title="Review Of Systems"
+							 popup-style="overflow-visible">
+							@include('app.patient.segment-templates.omega_ros.summary')
+						</div>
 					</div>
 
 					<div class="col-md-12">
@@ -882,8 +920,6 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 			@include('app.patient.segment-templates._common_actions.toggle-relevance', ['container' => '#edit-weight_loss_intake-container'])
         }
 
-        window.segmentInitializers.lifestyle_social = init;
-
         addMCInitializer('edit-weight_loss_intake-container-{{$note->id}}', init, '#edit-weight_loss_intake-container');
 
     })();

+ 27 - 0
resources/views/app/patient/segment-templates/omega_allergies/active-linear-summary.blade.php

@@ -0,0 +1,27 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$points = Point::getPointsOfCategory($patient, 'ALLERGY');
+$tracker = Point::getGlobalSingletonOfCategory($patient, 'NO_KNOWN_TRACKER');
+?>
+
+<?php if($tracker && @($tracker->data->no_known_drug_allergies)): ?>
+	<div class="text-secondary mb-2"><span>No known drug allergies</span></div>
+<?php endif; ?>
+<?php if($tracker && @($tracker->data->no_known_allergies_of_any_type)): ?>
+	<div class="text-secondary mb-2"><span>No known allergies of any type</span></div>
+<?php endif; ?>
+<?php if(!$tracker || !@($tracker->data->no_known_allergies_of_any_type)): ?>
+	<?php if (!count($points)): ?>
+		<div class="text-secondary">-</div>
+	<?php else: ?>
+		<div class="d-flex align-items-baseline flex-wrap">
+			<?php $j = 0; foreach ($points as $point): $j++; ?>
+				<span class="mr-2 text-nowrap">• <?= !!@($point->data->name) ? @($point->data->name) : '-' ?></span>
+			<?php endforeach; ?>
+		</div>
+	<?php endif; ?>
+<?php endif; ?>

+ 24 - 0
resources/views/app/patient/segment-templates/omega_medications/active-linear-summary.blade.php

@@ -0,0 +1,24 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$points = Point::getPointsOfCategory($patient, 'MEDICATION');
+$tracker = Point::getGlobalSingletonOfCategory($patient, 'NO_KNOWN_TRACKER');
+?>
+
+<?php if($tracker && @($tracker->data->no_known_medications)): ?>
+    <div class="text-secondary"><span>No active medications</span></div>
+<?php endif; ?>
+<?php if(!$tracker || !@($tracker->data->no_known_medications)): ?>
+	<?php if (!count($points)): ?>
+		<div class="text-secondary">-</div>
+	<?php else: ?>
+		<div class="d-flex align-items-baseline flex-wrap">
+			<?php $j = 0; foreach ($points as $point): $j++; ?>
+				<span class="mr-2 text-nowrap">• <?= !!@($point->data->name) ? @($point->data->name) : '-' ?></span>
+			<?php endforeach; ?>
+		</div>
+	<?php endif; ?>
+<?php endif; ?>