Sfoglia il codice sorgente

Vitals settings - BMI Management

Vijayakrishnan 3 anni fa
parent
commit
03269548f0

+ 4 - 0
app/Http/Controllers/PatientController.php

@@ -398,6 +398,10 @@ class PatientController extends Controller
         return view('app.patient.flowsheets', compact('patient', 'pros', 'filter'));
     }
 
+    public function vitalsSettings(Request $request, Client $patient) {
+        return view('app.patient.vitals-settings', compact('patient'));
+    }
+
     public function vitalsGraph(Request $request, Client $patient, $filter = '') {
         $pros = $this->pros;
         return view('app.patient.vitals-graph', compact('patient', 'pros', 'filter'));

+ 210 - 0
resources/views/app/patient/vitals-settings.blade.php

@@ -0,0 +1,210 @@
+@extends ('layouts.patient')
+
+@section('inner-content')
+
+    <h4 class="font-weight-bold mb-3 text-secondary font-size-16" id="rm-setup">Vitals Settings</h4>
+
+    <hr class="m-neg-4">
+
+    <div class="row" id="vitals-settings-{{$patient->uid}}">
+        <div class="col-6">
+            <div class="d-flex align-items-baseline">
+                <b>BMI Management</b>
+                <span class="mx-2 text-secondary">|</span>
+                <div moe large>
+                    <a href="#" start show>Update</a>
+                    <form url="/api/client/updateBmiManagementValue">
+                        <input type="hidden" name="uid" value="{{$patient->uid}}">
+                        <p>BMI Management</p>
+                        <div class="mb-2">
+                            <label class="text-sm text-secondary mb-1">Is Weight Monitoring Needed?</label>
+                            <select type="text" class="form-control form-control-sm min-width-unset" condition name="isWeightMonitoringNeeded">
+                                <option value="">-- select --</option>
+                                <option {{$patient->is_weight_monitoring_needed === 'YES' ? 'selected' : '' }} value="YES">Yes</option>
+                                <option {{$patient->is_weight_monitoring_needed === 'NO' ? 'selected' : '' }} value="NO">No</option>
+                                <option {{$patient->is_weight_monitoring_needed === 'UNKNOWN' ? 'selected' : '' }} value="UNKNOWN">Unknown</option>
+                            </select>
+                        </div>
+                        <div condition-key="isWeightMonitoringNeeded" condition-value="YES">
+                            <div class="mb-2">
+                                <label class="text-sm text-secondary mb-1">Why Is Weight Monitoring Needed?</label>
+                                <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeeded" value="{{$patient->why_is_weight_monitoring_needed}}">
+                            </div>
+                            <div class="row mb-2">
+                                <div class="col-3 pr-0">
+                                    <label class="text-sm text-secondary mb-1">ICD 1</label>
+                                    <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeededIcd1" value="{{$patient->why_is_weight_monitoring_needed_icd1}}">
+                                </div>
+                                <div class="col-3 pr-0">
+                                    <label class="text-sm text-secondary mb-1">ICD 2</label>
+                                    <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeededIcd2" value="{{$patient->why_is_weight_monitoring_needed_icd2}}">
+                                </div>
+                                <div class="col-3 pr-0">
+                                    <label class="text-sm text-secondary mb-1">ICD 3</label>
+                                    <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeededIcd3" value="{{$patient->why_is_weight_monitoring_needed_icd3}}">
+                                </div>
+                                <div class="col-3">
+                                    <label class="text-sm text-secondary mb-1">ICD 4</label>
+                                    <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeededIcd4" value="{{$patient->why_is_weight_monitoring_needed_icd4}}">
+                                </div>
+                            </div>
+                            <div class="row mb-2">
+                                <div class="col-6 pr-0">
+                                    <label class="text-sm text-secondary mb-1">Description 1</label>
+                                    <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeededDescription1" value="{{$patient->why_is_weight_monitoring_needed_description1}}">
+                                </div>
+                                <div class="col-6">
+                                    <label class="text-sm text-secondary mb-1">Description 2</label>
+                                    <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeededDescription2" value="{{$patient->why_is_weight_monitoring_needed_description2}}">
+                                </div>
+                            </div>
+                            <div class="row mb-2">
+                                <div class="col-6 pr-0">
+                                    <label class="text-sm text-secondary mb-1">Description 3</label>
+                                    <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeededDescription3" value="{{$patient->why_is_weight_monitoring_needed_description3}}">
+                                </div>
+                                <div class="col-6">
+                                    <label class="text-sm text-secondary mb-1">Description 4</label>
+                                    <input type="text" class="form-control form-control-sm min-width-unset" name="whyIsWeightMonitoringNeededDescription4" value="{{$patient->why_is_weight_monitoring_needed_description4}}">
+                                </div>
+                            </div>
+                            <div class="mb-2">
+                                <label class="text-sm text-secondary mb-1">Has Heart Failure Dx?</label>
+                                <select type="text" class="form-control form-control-sm min-width-unset" name="hasHeartFailureDx">
+                                    <option value="">-- select --</option>
+                                    <option {{$patient->has_heart_failure_dx === 'YES' ? 'selected' : ''}} value="YES">Yes</option>
+                                    <option {{$patient->has_heart_failure_dx === 'NO' ? 'selected' : ''}} value="NO">No</option>
+                                    <option {{$patient->has_heart_failure_dx === 'UNKNOWN' ? 'selected' : ''}} value="UNKNOWN">Unknown</option>
+                                </select>
+                            </div>
+                            <div class="mb-2">
+                                <label class="text-sm text-secondary mb-1">Weight Management Goal Category</label>
+                                <select type="text" class="form-control form-control-sm min-width-unset" name="weightManagementGoalCategory">
+                                    <option value="">-- select --</option>
+                                    <option {{$patient->weight_management_goal_category === 'LOSE' ? 'selected' : ''}} value="LOSE">Lose</option>
+                                    <option {{$patient->weight_management_goal_category === 'GAIN' ? 'selected' : ''}} value="GAIN">Gain</option>
+                                    <option {{$patient->weight_management_goal_category === 'MAINTAIN' ? 'selected' : ''}} value="MAINTAIN">Maintain</option>
+                                </select>
+                            </div>
+                            <div class="row mb-2">
+                                <div class="col-4 pr-0">
+                                    <label class="text-sm text-secondary mb-1">Baseline Weight (lbs)</label>
+                                    <input type="number" class="form-control form-control-sm min-width-unset" name="baselineWeight" value="{{$patient->baseline_weight}}">
+                                </div>
+                                <div class="col-4 pr-0">
+                                    <label class="text-sm text-secondary mb-1">Baseline Min (lbs)</label>
+                                    <input type="number" class="form-control form-control-sm min-width-unset" name="baselineWeightMin" value="{{$patient->baseline_weight_min}}">
+                                </div>
+                                <div class="col-4">
+                                    <label class="text-sm text-secondary mb-1">Baseline Max (lbs)</label>
+                                    <input type="number" class="form-control form-control-sm min-width-unset" name="baselineWeightMax" value="{{$patient->baseline_weight_max}}">
+                                </div>
+                            </div>
+                            <div class="row mb-2">
+                                <div class="col-4 pr-0">
+                                    <label class="text-sm text-secondary mb-1">Ideal Weight (lbs)</label>
+                                    <input type="number" class="form-control form-control-sm min-width-unset" name="idealWeight" value="{{$patient->ideal_weight}}">
+                                </div>
+                            </div>
+                        </div>
+                        <div class="pt-2">
+                            <button class="btn btn-success btn-sm" submit>Submit</button>
+                            <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                        </div>
+                    </form>
+                </div>
+            </div>
+            <table class="table table-sm table-condensed table-bordered table-hover mt-3">
+                <tbody>
+                <tr>
+                    <td>Is Weight Monitoring Needed?</td>
+                    <td class="font-weight-bold">{{$patient->is_weight_monitoring_needed}}</td>
+                </tr>
+                @if($patient->is_weight_monitoring_needed === 'YES')
+                    <tr>
+                        <td>Why Is Weight Monitoring Needed</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed}}</td>
+                    </tr>
+                    <tr>
+                        <td>ICD 1</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed_icd1}}</td>
+                    </tr>
+                    <tr>
+                        <td>ICD 2</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed_icd2}}</td>
+                    </tr>
+                    <tr>
+                        <td>ICD 3</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed_icd3}}</td>
+                    </tr>
+                    <tr>
+                        <td>ICD 4</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed_icd4}}</td>
+                    </tr>
+                    <tr>
+                        <td>Description 1</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed_description1}}</td>
+                    </tr>
+                    <tr>
+                        <td>Description 2</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed_description2}}</td>
+                    </tr>
+                    <tr>
+                        <td>Description 3</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed_description3}}</td>
+                    </tr>
+                    <tr>
+                        <td>Description 4</td>
+                        <td class="font-weight-bold">{{$patient->why_is_weight_monitoring_needed_description4}}</td>
+                    </tr>
+                    <tr>
+                        <td>Has Heart Failure Dx?</td>
+                        <td class="font-weight-bold">{{$patient->has_heart_failure_dx}}</td>
+                    </tr>
+                    <tr>
+                        <td>Weight Management Goal Category</td>
+                        <td class="font-weight-bold">{{$patient->weight_management_goal_category}}</td>
+                    </tr>
+                    <tr>
+                        <td>Baseline Weight (lbs)</td>
+                        <td class="font-weight-bold">{{$patient->baseline_weight}}</td>
+                    </tr>
+                    <tr>
+                        <td>Baseline Min (lbs)</td>
+                        <td class="font-weight-bold">{{$patient->baseline_weight_min}}</td>
+                    </tr>
+                    <tr class="col-4">
+                        <td>Baseline Max (lbs)</td>
+                        <td class="font-weight-bold">{{$patient->baseline_weight_max}}</td>
+                    </tr>
+                    <tr>
+                        <td>Ideal Weight (lbs)</td>
+                        <td class="font-weight-bold">{{$patient->ideal_weight}}</td>
+                    </tr>
+
+                @endif
+                </tbody>
+            </table>
+        </div>
+        <div class="col-6">
+
+        </div>
+    </div>
+
+    <script>
+        (function() {
+            function init() {
+                $('[condition]')
+                    .off('change.condition')
+                    .on('change.condition', function() {
+                        let form = $(this).closest('form');
+                        form.find('[condition-key="' + this.name + '"]').hide();
+                        form.find('[condition-key="' + this.name + '"][condition-value="' + this.value + '"]').show();
+                    })
+                    .trigger('change');
+            }
+            addMCInitializer('vitals-settings-{{$patient->uid}}', init, '#vitals-settings-{{$patient->uid}}')
+        }).call(window);
+    </script>
+
+@endsection

+ 4 - 0
resources/views/layouts/patient.blade.php

@@ -30,6 +30,10 @@
                             <a class="nav-link {{ strpos($routeName, 'patients.view.flowsheets') === 0 ? 'active' : '' }}"
                                href="{{ route('patients.view.flowsheets', ['patient' => $patient]) }}">Flowsheets</a>
                         </li>
+                        <li class="nav-item">
+                            <a class="nav-link {{ strpos($routeName, 'patients.view.vitals-settings') === 0 ? 'active' : '' }}"
+                               href="{{ route('patients.view.vitals-settings', ['patient' => $patient]) }}">Vitals Settings</a>
+                        </li>
                         <li class="nav-item">
                             <a class="nav-link {{ strpos($routeName, 'patients.view.vitals-graph') === 0 ? 'active' : '' }}"
                                href="{{ route('patients.view.vitals-graph', ['patient' => $patient]) }}">Vitals Graph</a>

+ 3 - 0
routes/web.php

@@ -276,6 +276,9 @@ Route::middleware('pro.auth')->group(function () {
             // flowsheets
             Route::get('flowsheets/{filter?}', 'PatientController@flowsheets')->name('flowsheets');
 
+            // vitals-settings
+            Route::get('vitals-settings/{filter?}', 'PatientController@vitalsSettings')->name('vitals-settings');
+
             // vitals-graph
             Route::get('vitals-graph/{filter?}', 'PatientController@vitalsGraph')->name('vitals-graph');