Преглед изворни кода

Include bmi/bp summary in stamp popup

Vijayakrishnan пре 3 година
родитељ
комит
e3b419fb80

+ 1 - 0
app/Http/Controllers/HomeController.php

@@ -625,6 +625,7 @@ SELECT measurement.uid as uid,
        measurement.value_pulse,
        measurement.value_irregular,
        measurement.ts,
+       client.id as client_id,
        client.mcp_pro_id,
        client.default_na_pro_id,
        client.rmm_pro_id,

+ 1 - 0
resources/views/app/dashboard/measurements.blade.php

@@ -110,6 +110,7 @@
                         <a native target="_blank"
                            open-in-stag-popup
                            update-parent
+                           mc-initer="cm-matrix-{{$measurement->client_id}}"
                            title="Care Month Matrix: {{date('M Y', strtotime($measurement->care_month_start_date))}}"
                            href="/patient-care-month-matrix/{{$measurement->care_month_uid}}">
                             View &amp; Stamp

+ 33 - 3
resources/views/app/patient/care-month/_matrix.blade.php

@@ -26,8 +26,14 @@ foreach ($days as $k => $day) {
 }
 
 ?>
-<p class="font-weight-bold">Care Month Matrix</p>
-<table class="table table-condensed table-sm table-bordered mt-2 mb-3">
+<div class="d-flex align-items-baseline">
+    <a class="font-weight-bold" href="#" tab-link="matrix">Care Month Matrix</a>
+    <span class="mx-2 text-secondary text-sm">|</span>
+    <a class="" href="#" tab-link="bmi-summary">BMI Management Settings</a>
+    <span class="mx-2 text-secondary text-sm">|</span>
+    <a class="" href="#" tab-link="bp-summary">BP Management Settings</a>
+</div>
+<table class="table table-condensed table-sm table-bordered my-3 cm-tab" tab-key="matrix">
     <thead>
     <tr>
         <th class="px-2 text-secondary align-bottom" rowspan="2">Date</th>
@@ -251,4 +257,28 @@ foreach ($days as $k => $day) {
         @endforeach
     @endforeach
     </tbody>
-</table>
+</table>
+<div class="my-3 border p-3 d-none cm-tab" tab-key="bmi-summary">
+    @include('app.patient.vitals-settings.bmi-management-summary')
+</div>
+<div class="my-3 border p-3 d-none cm-tab" tab-key="bp-summary">
+    @include('app.patient.vitals-settings.bp-management-summary')
+</div>
+
+<script>
+    (function() {
+        function init() {
+            $('a[tab-link]')
+                .off('click')
+                .on('click', function () {
+                    let tab = $(this).attr('tab-link');
+                    $(this).siblings().removeClass('font-weight-bold');
+                    $(this).addClass('font-weight-bold');
+                    $('.cm-tab').addClass('d-none');
+                    $('.cm-tab[tab-key="' + tab + '"]').removeClass('d-none');
+                    return false;
+                });
+        }
+        addMCInitializer('cm-matrix-{{$patient->id}}', init);
+    }).call(window);
+</script>

+ 1 - 0
resources/views/app/patient/care-months.blade.php

@@ -137,6 +137,7 @@
                     <td class="px-2">
                         <a native target="_blank"
                            open-in-stag-popup
+                           mc-initer="cm-matrix-{{$patient->id}}"
                            title="Care Month Matrix: {{date('M Y', strtotime($careMonth->start_date))}}"
                            href="/patient-care-month-matrix/{{$careMonth->uid}}">
                             View