Эх сурвалжийг харах

Merge branch 'dev' of rav.triplestart.com:jmudaka/stagfe2

= 3 жил өмнө
parent
commit
157d06ecea
43 өөрчлөгдсөн 495 нэмэгдсэн , 280 устгасан
  1. 18 0
      app/Http/Controllers/HomeController.php
  2. 1 1
      config/app.php
  3. 2 1
      public/js/pro-suggest.js
  4. 2 2
      resources/views/app/new-non-mcn-patient.blade.php
  5. 39 2
      resources/views/app/new-patient.blade.php
  6. 5 3
      resources/views/app/patient/care-month/_matrix.blade.php
  7. 3 2
      resources/views/app/patient/claims-resolver.blade.php
  8. 52 63
      resources/views/app/patient/client-primary-coverages.blade.php
  9. 37 59
      resources/views/app/patient/dashboard.blade.php
  10. 7 1
      resources/views/app/patient/note/dashboard.blade.php
  11. 4 1
      resources/views/app/patient/note/dashboard_script.blade.php
  12. 2 0
      resources/views/app/patient/note/note-section-list.blade.php
  13. 1 1
      resources/views/app/patient/note/note-segment-list.blade.php
  14. 1 1
      resources/views/app/patient/note/section_script.blade.php
  15. 17 10
      resources/views/app/patient/note/segment.blade.php
  16. 40 30
      resources/views/app/patient/note/segment_script.blade.php
  17. 59 48
      resources/views/app/patient/notes.blade.php
  18. 2 2
      resources/views/app/patient/partials/appointment-confirmation.blade.php
  19. 1 1
      resources/views/app/patient/segment-templates/history_social/edit.blade.php
  20. 2 2
      resources/views/app/patient/segment-templates/history_social/summary.blade.php
  21. 1 1
      resources/views/app/patient/segment-templates/history_surgical/edit.blade.php
  22. 6 6
      resources/views/app/patient/segment-templates/history_surgical/summary.blade.php
  23. 20 6
      resources/views/app/patient/segment-templates/lifestyle_general/edit.blade.php
  24. 13 0
      resources/views/app/patient/segment-templates/lifestyle_nutrition/edit.blade.php
  25. 11 0
      resources/views/app/patient/segment-templates/lifestyle_physical_activity/edit.blade.php
  26. 11 1
      resources/views/app/patient/segment-templates/lifestyle_sleep/edit.blade.php
  27. 11 1
      resources/views/app/patient/segment-templates/lifestyle_social/edit.blade.php
  28. 11 0
      resources/views/app/patient/segment-templates/lifestyle_stress/edit.blade.php
  29. 11 0
      resources/views/app/patient/segment-templates/lifestyle_substances/edit.blade.php
  30. 1 1
      resources/views/app/patient/segment-templates/past_medical_history/edit.blade.php
  31. 2 2
      resources/views/app/patient/segment-templates/past_medical_history/summary.blade.php
  32. 2 2
      resources/views/app/patient/segment-templates/plan_allergies/edit.blade.php
  33. 2 2
      resources/views/app/patient/segment-templates/plan_care_team/edit.blade.php
  34. 2 2
      resources/views/app/patient/segment-templates/plan_goals/edit.blade.php
  35. 2 2
      resources/views/app/patient/segment-templates/plan_interventions/edit.blade.php
  36. 2 2
      resources/views/app/patient/segment-templates/plan_medications/edit.blade.php
  37. 2 2
      resources/views/app/patient/segment-templates/plan_problems/edit.blade.php
  38. 11 11
      resources/views/app/patient/segment-templates/vitals/edit.blade.php
  39. 1 1
      resources/views/app/patient/supply-orders.blade.php
  40. 1 1
      resources/views/app/patient/vitals-settings.blade.php
  41. 37 2
      resources/views/app/patient/vitals-settings/bmi-management-form.blade.php
  42. 36 2
      resources/views/app/patient/vitals-settings/bp-management-form.blade.php
  43. 4 3
      resources/views/layouts/patient.blade.php

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

@@ -920,6 +920,24 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
                 ->orWhereRaw('cell_number LIKE ?', ['%' . $term . '%']);
                 ->orWhereRaw('cell_number LIKE ?', ['%' . $term . '%']);
         });
         });
 
 
+        $type = $request->input('type') ? trim($request->input('type')) : '';
+        if(!!$type) {
+            switch(strtolower($type)) {
+                case 'hcp':
+                    $pros->where('is_hcp', true);
+                    break;
+                case 'default-na': // TODO: fix condition for NA
+                    $pros->where('is_hcp', false)->where('pro_type', '!=', 'ADMIN');
+                    break;
+                case 'admin':
+                    $pros->where('pro_type', 'ADMIN');
+                    break;
+                case 'non-admin':
+                    $pros->where('pro_type', '!=', 'ADMIN');
+                    break;
+            }
+        }
+
         if($this->performer->pro && $this->performer->pro->pro_type != 'ADMIN'){
         if($this->performer->pro && $this->performer->pro->pro_type != 'ADMIN'){
             $accessiblePros = ProProAccess::where('owner_pro_id', $this->performer->pro->id);
             $accessiblePros = ProProAccess::where('owner_pro_id', $this->performer->pro->id);
             $accessibleProIds = [];
             $accessibleProIds = [];

+ 1 - 1
config/app.php

@@ -65,7 +65,7 @@ return [
 
 
     'hrm2_url' => env('HRM2_URL'),
     'hrm2_url' => env('HRM2_URL'),
 
 
-    'asset_version' => 10,
+    'asset_version' => 12,
 
 
     'temp_dir' => env('TEMP_DIR'),
     'temp_dir' => env('TEMP_DIR'),
 
 

+ 2 - 1
public/js/pro-suggest.js

@@ -19,7 +19,7 @@
     var returnedFunction = debounce(function (elem) {
     var returnedFunction = debounce(function (elem) {
         var term = elem.val();
         var term = elem.val();
         if (!!term && lastTerm !== term) {
         if (!!term && lastTerm !== term) {
-            $.get('/pro-suggest?term=' + $.trim(term), function (_data) {
+            $.get('/pro-suggest?term=' + $.trim(term) + '&type=' + elem.attr('provider-type'), function (_data) {
                 suggestionsOuter.html(_data).removeClass('d-none');
                 suggestionsOuter.html(_data).removeClass('d-none');
             });
             });
             lastTerm = term;
             lastTerm = term;
@@ -95,6 +95,7 @@
             elem.next('.pro-suggest-input').remove();
             elem.next('.pro-suggest-input').remove();
             elem.next('.pro-suggestions-container').remove();
             elem.next('.pro-suggestions-container').remove();
             let input = $('<input type="text" placeholder="Pro">').addClass('pro-suggest-input form-control form-control-sm').insertAfter(elem);
             let input = $('<input type="text" placeholder="Pro">').addClass('pro-suggest-input form-control form-control-sm').insertAfter(elem);
+            input.attr('provider-type', elem.attr('provider-type'));
             $('<div class="pro-suggestions-container position-relative">' +
             $('<div class="pro-suggestions-container position-relative">' +
                 '<div class="suggestions-outer pro-suggestions position-absolute d-none"></div>' +
                 '<div class="suggestions-outer pro-suggestions position-absolute d-none"></div>' +
                 '</div>').insertAfter(input);
                 '</div>').insertAfter(input);

+ 2 - 2
resources/views/app/new-non-mcn-patient.blade.php

@@ -73,7 +73,7 @@
                         </div>
                         </div>
                         <div class='form-group mb-3'>
                         <div class='form-group mb-3'>
                             <label class='control-label'>Payer</label>
                             <label class='control-label'>Payer</label>
-                            <select name="mbPayerUid" class="form-control select2">
+                            <select name="payerName" class="form-control select2">
                                 <option value="">--select--</option>
                                 <option value="">--select--</option>
                                 @foreach($mbPayers as $mbPayer)
                                 @foreach($mbPayers as $mbPayer)
                                 <option value="{{$mbPayer->uid}}">{{$mbPayer->name()}}</option>
                                 <option value="{{$mbPayer->uid}}">{{$mbPayer->name()}}</option>
@@ -82,7 +82,7 @@
                         </div>
                         </div>
                         <div class='form-group mb-3'>
                         <div class='form-group mb-3'>
                             <label class='control-label'>Member ID</label>
                             <label class='control-label'>Member ID</label>
-                            <input class='form-control' type='text' name='mbPayerMemberId' required>
+                            <input class='form-control' type='text' name='payerMemberId' required>
                         </div>
                         </div>
                         <div class='form-group mb-3'>
                         <div class='form-group mb-3'>
                             <label class='control-label'>Initiative</label>
                             <label class='control-label'>Initiative</label>

+ 39 - 2
resources/views/app/new-patient.blade.php

@@ -27,6 +27,43 @@
                             <label class='control-label'>Last Name *</label>
                             <label class='control-label'>Last Name *</label>
                             <input class='form-control' type='text' name='nameLast' value='' required>
                             <input class='form-control' type='text' name='nameLast' value='' required>
                         </div>
                         </div>
+
+                        @if($pro->pro_type === 'ADMIN')
+                            <div class='form-group mb-3'>
+                                <label class='control-label'>MCP Pro</label>
+                                <select name="mcpProUid" class="form-control" provider-search provider-type="hcp">
+                                    <option value="">--select--</option>
+                                </select>
+                            </div>
+                            <div class='form-group mb-3'>
+                                <label class='control-label'>Default NA Pro</label>
+                                <select name="defaultNaProUid" class="form-control" provider-search provider-type="default-na">
+                                    <option value="">--select--</option>
+                                </select>
+                            </div>
+                        @elseif($pro->is_hcp === true)
+                            <div class='form-group mb-3'>
+                                <label class='control-label'>MCP Pro</label>
+                                <input type="text" class="form-control" readonly value="{{$pro->displayName()}}">
+                                <input type="hidden" name="mcpProUid" value="{{$pro->uid}}">
+                            </div>
+                        @elseif($pro->isDefaultNA())
+                            <div class='form-group mb-3'>
+                                <label class='control-label'>MCP Pro</label>
+                                <?php $teams = $pro->teamsWhereAssistant; ?>
+                                <select name="mcpProUid" class="form-control">
+                                    <option value="">--select--</option>
+                                    @foreach($teams as $team)
+                                        <option value="{{$team->mcp->uid}}">{{$team->mcp->displayName()}}</option>
+                                    @endforeach
+                                </select>
+                            </div>
+                            <div class='form-group mb-3'>
+                                <label class='control-label'>Default NA Pro</label>
+                                <input type="text" class="form-control" readonly value="{{$pro->displayName()}}">
+                                <input type="hidden" name="defaultNaProUid" value="{{$pro->uid}}">
+                            </div>
+                        @endif
 			
 			
                         <div class='form-group mb-3'>
                         <div class='form-group mb-3'>
                             <label class='control-label'>Sex</label>
                             <label class='control-label'>Sex</label>
@@ -91,7 +128,7 @@
                         <div data-insurance="non-medicare" class="d-none">
                         <div data-insurance="non-medicare" class="d-none">
                             <div class='form-group mb-3'>
                             <div class='form-group mb-3'>
                                 <label class='control-label d-block'>Payer</label>
                                 <label class='control-label d-block'>Payer</label>
-                                <select name="mbPayerUid" class="form-control select2">
+                                <select name="payerName" class="form-control select2">
                                     <option value="">--select--</option>
                                     <option value="">--select--</option>
                                     <option value="1199SEIU">1199SEIU</option>
                                     <option value="1199SEIU">1199SEIU</option>
                                     <option value="1st Agency">1st Agency</option>
                                     <option value="1st Agency">1st Agency</option>
@@ -810,7 +847,7 @@
                             </div>
                             </div>
                             <div class='form-group mb-3'>
                             <div class='form-group mb-3'>
                                 <label class='control-label'>Member ID</label>
                                 <label class='control-label'>Member ID</label>
-                                <input class='form-control' type='text' name='mbPayerMemberId'>
+                                <input class='form-control' type='text' name='payerMemberId'>
                             </div>
                             </div>
                         </div>
                         </div>
                         <hr class="m-neg-4">
                         <hr class="m-neg-4">

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

@@ -26,10 +26,12 @@ foreach ($days as $k => $day) {
 }
 }
 
 
 ?>
 ?>
+
+<div id="cm-matrix-{{$patient->id}}">
 <div class="d-flex align-items-baseline">
 <div class="d-flex align-items-baseline">
     <a class="font-weight-bold" href="#" tab-link="matrix">Care Month Matrix</a>
     <a class="font-weight-bold" href="#" tab-link="matrix">Care Month Matrix</a>
     <span class="mx-2 text-secondary text-sm">|</span>
     <span class="mx-2 text-secondary text-sm">|</span>
-    <a class="" href="#" tab-link="bmi-summary">BMI Management Settings</a>
+    <a class="" href="#" tab-link="bmi-summary">BMI/Weight Management Settings</a>
     <span class="mx-2 text-secondary text-sm">|</span>
     <span class="mx-2 text-secondary text-sm">|</span>
     <a class="" href="#" tab-link="bp-summary">BP Management Settings</a>
     <a class="" href="#" tab-link="bp-summary">BP Management Settings</a>
 </div>
 </div>
@@ -264,7 +266,7 @@ foreach ($days as $k => $day) {
 <div class="my-3 border p-3 d-none cm-tab" tab-key="bp-summary">
 <div class="my-3 border p-3 d-none cm-tab" tab-key="bp-summary">
     @include('app.patient.vitals-settings.bp-management-summary')
     @include('app.patient.vitals-settings.bp-management-summary')
 </div>
 </div>
-
+</div>
 <script>
 <script>
     (function() {
     (function() {
         function init() {
         function init() {
@@ -279,6 +281,6 @@ foreach ($days as $k => $day) {
                     return false;
                     return false;
                 });
                 });
         }
         }
-        addMCInitializer('cm-matrix-{{$patient->id}}', init);
+        addMCInitializer('cm-matrix-{{$patient->id}}', init, '#cm-matrix-{{$patient->id}}');
     }).call(window);
     }).call(window);
 </script>
 </script>

+ 3 - 2
resources/views/app/patient/claims-resolver.blade.php

@@ -53,6 +53,7 @@
         if($note->is_claim_closed) $totalNotesWithClaimingClosed++;
         if($note->is_claim_closed) $totalNotesWithClaimingClosed++;
     }
     }
     ?>
     ?>
+    <div id="claims-resolver">
     <h2><strong>Numbers:</strong></h2>
     <h2><strong>Numbers:</strong></h2>
     <table class="table table-sm table-striped">
     <table class="table table-sm table-striped">
         <tr>
         <tr>
@@ -413,7 +414,7 @@
         </tbody>
         </tbody>
     </table>
     </table>
     </div>
     </div>
-
+    </div>
     <script>
     <script>
         (function() {
         (function() {
             function init() {
             function init() {
@@ -423,7 +424,7 @@
                     scrollX: true
                     scrollX: true
                 });
                 });
             }
             }
-            addMCInitializer('claims-resolver', init);
+            addMCInitializer('claims-resolver', init, '#claims-resolver');
         }).call(window);
         }).call(window);
     </script>
     </script>
 
 

+ 52 - 63
resources/views/app/patient/client-primary-coverages.blade.php

@@ -43,15 +43,15 @@
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Name First</label>
                         <label class="control-label">Subscriber Name First</label>
-                        <input type="text" name="subscriberNameFirst" class="form-control input-sm" />
+                        <input type="text" name="subscriberNameFirst" class="form-control input-sm" value="{{$patient->name_first}}" />
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Name Last</label>
                         <label class="control-label">Subscriber Name Last</label>
-                        <input type="text" name="subscriberNameLast" class="form-control input-sm" />
+                        <input type="text" name="subscriberNameLast" class="form-control input-sm" value="{{$patient->name_last}}" />
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Dob</label>
                         <label class="control-label">Subscriber Dob</label>
-                        <input type="date" name="subscriberDob" class="form-control input-sm" />
+                        <input type="date" name="subscriberDob" class="form-control input-sm" value="{{$patient->dob}}" />
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Payer Member Identifier</label>
                         <label class="control-label">Payer Member Identifier</label>
@@ -59,7 +59,7 @@
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Date Of Service</label>
                         <label class="control-label">Date Of Service</label>
-                        <input type="date" name="dateOfService" class="form-control input-sm" />
+                        <input type="date" name="dateOfService" class="form-control input-sm" value="{{date('Y-m-d')}}" />
                     </div>
                     </div>
                     <div class="form-group text-nowrap mb-0">
                     <div class="form-group text-nowrap mb-0">
                         <button class="btn btn-sm btn-primary" submit>Submt</button>
                         <button class="btn btn-sm btn-primary" submit>Submt</button>
@@ -74,40 +74,37 @@
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Name First</label>
                         <label for="" class="control-label">Subscriber Name First</label>
-                        <input type="text" name="subscriberNameFirst" class="form-control input-sm">
+                        <input type="text" name="subscriberNameFirst" class="form-control input-sm" value="{{$patient->name_first}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Name Last</label>
                         <label for="" class="control-label">Subscriber Name Last</label>
-                        <input type="text" name="subscriberNameLast" class="form-control input-sm">
+                        <input type="text" name="subscriberNameLast" class="form-control input-sm" value="{{$patient->name_last}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Dob</label>
                         <label for="" class="control-label">Subscriber Dob</label>
-                        <input type="date" name="subscriberDob" class="form-control input-sm">
-                    </div>
-                    <div class="form-group">
-                        <label for="" class="control-label">Payer Member Identifier</label>
-                        <input type="String" name="payerMemberIdentifier" class="form-control input-sm">
-                    </div>
-                    <div class="form-group">
-                        <label for="" class="control-label">Date Of Service</label>
-                        <input type="date" name="dateOfService" class="form-control input-sm">
+                        <input type="date" name="subscriberDob" class="form-control input-sm" value="{{$patient->dob}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Sex</label>
                         <label for="" class="control-label">Subscriber Sex</label>
                         <select  name="subscriberSex" class="form-control input-sm">
                         <select  name="subscriberSex" class="form-control input-sm">
                             <option value="">--select--</option>
                             <option value="">--select--</option>
-                            <option value="M">M</option>
-                            <option value="F">F</option>
+                            <option value="M" {{$patient->sex === 'M' ? 'selected' : ''}}>M</option>
+                            <option value="F" {{$patient->sex === 'F' ? 'selected' : ''}}>F</option>
                         </select>
                         </select>
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
-                        <label for="" class="control-label">Plan Name</label>
-                        <input type="text" name="planName" class="form-control input-sm">
+                        <label for="" class="control-label">Payer Name</label>
+                        <input type="text" name="payerName" class="form-control input-sm">
+                    </div>
+                    <div class="form-group">
+                        <label for="" class="control-label">Payer Member Identifier</label>
+                        <input type="String" name="payerMemberIdentifier" class="form-control input-sm">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
-                        <label for="" class="control-label">Plan Identifier</label>
-                        <input type="text" name="planIdentifier" class="form-control input-sm">
+                        <label for="" class="control-label">Date Of Service</label>
+                        <input type="date" name="dateOfService" class="form-control input-sm" value="{{date('Y-m-d')}}">
                     </div>
                     </div>
+                   
                     <div class="form-group text-nowrap mb-0">
                     <div class="form-group text-nowrap mb-0">
                         <button class="btn btn-sm btn-primary" submit>Submt</button>
                         <button class="btn btn-sm btn-primary" submit>Submt</button>
                         <button class="btn btn-sm btn-default border" close>Close</button>
                         <button class="btn btn-sm btn-default border" close>Close</button>
@@ -121,40 +118,37 @@
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Name First</label>
                         <label class="control-label">Subscriber Name First</label>
-                        <input type="text" name="subscriberNameFirst" class="form-control input-sm">
+                        <input type="text" name="subscriberNameFirst" class="form-control input-sm" value="{{$patient->name_first}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Name Last</label>
                         <label class="control-label">Subscriber Name Last</label>
-                        <input type="text" name="subscriberNameLast" class="form-control input-sm">
+                        <input type="text" name="subscriberNameLast" class="form-control input-sm" value="{{$patient->name_last}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Dob</label>
                         <label class="control-label">Subscriber Dob</label>
-                        <input type="date" name="subscriberDob" class="form-control input-sm">
-                    </div>
-                    <div class="form-group">
-                        <label class="control-label">Payer Member Identifier</label>
-                        <input type="text" name="payerMemberIdentifier" class="form-control input-sm">
-                    </div>
-                    <div class="form-group">
-                        <label class="control-label">Date Of Service</label>
-                        <input type="date" name="dateOfService" class="form-control input-sm">
+                        <input type="date" name="subscriberDob" class="form-control input-sm" value="{{$patient->dob}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Sex</label>
                         <label for="" class="control-label">Subscriber Sex</label>
                         <select  name="subscriberSex" class="form-control input-sm">
                         <select  name="subscriberSex" class="form-control input-sm">
                             <option value="">--select--</option>
                             <option value="">--select--</option>
-                            <option value="M">M</option>
-                            <option value="F">F</option>
+                            <option value="M" {{$patient->sex === 'M' ? 'selected' : ''}}>M</option>
+                            <option value="F" {{$patient->sex === 'F' ? 'selected' : ''}}>F</option>
                         </select>
                         </select>
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
-                        <label class="control-label">Plan Name</label>
-                        <input type="text" name="planName" class="form-control input-sm">
+                        <label class="control-label">Payer Name</label>
+                        <input type="text" name="payerName" class="form-control input-sm">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
-                        <label class="control-label">Plan Identifier</label>
-                        <input type="text" name="planIdentifier" class="form-control input-sm">
+                        <label class="control-label">Payer Member Identifier</label>
+                        <input type="text" name="payerMemberIdentifier" class="form-control input-sm">
                     </div>
                     </div>
+                    <div class="form-group">
+                        <label class="control-label">Date Of Service</label>
+                        <input type="date" name="dateOfService" class="form-control input-sm" value="{{date('Y-m-d')}}">
+                    </div>
+                    
                     <div class="form-group text-nowrap mb-0">
                     <div class="form-group text-nowrap mb-0">
                         <button class="btn btn-sm btn-primary" submit>Submt</button>
                         <button class="btn btn-sm btn-primary" submit>Submt</button>
                         <button class="btn btn-sm btn-default border" close>Close</button>
                         <button class="btn btn-sm btn-default border" close>Close</button>
@@ -170,15 +164,15 @@
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Name First</label>
                         <label for="" class="control-label">Subscriber Name First</label>
-                        <input type="text" name="subscriberNameFirst" class="form-control input-sm"/>
+                        <input type="text" name="subscriberNameFirst" class="form-control input-sm" value="{{$patient->name_first}}"/>
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Name Last</label>
                         <label for="" class="control-label">Subscriber Name Last</label>
-                        <input type="text" name="subscriberNameLast" class="form-control input-sm"/>
+                        <input type="text" name="subscriberNameLast" class="form-control input-sm" value="{{$patient->name_last}}"/>
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Dob</label>
                         <label for="" class="control-label">Subscriber Dob</label>
-                        <input type="date" name="subscriberDob" class="form-control input-sm"/>
+                        <input type="date" name="subscriberDob" class="form-control input-sm" value="{{$patient->dob}}"/>
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Payer Member Identifier</label>
                         <label for="" class="control-label">Payer Member Identifier</label>
@@ -186,7 +180,7 @@
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Date Of Service</label>
                         <label for="" class="control-label">Date Of Service</label>
-                        <input type="date" name="dateOfService" class="form-control input-sm"/>
+                        <input type="date" name="dateOfService" class="form-control input-sm" value="{{date('Y-m-d')}}"/>
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Manual Determination Strategy</label>
                         <label for="" class="control-label">Manual Determination Strategy</label>
@@ -363,40 +357,37 @@
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Name First</label>
                         <label class="control-label">Subscriber Name First</label>
-                        <input type="text" name="subscriberNameFirst" class="form-control input-sm">
+                        <input type="text" name="subscriberNameFirst" class="form-control input-sm" value="{{$patient->name_first}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Name Last</label>
                         <label class="control-label">Subscriber Name Last</label>
-                        <input type="text" name="subscriberNameLast" class="form-control input-sm">
+                        <input type="text" name="subscriberNameLast" class="form-control input-sm" value="{{$patient->name_last}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label class="control-label">Subscriber Dob</label>
                         <label class="control-label">Subscriber Dob</label>
-                        <input type="date" name="subscriberDob" class="form-control input-sm">
-                    </div>
-                    <div class="form-group">
-                        <label class="control-label">Payer Member Identifier</label>
-                        <input type="text" name="payerMemberIdentifier" class="form-control input-sm">
-                    </div>
-                    <div class="form-group">
-                        <label class="control-label">Date Of Service</label>
-                        <input type="date" name="dateOfService" class="form-control input-sm">
+                        <input type="date" name="subscriberDob" class="form-control input-sm" value="{{$patient->dob}}">
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Subscriber Sex</label>
                         <label for="" class="control-label">Subscriber Sex</label>
                         <select  name="subscriberSex" class="form-control input-sm">
                         <select  name="subscriberSex" class="form-control input-sm">
                             <option value="">--select--</option>
                             <option value="">--select--</option>
-                            <option value="M">M</option>
-                            <option value="F">F</option>
+                            <option value="M" {{$patient->sex === 'M' ? 'selected' : ''}}>M</option>
+                            <option value="F" {{$patient->sex === 'F' ? 'selected' : ''}}>F</option>
                         </select>
                         </select>
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
-                        <label for="" class="control-label">Plan Name</label>
-                        <input type="text" name="planName" class="form-control input-sm"/>
+                        <label for="" class="control-label">Payer Name</label>
+                        <input type="text" name="payerName" class="form-control input-sm"/>
                     </div>
                     </div>
                     <div class="form-group">
                     <div class="form-group">
-                        <label for="" class="control-label">Plan Identifier</label>
-                        <input type="text" name="planIdentifier" class="form-control input-sm"/>
+                        <label class="control-label">Payer Member Identifier</label>
+                        <input type="text" name="payerMemberIdentifier" class="form-control input-sm">
+                    </div>
+                    <div class="form-group">
+                        <label class="control-label">Date Of Service</label>
+                        <input type="date" name="dateOfService" class="form-control input-sm" value="{{date('Y-m-d')}}">
                     </div>
                     </div>
+                   
                     <div class="form-group">
                     <div class="form-group">
                         <label for="" class="control-label">Manual Determination Strategy</label>
                         <label for="" class="control-label">Manual Determination Strategy</label>
                         <select  name="manualDeterminationStrategy" class="form-control input-sm">
                         <select  name="manualDeterminationStrategy" class="form-control input-sm">
@@ -448,8 +439,7 @@
                 <th>Subscriber Sex</th>
                 <th>Subscriber Sex</th>
                 <th>Subscriber Dob</th>
                 <th>Subscriber Dob</th>
                 <th>Payer Member Identifier</th>
                 <th>Payer Member Identifier</th>
-                <th>Plan Name</th>
-                <th>Plan Identifier</th>
+                <th>Payer Name</th>
                 <th>Date Of Service</th>
                 <th>Date Of Service</th>
                 <th>Auto Is Payer Member Identifier Valid</th>
                 <th>Auto Is Payer Member Identifier Valid</th>
                 <th>Auto Detail Json</th>
                 <th>Auto Detail Json</th>
@@ -804,8 +794,7 @@
                 <td>{{$cpc->subscriber_sex}}</td>
                 <td>{{$cpc->subscriber_sex}}</td>
                 <td>{{$cpc->subscriber_dob}}</td>
                 <td>{{$cpc->subscriber_dob}}</td>
                 <td>{{$cpc->payer_member_identifier}}</td>
                 <td>{{$cpc->payer_member_identifier}}</td>
-                <td>{{$cpc->plan_name}}</td>
-                <td>{{$cpc->plan_identifier}}</td>
+                <td>{{$cpc->payer_name}}</td>
                 <td>{{$cpc->date_of_service}}</td>
                 <td>{{$cpc->date_of_service}}</td>
                 <td>{{$cpc->auto_is_payer_member_identifier_valid}}</td>
                 <td>{{$cpc->auto_is_payer_member_identifier_valid}}</td>
                 <td>{{$cpc->auto_detail_json}}</td>
                 <td>{{$cpc->auto_detail_json}}</td>

+ 37 - 59
resources/views/app/patient/dashboard.blade.php

@@ -33,16 +33,15 @@
                 @include('app/patient/partials/appointments')
                 @include('app/patient/partials/appointments')
 
 
                 {{-- canvas based allergies --}}
                 {{-- canvas based allergies --}}
-                {{-- <div class="pt-2 mt-2 border-top">
+                <div class="pt-2 mt-2 border-top">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Allergies</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Allergies</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'allergies'])
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.allergies.summary')
                         @include('app.patient.canvas-sections.allergies.summary')
                     </div>
                     </div>
-                </div> --}}
+                </div>
 
 
                 <!-- allergies - point -->
                 <!-- allergies - point -->
                 <?php
                 <?php
@@ -51,6 +50,7 @@
                 <div class="pt-2 mt-2">
                 <div class="pt-2 mt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Allergies</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Allergies</h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @foreach($allergies as $allergy)
                         @foreach($allergies as $allergy)
@@ -66,23 +66,15 @@
                 </div>
                 </div>
 
 
                 {{-- canvas based rx --}}
                 {{-- canvas based rx --}}
-                {{-- <div class="pt-2 mt-2 border-top">
+                <div class="pt-2 mt-2 border-top">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'rx', 'class' => 'wide'])
-                        <span class="mx-2 text-secondary">|</span>
-                        <a href="/patients/view/{{$patient->uid}}/tickets/erx?popupmode=1"
-                           native target="_blank"
-                           class="ticket-popup-trigger d-block text-nowrap mr-3">
-                            Erx/Orders
-                        </a>
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.rx.summary')
                         @include('app.patient.canvas-sections.rx.summary')
                     </div>
                     </div>
                 </div>
                 </div>
-                <div class="stag-popup stag-popup-lg ticket-popup mcp-theme-1" stag-popup-key="ticket-popup"></div> --}}
 
 
                 <!-- meds - point -->
                 <!-- meds - point -->
                 <?php
                 <?php
@@ -91,6 +83,7 @@
                 <div class="pt-2 mt-2">
                 <div class="pt-2 mt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @foreach($medications as $medication)
                         @foreach($medications as $medication)
@@ -232,16 +225,15 @@
                 {{--@include('app/patient/partials/vitals')--}}
                 {{--@include('app/patient/partials/vitals')--}}
 
 
                 {{-- canvas based vitals --}}
                 {{-- canvas based vitals --}}
-                {{-- <div class="pt-2 border-top">
+                <div class="pt-2 border-top">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Vitals</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Vitals</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'vitals', 'class' => 'narrow'])
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.vitals.summary')
                         @include('app.patient.canvas-sections.vitals.summary')
                     </div>
                     </div>
-                </div> --}}
+                </div>
 
 
                 <!-- vitals - point -->
                 <!-- vitals - point -->
                 <?php $latestVitals = \App\Models\Point::where('client_id', $patient->id)->where('category', 'VITALS')->orderBy('id', 'DESC')->first(); ?>
                 <?php $latestVitals = \App\Models\Point::where('client_id', $patient->id)->where('category', 'VITALS')->orderBy('id', 'DESC')->first(); ?>
@@ -254,6 +246,7 @@
                                 </span>
                                 </span>
                             @endif
                             @endif
                         </h6>
                         </h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @if(!!$latestVitals)
                         @if(!!$latestVitals)
@@ -271,16 +264,15 @@
                 @include('app/patient/partials/medical-team')
                 @include('app/patient/partials/medical-team')
 
 
                 {{-- canvas based dx --}}
                 {{-- canvas based dx --}}
-                {{-- <div class="pt-2 mt-2 border-top">
+                <div class="pt-2 mt-2 border-top">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Current Problems / Focus Areas</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Current Problems / Focus Areas</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'dx', 'class' => 'wide'])
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.dx.summary')
                         @include('app.patient.canvas-sections.dx.summary')
                     </div>
                     </div>
-                </div> --}}
+                </div>
 
 
                 <!-- probs - point -->
                 <!-- probs - point -->
                 <?php
                 <?php
@@ -289,6 +281,7 @@
                 <div class="pt-2 mt-2">
                 <div class="pt-2 mt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Current Problems / Focus Areas</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Current Problems / Focus Areas</h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @foreach($problems as $problem)
                         @foreach($problems as $problem)
@@ -304,34 +297,22 @@
                     </div>
                     </div>
                 </div>
                 </div>
 
 
-
-                {{--<div class="mt-2">
-                    <div class="d-flex align-items-center mb-2 py-2 border-top border-bottom">
-                        <h6 class="my-0 font-weight-bold text-secondary">History</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        <a start show class="py-0 font-weight-normal"
-                           href="/patients/view/{{ $patient->uid }}/history">
-                            View All
-                        </a>
-                    </div>
-                </div>--}}
-
                 {{-- history_medical --}}
                 {{-- history_medical --}}
-                {{-- <div class="pt-2 mt-2 border-top">
+                <div class="pt-2 mt-2 border-top">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Medical History</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Medical History</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'pmhx'])
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.pmhx.summary')
                         @include('app.patient.canvas-sections.pmhx.summary')
                     </div>
                     </div>
-                </div> --}}
+                </div>
 
 
                 <!-- pmhx - point -->
                 <!-- pmhx - point -->
                 <div class="pt-2 mt-2">
                 <div class="pt-2 mt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Medical History</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Medical History</h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.segment-templates.past_medical_history.summary', compact('patient'))
                         @include('app.patient.segment-templates.past_medical_history.summary', compact('patient'))
@@ -339,21 +320,21 @@
                 </div>
                 </div>
 
 
                 {{-- history_surgical --}}
                 {{-- history_surgical --}}
-                {{-- <div class="mt-2">
+                <div class="mt-2 border-top pt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Surgical History</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Surgical History</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'pshx'])
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.pshx.summary')
                         @include('app.patient.canvas-sections.pshx.summary')
                     </div>
                     </div>
-                </div> --}}
+                </div>
 
 
                 <!-- pshx - point -->
                 <!-- pshx - point -->
                 <div class="pt-2 mt-2">
                 <div class="pt-2 mt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Surgical History</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Surgical History</h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.segment-templates.history_surgical.summary', compact('patient'))
                         @include('app.patient.segment-templates.history_surgical.summary', compact('patient'))
@@ -361,21 +342,21 @@
                 </div>
                 </div>
 
 
                 {{-- history_family --}}
                 {{-- history_family --}}
-                {{-- <div class="mt-2">
+                <div class="mt-2 border-top pt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Family History</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Family History</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'fhx'])
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.fhx.summary')
                         @include('app.patient.canvas-sections.fhx.summary')
                     </div>
                     </div>
-                </div> --}}
+                </div>
 
 
                 <!-- fhx - point -->
                 <!-- fhx - point -->
                 <div class="pt-2 mt-2">
                 <div class="pt-2 mt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Family History</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Family History</h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.segment-templates.history_family.summary', compact('patient'))
                         @include('app.patient.segment-templates.history_family.summary', compact('patient'))
@@ -383,21 +364,21 @@
                 </div>
                 </div>
 
 
                 {{-- history_social --}}
                 {{-- history_social --}}
-                {{-- <div class="mt-2">
+                <div class="mt-2 border-top pt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Social History</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Social History</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'sochx'])
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.sochx.summary')
                         @include('app.patient.canvas-sections.sochx.summary')
                     </div>
                     </div>
-                </div> --}}
+                </div>
 
 
                 <!-- sochx - point -->
                 <!-- sochx - point -->
                 <div class="pt-2 mt-2">
                 <div class="pt-2 mt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Social History</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Social History</h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.segment-templates.history_social.summary', compact('patient'))
                         @include('app.patient.segment-templates.history_social.summary', compact('patient'))
@@ -405,7 +386,7 @@
                 </div>
                 </div>
 
 
                 {{-- history_ob_and_preg --}}
                 {{-- history_ob_and_preg --}}
-                <div class="pl-2 mt-2">
+                <div class="pl-2 mt-2 border-top pt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold">OB & Pregnancy</h6>
                         <h6 class="my-0 font-weight-bold">OB & Pregnancy</h6>
                         <span class="mx-2 text-secondary">|</span>
                         <span class="mx-2 text-secondary">|</span>
@@ -778,20 +759,16 @@
                     </div>
                     </div>
                 </div>
                 </div>
 
 
-                {{-- care-team --}}
-                {{--@include('app/patient/partials/care-team')--}}
-
-                {{-- canvas based dx --}}
-                {{-- <div class="pt-2 mt-2 border-top">
+                {{-- canvas based careteam --}}
+                <div class="pt-2 mt-2 border-top">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Care Team</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Care Team</h6>
-                        <span class="mx-2 text-secondary">|</span>
-                        @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'care-team', 'class' => 'wide'])
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @include('app.patient.canvas-sections.care-team.summary')
                         @include('app.patient.canvas-sections.care-team.summary')
                     </div>
                     </div>
-                </div> --}}
+                </div>
 
 
                 <!-- careteam - point -->
                 <!-- careteam - point -->
                 <?php
                 <?php
@@ -800,6 +777,7 @@
                 <div class="pt-2 mt-2">
                 <div class="pt-2 mt-2">
                     <div class="d-flex align-items-center pb-2">
                     <div class="d-flex align-items-center pb-2">
                         <h6 class="my-0 font-weight-bold text-secondary">Care Team</h6>
                         <h6 class="my-0 font-weight-bold text-secondary">Care Team</h6>
+                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
                     </div>
                     </div>
                     <div class="bg-light border p-2 mb-3">
                     <div class="bg-light border p-2 mb-3">
                         @foreach($careTeamMembers as $careTeamMember)
                         @foreach($careTeamMembers as $careTeamMember)

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

@@ -504,7 +504,9 @@
                         <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="NA Bills" href="#">NA Bills</a></div>
                         <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="NA Bills" href="#">NA Bills</a></div>
                         @endif
                         @endif
                         <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Claims" href="#">Claims</a></div>
                         <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Claims" href="#">Claims</a></div>
+                        @if($note->is_signed_by_hcp)
                         <div class="note-tree-node mb-3"><a native="" target="_top" data-non-segment-target="Addendums" href="#">Addendums</a></div>
                         <div class="note-tree-node mb-3"><a native="" target="_top" data-non-segment-target="Addendums" href="#">Addendums</a></div>
+                        @endif
 
 
                 </div>
                 </div>
                 @endif
                 @endif
@@ -633,7 +635,7 @@
                     <div class="row" id="vitals-settings-{{$patient->uid}}">
                     <div class="row" id="vitals-settings-{{$patient->uid}}">
                         <div class="col-4 border-right">
                         <div class="col-4 border-right">
                             <div class="d-flex align-items-baseline">
                             <div class="d-flex align-items-baseline">
-                                <b>BMI Management</b>
+                                <b>BMI/Weight Management</b>
                                 <span class="mx-2 text-secondary">|</span>
                                 <span class="mx-2 text-secondary">|</span>
                                 @include('app.patient.vitals-settings.bmi-management-form')
                                 @include('app.patient.vitals-settings.bmi-management-form')
                             </div>
                             </div>
@@ -2133,6 +2135,7 @@
                 @endif
                 @endif
 
 
                 {{-- addendums --}}
                 {{-- addendums --}}
+                @if($note->is_signed_by_hcp)
                 <div class="border-top p-3 screen-only" data-non-segment-section="Addendums">
                 <div class="border-top p-3 screen-only" data-non-segment-section="Addendums">
                     @if($note->addendums->count())
                     @if($note->addendums->count())
                         <div class="">
                         <div class="">
@@ -2194,6 +2197,7 @@
                         </div>
                         </div>
                     @endif
                     @endif
                 </div>
                 </div>
+                @endif
 
 
                 <div class="screen-only">
                 <div class="screen-only">
                     @include('app/patient/note/_cancel-signed-note')
                     @include('app/patient/note/_cancel-signed-note')
@@ -2206,7 +2210,9 @@
     </div>
     </div>
     <div class="note-templates-underlay"></div>
     <div class="note-templates-underlay"></div>
     @include('app.patient.note.dashboard_script')
     @include('app.patient.note.dashboard_script')
+    @if(!$isVisitTemplateBased)
     @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'rx', 'class' => 'wide', 'noEditLink' => true])
     @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'rx', 'class' => 'wide', 'noEditLink' => true])
+    @endif
     @if($isVisitTemplateBased)
     @if($isVisitTemplateBased)
     <script>
     <script>
         (function() {
         (function() {

+ 4 - 1
resources/views/app/patient/note/dashboard_script.blade.php

@@ -108,6 +108,9 @@
                 $(document)
                 $(document)
                     .off('click.edit-trigger', '.edit-trigger:not(.edit)')
                     .off('click.edit-trigger', '.edit-trigger:not(.edit)')
                     .on('click.edit-trigger', '.edit-trigger:not(.edit)', function() {
                     .on('click.edit-trigger', '.edit-trigger:not(.edit)', function() {
+
+                        if($('.note-section>.stag-popup:visible').length) return;
+
                         let editParent = $(this).closest('.note-section');
                         let editParent = $(this).closest('.note-section');
 
 
                         // TEMP: disable edit mode for medrisk_vigilance
                         // TEMP: disable edit mode for medrisk_vigilance
@@ -499,6 +502,6 @@
                 $('.note-template-output-text:visible').first().html(lines.join(''));
                 $('.note-template-output-text:visible').first().html(lines.join(''));
             }
             }
 
 
-            addMCInitializer('note-single', init);
+            addMCInitializer('note-single', init, '#note-single-header');
         })();
         })();
     </script>
     </script>

+ 2 - 0
resources/views/app/patient/note/note-section-list.blade.php

@@ -1,3 +1,4 @@
+<div id="note-section-list">
 <?php $canvasData = json_decode($patient->canvas_data, true); ?>
 <?php $canvasData = json_decode($patient->canvas_data, true); ?>
 <?php $previousHeading = null; ?>
 <?php $previousHeading = null; ?>
 @foreach($note->sections as $section)
 @foreach($note->sections as $section)
@@ -24,4 +25,5 @@ if(!empty($previousHeading)) {
     echo '</div></div>'; // <!-- close any open parent section -->
     echo '</div></div>'; // <!-- close any open parent section -->
 }
 }
 ?>
 ?>
+</div>
 @include('app.patient.note.section_script')
 @include('app.patient.note.section_script')

+ 1 - 1
resources/views/app/patient/note/note-segment-list.blade.php

@@ -1,4 +1,4 @@
-<div class="segments-list">
+<div class="segments-list" id="note-segments-list">
     @foreach($note->segments as $segment)
     @foreach($note->segments as $segment)
         @include('app.patient.note.segment')
         @include('app.patient.note.segment')
     @endforeach
     @endforeach

+ 1 - 1
resources/views/app/patient/note/section_script.blade.php

@@ -186,7 +186,7 @@
             });
             });
         }
         }
 
 
-        addMCInitializer('note-sections-list', init);
+        addMCInitializer('note-sections-list', init, '#note-section-list');
 
 
     })();
     })();
 </script>
 </script>

+ 17 - 10
resources/views/app/patient/note/segment.blade.php

@@ -3,21 +3,28 @@
      data-segment-template-uid="{{ $segment->segmentTemplate->uid }}"
      data-segment-template-uid="{{ $segment->segmentTemplate->uid }}"
      data-segment-template-name="{{ $segment->segmentTemplate->internal_name }}">
      data-segment-template-name="{{ $segment->segmentTemplate->internal_name }}">
 
 
+    <?php $isLSSegment = strpos($segment->segmentTemplate->internal_name, 'lifestyle_') === 0; ?>
+
     <div class="d-flex align-items-baseline">
     <div class="d-flex align-items-baseline">
 
 
         <!-- show hierarchy -->
         <!-- show hierarchy -->
-        @if($segment->heading)
+        {{--@if($segment->heading)
             <span class="text-secondary">{{$segment->heading}}</span>
             <span class="text-secondary">{{$segment->heading}}</span>
             <i class="text-secondary text-sm fa fa-arrow-right mx-2"></i>
             <i class="text-secondary text-sm fa fa-arrow-right mx-2"></i>
         @endif
         @endif
         @if($segment->subheading)
         @if($segment->subheading)
             <span class="text-secondary">{{$segment->subheading}}</span>
             <span class="text-secondary">{{$segment->subheading}}</span>
             <i class="text-secondary text-sm fa fa-arrow-right mx-2"></i>
             <i class="text-secondary text-sm fa fa-arrow-right mx-2"></i>
-        @endif
+        @endif--}}
 
 
     <!-- title -->
     <!-- title -->
-        <span class="font-weight-bold mb-2 d-flex align-items-center">
+        <span class="font-weight-bold d-flex align-items-center {{$isLSSegment ? '' : 'mb-2'}}">
 			{{$segment->display_title}}
 			{{$segment->display_title}}
+
+            @if($segment->heading)
+                <span class="text-secondary ml-2 text-sm font-weight-normal">({{$segment->heading}})</span>
+            @endif
+
 		</span>
 		</span>
 
 
         @if(!$note->is_signed_by_hcp)
         @if(!$note->is_signed_by_hcp)
@@ -34,14 +41,14 @@
             @include('app/patient/note/_templates-v2-index', ['sectionInternalName' => $segment->segmentTemplate->internal_name])
             @include('app/patient/note/_templates-v2-index', ['sectionInternalName' => $segment->segmentTemplate->internal_name])
         @endif
         @endif
 
 
+        @if($isLSSegment)
+            <span class="text-info ml-auto font-weight-normal">(click to view)</span>
+        @endif
+
     </div>
     </div>
 
 
     <!-- popup hack for LS segments -->
     <!-- popup hack for LS segments -->
-    <?php if(strpos($segment->segmentTemplate->internal_name, 'lifestyle_') === 0): ?>
-
-    <span class="text-info">(click to view)</span>
-
-    <?php else: ?>
+    <?php if(!$isLSSegment): ?>
 
 
     <div class="d-none if-not-edit inset-comment summary-container">
     <div class="d-none if-not-edit inset-comment summary-container">
         {!! $segment->summary_html !!}
         {!! $segment->summary_html !!}
@@ -54,7 +61,7 @@
     <?php endif ?>
     <?php endif ?>
 
 
     <!-- popup hack for LS segments -->
     <!-- popup hack for LS segments -->
-    <?php if(strpos($segment->segmentTemplate->internal_name, 'lifestyle_') === 0): ?>
+    <?php if($isLSSegment): ?>
     <div class="stag-popup stag-popup-md"
     <div class="stag-popup stag-popup-md"
          stag-popup-key="segment-popup-<?= $segment->segmentTemplate->internal_name ?>">
          stag-popup-key="segment-popup-<?= $segment->segmentTemplate->internal_name ?>">
         <div class="stag-popup-content">
         <div class="stag-popup-content">
@@ -66,7 +73,7 @@
                     @endif
                     @endif
                     {{$segment->display_title}}
                     {{$segment->display_title}}
                 </span>
                 </span>
-                <a href="#" class="ml-auto text-secondary" onclick="return closeStagPopup()">
+                <a href="#" class="ml-auto text-secondary" onclick="event.stopPropagation(); return closeStagPopup()">
                     <i class="fa fa-times-circle"></i>
                     <i class="fa fa-times-circle"></i>
                 </a>
                 </a>
             </h3>
             </h3>

+ 40 - 30
resources/views/app/patient/note/segment_script.blade.php

@@ -1,7 +1,7 @@
 <script>
 <script>
     (function() {
     (function() {
 
 
-        function updateAllSegmentsInResponse(_response) {
+        function updateAllSegmentsInResponse(_response, _updateListeners = true) {
             if(!hasResponseError(_response)) {
             if(!hasResponseError(_response)) {
 
 
                 // refresh primary segment (where uid is _response.data.uid)
                 // refresh primary segment (where uid is _response.data.uid)
@@ -10,22 +10,24 @@
                 }
                 }
 
 
                 // refresh listening segments
                 // refresh listening segments
-                if(_response.data && _response.data.listenerSegmentUids && _response.data.listenerSegmentUids.length) {
-                    for (let i=0; i<_response.data.listenerSegmentUids.length; i++) {
-                        let listenerSegment = $('.note-section[data-segment-uid="' + _response.data.listenerSegmentUids[i] + '"]');
-                        let listenerSegmentTemplateName = listenerSegment.attr('data-segment-template-name');
-                        if(listenerSegment && listenerSegment.length) {
-                            $.post('/api/visit/updateSegmentHtml', {
-                                segmentUid: _response.data.listenerSegmentUids[i]
-                            }, _data => {
-                                updateAllSegmentsInResponse(_data);
-
-                                // TODO: remove this ugliness
-                                if(listenerSegmentTemplateName === 'medrisk_vigilence') {
-                                    toastr.info('Medrisk Vigilance Updated', null, { timeOut: 10000 });
-                                }
-
-                            }, 'json');
+                if(_updateListeners) {
+                    if(_response.data && _response.data.listenerSegmentUids && _response.data.listenerSegmentUids.length) {
+                        for (let i=0; i<_response.data.listenerSegmentUids.length; i++) {
+                            let listenerSegment = $('.note-section[data-segment-uid="' + _response.data.listenerSegmentUids[i] + '"]');
+                            let listenerSegmentTemplateName = listenerSegment.attr('data-segment-template-name');
+                            if(listenerSegment && listenerSegment.length) {
+                                $.post('/api/visit/updateSegmentHtml', {
+                                    segmentUid: _response.data.listenerSegmentUids[i]
+                                }, _data => {
+                                    updateAllSegmentsInResponse(_data, false);
+
+                                    // TODO: remove this ugliness
+                                    if(listenerSegmentTemplateName === 'medrisk_vigilence') {
+                                        toastr.info('Medrisk Vigilance Updated', null, { timeOut: 10000 });
+                                    }
+
+                                }, 'json');
+                            }
                         }
                         }
                     }
                     }
                 }
                 }
@@ -81,7 +83,11 @@
             saveVisitForm(_trigger, true);
             saveVisitForm(_trigger, true);
         };
         };
 
 
-        function saveVisitForm(_trigger, _silent = false) {
+        window.autoSaveSegmentAndClose = function(_trigger) {
+            saveVisitForm(_trigger, true, true);
+        };
+
+        function saveVisitForm(_trigger, _silent = false, _close = false) {
             let form = $(_trigger).closest('form');
             let form = $(_trigger).closest('form');
 
 
             if (!_silent && !form[0].checkValidity()) {
             if (!_silent && !form[0].checkValidity()) {
@@ -131,19 +137,23 @@
 
 
             $.post(form.attr('url'), form.serialize(), _data => {
             $.post(form.attr('url'), form.serialize(), _data => {
                 if(!hasResponseError(_data)) {
                 if(!hasResponseError(_data)) {
-                    if(_silent) return false;
-                    hideMask();
-                    updateAllSegmentsInResponse(_data);
-                    if(closeOnSave) {
-                        noteSection.removeClass('edit');
-                        let segmentUid = form.find('[name="segmentUid"]').first();
-                        segmentUid = segmentUid.length ? segmentUid.val() : false;
-                        if(segmentUid) {
-                            window.setTimeout(() => {
-                                $('.note-tree-node>a[data-segment-uid="' + segmentUid + '"]').trigger('click');
-                            }, 250);
+                    if(!_silent) {
+                        hideMask();
+                        updateAllSegmentsInResponse(_data);
+                        if (closeOnSave) {
+                            noteSection.removeClass('edit');
+                            let segmentUid = form.find('[name="segmentUid"]').first();
+                            segmentUid = segmentUid.length ? segmentUid.val() : false;
+                            if (segmentUid) {
+                                window.setTimeout(() => {
+                                    $('.note-tree-node>a[data-segment-uid="' + segmentUid + '"]').trigger('click');
+                                }, 250);
+                            }
                         }
                         }
                     }
                     }
+                    if(_close) {
+                        closeStagPopup();
+                    }
                 }
                 }
             }, 'json');
             }, 'json');
             return false;
             return false;
@@ -295,7 +305,7 @@
              */
              */
         }
         }
 
 
-        addMCInitializer('note-segments-list', init);
+        addMCInitializer('note-segments-list', init, '#note-segments-list');
 
 
     })();
     })();
 </script>
 </script>

+ 59 - 48
resources/views/app/patient/notes.blade.php

@@ -2,56 +2,58 @@
 
 
 @section('inner-content')
 @section('inner-content')
 
 
+    <div id="notes-list-{{$patient->id}}">
     <div class="pt-2 d-flex align-items-start">
     <div class="pt-2 d-flex align-items-start">
         <h6 class="my-0 text-secondary d-flex align-items-center w-100">
         <h6 class="my-0 text-secondary d-flex align-items-center w-100">
             <span class="font-weight-bold text-secondary">Notes</span>
             <span class="font-weight-bold text-secondary">Notes</span>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="py-0 mb-3">Add</a>
-                <form url="/api/note/create" class="mcp-theme-1"
-                      redir="patients/view/{{ $patient->uid }}/notes/view/[data]">
-                    <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                    <div class="form-group">
-                        <label for="" class="text-secondary text-sm mb-1">Pro *</label>
-                        <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
-                        </select>
-                    </div>
-                    <input type="hidden" name="effectiveDateEST" value="{{ date('Y-m-d') }}">
-                    <div class="form-group">
-                        <label for="" class="text-secondary text-sm mb-1">Type *</label>
-                        <select name="newOrFuOrNa" class="form-control">
-                            <option value="NEW">New Patient</option>
-                            <option value="FU" {{$pro->is_hcp && $patient->hasNewNoteForPro($pro) ? 'selected' : ''}}>Follow Up</option>
-                            <option value="NA">N/A</option>
-                        </select>
-                    </div>
-                    <div class="form-group">
-                        <label for="" class="text-secondary text-sm mb-1">Method *</label>
-                        <select name="method" class="form-control note-method-select" required>
-                            <option value="">-- select --</option>
-                            <option value="VIDEO">Video</option>
-                            <option value="AUDIO">Audio</option>
-                            <option value="IN_CLINIC">In Clinic</option>
-                            <option value="HOUSE_CALL">House Call</option>
-                        </select>
-                    </div>
-                    <div class="form-group if-in-clinic">
-                        <label for="" class="text-secondary text-sm mb-1">Location</label>
-                        <select name="hcpCompanyLocationUid" class="form-control">
-                            <option value=""></option>
-                            @foreach($pro->companyLocations() as $location)
-                                <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
-                            @endforeach
-                        </select>
-                    </div>
-                    <div>
-                        <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                        <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                    </div>
-                </form>
-            </div>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
+            @if($patient->getPrimaryCoverageStatus() === 'YES')
+                <span class="mx-2 text-secondary">|</span>
+                <div moe>
+                    <a start show class="py-0 mb-3">Add</a>
+                    <form url="/api/note/create" class="mcp-theme-1"
+                          redir="patients/view/{{ $patient->uid }}/notes/view/[data]">
+                        <input type="hidden" name="clientUid" value="{{$patient->uid}}">
+                        <div class="form-group">
+                            <label for="" class="text-secondary text-sm mb-1">Pro *</label>
+                            <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
+                            </select>
+                        </div>
+                        <input type="hidden" name="effectiveDateEST" value="{{ date('Y-m-d') }}">
+                        <div class="form-group">
+                            <label for="" class="text-secondary text-sm mb-1">Type *</label>
+                            <select name="newOrFuOrNa" class="form-control">
+                                <option value="NEW">New Patient</option>
+                                <option value="FU" {{$pro->is_hcp && $patient->hasNewNoteForPro($pro) ? 'selected' : ''}}>Follow Up</option>
+                                <option value="NA">N/A</option>
+                            </select>
+                        </div>
+                        <div class="form-group">
+                            <label for="" class="text-secondary text-sm mb-1">Method *</label>
+                            <select name="method" class="form-control note-method-select" required>
+                                <option value="">-- select --</option>
+                                <option value="VIDEO">Video</option>
+                                <option value="AUDIO">Audio</option>
+                                <option value="IN_CLINIC">In Clinic</option>
+                                <option value="HOUSE_CALL">House Call</option>
+                            </select>
+                        </div>
+                        <div class="form-group if-in-clinic">
+                            <label for="" class="text-secondary text-sm mb-1">Location</label>
+                            <select name="hcpCompanyLocationUid" class="form-control">
+                                <option value=""></option>
+                                @foreach($pro->companyLocations() as $location)
+                                    <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
+                                @endforeach
+                            </select>
+                        </div>
+                        <div>
+                            <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
+                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                        </div>
+                    </form>
+                </div>
+                <span class="mx-2 text-secondary">|</span>
+                <div moe>
                 <a start show class="py-0 mb-3">Add Visit</a>
                 <a start show class="py-0 mb-3">Add Visit</a>
                 <form url="/api/visit/create"
                 <form url="/api/visit/create"
                       redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
                       redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
@@ -109,6 +111,14 @@
                     </div>
                     </div>
                 </form>
                 </form>
             </div>
             </div>
+            @else
+                <span class="ml-3 text-danger">
+                    <i class="fa fa-exclamation-triangle"></i>
+                    <b>Cannot create note.</b> Patient is not covered or coverage is pending verification.
+                </span>
+                <a class="ml-3" href="{{route('patients.view.client-primary-coverages', ['patient' => $patient])}}">View Coverages</a>
+            @endif
+
             <select class="ml-auto max-width-300px form-control form-control-sm"
             <select class="ml-auto max-width-300px form-control form-control-sm"
                     onchange="fastLoad('/patients/view/{{$patient->uid}}/notes/' + this.value, true, false, false)">
                     onchange="fastLoad('/patients/view/{{$patient->uid}}/notes/' + this.value, true, false, false)">
                 <option value="active" {{ $filter === 'active' ? 'selected' : '' }}>Active notes</option>
                 <option value="active" {{ $filter === 'active' ? 'selected' : '' }}>Active notes</option>
@@ -206,6 +216,7 @@
         @endforeach
         @endforeach
         </tbody>
         </tbody>
     </table>
     </table>
+    </div>
     <script>
     <script>
         (function() {
         (function() {
             function initNotesList() {
             function initNotesList() {
@@ -261,7 +272,7 @@
                     }
                     }
                 });
                 });
             }
             }
-            addMCInitializer('notes-list', initNotesList);
+            addMCInitializer('notes-list', initNotesList, '#notes-list-{{$patient->id}}');
         })();
         })();
     </script>
     </script>
 @endsection
 @endsection

+ 2 - 2
resources/views/app/patient/partials/appointment-confirmation.blade.php

@@ -1,4 +1,4 @@
-<div class="d-flex">
+<div class="d-flex" id="appointment-confirmation">
     <div class="flex-grow-1">
     <div class="flex-grow-1">
         @if($appointment->status === 'CREATED' && !$appointment->latest_confirmation_request_at && !$appointment->latest_confirmation_decision_at)
         @if($appointment->status === 'CREATED' && !$appointment->latest_confirmation_request_at && !$appointment->latest_confirmation_decision_at)
             <b class="text-warning-mellow">Not requested yet</b>
             <b class="text-warning-mellow">Not requested yet</b>
@@ -65,6 +65,6 @@
                     container.load('/appointment-confirmation-history/' + $(this).attr('data-uid'));
                     container.load('/appointment-confirmation-history/' + $(this).attr('data-uid'));
                 });
                 });
         }
         }
-        addMCInitializer('appointment-confirmation', init);
+        addMCInitializer('appointment-confirmation', init, '#appointment-confirmation');
     }).call(window);
     }).call(window);
 </script>
 </script>

+ 1 - 1
resources/views/app/patient/segment-templates/history_social/edit.blade.php

@@ -241,7 +241,7 @@ for ($i = 0; $i < count($fields); $i++) {
                     },
                     },
                     cancelCustomItem: function() {
                     cancelCustomItem: function() {
                         hideMoeFormMask();
                         hideMoeFormMask();
-                        $('div[moe]').hide();
+                        $('[custom-item-form]').hide();
                         return false;
                         return false;
                     }
                     }
                 }
                 }

+ 2 - 2
resources/views/app/patient/segment-templates/history_social/summary.blade.php

@@ -59,7 +59,7 @@ if ($point && @$point->data) {
     // custom fields
     // custom fields
 
 
     if(isset($contentData['customFields']) && count($contentData['customFields'])):
     if(isset($contentData['customFields']) && count($contentData['customFields'])):
-        ?> <div class="mt-2"> <?php
+        ?> <div class=""> <?php
         for ($i = 0; $i < count($contentData['customFields']); $i++):
         for ($i = 0; $i < count($contentData['customFields']); $i++):
             $item = $contentData['customFields'][$i];
             $item = $contentData['customFields'][$i];
             if($item['value']): ?>
             if($item['value']): ?>
@@ -77,7 +77,7 @@ if ($point && @$point->data) {
         ?> </div> <?php
         ?> </div> <?php
     endif;
     endif;
 
 
-    if(isset($contentData['comments'])) { ?>
+    if(isset($contentData['comments']) && !empty(trim($contentData['comments']))) { ?>
         <div class="mt-2 mb-1">
         <div class="mt-2 mb-1">
             <div class="font-weight-bold">Comments:</div>
             <div class="font-weight-bold">Comments:</div>
             <div><?= $contentData['comments'] ?></div>
             <div><?= $contentData['comments'] ?></div>

+ 1 - 1
resources/views/app/patient/segment-templates/history_surgical/edit.blade.php

@@ -241,7 +241,7 @@ for ($i = 0; $i < count($fields); $i++) {
                     },
                     },
                     cancelCustomItem: function() {
                     cancelCustomItem: function() {
                         hideMoeFormMask();
                         hideMoeFormMask();
-                        $('div[moe]').hide();
+                        $('[custom-item-form]').hide();
                         return false;
                         return false;
                     }
                     }
                 }
                 }

+ 6 - 6
resources/views/app/patient/segment-templates/history_surgical/summary.blade.php

@@ -40,8 +40,8 @@ if ($point && @$point->data) {
                 $fName = $head . '_' . sanitize_field_name($values[$k]);
                 $fName = $head . '_' . sanitize_field_name($values[$k]);
                 if(@$contentData['common'][$fName]): ?>
                 if(@$contentData['common'][$fName]): ?>
                     <div>
                     <div>
-                        Common
-                        <i class="fa fa-arrow-right text-sm text-secondary"></i>
+                        <!--Common
+                        <i class="fa fa-arrow-right text-sm text-secondary"></i>-->
                         <span class="font-weight-bold"><?= $values[$k] ?></span>
                         <span class="font-weight-bold"><?= $values[$k] ?></span>
                         <?php if(@$contentData['common'][$fName . '__comments']): ?>
                         <?php if(@$contentData['common'][$fName . '__comments']): ?>
                             <span class="text-sm ml-1 text-secondary">(<?= $contentData['common'][$fName . '__comments'] ?>)</span>
                             <span class="text-sm ml-1 text-secondary">(<?= $contentData['common'][$fName . '__comments'] ?>)</span>
@@ -56,13 +56,13 @@ if ($point && @$point->data) {
     // custom fields
     // custom fields
 
 
     if(isset($contentData['customFields']) && count($contentData['customFields'])):
     if(isset($contentData['customFields']) && count($contentData['customFields'])):
-        ?> <div class="mt-2"> <?php
+        ?> <div class=""> <?php
         for ($i = 0; $i < count($contentData['customFields']); $i++):
         for ($i = 0; $i < count($contentData['customFields']); $i++):
             $item = $contentData['customFields'][$i];
             $item = $contentData['customFields'][$i];
             if($item['value']): ?>
             if($item['value']): ?>
                 <div>
                 <div>
-                    Custom
-                    <i class="fa fa-arrow-right text-sm text-secondary"></i>
+                    <!--Custom
+                    <i class="fa fa-arrow-right text-sm text-secondary"></i>-->
                     <span class="font-weight-bold"><?= $item['label'] ?></span>
                     <span class="font-weight-bold"><?= $item['label'] ?></span>
                     <?php if($item['comments']): ?>
                     <?php if($item['comments']): ?>
                         <span class="text-sm ml-1 text-secondary">(<?= $item['comments'] ?>)</span>
                         <span class="text-sm ml-1 text-secondary">(<?= $item['comments'] ?>)</span>
@@ -74,7 +74,7 @@ if ($point && @$point->data) {
         ?> </div> <?php
         ?> </div> <?php
     endif;
     endif;
 
 
-    if(isset($contentData['comments'])) { ?>
+    if(isset($contentData['comments']) && !empty(trim($contentData['comments']))) { ?>
         <div class="mt-2 mb-1">
         <div class="mt-2 mb-1">
             <div class="font-weight-bold">Comments:</div>
             <div class="font-weight-bold">Comments:</div>
             <div><?= $contentData['comments'] ?></div>
             <div><?= $contentData['comments'] ?></div>

+ 20 - 6
resources/views/app/patient/segment-templates/lifestyle_general/edit.blade.php

@@ -330,30 +330,34 @@ if ($point && @$point->data) {
                                         <div>
                                         <div>
                                             <b>What would you like to gain from this lifestyle visit?</b> Check all that apply
                                             <b>What would you like to gain from this lifestyle visit?</b> Check all that apply
                                         </div>
                                         </div>
-                                        <div>
+                                        <div class="mt-2">
                                             <div class="form-check form-check-inline">
                                             <div class="form-check form-check-inline">
                                                 <input class="form-check-input" type="checkbox"
                                                 <input class="form-check-input" type="checkbox"
-                                                       name="visit_gains" value="more_medical_scientific_knowledge" v-model="data.visit_gains">
+                                                       id="more_medical_scientific_knowledge"
+                                                       value="more_medical_scientific_knowledge" v-model="data.visit_gains">
                                                 <label class="form-check-label" for="more_medical_scientific_knowledge">More medical/scientific
                                                 <label class="form-check-label" for="more_medical_scientific_knowledge">More medical/scientific
                                                     knowledge</label>
                                                     knowledge</label>
                                             </div>
                                             </div>
                                             <div class="form-check form-check-inline">
                                             <div class="form-check form-check-inline">
                                                 <input class="form-check-input" type="checkbox"
                                                 <input class="form-check-input" type="checkbox"
-                                                       name="visit_gains" value="practical_health_tips" v-model="data.visit_gains">
+                                                       id="practical_health_tips"
+                                                       value="practical_health_tips" v-model="data.visit_gains">
                                                 <label class="form-check-label" for="practical_health_tips">Practical health tips</label>
                                                 <label class="form-check-label" for="practical_health_tips">Practical health tips</label>
                                             </div>
                                             </div>
                                             <div class="form-check form-check-inline">
                                             <div class="form-check form-check-inline">
-                                                <input class="form-check-input" type="checkbox" name="visit_gains"
+                                                <input class="form-check-input" type="checkbox" id="accountability"
                                                        value="accountability" v-model="data.visit_gains">
                                                        value="accountability" v-model="data.visit_gains">
                                                 <label class="form-check-label" for="accountability">Accountability</label>
                                                 <label class="form-check-label" for="accountability">Accountability</label>
                                             </div>
                                             </div>
                                             <div class="form-check form-check-inline">
                                             <div class="form-check form-check-inline">
                                                 <input class="form-check-input" type="checkbox"
                                                 <input class="form-check-input" type="checkbox"
-                                                       name="visit_gains" value="personalized_plan" v-model="data.visit_gains">
+                                                       id="personalized_plan"
+                                                       value="personalized_plan" v-model="data.visit_gains">
                                                 <label class="form-check-label" for="personalized_plan">Personalized Plan</label>
                                                 <label class="form-check-label" for="personalized_plan">Personalized Plan</label>
                                             </div>
                                             </div>
                                             <div class="form-check form-check-inline">
                                             <div class="form-check form-check-inline">
-                                                <input class="form-check-input" type="checkbox" name="visit_gains" value="other"
+                                                <input class="form-check-input" type="checkbox" id="other"
+                                                       value="other"
                                                        v-model="data.visit_gains">
                                                        v-model="data.visit_gains">
                                                 <label class="form-check-label" for="other">Other</label>
                                                 <label class="form-check-label" for="other">Other</label>
                                             </div>
                                             </div>
@@ -373,6 +377,11 @@ if ($point && @$point->data) {
 
 
                 </div>
                 </div>
 
 
+                <div class="mt-3 pt-3 border-top text-center">
+                    <button type="button" v-on:click.prevent="saveForm()" class="btn btn-sm btn-primary mr-2">Submit</button>
+                    <button type="button" onclick="closeStagPopup()" class="btn btn-sm btn-default border">Cancel</button>
+                </div>
+
             </div>
             </div>
 
 
             <div class="d-none">
             <div class="d-none">
@@ -411,6 +420,11 @@ if ($point && @$point->data) {
                         var days = !isNaN(parseInt(this.data.days_exercise)) ? parseInt(this.data.days_exercise) : 0;
                         var days = !isNaN(parseInt(this.data.days_exercise)) ? parseInt(this.data.days_exercise) : 0;
                         var min = !isNaN(parseInt(this.data.min_exercise)) ? parseInt(this.data.min_exercise) : 0;
                         var min = !isNaN(parseInt(this.data.min_exercise)) ? parseInt(this.data.min_exercise) : 0;
                         this.data.total_exercise = days * min;
                         this.data.total_exercise = days * min;
+                    },
+                    saveForm: function() {
+                        let parent = $('#edit-univ_sub_lifestyle_general-container').closest('form');
+                        parent.find('[name="data"]').val(JSON.stringify(this.data));
+                        autoSaveSegmentAndClose(parent.find('[submit]').first());
                     }
                     }
                 }
                 }
             });
             });

+ 13 - 0
resources/views/app/patient/segment-templates/lifestyle_nutrition/edit.blade.php

@@ -1236,6 +1236,12 @@ if ($point && @$point->data) {
                     <span class="mr-2">Other</span>
                     <span class="mr-2">Other</span>
                     <input type="text" class="flex-grow-1 form-control form-control-sm" v-model="data.weight_loss_fad_diets_other">
                     <input type="text" class="flex-grow-1 form-control form-control-sm" v-model="data.weight_loss_fad_diets_other">
                 </div>
                 </div>
+
+                <div class="mt-3 pt-3 border-top text-center">
+                    <button type="button" v-on:click.prevent="saveForm()" class="btn btn-sm btn-primary mr-2">Submit</button>
+                    <button type="button" onclick="closeStagPopup()" class="btn btn-sm btn-default border">Cancel</button>
+                </div>
+
             </div>
             </div>
 
 
             <div class="d-none">
             <div class="d-none">
@@ -1267,6 +1273,13 @@ if ($point && @$point->data) {
                         },
                         },
                         deep: true
                         deep: true
                     }
                     }
+                },
+                methods: {
+                    saveForm: function() {
+                        let parent = $('#edit-univ_sub_nutrition_assessment-container').closest('form');
+                        parent.find('[name="data"]').val(JSON.stringify(this.data));
+                        autoSaveSegmentAndClose(parent.find('[submit]').first());
+                    }
                 }
                 }
             });
             });
         };
         };

+ 11 - 0
resources/views/app/patient/segment-templates/lifestyle_physical_activity/edit.blade.php

@@ -343,6 +343,12 @@ if ($point && @$point->data) {
                     </tr>
                     </tr>
                     </tbody>
                     </tbody>
                 </table>
                 </table>
+
+                <div class="mt-3 pt-3 border-top text-center">
+                    <button type="button" v-on:click.prevent="saveForm()" class="btn btn-sm btn-primary mr-2">Submit</button>
+                    <button type="button" onclick="closeStagPopup()" class="btn btn-sm btn-default border">Cancel</button>
+                </div>
+
             </div>
             </div>
 
 
             <div class="d-none">
             <div class="d-none">
@@ -380,6 +386,11 @@ if ($point && @$point->data) {
                         var days = !isNaN(parseInt(this.data.days_exercise)) ? parseInt(this.data.days_exercise) : 0;
                         var days = !isNaN(parseInt(this.data.days_exercise)) ? parseInt(this.data.days_exercise) : 0;
                         var min = !isNaN(parseInt(this.data.min_exercise)) ? parseInt(this.data.min_exercise) : 0;
                         var min = !isNaN(parseInt(this.data.min_exercise)) ? parseInt(this.data.min_exercise) : 0;
                         this.data.total_exercise = days * min;
                         this.data.total_exercise = days * min;
+                    },
+                    saveForm: function() {
+                        let parent = $('#edit-univ_sub_physical_activity_assessment-container').closest('form');
+                        parent.find('[name="data"]').val(JSON.stringify(this.data));
+                        autoSaveSegmentAndClose(parent.find('[submit]').first());
                     }
                     }
                 }
                 }
             });
             });

+ 11 - 1
resources/views/app/patient/segment-templates/lifestyle_sleep/edit.blade.php

@@ -745,7 +745,10 @@ if ($point && @$point->data) {
 
 
                 </div>
                 </div>
 
 
-
+                <div class="mt-3 pt-3 border-top text-center">
+                    <button type="button" v-on:click.prevent="saveForm()" class="btn btn-sm btn-primary mr-2">Submit</button>
+                    <button type="button" onclick="closeStagPopup()" class="btn btn-sm btn-default border">Cancel</button>
+                </div>
 
 
             </div>
             </div>
 
 
@@ -778,6 +781,13 @@ if ($point && @$point->data) {
                         },
                         },
                         deep: true
                         deep: true
                     }
                     }
+                },
+                methods: {
+                    saveForm: function() {
+                        let parent = $('#edit-univ_sub_sleep_assessment-container').closest('form');
+                        parent.find('[name="data"]').val(JSON.stringify(this.data));
+                        autoSaveSegmentAndClose(parent.find('[submit]').first());
+                    }
                 }
                 }
             });
             });
         };
         };

+ 11 - 1
resources/views/app/patient/segment-templates/lifestyle_social/edit.blade.php

@@ -230,7 +230,10 @@ if ($point && @$point->data) {
 
 
                 </div>
                 </div>
 
 
-
+                <div class="mt-3 pt-3 border-top text-center">
+                    <button type="button" v-on:click.prevent="saveForm()" class="btn btn-sm btn-primary mr-2">Submit</button>
+                    <button type="button" onclick="closeStagPopup()" class="btn btn-sm btn-default border">Cancel</button>
+                </div>
 
 
             </div>
             </div>
 
 
@@ -263,6 +266,13 @@ if ($point && @$point->data) {
                         },
                         },
                         deep: true
                         deep: true
                     }
                     }
+                },
+                methods: {
+                    saveForm: function() {
+                        let parent = $('#edit-univ_sub_social_relationships_assessment-container').closest('form');
+                        parent.find('[name="data"]').val(JSON.stringify(this.data));
+                        autoSaveSegmentAndClose(parent.find('[submit]').first());
+                    }
                 }
                 }
             });
             });
         };
         };

+ 11 - 0
resources/views/app/patient/segment-templates/lifestyle_stress/edit.blade.php

@@ -592,6 +592,12 @@ if ($point && @$point->data) {
                         </div>
                         </div>
                     </div>
                     </div>
                 </div>
                 </div>
+
+                <div class="mt-3 pt-3 border-top text-center">
+                    <button type="button" v-on:click.prevent="saveForm()" class="btn btn-sm btn-primary mr-2">Submit</button>
+                    <button type="button" onclick="closeStagPopup()" class="btn btn-sm btn-default border">Cancel</button>
+                </div>
+
             </div>
             </div>
 
 
             <div class="d-none">
             <div class="d-none">
@@ -665,6 +671,11 @@ if ($point && @$point->data) {
                         var days = !isNaN(parseInt(this.data.days_exercise)) ? parseInt(this.data.days_exercise) : 0;
                         var days = !isNaN(parseInt(this.data.days_exercise)) ? parseInt(this.data.days_exercise) : 0;
                         var min = !isNaN(parseInt(this.data.min_exercise)) ? parseInt(this.data.min_exercise) : 0;
                         var min = !isNaN(parseInt(this.data.min_exercise)) ? parseInt(this.data.min_exercise) : 0;
                         this.data.total_exercise = days * min;
                         this.data.total_exercise = days * min;
+                    },
+                    saveForm: function() {
+                        let parent = $('#edit-univ_sub_stress_assessment-container').closest('form');
+                        parent.find('[name="data"]').val(JSON.stringify(this.data));
+                        autoSaveSegmentAndClose(parent.find('[submit]').first());
                     }
                     }
                 }
                 }
             });
             });

+ 11 - 0
resources/views/app/patient/segment-templates/lifestyle_substances/edit.blade.php

@@ -904,6 +904,10 @@ if ($point && @$point->data) {
                     </div>
                     </div>
                 </div>
                 </div>
 
 
+                <div class="mt-3 pt-3 border-top text-center">
+                    <button type="button" v-on:click.prevent="saveForm()" class="btn btn-sm btn-primary mr-2">Submit</button>
+                    <button type="button" onclick="closeStagPopup()" class="btn btn-sm btn-default border">Cancel</button>
+                </div>
 
 
             </div>
             </div>
 
 
@@ -936,6 +940,13 @@ if ($point && @$point->data) {
                         },
                         },
                         deep: true
                         deep: true
                     }
                     }
+                },
+                methods: {
+                    saveForm: function() {
+                        let parent = $('#edit-univ_sub_substance_use_assessment-container').closest('form');
+                        parent.find('[name="data"]').val(JSON.stringify(this.data));
+                        autoSaveSegmentAndClose(parent.find('[submit]').first());
+                    }
                 }
                 }
             });
             });
         };
         };

+ 1 - 1
resources/views/app/patient/segment-templates/past_medical_history/edit.blade.php

@@ -271,7 +271,7 @@ for ($i = 0; $i < count($fields); $i++) {
                     },
                     },
                     cancelCustomItem: function() {
                     cancelCustomItem: function() {
                         hideMoeFormMask();
                         hideMoeFormMask();
-                        $('div[moe]').hide();
+                        $('[custom-item-form]').hide();
                         return false;
                         return false;
                     }
                     }
                 }
                 }

+ 2 - 2
resources/views/app/patient/segment-templates/past_medical_history/summary.blade.php

@@ -83,7 +83,7 @@ if ($point && @$point->data) {
     // custom fields
     // custom fields
 
 
     if(isset($contentData['customFields']) && count($contentData['customFields'])):
     if(isset($contentData['customFields']) && count($contentData['customFields'])):
-        ?> <div class="mt-2"> <?php
+        ?> <div class=""> <?php
         for ($i = 0; $i < count($contentData['customFields']); $i++):
         for ($i = 0; $i < count($contentData['customFields']); $i++):
             $item = $contentData['customFields'][$i];
             $item = $contentData['customFields'][$i];
             if($item['value']): ?>
             if($item['value']): ?>
@@ -101,7 +101,7 @@ if ($point && @$point->data) {
         ?> </div> <?php
         ?> </div> <?php
     endif;
     endif;
 
 
-    if(isset($contentData['comments'])) { ?>
+    if(isset($contentData['comments']) && !empty(trim($contentData['comments']))) { ?>
         <div class="mt-2 mb-1">
         <div class="mt-2 mb-1">
             <div class="font-weight-bold">Comments:</div>
             <div class="font-weight-bold">Comments:</div>
             <div><?= $contentData['comments'] ?></div>
             <div><?= $contentData['comments'] ?></div>

+ 2 - 2
resources/views/app/patient/segment-templates/plan_allergies/edit.blade.php

@@ -146,9 +146,9 @@ else {
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
             </form>
             </form>
         </div>
         </div>
-        <div visit-moe large class="ml-auto mt-1 max-width-500px">
+        <div visit-moe large class="ml-2 max-width-500px">
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new allergy, added during this visit</a>
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new allergy, added during this visit</a>
-            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1" right>
+            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="category" value="ALLERGY">
                 <input type="hidden" name="category" value="ALLERGY">
                 <input type="hidden" name="data">
                 <input type="hidden" name="data">

+ 2 - 2
resources/views/app/patient/segment-templates/plan_care_team/edit.blade.php

@@ -167,9 +167,9 @@ else {
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
             </form>
             </form>
         </div>
         </div>
-        <div visit-moe large class="ml-auto mt-1 max-width-500px">
+        <div visit-moe large class="ml-2 max-width-500px">
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new care team member, added during this visit</a>
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new care team member, added during this visit</a>
-            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1" right>
+            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="category" value="CARE_TEAM_MEMBER">
                 <input type="hidden" name="category" value="CARE_TEAM_MEMBER">
                 <input type="hidden" name="data">
                 <input type="hidden" name="data">

+ 2 - 2
resources/views/app/patient/segment-templates/plan_goals/edit.blade.php

@@ -222,9 +222,9 @@ else {
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
             </form>
             </form>
         </div>
         </div>
-        <div visit-moe large class="ml-auto mt-1 max-width-500px">
+        <div visit-moe large class="ml-2 max-width-500px">
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new goal, added during this visit</a>
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new goal, added during this visit</a>
-            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1 max-width-500px min-width-500px" right>
+            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1 max-width-500px min-width-500px">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="category" value="GOAL">
                 <input type="hidden" name="category" value="GOAL">
                 <input type="hidden" name="data">
                 <input type="hidden" name="data">

+ 2 - 2
resources/views/app/patient/segment-templates/plan_interventions/edit.blade.php

@@ -169,9 +169,9 @@ else {
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
             </form>
             </form>
         </div>
         </div>
-        <div visit-moe large class="ml-auto mt-1 max-width-500px">
+        <div visit-moe large class="ml-2 max-width-500px">
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new intervention, added during this visit</a>
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new intervention, added during this visit</a>
-            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1" right>
+            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="category" value="INTERVENTION">
                 <input type="hidden" name="category" value="INTERVENTION">
                 <input type="hidden" name="data">
                 <input type="hidden" name="data">

+ 2 - 2
resources/views/app/patient/segment-templates/plan_medications/edit.blade.php

@@ -158,9 +158,9 @@ else {
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
             </form>
             </form>
         </div>
         </div>
-        <div visit-moe large class="ml-auto mt-1 max-width-500px">
+        <div visit-moe large class="ml-2 max-width-500px">
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new medication, prescribed during this visit</a>
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new medication, prescribed during this visit</a>
-            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1" right>
+            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="category" value="MEDICATION">
                 <input type="hidden" name="category" value="MEDICATION">
                 <input type="hidden" name="data">
                 <input type="hidden" name="data">

+ 2 - 2
resources/views/app/patient/segment-templates/plan_problems/edit.blade.php

@@ -155,9 +155,9 @@ else {
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
                 <button submit class="btn btn-sm btn-info font-weight-bold">Save Relevance</button>
             </form>
             </form>
         </div>
         </div>
-        <div visit-moe large class="ml-auto mt-1 max-width-500px">
+        <div visit-moe large class="ml-2 max-width-500px">
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new problem, added during this visit</a>
             <a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new problem, added during this visit</a>
-            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1" right>
+            <form url="/api/visitPoint/addTopLevelDuringVisit" class="mcp-theme-1">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="category" value="PROBLEM">
                 <input type="hidden" name="category" value="PROBLEM">
                 <input type="hidden" name="data">
                 <input type="hidden" name="data">

+ 11 - 11
resources/views/app/patient/segment-templates/vitals/edit.blade.php

@@ -29,52 +29,52 @@ if(!$contentData) {
         "heightInInches" => [
         "heightInInches" => [
             "label" => "Ht. (in.)",
             "label" => "Ht. (in.)",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "weightPounds" => [
         "weightPounds" => [
             "label" => "Wt. (lbs.)",
             "label" => "Wt. (lbs.)",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "temperatureF" => [
         "temperatureF" => [
             "label" => "Temp. (F)",
             "label" => "Temp. (F)",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "systolicBP" => [
         "systolicBP" => [
             "label" => "SBP",
             "label" => "SBP",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "diastolicBP" => [
         "diastolicBP" => [
             "label" => "DBP",
             "label" => "DBP",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "pulseRatePerMinute" => [
         "pulseRatePerMinute" => [
             "label" => "Pulse",
             "label" => "Pulse",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "respirationRatePerMinute" => [
         "respirationRatePerMinute" => [
             "label" => "Resp.",
             "label" => "Resp.",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "pulseOx" => [
         "pulseOx" => [
             "label" => "Pulse Ox.",
             "label" => "Pulse Ox.",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "smokingStatus" => [
         "smokingStatus" => [
             "label" => "Smoking Status",
             "label" => "Smoking Status",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
         "bmi" => [
         "bmi" => [
             "label" => "BMI (kg/m²)",
             "label" => "BMI (kg/m²)",
             "value" => "",
             "value" => "",
-            "date" => "",
+            "date" => date('Y-m-d'),
         ],
         ],
     ];
     ];
 }else {
 }else {
@@ -83,7 +83,7 @@ if(!$contentData) {
             $contentData[$k] = [
             $contentData[$k] = [
                 "label" => $v,
                 "label" => $v,
                 "value" => "",
                 "value" => "",
-                "date" => "",
+                "date" => date('Y-m-d'),
             ];
             ];
         }
         }
     }
     }

+ 1 - 1
resources/views/app/patient/supply-orders.blade.php

@@ -537,7 +537,7 @@
                 }
                 }
 
 
             }
             }
-            addMCInitializer('patient-supply-orders', init);
+            addMCInitializer('patient-supply-orders', init, '#patient-supply-orders');
         }).call(window);
         }).call(window);
     </script>
     </script>
 @endsection
 @endsection

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

@@ -9,7 +9,7 @@
     <div class="row" id="vitals-settings-{{$patient->uid}}">
     <div class="row" id="vitals-settings-{{$patient->uid}}">
         <div class="col-5 border-right">
         <div class="col-5 border-right">
             <div class="d-flex align-items-baseline">
             <div class="d-flex align-items-baseline">
-                <b>BMI Management</b>
+                <b>BMI/Weight Management</b>
                 <span class="mx-2 text-secondary">|</span>
                 <span class="mx-2 text-secondary">|</span>
                 @include('app.patient.vitals-settings.bmi-management-form')
                 @include('app.patient.vitals-settings.bmi-management-form')
             </div>
             </div>

+ 37 - 2
resources/views/app/patient/vitals-settings/bmi-management-form.blade.php

@@ -2,7 +2,7 @@
     <a href="#" start show>Update</a>
     <a href="#" start show>Update</a>
     <form url="/api/client/updateBmiManagementSettingsValue">
     <form url="/api/client/updateBmiManagementSettingsValue">
         <input type="hidden" name="uid" value="{{$patient->uid}}">
         <input type="hidden" name="uid" value="{{$patient->uid}}">
-        <p class="text-secondary font-weight-bold font-size-14">BMI Management</p>
+        <p class="text-secondary font-weight-bold font-size-14">BMI/Weight Management</p>
 
 
         <div class="mb-3 d-flex align-items-center">
         <div class="mb-3 d-flex align-items-center">
             <span class="text-secondary min-width-140px">Current Height:</span>
             <span class="text-secondary min-width-140px">Current Height:</span>
@@ -141,4 +141,39 @@
             <button class="btn btn-default border btn-sm" cancel>Cancel</button>
             <button class="btn btn-default border btn-sm" cancel>Cancel</button>
         </div>
         </div>
     </form>
     </form>
-</div>
+</div>
+
+<script>
+    (function() {
+
+        function initICDAutoSuggest(_codeElem, _descElem) {
+            if(_codeElem.is('[ac-initialized]')) return false;
+            var elem = _codeElem[0], descElem = _descElem[0], dynID = 'icd-' + Math.ceil(Math.random() * 1000000);
+            $(elem).attr('id', dynID);
+            new window.Def.Autocompleter.Search(dynID,
+                'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&ef=name', {
+                    tableFormat: true,
+                    valueCols: [0],
+                    colHeaders: ['Code', 'Name'],
+                }
+            );
+            window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
+                let acData = elem.autocomp.getSelectedItemData();
+                if(!acData[0] || !acData[0].data) return false;
+                $(elem).val(acData[0].code);
+                $(descElem).val(acData[0].data.name);
+                return false;
+            });
+            $(elem).attr('ac-initialized', 1);
+        }
+
+        function init() {
+            for (let i = 1; i <= 4; i++) {
+                initICDAutoSuggest($('[name="whyIsWeightMonitoringNeededIcd' + i + '"]'), $('[name="whyIsWeightMonitoringNeededDescription' + i + '"]'));
+            }
+        }
+
+        addMCInitializer('bmi-management-settings', init, '#bmi-management-settings');
+
+    }).call(window);
+</script>

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

@@ -1,4 +1,4 @@
-<div moe large>
+<div moe large id="bp-management-settings">
     <a href="#" start show>Update</a>
     <a href="#" start show>Update</a>
     <form url="/api/client/updateBpManagementSettingsValue">
     <form url="/api/client/updateBpManagementSettingsValue">
         <input type="hidden" name="uid" value="{{$patient->uid}}">
         <input type="hidden" name="uid" value="{{$patient->uid}}">
@@ -295,4 +295,38 @@
             <button class="btn btn-default border btn-sm" cancel>Cancel</button>
             <button class="btn btn-default border btn-sm" cancel>Cancel</button>
         </div>
         </div>
     </form>
     </form>
-</div>
+</div>
+<script>
+    (function() {
+
+        function initICDAutoSuggest(_codeElem, _descElem) {
+            if(_codeElem.is('[ac-initialized]')) return false;
+            var elem = _codeElem[0], descElem = _descElem[0], dynID = 'icd-' + Math.ceil(Math.random() * 1000000);
+            $(elem).attr('id', dynID);
+            new window.Def.Autocompleter.Search(dynID,
+                'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&ef=name', {
+                    tableFormat: true,
+                    valueCols: [0],
+                    colHeaders: ['Code', 'Name'],
+                }
+            );
+            window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
+                let acData = elem.autocomp.getSelectedItemData();
+                if(!acData[0] || !acData[0].data) return false;
+                $(elem).val(acData[0].code);
+                $(descElem).val(acData[0].data.name);
+                return false;
+            });
+            $(elem).attr('ac-initialized', 1);
+        }
+
+        function init() {
+            for (let i = 1; i <= 4; i++) {
+                initICDAutoSuggest($('[name="whyIsBpMonitoringNeededIcd' + i + '"]'), $('[name="whyIsBpMonitoringNeededDescription' + i + '"]'));
+            }
+        }
+
+        addMCInitializer('bp-management-settings', init, '#bp-management-settings');
+
+    }).call(window);
+</script>

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

@@ -652,6 +652,7 @@
                                         </div>
                                         </div>
                                     </section>--}}
                                     </section>--}}
                                     <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-4">
                                     <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-4">
+                                        {{--
                                         <div moe>
                                         <div moe>
                                             <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;Note
                                             <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;Note
                                             </button>
                                             </button>
@@ -701,7 +702,7 @@
                                                     <button submit class="btn btn-primary btn-sm">submit</button>
                                                     <button submit class="btn btn-primary btn-sm">submit</button>
                                                 </div>
                                                 </div>
                                             </form>
                                             </form>
-                                        </div>
+                                        </div> --}}
                                         <div>
                                         <div>
                                             <div moe relative>
                                             <div moe relative>
                                                 <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;SMS
                                                 <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;SMS
@@ -767,9 +768,9 @@
                                         <div>
                                         <div>
                                             <button class="col-2-button" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')">Join Video</button>
                                             <button class="col-2-button" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')">Join Video</button>
                                         </div>
                                         </div>
+                                        {{--
                                         <div class="">
                                         <div class="">
                                             @if($pro->isWorkingOnClient($patient))
                                             @if($pro->isWorkingOnClient($patient))
-                                                {{-- stop work on client --}}
                                                 <div moe>
                                                 <div moe>
                                                     <form url="/api/proClientWork/KillRunningWorkForSelf"
                                                     <form url="/api/proClientWork/KillRunningWorkForSelf"
                                                           class="mcp-theme-1" show>
                                                           class="mcp-theme-1" show>
@@ -782,7 +783,6 @@
                                                     </form>
                                                     </form>
                                                 </div>
                                                 </div>
                                             @else
                                             @else
-                                                {{-- start work on client --}}
                                                 <div moe>
                                                 <div moe>
                                                     <form url="/api/proClientWork/create" class="mcp-theme-1" show>
                                                     <form url="/api/proClientWork/create" class="mcp-theme-1" show>
                                                         <input type="hidden" name="clientUid" value="{{$patient->uid}}">
                                                         <input type="hidden" name="clientUid" value="{{$patient->uid}}">
@@ -795,6 +795,7 @@
                                                 </div>
                                                 </div>
                                             @endif
                                             @endif
                                         </div>
                                         </div>
+                                        --}}
                                         <div class="mr-auto">
                                         <div class="mr-auto">
                                             @if($pro->isWorkingOnClient($patient))
                                             @if($pro->isWorkingOnClient($patient))
                                                 <div class="d-flex align-items-center">
                                                 <div class="d-flex align-items-center">