Peter Muturi 3 år sedan
förälder
incheckning
dade9fd216

+ 35 - 3
public/css/style.css

@@ -50,6 +50,7 @@
 .text-link {
     color: rgb(13, 89, 175) !important;
 }
+
 .stag-primary-bg {
   background-color: var(--primary-color) !important;
   color: #fff;
@@ -340,13 +341,16 @@ body>nav.navbar {
     width: 800px;
 }
 [moe][center][extra-wide] [url]:not([show]) {
-    left: calc(50% - 450px);
-    width: 900px;
+    left: calc(50% - 500px);
+    width: 1000px;
 }
 [moe][center] [url]:not([show]) .form-control.form-control-sm {
     min-width: unset;
     max-width: 100%;
 }
+.form-check-label {
+  padding-top: 2px;
+}
 .mcp-theme-1 .rotateh {
     transform: rotateY(180deg);
 }
@@ -624,6 +628,34 @@ input.search_field, textarea.search_field {
         padding-top: 55px;
     }
 }
+.flex-parent-container {
+  display: flex;
+  align-items: flex-start;
+}
+.flex-parent-container > div:first-child {
+  border-right: 1px solid #eee !important;
+  margin-right: 10px;
+}
+.flex-parent-container > div {
+  flex-basis: 50%;
+}
+@media screen and (min-width: 1400px) {
+  .flex-container, .flex-parent-container {
+    display: flex;
+    align-items: flex-start;
+    justify-content: space-between;
+  }
+  .flex-container >div {
+    flex-basis: 50%;
+  }
+  .flex-parent-container > div:first-child {
+    flex-basis: 40%;
+  }
+  .flex-parent-container > div {
+    flex-basis: 60%;
+  }
+}
+
 .main-row > .sidebar .nav .nav-item a {
     white-space: nowrap;
 }
@@ -2549,7 +2581,7 @@ td.row-selection-highlight:after {
     max-height: 14px;
 }
 
-.table td.fit, 
+.table td.fit,
 .table th.fit {
     white-space: nowrap;
     width: 1%;

+ 2 - 2
resources/views/app/patient/note/dashboard.blade.php

@@ -949,7 +949,7 @@ use App\Models\Handout;
                         <p class="font-weight-bold text-secondary m-0 font-size-14">Vitals Settings</p>
                     </div>
                     <div class="row" id="vitals-settings-{{$patient->uid}}">
-                        <div class="col-4 border-right">
+                        <div class="col-5 border-right">
                             <div class="d-flex align-items-baseline">
                                 <b>BMI/Weight Management</b>
                                 <span class="mx-2 text-secondary">|</span>
@@ -959,7 +959,7 @@ use App\Models\Handout;
                                 @include('app.patient.vitals-settings.bmi-management-summary')
                             </div>
                         </div>
-                        <div class="col-8">
+                        <div class="col-7">
                             <div class="d-flex align-items-baseline">
                                 <b>BP Management</b>
                                 <span class="mx-2 text-secondary">|</span>

+ 19 - 15
resources/views/app/patient/vitals-settings/bmi-management-summary.blade.php

@@ -9,54 +9,58 @@
 <div class="mb-1 d-flex align-items-baseline">
     <span class="text-secondary text-nowrap">Weight (usual):</span>
     <div class="ml-2">
-        Between <b><?= vsValue('usual_weight_in_pounds_min', $patient) ?></b>
-        and <b><?= vsValue('usual_weight_in_pounds_max', $patient) ?></b>
+      @if($patient->usual_weight_in_pounds_min)
+        Between <b>{{$patient->usual_weight_in_pounds_min}}</b>
+        and <b>{{$patient->usual_weight_in_pounds_max}}</b>
+      @else
+      <span>-</span>
+      @endif
     </div>
 </div>
 
 <div class="mb-3 d-flex align-items-baseline">
     <span class="text-secondary text-nowrap">BMI (usual):</span>
     <div class="ml-2">
-        Between <span class="text-nowrap"><b><?= vsValue('usual_bmi_min', $patient) ?></b> <span class="text-secondary text-sm"><?= vsValue('usual_bmi_min_category', $patient) ?></span></span>
-        and <span class="text-nowrap"><b><?= vsValue('usual_bmi_max', $patient) ?></b> <span class="text-secondary text-sm"><?= vsValue('usual_bmi_max_category', $patient) ?></span></span>
+      @if($patient->usual_bmi_min)
+        Between <span class="text-nowrap"><b>{{$patient->usual_bmi_min}}</b> {{$patient->usual_bmi_min_category}}</span>
+        and <span class="text-nowrap"><b>{{$patient->usual_bmi_max}}</b> {{$patient->usual_bmi_max_category}}</span>
+      @else
+      <span>-</span>
+      @endif
     </div>
 </div>
 
 <div class="mb-1 d-flex align-items-baseline">
     <span class="text-secondary text-nowrap">Weight (ideal):</span>
     <div class="ml-2">
-        <b><?= vsValue('ideal_weight_in_pounds', $patient) ?></b>
+        <b>{{$patient->ideal_weight_in_pounds ?? '-'}}</b>
     </div>
 </div>
 
 <div class="mb-3 d-flex align-items-baseline">
     <span class="text-secondary text-nowrap">BMI (ideal):</span>
     <div class="ml-2">
-        <b><?= vsValue('ideal_bmi', $patient) ?></b>
-        <span class="text-secondary text-sm"><?= vsValue('ideal_bmi_category', $patient) ?></span>
+        <b>{{$patient->ideal_bmi ?? '-'}}</b>
+        <span class="text-secondary text-sm">{{$patient->ideal_bmi_category}}</span>
     </div>
 </div>
 
 <div class="mb-3 d-flex align-items-baseline">
     <span class="text-secondary mr-2">Goal:</span>
-    <div class="flex-grow-1"><?= vsValue('weight_management_goal_category', $patient) ?></div>
+    <div class="flex-grow-1">{{$patient->weight_management_goal_category ?? '-'}}</div>
 </div>
 
 <div class="mb-3 d-flex align-items-baseline">
     <span class="text-secondary mr-2">CHF?</span>
-    <div class="flex-grow-1"><?= vsValue('has_heart_failure_dx', $patient) ?></div>
+    <div class="flex-grow-1">{{$patient->has_heart_failure_dx ?? '-'}}</div>
 </div>
 
 <div class="mb-3 d-flex align-items-baseline">
     <span class="text-secondary mr-2">Weight monitoring prescribed?</span>
-    <div class="flex-grow-1">
-        <?= vsValue('is_weight_monitoring_needed', $patient) ?>
-    </div>
+    <div class="flex-grow-1">{{$patient->is_weight_monitoring_needed ?? '-'}}</div>
 </div>
 
 <div class="mb-3 d-flex align-items-baseline">
     <span class="text-secondary mr-2">Remarks:</span>
-    <div class="flex-grow-1">
-        <?= vsValue('why_is_weight_monitoring_needed', $patient) ?>
-    </div>
+    <div class="flex-grow-1">{{$patient->why_is_weight_monitoring_needed ?? '-'}}</div>
 </div>

+ 5 - 5
resources/views/app/patient/vitals-settings/bp-management-form.blade.php

@@ -5,7 +5,7 @@
         <p class="text-secondary font-weight-bold font-size-14">BP Management</p>
 
         <div id="bpManagementComponent" class="row mx-0" v-cloak>
-            <div class="col-7 border-right">
+            <div class="col-6 border-right">
                 <div class="text-secondary font-weight-bold mb-3">Blood Pressure & Pulse:</div>
                 <div class="pl-3">
                     <h6 class="text-secondary mb-3"><b>Usual:</b></h6>
@@ -64,8 +64,8 @@
 
                             </div>
 
-                            <div>
-                                <div class="form-check mb-2">
+                            <div class="d-flex align-items-start">
+                                <div class="form-check mr-2">
                                     <input type="checkbox" class="form-check-input" id="amPmVariation" name="doesUsualBpHaveAmPmVariation" v-model="form.doesUsualBpHaveAmPmVariation">
                                     <label class="form-check-label" for="amPmVariation">AM/PM Variation</label>
                                 </div>
@@ -142,7 +142,7 @@
                     </div>
                 </div>
             </div>
-            <div class="col-5">
+            <div class="col-6">
                 <div class="mb-2 d-flex align-items-start">
                     <span class="text-secondary min-width-140px w-50">Reports prehypertension?</span>
                     <div class="w-50">
@@ -308,4 +308,4 @@
         addMCInitializer('bp-management-settings', init, '#bp-management-settings');
 
     }).call(window);
-</script>
+</script>

+ 129 - 77
resources/views/app/patient/vitals-settings/bp-management-summary.blade.php

@@ -1,171 +1,223 @@
 
-<div class="row">
-    <div class="col-6 border-right">
+<div class="flex-container">
+    <div>
         <h6 class="text-secondary font-weight-bold mb-3">Usual:</h6>
         <div class="d-flex mb-3">
             <div class="pl-3">
                 @if($patient->does_usual_bp_have_am_pm_variation)
                     <div class="text-secondary font-weight-bold mb-2"><i class="fa fa-sun"></i> AM</div>
                 @endif
-                <div class="d-flex align-items-center">
+                <div class="d-flex align-items-center mb-2">
                     @if($patient->does_usual_bp_have_range)
                         <h6 class="mb-0 mr-2">LOWEST:</h6>
                     @endif
                     <h6 class="mb-0 mr-2">BP:</h6>
-                    <span><b><?= vsValue('usual_am_resting_sbp_min', $patient) ?></b></span>
+                    <span><b>{{$patient->usual_am_resting_sbp_min ?? '-'}}</b></span>
+                    @if($patient->usual_am_resting_dbp_min)
                     <span>/</span>
-                    <span class="mr-2"><b><?= vsValue('usual_am_resting_dbp_min', $patient) ?></b></span>
-                    <span class="mr-2">mm Hg Pulse:</span>
-                    <span><b><?= vsValue('usual_am_resting_pulse_min', $patient) ?></b></span>
+                    <span class="mr-2"><b>{{$patient->usual_am_resting_dbp_min}}</b></span>
+                    @endif
+                    @if($patient->usual_am_resting_pulse_min)
+                    <span class="mr-2">Pulse:</span>
+                    <span><b>{{$patient->usual_am_resting_pulse_min}}</b></span>
                     <span class="ml-2">BPM</span>
+                    @endif
                 </div>
                 @if($patient->does_usual_bp_have_range)
-                    <div class="d-flex align-items-center">
+                    <div class="d-flex align-items-center mb-2">
                         <h6 class="mb-0 mr-2">HIGHEST:</h6>
                         <h6 class="mb-0 mr-2">BP:</h6>
-                        <span><b><?= vsValue('usual_am_resting_sbp_max', $patient) ?></b></span>
+                        <span><b>{{$patient->usual_am_resting_sbp_max ?? '-'}}</b></span>
+                        @if($patient->usual_am_resting_dbp_max)
                         <span>/</span>
-                        <span class="mr-2"><b><?= vsValue('usual_am_resting_dbp_max', $patient) ?></b></span>
-                        <span class="mr-2">mm Hg Pulse:</span>
-                        <span><b><?= vsValue('usual_am_resting_pulse_max', $patient) ?></b></span>
+                        <span class="mr-2"><b>{{$patient->usual_am_resting_dbp_max}}</b></span>
+                        @endif
+                        @if($patient->usual_am_resting_pulse_max)
+                        <span class="mr-2">Pulse:</span>
+                        <span><b>{{$patient->usual_am_resting_pulse_max}}</b></span>
                         <span class="ml-2">BPM</span>
+                        @endif
                     </div>
                 @endif
                 @if($patient->does_usual_bp_have_am_pm_variation)
                     <div class="text-secondary font-weight-bold my-2"><i class="fa fa-moon"></i> PM</div>
-                    <div class="d-flex align-items-center">
+                    <div class="d-flex align-items-center mb-2">
                         @if($patient->does_usual_bp_have_range)
                             <h6 class="mb-0 mr-2">LOWEST:</h6>
                         @endif
                         <h6 class="mb-0 mr-2">BP:</h6>
-                        <span><b><?= vsValue('usual_pm_resting_sbp_min', $patient) ?></b></span>
+                        <span><b>{{$patient->usual_pm_resting_sbp_min ?? '-'}}</b></span>
+                        @if($patient->usual_pm_resting_dbp_min)
                         <span>/</span>
-                        <span class="mr-2"><b><?= vsValue('usual_pm_resting_dbp_min', $patient) ?></b></span>
-                        <span class="mr-2">mm Hg Pulse:</span>
-                        <span><b><?= vsValue('usual_pm_resting_pulse_min', $patient) ?></b></span>
+                        <span class="mr-2"><b>{{$patient->usual_pm_resting_dbp_min}}</b></span>
+                        @endif
+                        @if($patient->usual_pm_resting_pulse_min)
+                        <span class="mr-2">Pulse:</span>
+                        <span><b>{{$patient->usual_pm_resting_pulse_min}}</b></span>
                         <span class="ml-2">BPM</span>
+                        @endif
                     </div>
                 @endif
                 @if($patient->does_usual_bp_have_range)
-                    <div class="d-flex align-items-center">
+                    <div class="d-flex align-items-center mb-2">
                         @if($patient->does_usual_bp_have_range)
                             <h6 class="mb-0 mr-2">HIGHEST:</h6>
                         @endif
                         <h6 class="mb-0 mr-2">BP:</h6>
-                        <span><b><?= vsValue('usual_pm_resting_sbp_max', $patient) ?></b></span>
+                        <span><b>{{$patient->usual_pm_resting_sbp_max ?? '-'}}</b></span>
+                        @if($patient->usual_pm_resting_dbp_max)
                         <span>/</span>
-                        <span class="mr-2"><b><?= vsValue('usual_pm_resting_dbp_max', $patient) ?></b></span>
-                        <span class="mr-2">mm Hg Pulse:</span>
-                        <span><b><?= vsValue('usual_pm_resting_pulse_max', $patient) ?></b></span>
+                        <span class="mr-2"><b>{{$patient->usual_pm_resting_dbp_max}}</b></span>
+                        @endif
+                        @if($patient->usual_pm_resting_pulse_max)
+                        <span class="mr-2">Pulse:</span>
+                        <span><b>{{$patient->usual_pm_resting_pulse_max}}</b></span>
                         <span class="ml-2">BPM</span>
+                        @endif
                     </div>
                 @endif
             </div>
         </div>
+        @if($patient->ideal_am_resting_sbp_min)
         <div class="mb-3">
             <h6 class="text-secondary font-weight-bold">Ideal BP</h6>
             <div class="pl-3">
                 <div class="d-flex align-items-center">
                     <h6 class="mb-0 mr-2">Target:</h6>
                     <h6 class="mb-0 mr-2">BP:</h6>
-                    <span><b><?= vsValue('ideal_am_resting_sbp_min', $patient) ?></b></span>
+                    <span><b>{{$patient->ideal_am_resting_sbp_min ?? '-'}}</b></span>
+                    @if($patient->ideal_am_resting_dbp_min)
                     <span>/</span>
-                    <span class="mr-2"><b><?= vsValue('ideal_am_resting_dbp_min', $patient) ?></b></span>
-                    <span class="mr-2">mm Hg Pulse:</span>
-                    <span><b><?= vsValue('ideal_am_resting_pulse', $patient) ?></b></span>
+                    <span class="mr-2"><b>{{$patient->ideal_am_resting_dbp_min}}</b></span>
+                    @endif
+                    @if($patient->ideal_am_resting_pulse)
+                    <span class="mr-2">Pulse:</span>
+                    <span><b>{{$patient->ideal_am_resting_pulse}}</b></span>
                     <span class="ml-2">BPM</span>
+                    @endif
                 </div>
             </div>
         </div>
+        @endif
 
         <div class="mb-3">
             <h6 class="text-secondary font-weight-bold mb-3">Alerts</h6>
             <div class="pl-3">
-                <div class="mb-3">
-                    <div class="mb-2"><i class="fa fa-circle text-danger"></i> Red</div>
-                    <div class="d-flex align-items-center">
-                        <h6 class="mb-0 mr-2">Above:</h6>
-                        <h6 class="mb-0 mr-2">BP:</h6>
-                        <span><b><?= vsValue('red_alert_when_sbp_above', $patient) ?></b></span>
-                        <span>/</span>
-                        <span class="mr-2"><b><?= vsValue('red_alert_when_dbp_above', $patient) ?></b></span>
-                        <span class="mr-2">mm Hg Pulse:</span>
-                        <span><b><?= vsValue('red_alert_when_pulse_above', $patient) ?></b></span>
-                        <span class="ml-2">BPM</span>
-                    </div>
-                    <div class="d-flex align-items-center">
-                        <h6 class="mb-0 mr-2">Below:</h6>
-                        <h6 class="mb-0 mr-2">BP:</h6>
-                        <span><b><?= vsValue('red_alert_when_sbp_below', $patient) ?></b></span>
-                        <span>/</span>
-                        <span class="mr-2"><b><?= vsValue('red_alert_when_dbp_below', $patient) ?></b></span>
-                        <span class="mr-2">mm Hg Pulse:</span>
-                        <span><b><?= vsValue('red_alert_when_pulse_below', $patient) ?></b></span>
-                        <span class="ml-2">BPM</span>
+                <div class="d-flex align-items-start mb-3">
+                  <?php
+                    $redAlertHasContent = $patient->red_alert_when_sbp_above || $patient->red_alert_when_sbp_below;
+                   ?>
+                    <div class="mr-2"><i class="fa fa-circle text-danger"></i> @if(!$redAlertHasContent)<span class="ml-2">-</span> @endif</div>
+                    <div>
+                      @if($redAlertHasContent)
+                      <div class="d-flex align-items-center">
+                          <h6 class="mb-0 mr-2">Above:</h6>
+                          <h6 class="mb-0 mr-2">BP:</h6>
+                          <span><b>{{$patient->red_alert_when_sbp_above ?? '-'}}</b></span>
+                          @if($patient->red_alert_when_dbp_above)
+                          <span>/</span>
+                          <span class="mr-2"><b>{{$patient->red_alert_when_dbp_above}}</b></span>
+                          @endif
+                          @if($patient->red_alert_when_pulse_above)
+                          <span class="mr-2">Pulse:</span>
+                          <span><b>{{$patient->red_alert_when_pulse_above}}</b></span>
+                          <span class="ml-2">BPM</span>
+                          @endif
+                      </div>
+                      <div class="d-flex align-items-center">
+                          <h6 class="mb-0 mr-2">Below:</h6>
+                          <h6 class="mb-0 mr-2">BP:</h6>
+                          <span><b>{{$patient->red_alert_when_sbp_below ?? '-'}}</b></span>
+                          @if($patient->red_alert_when_dbp_below)
+                          <span>/</span>
+                          <span class="mr-2"><b>{{$patient->red_alert_when_dbp_below}}</b></span>
+                          @endif
+                          @if($patient->red_alert_when_pulse_below)
+                          <span class="mr-2">Pulse:</span>
+                          <span><b>{{$patient->red_alert_when_pulse_below}}</b></span>
+                          <span class="ml-2">BPM</span>
+                          @endif
+                      </div>
+                      @endif
                     </div>
                 </div>
-                <div class="mb-3">
-                    <div class="mb-2"><i class="fa fa-circle text-warning-mellow"></i> Yellow</div>
-                    <div class="d-flex align-items-center">
-                        <h6 class="mb-0 mr-2">Above:</h6>
-                        <h6 class="mb-0 mr-2">BP:</h6>
-                        <span><b><?= vsValue('yellow_alert_when_sbp_above', $patient) ?></b></span>
-                        <span>/</span>
-                        <span class="mr-2"><b><?= vsValue('yellow_alert_when_dbp_above', $patient) ?></b></span>
-                        <span class="mr-2">mm Hg Pulse:</span>
-                        <span><b><?= vsValue('yellow_alert_when_pulse_above', $patient) ?></b></span>
-                        <span class="ml-2">BPM</span>
-                    </div>
-                    <div class="d-flex align-items-center">
-                        <h6 class="mb-0 mr-2">Below:</h6>
-                        <h6 class="mb-0 mr-2">BP:</h6>
-                        <span><b><?= vsValue('yellow_alert_when_sbp_below', $patient) ?></b></span>
-                        <span>/</span>
-                        <span class="mr-2"><b><?= vsValue('yellow_alert_when_dbp_below', $patient) ?></b></span>
-                        <span class="mr-2">mm Hg Pulse:</span>
-                        <span><b><?= vsValue('yellow_alert_when_pulse_below', $patient) ?></b></span>
-                        <span class="ml-2">BPM</span>
+                <div class="d-flex align-items-start mb-3">
+                    <?php
+                      $yellowAlertHasContent = $patient->yellow_alert_when_sbp_above || $patient->yellow_alert_when_sbp_below;
+                     ?>
+                    <div class="mr-2"><i class="fa fa-circle text-warning-mellow"></i> @if(!$yellowAlertHasContent)<span class="ml-2">-</span> @endif</div>
+                    <div>
+                      @if($yellowAlertHasContent)
+                      <div class="d-flex align-items-center">
+                          <h6 class="mb-0 mr-2">Above:</h6>
+                          <h6 class="mb-0 mr-2">BP:</h6>
+                          <span><b>{{$patient->yellow_alert_when_sbp_above ?? '-'}}</b></span>
+                          @if($patient->yellow_alert_when_dbp_above)
+                          <span>/</span>
+                          <span class="mr-2"><b>{{$patient->yellow_alert_when_dbp_above}}</b></span>
+                          @endif
+                          @if($patient->yellow_alert_when_pulse_above)
+                          <span class="mr-2">Pulse:</span>
+                          <span><b>{{$patient->yellow_alert_when_pulse_above}}</b></span>
+                          <span class="ml-2">BPM</span>
+                          @endif
+                      </div>
+                      <div class="d-flex align-items-center">
+                          <h6 class="mb-0 mr-2">Below:</h6>
+                          <h6 class="mb-0 mr-2">BP:</h6>
+                          <span><b>{{$patient->yellow_alert_when_sbp_below ?? '-'}}</b></span>
+                          @if($patient->yellow_alert_when_dbp_below)
+                          <span>/</span>
+                          <span class="mr-2"><b>{{$patient->yellow_alert_when_dbp_below}}</b></span>
+                          @endif
+                          @if($patient->yellow_alert_when_pulse_below)
+                          <span class="mr-2">Pulse:</span>
+                          <span><b>{{$patient->yellow_alert_when_pulse_below}}</b></span>
+                          <span class="ml-2">BPM</span>
+                          @endif
+                      </div>
+                      @endif
                     </div>
                 </div>
             </div>
         </div>
 
     </div>
-    <div class="col-6">
+    <div class="">
         <div class="table-responsive">
             <table class="table table-sm table-striped table-bordered">
                 <tbody>
                     <tr>
                         <td>Reports prehypertension?</td>
-                        <td><?= vsValue('has_prehypertension_dx', $patient) ?></td>
+                        <td>{{$patient->has_prehypertension_dx ?? '-'}}</td>
                     </tr>
                     <tr>
                         <td>Reports hypertension?</td>
-                        <td><?= vsValue('has_hypertension_dx', $patient) ?></td>
+                        <td>{{$patient->has_hypertension_dx ?? '-'}}</td>
                     </tr>
                     <tr>
                         <td>Reports hypertension medicine?</td>
-                        <td><?= vsValue('is_prescribed_hypertension_medicine', $patient) ?></td>
+                        <td>{{$patient->is_prescribed_hypertension_medicine ?? '-'}}</td>
                     </tr>
                     <tr>
                         <td>Is it a goal to reduce<br>hypertension medicine?</td>
-                        <td><?= vsValue('is_goal_to_reduce_hypertension_medicine', $patient) ?></td>
+                        <td>{{$patient->is_goal_to_reduce_hypertension_medicine ?? '-'}}</td>
                     </tr>
                     <tr>
                         <td>Describe the goal</td>
-                        <td><?= vsValue('goal_to_reduce_hypertension_medicine_memo', $patient) ?></td>
+                        <td>{{$patient->goal_to_reduce_hypertension_medicine_memo ?? '-'}}</td>
                     </tr>
                     <tr>
                         <td>BP monitoring prescribed?</td>
-                        <td><?= vsValue('is_bp_monitoring_needed', $patient) ?></td>
+                        <td>{{$patient->is_bp_monitoring_needed ?? '-'}}</td>
                     </tr>
                     <tr>
                         <td>BP monitoring prescribed?</td>
-                        <td><?= vsValue('is_bp_monitoring_needed', $patient) ?></td>
+                        <td>{{$patient->is_bp_monitoring_needed ?? '-'}}</td>
                     </tr>
                     <tr>
                         <td>Remarks</td>
-                        <td><?= vsValue('why_is_bp_monitoring_needed', $patient) ?></td>
+                        <td>{{$patient->why_is_bp_monitoring_needed ?? '-'}}</td>
                     </tr>
                 </tbody>
             </table>