Browse Source

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

= 3 years ago
parent
commit
af44a035a3
82 changed files with 1468 additions and 137 deletions
  1. 6 0
      app/Helpers/helpers.php
  2. 11 1
      app/Http/Controllers/NoteController.php
  3. 1 1
      config/app.php
  4. 3 3
      js-dev/stag-suggest.js
  5. 7 1
      public/css/style.css
  6. 1 1
      resources/views/app/patient/appointments.blade.php
  7. 15 3
      resources/views/app/patient/care-month/dashboard.blade.php
  8. 2 5
      resources/views/app/patient/careteam-center.blade.php
  9. 1 1
      resources/views/app/patient/handouts-list.blade.php
  10. 1 1
      resources/views/app/patient/module-specific-summary-renderers/allergy/plan.blade.php
  11. 58 0
      resources/views/app/patient/module-specific-summary-renderers/allergy/subjective.blade.php
  12. 1 1
      resources/views/app/patient/module-specific-summary-renderers/behavior/plan.blade.php
  13. 1 1
      resources/views/app/patient/module-specific-summary-renderers/behavior/subjective.blade.php
  14. 1 1
      resources/views/app/patient/module-specific-summary-renderers/care_team_member/plan.blade.php
  15. 58 0
      resources/views/app/patient/module-specific-summary-renderers/care_team_member/subjective.blade.php
  16. 1 1
      resources/views/app/patient/module-specific-summary-renderers/exercise/plan.blade.php
  17. 1 1
      resources/views/app/patient/module-specific-summary-renderers/exercise/subjective.blade.php
  18. 1 1
      resources/views/app/patient/module-specific-summary-renderers/goal/plan.blade.php
  19. 58 0
      resources/views/app/patient/module-specific-summary-renderers/goal/subjective.blade.php
  20. 114 0
      resources/views/app/patient/module-specific-summary-renderers/history_family/subjective.blade.php
  21. 112 0
      resources/views/app/patient/module-specific-summary-renderers/history_social/subjective.blade.php
  22. 109 0
      resources/views/app/patient/module-specific-summary-renderers/history_surgical/subjective.blade.php
  23. 1 1
      resources/views/app/patient/module-specific-summary-renderers/medication/plan.blade.php
  24. 58 0
      resources/views/app/patient/module-specific-summary-renderers/medication/subjective.blade.php
  25. 1 1
      resources/views/app/patient/module-specific-summary-renderers/nutrition/plan.blade.php
  26. 1 1
      resources/views/app/patient/module-specific-summary-renderers/nutrition/subjective.blade.php
  27. 147 0
      resources/views/app/patient/module-specific-summary-renderers/past_medical_history/subjective.blade.php
  28. 1 1
      resources/views/app/patient/module-specific-summary-renderers/problem/plan.blade.php
  29. 58 0
      resources/views/app/patient/module-specific-summary-renderers/problem/subjective.blade.php
  30. 286 0
      resources/views/app/patient/module-specific-summary-renderers/ros/subjective.blade.php
  31. 5 7
      resources/views/app/patient/note/dashboard.blade.php
  32. 4 2
      resources/views/app/patient/note/follow-up-appointment.blade.php
  33. 1 1
      resources/views/app/patient/note/rhs-sidebar.blade.php
  34. 4 2
      resources/views/app/patient/note/segment-slim.blade.php
  35. 2 2
      resources/views/app/patient/note/segment_script.blade.php
  36. 1 1
      resources/views/app/patient/partials/company-pro-documents.blade.php
  37. 22 8
      resources/views/app/patient/prescriptions/list.blade.php
  38. 2 2
      resources/views/app/patient/segment-templates/_child_plan/behavior/CRAVINGS/last-plan.php
  39. 2 2
      resources/views/app/patient/segment-templates/_child_plan/behavior/FOOD_TRIGGERS/last-plan.php
  40. 2 2
      resources/views/app/patient/segment-templates/_child_plan/behavior/SELF_MONITORING/last-plan.php
  41. 2 2
      resources/views/app/patient/segment-templates/_child_plan/behavior/SLEEP_HABITS/last-plan.php
  42. 2 2
      resources/views/app/patient/segment-templates/_child_plan/exercise/AEROBIC_ACTIVITY/last-plan.php
  43. 2 2
      resources/views/app/patient/segment-templates/_child_plan/exercise/NEAT/last-plan.php
  44. 2 2
      resources/views/app/patient/segment-templates/_child_plan/exercise/STRENGTH_TRAINING/last-plan.php
  45. 2 2
      resources/views/app/patient/segment-templates/_child_plan/last-plan.php
  46. 2 2
      resources/views/app/patient/segment-templates/_child_plan/nutrition/DAILY_INTAKE_CALORIES/last-plan.php
  47. 2 2
      resources/views/app/patient/segment-templates/_child_plan/nutrition/DAILY_INTAKE_CARBOHYDRATES/last-plan.php
  48. 2 2
      resources/views/app/patient/segment-templates/_child_plan/nutrition/FAST_FOOD/last-plan.php
  49. 2 2
      resources/views/app/patient/segment-templates/_child_plan/nutrition/HIGH_SUGAR_BEVERAGES/last-plan.php
  50. 2 2
      resources/views/app/patient/segment-templates/_child_plan/nutrition/PORTION_SIZES/last-plan.php
  51. 2 2
      resources/views/app/patient/segment-templates/_child_plan/nutrition/SNACKS/last-plan.php
  52. 2 2
      resources/views/app/patient/segment-templates/_child_plan/nutrition/VEGETABLES/last-plan.php
  53. 2 2
      resources/views/app/patient/segment-templates/_child_plan/nutrition/WATER_INTAKE/last-plan.php
  54. 2 2
      resources/views/app/patient/segment-templates/_child_review/behavior/CRAVINGS/last-review.php
  55. 2 2
      resources/views/app/patient/segment-templates/_child_review/behavior/FOOD_TRIGGERS/last-review.php
  56. 2 2
      resources/views/app/patient/segment-templates/_child_review/behavior/SELF_MONITORING/last-review.php
  57. 2 2
      resources/views/app/patient/segment-templates/_child_review/behavior/SLEEP_HABITS/last-review.php
  58. 2 2
      resources/views/app/patient/segment-templates/_child_review/exercise/AEROBIC_ACTIVITY/last-review.php
  59. 2 2
      resources/views/app/patient/segment-templates/_child_review/exercise/NEAT/last-review.php
  60. 2 2
      resources/views/app/patient/segment-templates/_child_review/exercise/STRENGTH_TRAINING/last-review.php
  61. 2 2
      resources/views/app/patient/segment-templates/_child_review/last-review.php
  62. 2 2
      resources/views/app/patient/segment-templates/_child_review/nutrition/DAILY_INTAKE_CALORIES/last-review.php
  63. 2 2
      resources/views/app/patient/segment-templates/_child_review/nutrition/DAILY_INTAKE_CARBOHYDRATES/last-review.php
  64. 14 4
      resources/views/app/patient/segment-templates/_child_review/nutrition/FAST_FOOD/edit-review.php
  65. 6 2
      resources/views/app/patient/segment-templates/_child_review/nutrition/FAST_FOOD/last-review.php
  66. 2 2
      resources/views/app/patient/segment-templates/_child_review/nutrition/HIGH_SUGAR_BEVERAGES/last-review.php
  67. 2 2
      resources/views/app/patient/segment-templates/_child_review/nutrition/PORTION_SIZES/last-review.php
  68. 2 2
      resources/views/app/patient/segment-templates/_child_review/nutrition/SNACKS/last-review.php
  69. 2 2
      resources/views/app/patient/segment-templates/_child_review/nutrition/VEGETABLES/last-review.php
  70. 2 2
      resources/views/app/patient/segment-templates/_child_review/nutrition/WATER_INTAKE/last-review.php
  71. 2 2
      resources/views/app/patient/segment-templates/_custom_items/script.blade.php
  72. 6 3
      resources/views/app/patient/segment-templates/history_family/edit.blade.php
  73. 6 3
      resources/views/app/patient/segment-templates/history_social/edit.blade.php
  74. 6 3
      resources/views/app/patient/segment-templates/history_surgical/edit.blade.php
  75. 6 0
      resources/views/app/patient/segment-templates/omega_plan_system/summary.blade.php
  76. 1 1
      resources/views/app/patient/segment-templates/omega_ros/edit.blade.php
  77. 142 2
      resources/views/app/patient/segment-templates/omega_subjective_system/summary.blade.php
  78. 7 4
      resources/views/app/patient/segment-templates/past_medical_history/edit.blade.php
  79. 3 0
      resources/views/app/patient/wizard-partials/common-script.blade.php
  80. 1 1
      resources/views/app/patient/wizard-partials/show-plan.blade.php
  81. 47 0
      resources/views/document-templates-generic/client_authorization_letter/content.blade.php
  82. 4 0
      resources/views/document-templates-generic/client_authorization_letter/spec.json

+ 6 - 0
app/Helpers/helpers.php

@@ -776,6 +776,12 @@ if(!function_exists('segment_template_summary_value_display')) {
         return $default;
         return $default;
     }
     }
 }
 }
+if(!function_exists('starts_with')) {
+    function starts_with($haystack, $needle) {
+        $length = strlen($needle);
+    return substr($haystack, 0, $length) === $needle;
+    }
+}
 
 
 if(!function_exists('get_doc_templates')){
 if(!function_exists('get_doc_templates')){
     function get_doc_templates(){
     function get_doc_templates(){

+ 11 - 1
app/Http/Controllers/NoteController.php

@@ -68,7 +68,7 @@ class NoteController extends Controller
             ->where('note_id', '<>', $note->id)
             ->where('note_id', '<>', $note->id)
             ->get();
             ->get();
 
 
-        $templates =  get_doc_templates();
+        $templates =  $this->filterClientDocuments(get_doc_templates());
         
         
         $companyProIDs = DB::select('SELECT company_pro_id FROM company_pro_document WHERE related_client_id  = ?', [$patient->id]);
         $companyProIDs = DB::select('SELECT company_pro_id FROM company_pro_document WHERE related_client_id  = ?', [$patient->id]);
 
 
@@ -86,6 +86,16 @@ class NoteController extends Controller
             'supplyOrdersOnNote', 'otherOpenSupplyOrders', 'templates'));
             'supplyOrdersOnNote', 'otherOpenSupplyOrders', 'templates'));
     }
     }
 
 
+    private function filterClientDocuments($documents){
+        $clientDocs = [];
+        foreach($documents as $doc){
+            if(starts_with($doc['name'], 'client_')){
+                array_push($clientDocs, $doc);
+            }
+        }
+        return $clientDocs;
+    }
+
     public function signConfirmation(Request $request, Client $patient, Note $note) {
     public function signConfirmation(Request $request, Client $patient, Note $note) {
         return view('app.patient.note.sign-confirmation', compact('patient', 'note'));
         return view('app.patient.note.sign-confirmation', compact('patient', 'note'));
     }
     }

+ 1 - 1
config/app.php

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

+ 3 - 3
js-dev/stag-suggest.js

@@ -145,7 +145,7 @@
                     return false;
                     return false;
                 case 13:
                 case 13:
                     if (activeItem.length) {
                     if (activeItem.length) {
-                        activeItem.first().click();
+                        activeItem.first().trigger('mousedown');
                     }
                     }
                     return false;
                     return false;
                 default:
                 default:
@@ -210,8 +210,8 @@
         });
         });
 
 
         // on auto-suggest selection
         // on auto-suggest selection
-        $(document).off('click', '.suggest-item.stag-suggest');
-        $(document).on('click', '.suggest-item.stag-suggest', function () {
+        $(document).off('mousedown.stag-suggest', '.suggest-item.stag-suggest');
+        $(document).on('mousedown.stag-suggest', '.suggest-item.stag-suggest', function () {
 
 
             $('.suggestions-outer.stag-suggestions').addClass('d-none');
             $('.suggestions-outer.stag-suggestions').addClass('d-none');
 
 

+ 7 - 1
public/css/style.css

@@ -719,6 +719,9 @@ input.search_field, textarea.search_field {
     right: auto;
     right: auto;
     min-width: 100%;
     min-width: 100%;
 }
 }
+[stag-suggest]:not(:focus)+.stag-suggestions-container {
+    display: none !important
+}
 .suggestions-outer .suggest-item, .suggestions-outer .no-suggest-items {
 .suggestions-outer .suggest-item, .suggestions-outer .no-suggest-items {
     padding: 0.25rem 0.5rem;
     padding: 0.25rem 0.5rem;
     text-decoration: none;
     text-decoration: none;
@@ -3166,4 +3169,7 @@ body.forced-masking #mask {
 }
 }
 .inline-input-underlined.width-50 {
 .inline-input-underlined.width-50 {
     width: 50px;
     width: 50px;
-}
+}
+.note_template_omega_soap_visit .system_segment .d-flex.border-bottom:last-of-type {
+    border-bottom: 0 !important;
+}

+ 1 - 1
resources/views/app/patient/appointments.blade.php

@@ -39,7 +39,7 @@
                     <tr>
                     <tr>
                         <td>
                         <td>
                             <a href="/patients/view/{{$patient->uid}}/calendar/{{$appointment->uid}}" class="text-nowrap">
                             <a href="/patients/view/{{$patient->uid}}/calendar/{{$appointment->uid}}" class="text-nowrap">
-                                {{$appointment->raw_date . ' ' . $appointment->raw_start_time}} <span class="text-sm">{{friendly_timezone($appointment->timezone)}}</span>
+                                {{friendly_date($appointment->raw_date) . ' ' . friendly_time($appointment->raw_start_time)}} <span class="text-sm">{{friendly_timezone($appointment->timezone)}}</span>
                             </a>
                             </a>
                         </td>
                         </td>
                         <td>{{ $appointment->pro->displayName() }}</pre></td>
                         <td>{{ $appointment->pro->displayName() }}</pre></td>

+ 15 - 3
resources/views/app/patient/care-month/dashboard.blade.php

@@ -1,10 +1,16 @@
 <?php
 <?php
 /** @var App\Models\CareMonth $careMonth */
 /** @var App\Models\CareMonth $careMonth */
 /** @var App\Models\Pro $pro */
 /** @var App\Models\Pro $pro */
+
+    $leanView = request()->input('popupmode') && request()->input('fromNoteUid');
+
 ?>
 ?>
-@extends ('layouts.patient')
 
 
-@section('inner-content')
+@extends($leanView ? 'layouts.empty' : 'layouts.patient')
+
+@section($leanView ? 'content' : 'inner-content')
+
+    <div class="popup-content-container {{$leanView ? 'px-3 mx-1 pb-3' : ''}}">
 
 
     <?php
     <?php
     $shortCutsObject = [];
     $shortCutsObject = [];
@@ -88,6 +94,8 @@
     @else
     @else
 
 
     <div id="care-month-container-{{$patient->uid}}">
     <div id="care-month-container-{{$patient->uid}}">
+
+        @if(!$leanView)
         <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-start">
             <h6 class="my-0 text-secondary d-flex align-items-start">
                 <a href="/patients/view/{{ $patient->uid }}/care-months" class="small text-decoration-none mr-3">
                 <a href="/patients/view/{{ $patient->uid }}/care-months" class="small text-decoration-none mr-3">
@@ -101,7 +109,9 @@
             </h6>
             </h6>
         </div>
         </div>
 
 
-        <hr class="m-negator mb-0">
+        @endif
+
+        <hr class="m-negator mb-0 {{ $leanView ? 'mt-0' : '' }}">
 
 
         <div class="row m-negator bg-light py-1 text-sm-incl-children">
         <div class="row m-negator bg-light py-1 text-sm-incl-children">
             <div class="col-3 pl-3-5">
             <div class="col-3 pl-3-5">
@@ -1948,4 +1958,6 @@
     </script>
     </script>
 
 
     @endif
     @endif
+
+    </div>
 @endsection
 @endsection

+ 2 - 5
resources/views/app/patient/careteam-center.blade.php

@@ -53,8 +53,8 @@ list($careTeamMembers, $counts) = Point::getPointsOfCategoryExtended($patient, '
                                     <div moe huge relative>
                                     <div moe huge relative>
                                         <a start show href="#" title="Edit">
                                         <a start show href="#" title="Edit">
                                             <?= !!@($careTeamMember->data->name) ? @($careTeamMember->data->name) : '-' ?>
                                             <?= !!@($careTeamMember->data->name) ? @($careTeamMember->data->name) : '-' ?>
-                                            <?= !!@($careTeamMember->data->specialty) ? '<br>' . @($careTeamMember->data->specialty) : '' ?>
-                                            <?= !!@($careTeamMember->data->organization) ? '<br>' . @($careTeamMember->data->organization) : '' ?>
+                                            <?= !!@($careTeamMember->data->specialty) ? ' / ' . @($careTeamMember->data->specialty) : '' ?>
+                                            <?= !!@($careTeamMember->data->organization) ? ' / ' . @($careTeamMember->data->organization) : '' ?>
                                         </a>
                                         </a>
                                         <form url="/api/visitPoint/updateTopLevel" class="mcp-theme-1 frm-edit-care-team-member">
                                         <form url="/api/visitPoint/updateTopLevel" class="mcp-theme-1 frm-edit-care-team-member">
                                             <input type="hidden" name="uid" value="<?= $careTeamMember->uid ?>">
                                             <input type="hidden" name="uid" value="<?= $careTeamMember->uid ?>">
@@ -196,9 +196,6 @@ list($careTeamMembers, $counts) = Point::getPointsOfCategoryExtended($patient, '
                         if($segment) {
                         if($segment) {
                             include resource_path('views/app/patient/segment-templates/_child_review/edit-review-in-place.php');
                             include resource_path('views/app/patient/segment-templates/_child_review/edit-review-in-place.php');
                         }
                         }
-                        else {
-                            echo "pling!";
-                        }
                         ?>
                         ?>
                     </div>
                     </div>
                 </td>
                 </td>

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

@@ -38,7 +38,7 @@
         </thead>
         </thead>
         <tbody>
         <tbody>
         @foreach($patient->handouts($note) as $handout)
         @foreach($patient->handouts($note) as $handout)
-            <?php $downloadLink = env('APP_URL') . "/guest/handout/{$handout->handout_client_uid}"; ?>
+            <?php $downloadLink = config('app.url') . "/guest/handout/{$handout->handout_client_uid}"; ?>
             <tr>
             <tr>
                 <td>{{$handout->internal_name}}</td>
                 <td>{{$handout->internal_name}}</td>
                 <td>{{$handout->display_name}}</td>
                 <td>{{$handout->display_name}}</td>

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/allergy/plan.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 58 - 0
resources/views/app/patient/module-specific-summary-renderers/allergy/subjective.blade.php

@@ -0,0 +1,58 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/allergies-center/{{$note->client->uid}}/{{$note->uid}}"
+           mc-initer="allergies-center-{{$note->id}}"
+           title="Allergies Center"
+           popup-style="overflow-visible">
+            Allergies
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                <?php $rel = $point->relevanceToNote($note); ?>
+                <tr>
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
+                        @if($rel)
+                            {{ $j }}.*
+                        @else
+                            {{ $j }}.
+                        @endif
+                    </td>
+                    <td class="px-2 width-300px">
+                        <div class=" <?= $point->is_removed ? 'strike-through' : '' ?>">
+                            <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
+                        </div>
+                    </td>
+                    <td class="width-300px">
+                        <div class="d-flex align-items-baseline pl-2">
+                            <?php $review = $point->childReviewAddedInNote($note); ?>
+                            <?php if(!!$review): ?>
+                            <span class="pr-2">{!! $review->data->value !!}</span>
+                            <?php endif; ?>
+                            <span>
+                                <?php if ($point->is_removed): ?>
+                                @if($point->removal_reason_category === 'DURING_VISIT')
+                                    <span class="text-sm text-secondary">Removed during visit</span>
+                                @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                    <span class="text-sm text-secondary">Removed on intake</span>
+                                @endif
+                                <?php elseif ($point->added_in_note_id === $note->id): ?>
+                                <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                                <span class="text-sm text-success">* Diagnosed during visit</span>
+                                <?php else: ?>
+                                <span class="text-sm text-info">* Diagnosed on intake</span>
+                                <?php endif;?>
+                                <?php endif; ?>
+                            </span>
+                        </div>
+                    </td>
+                    <td></td>
+                </tr>
+                <?php endforeach; ?>
+            </table>
+
+        </div>
+    </div>
+@endif

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/behavior/plan.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/behavior/subjective.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/care_team_member/plan.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 58 - 0
resources/views/app/patient/module-specific-summary-renderers/care_team_member/subjective.blade.php

@@ -0,0 +1,58 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/careteam-center/{{$note->client->uid}}/{{$note->uid}}"
+           mc-initer="careteam-center-{{$note->id}}"
+           title="Care Team Center"
+           popup-style="overflow-visible">
+            Care Team
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                <?php $rel = $point->relevanceToNote($note); ?>
+                <tr>
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
+                        @if($rel)
+                            {{ $j }}.*
+                        @else
+                            {{ $j }}.
+                        @endif
+                    </td>
+                    <td class="px-2 width-300px">
+                        <div class=" <?= $point->is_removed ? 'strike-through' : '' ?>">
+                            <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
+                        </div>
+                    </td>
+                    <td class="width-300px">
+                        <div class="d-flex align-items-baseline pl-2">
+                            <?php $review = $point->childReviewAddedInNote($note); ?>
+                            <?php if(!!$review): ?>
+                            <span class="pr-2">{!! $review->data->value !!}</span>
+                            <?php endif; ?>
+                            <span>
+                                <?php if ($point->is_removed): ?>
+                                @if($point->removal_reason_category === 'DURING_VISIT')
+                                    <span class="text-sm text-secondary">Removed during visit</span>
+                                @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                    <span class="text-sm text-secondary">Removed on intake</span>
+                                @endif
+                                <?php elseif ($point->added_in_note_id === $note->id): ?>
+                                <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                                <span class="text-sm text-success">* Added during visit</span>
+                                <?php else: ?>
+                                <span class="text-sm text-info">* Added on intake</span>
+                                <?php endif;?>
+                                <?php endif; ?>
+                            </span>
+                        </div>
+                    </td>
+                    <td></td>
+                </tr>
+                <?php endforeach; ?>
+            </table>
+
+        </div>
+    </div>
+@endif

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/exercise/plan.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/exercise/subjective.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/goal/plan.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 58 - 0
resources/views/app/patient/module-specific-summary-renderers/goal/subjective.blade.php

@@ -0,0 +1,58 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/goals-center/{{$note->client->uid}}/{{$note->uid}}"
+           mc-initer="goals-center-{{$note->id}}"
+           title="Goals Center"
+           popup-style="overflow-visible">
+            Goals
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                <?php $rel = $point->relevanceToNote($note); ?>
+                <tr>
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
+                        @if($rel)
+                            {{ $j }}.*
+                        @else
+                            {{ $j }}.
+                        @endif
+                    </td>
+                    <td class="px-2 width-300px">
+                        <div class=" <?= $point->is_removed ? 'strike-through' : '' ?>">
+                            <?= !!@($point->data->goal) ? @($point->data->goal) : '-' ?>
+                        </div>
+                    </td>
+                    <td class="width-300px">
+                        <div class="d-flex align-items-baseline pl-2">
+                            <?php $review = $point->childReviewAddedInNote($note); ?>
+                            <?php if(!!$review): ?>
+                            <span class="pr-2">{!! $review->data->value !!}</span>
+                            <?php endif; ?>
+                            <span>
+                                <?php if ($point->is_removed): ?>
+                                @if($point->removal_reason_category === 'DURING_VISIT')
+                                    <span class="text-sm text-secondary">Removed during visit</span>
+                                @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                    <span class="text-sm text-secondary">Removed on intake</span>
+                                @endif
+                                <?php elseif ($point->added_in_note_id === $note->id): ?>
+                                <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                                <span class="text-sm text-success">* Added during visit</span>
+                                <?php else: ?>
+                                <span class="text-sm text-info">* Added on intake</span>
+                                <?php endif;?>
+                                <?php endif; ?>
+                            </span>
+                        </div>
+                    </td>
+                    <td></td>
+                </tr>
+                <?php endforeach; ?>
+            </table>
+
+        </div>
+    </div>
+@endif

+ 114 - 0
resources/views/app/patient/module-specific-summary-renderers/history_family/subjective.blade.php

@@ -0,0 +1,114 @@
+<?php
+
+use App\Models\Client;
+use App\Models\Point;
+use App\Models\Note;
+use App\Models\Segment;
+/** @var Client $patient */
+/** @var Note $note */
+/** @var Segment $segment */
+
+?>
+
+@if($points && count($points))
+
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/note-segment-view-by-name/{{$note->uid}}/history_family/edit",
+           mc-initer="edit-univ_history_family-container-{{$note->id}}"
+           title="Family History"
+           popup-style="overflow-visible">
+            FHx
+        </a>
+        <div class="flex-grow-1">
+
+<?php
+
+$point = $points[0];
+
+if(!@$note) {
+    $note = $patient->coreNote;
+}
+
+$contentData = $parsed = false;
+
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $parsed = $point->lastChildReview->data;
+}
+
+$labels = [
+    'general_no_health_concern' => 'No health concern',
+    'general_arthritis' => 'Arthritis',
+    'general_asthma' => 'Asthma',
+    'general_bleeding_disorder' => 'Bleeding disorder',
+    'general_cad_lt_age_55' => 'CAD &gt; age 55',
+    'general_copd' => 'COPD',
+    'general_diabetes' => 'Diabetes',
+    'general_heart_attack' => 'Heart attack',
+    'general_heart_disease' => 'Heart disease',
+    'general_high_cholesterol' => 'High cholesterol',
+    'general_hypertension' => 'Hypertension',
+    'general_mental_illness' => 'Mental illness',
+    'general_osteoporosis' => 'Osteoporosis',
+    'general_stroke' => 'Stroke',
+    'cancer_breast_ca' => 'Breast cancer',
+    'cancer_colon_ca' => 'Colon cancer',
+    'cancer_other_ca' => 'Other cancer',
+    'cancer_ovarian_ca' => 'Ovarian cancer',
+    'cancer_uterine_ca' => 'Uterine cancer',
+];
+
+if($contentData && !$contentData['unknown'] && !!$contentData['count']) {
+    for ($i = 0; $i < $contentData['count']; $i++) {
+?>
+<div class="<?= $i > 0 ? 'mt-2' : '' ?>">
+    <div class="">
+        <b><?= isset($contentData['items'][$i]['relationship']) ? $contentData['items'][$i]['relationship'] : '--' ?></b>
+        <?php if(isset($contentData['items'][$i]['status']) && !empty($contentData['items'][$i]['status'])): ?>
+        <span class="ml-1 text-secondary">(<?= $contentData['items'][$i]['status'] ?>)</span>
+        <?php endif; ?>
+    </div>
+    <div class="ml-3">
+        <?php
+        $positives = [];
+        $negatives = [];
+        foreach ($labels as $k => $v) {
+            if(isset($contentData['items'][$i][$k])) {
+                if(strtolower($contentData['items'][$i][$k]) === 'yes') {
+                    $positives[] = $v;
+                }
+                else {
+                    $negatives[] = $v;
+                }
+            }
+        }
+        ?>
+        @if(count($positives))
+            <div class="pt-1"><b>Positive for</b>: {!!  implode(', ', $positives) !!}</div>
+        @endif
+        @if(count($negatives))
+            <div class="pt-1"><b>Negative for</b>: {!!  implode(', ', $negatives) !!}</div>
+        @endif
+    </div>
+    <?php if(isset($contentData['items'][$i]['comments']) && !empty($contentData['items'][$i]['comments'])): ?>
+    <div class="ml-3 pt-1 client-rs-contents">
+        <b>Comments: </b><?= $contentData['items'][$i]['comments'] ?>
+    </div>
+    <?php endif; ?>
+</div>
+<?php
+    }
+}
+else {
+?>
+<div class="text-secondary">-</div>
+<?php
+}
+?>
+
+        </div>
+    </div>
+
+@endif

+ 112 - 0
resources/views/app/patient/module-specific-summary-renderers/history_social/subjective.blade.php

@@ -0,0 +1,112 @@
+<?php
+
+use App\Models\Client;
+use App\Models\Point;
+use App\Models\Note;
+use App\Models\Segment;
+/** @var Client $patient */
+/** @var Note $note */
+/** @var Segment $segment */
+
+?>
+
+@if($points && count($points))
+
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/note-segment-view-by-name/{{$note->uid}}/history_social/edit",
+           mc-initer="edit-univ_history_social-container-{{$note->id}}"
+           title="Social History"
+           popup-style="overflow-visible">
+            Soc Hx
+        </a>
+        <div class="flex-grow-1">
+
+<?php
+
+$point = $points[0];
+
+$fields = [
+    [
+        "Tobacco" => ["Current every day smoker", "Current some day smoker", "Former smoker", "Heavy tobacco smoker", "Light tobacco smoker", "Never smoker", "Smoker, current status unknown", "Unknown if ever smoked "],
+    ],
+    [
+        "Alcohol" => ["Do not drink", "Drink daily", "Frequently drink", "Hx of Alcoholism", "Occasional drink"],
+        "Drug Abuse" => ["IVDU", "Illicit drug use", "No illicit drug use"],
+    ],
+    [
+        "Cardiovascular" => ["Eat healthy meals", "Regular exercise", "Take daily aspirin"],
+        "Safety" => ["Household Smoke detector", "Keep Firearms in home", "Wear seatbelts"],
+    ],
+    [
+        "Sexual Activity" => ["Exposure to STI", "Homosexual encounters", "Not sexually active", "Safe sex practices", "Sexually active"],
+        "Birth Gender" => ["Male", "Female", "Undifferentiated"],
+    ]
+];
+
+if(!@$note) {
+    $note = $patient->coreNote;
+}
+
+$contentData = $parsed = false;
+
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $parsed = $point->lastChildReview->data;
+
+    for ($i = 0; $i < count($fields); $i++):
+        foreach($fields[$i] as $head => $values):
+            for($k = 0; $k < count($values); $k++):
+                $fName = $head . '_' . sanitize_field_name($values[$k]);
+                if(@$contentData['common'][$fName]): ?>
+                    <div>
+                        <?= ucwords($head) ?>
+                        <i class="fa fa-arrow-right text-sm text-secondary"></i>
+                        <span class="font-weight-bold"><?= $values[$k] ?></span>
+                        <?php if(@$contentData['common'][$fName . '__comments']): ?>
+                            <span class="text-sm ml-1 text-secondary">(<?= $contentData['common'][$fName . '__comments'] ?>)</span>
+                        <?php endif; ?>
+                    </div>
+                <?php
+                endif;
+            endfor;
+        endforeach;
+    endfor;
+
+    // custom fields
+
+    if(isset($contentData['customFields']) && count($contentData['customFields'])):
+        ?> <div class=""> <?php
+        for ($i = 0; $i < count($contentData['customFields']); $i++):
+            $item = $contentData['customFields'][$i];
+            if($item['value']): ?>
+                <div>
+                    Custom
+                    <i class="fa fa-arrow-right text-sm text-secondary"></i>
+                    <span class="font-weight-bold"><?= $item['label'] ?></span>
+                    <?php if($item['comments']): ?>
+                        <span class="text-sm ml-1 text-secondary">(<?= $item['comments'] ?>)</span>
+                    <?php endif; ?>
+                </div>
+            <?php
+            endif;
+        endfor;
+        ?> </div> <?php
+    endif;
+
+    if(isset($contentData['comments']) && !empty(trim($contentData['comments']))) { ?>
+        <div class="mt-2 mb-1">
+            <b>Comments: </b><?= $contentData['comments'] ?>
+        </div>
+    <?php }
+}
+else {
+    echo '<span class="text-secondary">-</span>';
+}
+?>
+
+        </div>
+    </div>
+
+@endif

+ 109 - 0
resources/views/app/patient/module-specific-summary-renderers/history_surgical/subjective.blade.php

@@ -0,0 +1,109 @@
+<?php
+
+use App\Models\Client;
+use App\Models\Point;
+use App\Models\Note;
+use App\Models\Segment;
+/** @var Client $patient */
+/** @var Note $note */
+/** @var Segment $segment */
+
+?>
+
+@if($points && count($points))
+
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/note-segment-view-by-name/{{$note->uid}}/history_surgical/edit",
+           mc-initer="edit-univ_history_surgical-container-{{$note->id}}"
+           title="Surgical History"
+           popup-style="overflow-visible">
+            Surg Hx
+        </a>
+        <div class="flex-grow-1">
+
+<?php
+
+$point = $points[0];
+
+if(!@$note) {
+    $note = $patient->coreNote;
+}
+
+$fields = [
+    [
+        "" => ["Aneurysm repair", "Appendectomy", "Back surgery", "Bariatric surgery/gastric bypass", "Bilateral tubal ligation", "Breast resection/mastectomy", "CABG", "Carotid endarterectomy/stent", "Carpal tunnel release surgery",]
+    ],
+    [
+        "" => ["Cataract/lens surgery", "Cesarean section", "Cholecystectomy/bile duct surgery", "Dilation and curettage", "Hemorrhoid surgery", "Hip arthroplasty", "Hip replacement", "Hysterectomy", "Inguinal hernia repair",]
+    ],
+    [
+        "" => ["Knee arthroplasty", "LASIK", "Laminectomy", "Nasal surgery", "PTCA/PCI", "Pacemaker/defibrillator", "Prostate surgery", "Prostatectomy", "Rotator cuff surgery",]
+    ],
+    [
+        "" => ["Sinus surgery", "Skin cancer excision", "Spinal fusion", "TAH-BSO", "TURP", "Tonsillectomy/Adenoidectomy", "Vasectomy",]
+    ]
+];
+
+$contentData = $parsed = false;
+
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $parsed = $point->lastChildReview->data;
+
+    for ($i = 0; $i < count($fields); $i++):
+        foreach($fields[$i] as $head => $values):
+            for($k = 0; $k < count($values); $k++):
+                $fName = $head . '_' . sanitize_field_name($values[$k]);
+                if(@$contentData['common'][$fName]): ?>
+                    <div>
+                        <!--Common
+                        <i class="fa fa-arrow-right text-sm text-secondary"></i>-->
+                        <span class=""><?= $values[$k] ?></span>
+                        <?php if(@$contentData['common'][$fName . '__comments']): ?>
+                            <span class="text-sm ml-1 text-secondary">(<?= $contentData['common'][$fName . '__comments'] ?>)</span>
+                        <?php endif; ?>
+                    </div>
+                <?php
+                endif;
+            endfor;
+        endforeach;
+    endfor;
+
+    // custom fields
+
+    if(isset($contentData['customFields']) && count($contentData['customFields'])):
+        ?> <div class=""> <?php
+        for ($i = 0; $i < count($contentData['customFields']); $i++):
+            $item = $contentData['customFields'][$i];
+            if($item['value']): ?>
+                <div>
+                    <!--Custom
+                    <i class="fa fa-arrow-right text-sm text-secondary"></i>-->
+                    <span class="font-weight-bold"><?= $item['label'] ?></span>
+                    <?php if($item['comments']): ?>
+                        <span class="text-sm ml-1 text-secondary">(<?= $item['comments'] ?>)</span>
+                    <?php endif; ?>
+                </div>
+            <?php
+            endif;
+        endfor;
+        ?> </div> <?php
+    endif;
+
+    if(isset($contentData['comments']) && !empty(trim($contentData['comments']))) { ?>
+        <div class="mt-2 mb-1">
+            <b>Comments: </b><?= $contentData['comments'] ?>
+        </div>
+    <?php }
+}
+else {
+    echo '<span class="text-secondary">-</span>';
+}
+?>
+
+        </div>
+    </div>
+
+@endif

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/medication/plan.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 58 - 0
resources/views/app/patient/module-specific-summary-renderers/medication/subjective.blade.php

@@ -0,0 +1,58 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/medications-center/{{$note->client->uid}}/{{$note->uid}}"
+           mc-initer="medications-center-{{$note->id}}"
+           title="Medications Center"
+           popup-style="overflow-visible">
+            Medications
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                <?php $rel = $point->relevanceToNote($note); ?>
+                <tr>
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
+                        @if($rel)
+                            {{ $j }}.*
+                        @else
+                            {{ $j }}.
+                        @endif
+                    </td>
+                    <td class="px-2 width-300px">
+                        <div class=" <?= $point->is_removed ? 'strike-through' : '' ?>">
+                            <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
+                        </div>
+                    </td>
+                    <td class="width-300px">
+                        <div class="d-flex align-items-baseline pl-2">
+                            <?php $review = $point->childReviewAddedInNote($note); ?>
+                            <?php if(!!$review): ?>
+                            <span class="pr-2">{!! $review->data->value !!}</span>
+                            <?php endif; ?>
+                            <span>
+                                <?php if ($point->is_removed): ?>
+                                @if($point->removal_reason_category === 'DURING_VISIT')
+                                    <span class="text-sm text-secondary">Removed during visit</span>
+                                @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                    <span class="text-sm text-secondary">Removed on intake</span>
+                                @endif
+                                <?php elseif ($point->added_in_note_id === $note->id): ?>
+                                <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                                <span class="text-sm text-success">* Prescribed during visit</span>
+                                <?php else: ?>
+                                <span class="text-sm text-info">* Prescribed on intake</span>
+                                <?php endif;?>
+                                <?php endif; ?>
+                            </span>
+                        </div>
+                    </td>
+                    <td></td>
+                </tr>
+                <?php endforeach; ?>
+            </table>
+
+        </div>
+    </div>
+@endif

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/nutrition/plan.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/nutrition/subjective.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 147 - 0
resources/views/app/patient/module-specific-summary-renderers/past_medical_history/subjective.blade.php

@@ -0,0 +1,147 @@
+<?php
+
+use App\Models\Client;
+use App\Models\Point;
+use App\Models\Note;
+use App\Models\Segment;
+/** @var Client $patient */
+/** @var Note $note */
+/** @var Segment $segment */
+
+?>
+
+@if($points && count($points))
+
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/note-segment-view-by-name/{{$note->uid}}/past_medical_history/edit",
+           mc-initer="edit-univ_history_past_medical-container-{{$note->id}}"
+           title="Past Medical History"
+           popup-style="overflow-visible">
+            PMHx
+        </a>
+        <div class="flex-grow-1">
+
+<?php
+
+$point = $points[0];
+
+if(!@$note) {
+    $note = $patient->coreNote;
+}
+
+$fields = [
+    [
+        "Head" => ["Trauma"],
+        "Eyes" => ["Blindness", "Cataracts", "Glaucoma", "Wears glasses/contacts"],
+        "Ears" => ["Hearing aids"],
+        "Nose/Sinuses" => ["Allergic Rhinitis", "Sinus infections"],
+        "Mouth/Throat/Teeth" => ["Dentures"],
+        "Cardiovascular" => ["Aneurysm", "Angina", "DVT", "Dysrhythmia", "HTN", "Murmur", "Myocardial infarction", "Other heart disease"],
+    ],
+    [
+        "Respiratory" => ["Asthma", "Bronchitis", "COPD - Bronchitis/Emphysema", "Pleuritis", "Pneumonia"],
+        "Gastrointestinal" => ["Cirrhosis", "GERD", "Gallbladder disease", "Heartburn", "Hemorrhoids", "Hepatitis", "Hiatal hernia", "Jaundice", "Ulcer"],
+        "Genitourinary" => ["Hernia", "Incontinence", "Nephrolithiasis", "Other kidney disease", "STDs", "UTI(s)"],
+    ],
+    [
+        "Musculoskeletal" => ["Arthritis", "Gout", "M/S injury"],
+        "Skin" => ["Dermatitis", "Mole(s)", "Other skin condition(s)", "Psoriasis"],
+        "Neurological" => ["Epilepsy", "Seizures", "Severe headaches, migraines", "Stroke", "TIA"],
+        "Psychiatric" => ["Bipolar disorder", "Depression", "Hallucinations, delusions", "Suicidal ideation", "Suicide attempts"],
+    ],
+    [
+        "Endocrine" => ["Goiter", "Hyperlipidemia", "Hypothyroidism", "Thyroid disease", "Thyroiditis", "Type I DM", "Type II DM"],
+        "Heme/Onc" => ["Anemia", "Cancer"],
+        "Infectious" => ["HIV", "STDs", "Tuberculosis (dz)", "Tuberculosis (exposure)"],
+    ]
+];
+
+$contentData = [
+    "bloodType" => "",
+    "bloodRH" => "",
+    "common" => [],
+    "customFields" => [],
+    "comments" => "",
+];
+$isempty = false;
+
+$contentData = $parsed = false;
+
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $parsed = $point->lastChildReview->data;
+}
+
+if ($contentData) {
+
+    $blood = [];
+    if(isset($contentData['bloodType'])) {
+        $blood[] = $contentData['bloodType'];
+    }
+    if(isset($contentData['bloodRH'])) {
+        $blood[] = $contentData['bloodRH'];
+    }
+    $blood = implode(" ", $blood);
+    if(!empty(trim($blood))) { ?>
+        <div class="mb-2">
+            <div>Blood Type &amp; RH: <b><?= $blood ?></b></div>
+        </div>
+    <?php }
+
+    for ($i = 0; $i < count($fields); $i++):
+        foreach($fields[$i] as $head => $values):
+            for($k = 0; $k < count($values); $k++):
+                $fName = $head . '_' . sanitize_field_name($values[$k]);
+                if(@$contentData['common'][$fName]): ?>
+                    <div>
+                        <?= ucwords($head) ?>
+                        <i class="fa fa-arrow-right text-sm text-secondary"></i>
+                        <span class="font-weight-bold"><?= $values[$k] ?></span>
+                        <?php if(@$contentData['common'][$fName . '__comments']): ?>
+                            <span class="text-sm ml-1 text-secondary">(<?= $contentData['common'][$fName . '__comments'] ?>)</span>
+                        <?php endif; ?>
+                    </div>
+                <?php
+                endif;
+            endfor;
+        endforeach;
+    endfor;
+
+    // custom fields
+
+    if(isset($contentData['customFields']) && count($contentData['customFields'])):
+        ?> <div class=""> <?php
+        for ($i = 0; $i < count($contentData['customFields']); $i++):
+            $item = $contentData['customFields'][$i];
+            if($item['value']): ?>
+                <div>
+                    Custom
+                    <i class="fa fa-arrow-right text-sm text-secondary"></i>
+                    <span class="font-weight-bold"><?= $item['label'] ?></span>
+                    <?php if($item['comments']): ?>
+                        <span class="text-sm ml-1 text-secondary">(<?= $item['comments'] ?>)</span>
+                    <?php endif; ?>
+                </div>
+            <?php
+            endif;
+        endfor;
+        ?> </div> <?php
+    endif;
+
+    if(isset($contentData['comments']) && !empty(trim($contentData['comments']))) { ?>
+        <div class="mt-2 mb-1">
+            <b>Comments: </b><?= $contentData['comments'] ?>
+        </div>
+    <?php }
+
+} else {
+    echo '<div class="text-secondary">-</div>';
+}
+?>
+
+        </div>
+    </div>
+
+@endif

+ 1 - 1
resources/views/app/patient/module-specific-summary-renderers/problem/plan.blade.php

@@ -13,7 +13,7 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <?php $rel = $point->relevanceToNote($note); ?>
                 <tr>
                 <tr>
-                    <td class="width-40px px-2 {{ $rel ? ' text-info':'' }}">
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
                         @if($rel)
                         @if($rel)
                             {{ $j }}.*
                             {{ $j }}.*
                         @else
                         @else

+ 58 - 0
resources/views/app/patient/module-specific-summary-renderers/problem/subjective.blade.php

@@ -0,0 +1,58 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/problems-center/{{$note->client->uid}}/{{$note->uid}}"
+           mc-initer="problems-center-{{$note->id}}"
+           title="Problems Center"
+           popup-style="overflow-visible">
+            Problems
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                <?php $rel = $point->relevanceToNote($note); ?>
+                <tr>
+                    <td class="width-40px pr-2 pl-0 {{ $rel ? ' text-info':'' }}">
+                        @if($rel)
+                            {{ $j }}.*
+                        @else
+                            {{ $j }}.
+                        @endif
+                    </td>
+                    <td class="px-2 width-300px">
+                        <div class=" <?= $point->is_removed ? 'strike-through' : '' ?>">
+                            <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
+                        </div>
+                    </td>
+                    <td class="width-300px">
+                        <div class="d-flex align-items-baseline pl-2">
+                            <?php $review = $point->childReviewAddedInNote($note); ?>
+                            <?php if(!!$review): ?>
+                            <span class="pr-2">{!! $review->data->value !!}</span>
+                            <?php endif; ?>
+                            <span>
+                                <?php if ($point->is_removed): ?>
+                                @if($point->removal_reason_category === 'DURING_VISIT')
+                                    <span class="text-sm text-secondary">Removed during visit</span>
+                                @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                    <span class="text-sm text-secondary">Removed on intake</span>
+                                @endif
+                                <?php elseif ($point->added_in_note_id === $note->id): ?>
+                                <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                                <span class="text-sm text-success">* Diagnosed during visit</span>
+                                <?php else: ?>
+                                <span class="text-sm text-info">* Diagnosed on intake</span>
+                                <?php endif;?>
+                                <?php endif; ?>
+                            </span>
+                        </div>
+                    </td>
+                    <td></td>
+                </tr>
+                <?php endforeach; ?>
+            </table>
+
+        </div>
+    </div>
+@endif

+ 286 - 0
resources/views/app/patient/module-specific-summary-renderers/ros/subjective.blade.php

@@ -0,0 +1,286 @@
+<?php
+
+use App\Models\Client;
+use App\Models\Point;
+use App\Models\Note;
+use App\Models\Segment;
+/** @var Client $patient */
+/** @var Note $note */
+/** @var Segment $segment */
+
+?>
+
+@if($points && count($points))
+
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/note-segment-view-by-name/{{$note->uid}}/omega_ros/edit",
+           mc-initer="init-ros-{{$note->id}}"
+           title="Review Of Systems"
+           popup-style="overflow-visible">
+            ROS
+        </a>
+        <div class="flex-grow-1">
+
+<?php
+
+$point = $points[0];
+
+if(!@$note) {
+    $note = $patient->coreNote;
+}
+
+$contentData = $parsed = false;
+
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $parsed = $point->lastChildReview->data;
+}
+
+$fields = [
+    [
+        "Constitutional" => [
+            "Fatigue",
+            "Fever",
+            "Weight gain",
+            "Weight loss"],
+
+        "Eyes" => [
+            "Blurry vision",
+            "Double vision",
+            "Dry eyes",
+            "Floaters",
+            "Halos",
+            "Headache",
+            "Irritation",
+            "Loss of peripheral vision",
+            "Pain",
+            "Pinpoint pupils",
+            "Teary",
+            "Visual changes"],
+
+        "ENMT" => [
+            "Altered sense of smell",
+            "Dental caries",
+            "Dentures",
+            "Dizziness",
+            "Dry mouth",
+            "Ear pain/pressure",
+            "Hearing loss",
+            "Mouth pain",
+            "Nasal congestion",
+            "Neck pain/stiffness",
+            "Post nasal drainage",
+            "Sinus pain / pressure",
+            "Sore throat",
+            "Teeth missing",
+            "Tinnitus",
+            "Trouble swallowing"],
+        "Allergy / Immune" => [
+            "Congestion",
+            "Difficulty healing",
+            "Frequent infections",
+            "Headache",
+            "Hives",
+            "Itching",
+            "Running nose",
+            "Sneezing",
+            "Watery eyes"]
+    ],
+    [
+        "Cardiovascular" => [
+            "Chest pain / pressure at rest",
+            "Chest pain / pressure with excursion",
+            "Cold hands / feet",
+            "Dizziness",
+            "Exercise intolerance",
+            "Fainting",
+            "Feeling faint",
+            "Left arm pain",
+            "Light headed",
+            "Lower leg cramps",
+            "Muscle weakness",
+            "Palpitations",
+            "Shortness of breath",
+            "Sweating",
+            "Swelling"],
+
+        "Respiratory" => [
+            "Cough – dry",
+            "Cough – wet",
+            "Coughing up blood",
+            "Pain with breathing",
+            "Productive cough",
+            "Shortness of breath at rest",
+            "Shortness of breath on excursion",
+            "Wheezing"],
+
+        "Gastrointestinal" => [
+            "Abdominal pain",
+            "Constipation",
+            "Coughing up blood",
+            "Diarrhea",
+            "Difficulty swallowing",
+            "Fecal incontinence",
+            "Heartburn",
+            "Loose stool",
+            "Nausea",
+            "Painful swallowing",
+            "Rectal pain",
+            "Stool – black tarry",
+            "Stool – bloody"],
+    ],
+    [
+        "Genitourinary" => [
+            "Blood in urine",
+            "Discharge",
+            "Foley",
+            "Incontinence",
+            "Lesions",
+            "Sexual dysfunction",
+            "Tenderness",
+            "Urinary retention",
+            "Urination - frequent",
+            "Urination - painful",
+            "Urination wakes you up at night"],
+
+        "Musculoskeletal" => [
+            "Decreased range of motion",
+            "Fracture",
+            "Gait - unstable",
+            "Joint instability",
+            "Joint pain",
+            "Joint stiffness",
+            "Joint swelling",
+            "Muscle pain",
+            "Muscle weakness",
+            "Sprain"],
+
+        "Skin" => [
+            "Bruises",
+            "Color changes",
+            "Dry skin",
+            "Goosebumps",
+            "Itchy",
+            "IVDU marks",
+            "Lesions",
+            "Nodules",
+            "Rash",
+            "Scars",
+            "Swelling",
+            "Track marks",
+            "Ulcer",
+            "Wound"],
+
+    ],
+    [
+        "Neurological" => [
+            "Coordination problem",
+            "Dizziness",
+            "Double vision",
+            "Fainting",
+            "Head trauma",
+            "Headache",
+            "Imbalance",
+            "Muscle twitching",
+            "Numbness",
+            "Problems walking",
+            "Restlessness",
+            "Seizures",
+            "Speech disturbance",
+            "TBI",
+            "Tingling",
+            "Tinnitus",
+            "Tremor",
+            "Vertigo",
+            "Weakness"],
+
+        "Endocrine" => [
+            "Change in hair growth",
+            "Cold intolerance",
+            "Diabetes",
+            "Excessive hunger",
+            "Excessive thirst",
+            "Excessive urination",
+            "Exhausted",
+            "Goiter",
+            "Heat intolerance",
+            "Hot and cold flashes",
+            "Sleeplessness",
+            "Weight gain",
+            "Weight loss"],
+
+        "Lymphatic" => [
+            "Anemia",
+            "Bleeding tendency",
+            "Bruises",
+            "Lymph node pain enlargement",
+            "Pain",
+            "Swelling",
+            "Transfusions"],
+    ]
+];
+
+if ($contentData) {
+
+if(!!@$contentData['declaration']) {
+    echo '<div class="mb-1">';
+    echo '<i class="fa fa-check"></i>&nbsp;';
+    echo "Except for the systems documented in the HPI or detailed below, all other systems were reviewed and negative.";
+    echo '</div>';
+}
+
+// group by "head" and separate fields with values
+$grouped = [];
+for ($i = 0; $i < count($fields); $i++) {
+    foreach ($fields[$i] as $head => $values) {
+        for ($k = 0; $k < count($values); $k++) {
+            $fName = $head . '_' . sanitize_field_name($values[$k]);
+            if (@$contentData['common'][$fName]) {
+                if(!isset($grouped[$head])) $grouped[$head] = [];
+                $grouped[$head][] = [
+                    "label" => $values[$k],
+                    "value" => @$contentData['common'][$fName],
+                    "comments" => @$contentData['common'][$fName . '__comments']
+                ];
+            }
+        }
+    }
+}
+
+$display = [];
+foreach($grouped as $head => $items) {
+    $combined = [];
+    for ($i = 0; $i < count($items); $i++) {
+        $combined[] = $items[$i]['label'] . ' (' . $items[$i]['value'] . ')' .
+            (@$items[$i]['comments'] ? '<span class="text-secondary font-italic text-sm">&nbsp;' . @$items[$i]['comments'] . '</span>' : '');
+    }
+    $display[$head] = implode(' • ', $combined);
+}
+
+foreach($display as $head => $line) {
+?>
+<div class="">
+    <span class="font-weight-bold mr-1">{{$head}}:</span>
+    <span class="">{!! $line !!}</span>
+</div>
+<?php
+}
+?>
+@if(isset($contentData['comments']) && !empty(trim($contentData['comments'])))
+    <div class="mt-2">
+        <b>Comments: </b><?= $contentData['comments'] ?>
+    </div>
+@endif
+<?php
+} else {
+    echo '<div class="text-secondary">-</div>';
+}
+
+?>
+
+        </div>
+    </div>
+
+@endif

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

@@ -786,6 +786,11 @@
                     </div>
                     </div>
                 </div>
                 </div>
 
 
+                {{-- follow-up appt. --}}
+                <div class="p-3 screen-only border-bottom" data-non-segment-section="Follow-up Appointment">
+                    @include('app/patient/note/follow-up-appointment')
+                </div>
+
                 <span class="d-none latest-section-ts">{{ $latestSectionTS }}</span>
                 <span class="d-none latest-section-ts">{{ $latestSectionTS }}</span>
 
 
                 <!-- handouts -->
                 <!-- handouts -->
@@ -2427,13 +2432,6 @@
                     @include('app/patient/note/_cancel-signed-note')
                     @include('app/patient/note/_cancel-signed-note')
                 </div>
                 </div>
 
 
-                {{-- follow-up appt. --}}
-                <div class="screen-only">
-                    <div class="border-top p-3" data-non-segment-section="Follow-up Appointment">
-                        @include('app/patient/note/follow-up-appointment')
-                    </div>
-                </div>
-
                 @if($pro->pro_type === 'ADMIN' && $note->hcpPro)
                 @if($pro->pro_type === 'ADMIN' && $note->hcpPro)
                 <div class="screen-only">
                 <div class="screen-only">
                     <div class="border-top p3">
                     <div class="border-top p3">

+ 4 - 2
resources/views/app/patient/note/follow-up-appointment.blade.php

@@ -1,4 +1,4 @@
-<div class="{{ !@$noMinHeight ? 'min-height-300px' : ''}} fu-appt-container">
+<div class="fu-appt-container">
 
 
     @if(!is_null($note->is_follow_up_needed))
     @if(!is_null($note->is_follow_up_needed))
         <div class="mb-3 d-flex align-items-baseline">
         <div class="mb-3 d-flex align-items-baseline">
@@ -9,8 +9,10 @@
                         Follow up appointment marked as needed but <b>not booked yet!</b>
                         Follow up appointment marked as needed but <b>not booked yet!</b>
                     @else
                     @else
                         Follow up appointment on
                         Follow up appointment on
-                        <b>{{$note->followUpAppointment ? friendly_date($note->followUpAppointment->raw_date) : '-'}}</b>
+                        <b>{{$note->followUpAppointment ? friendly_date($note->followUpAppointment->raw_date) . ' ' . ($note->followUpAppointment->raw_start_time ? friendly_time($note->followUpAppointment->raw_start_time): '') : '-'}}</b>
                         <span class="text-sm">(Status: {{$note->followUpAppointment ? $note->followUpAppointment->status : '-'}})</span>
                         <span class="text-sm">(Status: {{$note->followUpAppointment ? $note->followUpAppointment->status : '-'}})</span>
+                        with
+                        <b>{{$note->followUpAppointment->pro->displayName()}}</b>
                     @endif
                     @endif
                 @else
                 @else
                     Follow up appointment not needed. Reason: <b>{{$note->follow_up_not_needed_memo}}</b>
                     Follow up appointment not needed. Reason: <b>{{$note->follow_up_not_needed_memo}}</b>

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

@@ -13,7 +13,7 @@
          @endif
          @endif
          popup-style="overflow-visible"
          popup-style="overflow-visible"
          @if($careMonth)
          @if($careMonth)
-         href="/patients/view/{{ $note->client->uid }}/care-months/view/{{$careMonth->uid}}" 
+         href="/patients/view/{{ $note->client->uid }}/care-months/view/{{$careMonth->uid}}?fromNoteUid={{$note->uid}}"
          @endif
          @endif
          >
          >
         <div class="font-weight-bold">
         <div class="font-weight-bold">

+ 4 - 2
resources/views/app/patient/note/segment-slim.blade.php

@@ -18,9 +18,11 @@ $isOmegaSystemSegment = (strpos($iName, 'omega_') === 0 && substr($iName, -7) ==
             $extraClass = $segment->heading ? 'min-width-110px' : 'min-width-140px pl-2';
             $extraClass = $segment->heading ? 'min-width-110px' : 'min-width-140px pl-2';
             ?>
             ?>
 
 
+            @if(!!$segment->display_title)
             <div class="text-dark font-weight-bold font-size-13 mr-2 {{$extraClass}}">
             <div class="text-dark font-weight-bold font-size-13 mr-2 {{$extraClass}}">
                 {{$segment->display_title}}:
                 {{$segment->display_title}}:
             </div>
             </div>
+            @endif
 
 
             <div class="flex-grow-1">
             <div class="flex-grow-1">
                 <div class="d-none if-not-edit inset-comment summary-container">
                 <div class="d-none if-not-edit inset-comment summary-container">
@@ -59,12 +61,12 @@ $isOmegaSystemSegment = (strpos($iName, 'omega_') === 0 && substr($iName, -7) ==
         {{-- if segment has log feature, link --}}
         {{-- if segment has log feature, link --}}
         @if($pro->pro_type === 'ADMIN' && file_exists(resource_path("views/app/patient/segment-templates/{$segment->segmentTemplate->internal_name}/log.blade.php")))
         @if($pro->pro_type === 'ADMIN' && file_exists(resource_path("views/app/patient/segment-templates/{$segment->segmentTemplate->internal_name}/log.blade.php")))
             <a native="" target="_blank"
             <a native="" target="_blank"
-               class="c-pointer ml-3 text-decoration-none"
+               class="c-pointer ml-2 text-decoration-none"
                open-in-stag-popup=""
                open-in-stag-popup=""
                title="{{$segment->display_title}} - Change Log"
                title="{{$segment->display_title}} - Change Log"
                popup-style="medium"
                popup-style="medium"
                href="/note-segment-view/{{$patient->uid}}/{{$note->uid}}/{{$segment->uid}}/<?= $segment->segmentTemplate->internal_name ?>/log">
                href="/note-segment-view/{{$patient->uid}}/{{$note->uid}}/{{$segment->uid}}/<?= $segment->segmentTemplate->internal_name ?>/log">
-               <i class="fas fa-history font-size-16"></i>
+               <i class="fas fa-history"></i>
             </a>
             </a>
         @endif
         @endif
 
 

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

@@ -365,8 +365,8 @@
                 debouncedSaver(this);
                 debouncedSaver(this);
             });
             });
 
 
-            $(document).off('save-trigger.auto-save-input', '.visit-segment.edit[data-segment-template-name] [visit-moe][no-auto-save] form input[type="hidden"]');
-            $(document).on('save-trigger.auto-save-input', '.visit-segment.edit[data-segment-template-name] [visit-moe][no-auto-save] form input[type="hidden"]', function () {
+            $(document).off('save-trigger.auto-save-input', '[visit-moe] form input[type="hidden"]');
+            $(document).on('save-trigger.auto-save-input', '[visit-moe] form input[type="hidden"]', function () {
                 debouncedSaver(this);
                 debouncedSaver(this);
             });
             });
         }
         }

+ 1 - 1
resources/views/app/patient/partials/company-pro-documents.blade.php

@@ -2,7 +2,7 @@
     <div class="card-header border-bottom-0 p-2">
     <div class="card-header border-bottom-0 p-2">
         <div class="d-flex align-items-center ">
         <div class="d-flex align-items-center ">
             <div class="d-flex align-items-center">
             <div class="d-flex align-items-center">
-                <h6 class="my-0 font-weight-bold">Company Documents</h6>
+                <h6 class="my-0 font-weight-bold">Practice Documents &amp; Forms</h6>
             </div>
             </div>
 
 
             <span class="mx-2 text-secondary">|</span>
             <span class="mx-2 text-secondary">|</span>

+ 22 - 8
resources/views/app/patient/prescriptions/list.blade.php

@@ -141,6 +141,7 @@
         <div v-if="currentPrescription" class="border-top border-right border-bottom align-self-stretch p-3 flex-grow-1 min-width-50">
         <div v-if="currentPrescription" class="border-top border-right border-bottom align-self-stretch p-3 flex-grow-1 min-width-50">
             <div class="d-flex align-items-center">
             <div class="d-flex align-items-center">
                 <h3 class="font-size-16 m-0 d-flex align-items-baseline">
                 <h3 class="font-size-16 m-0 d-flex align-items-baseline">
+                    <i v-if="currentPrescription.has_hcp_pro_signed" title="Signed" class="fa fa-check text-success mr-2"></i>
                     <b class="mr-1 font-size-16">@{{ currentPrescription.erx_category }} ERx <span class="ml-2">@{{ currentPrescription.created_at_friendly }}</span></b>
                     <b class="mr-1 font-size-16">@{{ currentPrescription.erx_category }} ERx <span class="ml-2">@{{ currentPrescription.created_at_friendly }}</span></b>
                     @if(@$note)
                     @if(@$note)
                         <div v-if="currentPrescription.note_id === {{$note->id}}" class="text-info mt-1 font-weight-bold text-nowrap ml-2">* From this note</div>
                         <div v-if="currentPrescription.note_id === {{$note->id}}" class="text-info mt-1 font-weight-bold text-nowrap ml-2">* From this note</div>
@@ -364,7 +365,7 @@
                     <div>@{{currentPrescription.hcpProDisplayName}}</div>
                     <div>@{{currentPrescription.hcpProDisplayName}}</div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="pb-2 d-flex align-items-center">
+            <!--<div class="pb-2 d-flex align-items-center">
                 <span class="min-width-140px text-secondary text-sm">Sign</span>
                 <span class="min-width-140px text-secondary text-sm">Sign</span>
                 <div v-if="currentPrescription.has_hcp_pro_signed" class="d-inline-flex align-items-baseline">
                 <div v-if="currentPrescription.has_hcp_pro_signed" class="d-inline-flex align-items-baseline">
                     <i class="text-secondary fa fa-check mr-1"></i>
                     <i class="text-secondary fa fa-check mr-1"></i>
@@ -376,7 +377,7 @@
                        v-on:click.prevent="signAsHcpPro(currentPrescription)">Sign</a>
                        v-on:click.prevent="signAsHcpPro(currentPrescription)">Sign</a>
                     <span v-else>-</span>
                     <span v-else>-</span>
                 </div>
                 </div>
-            </div>
+            </div>-->
             <div class="pb-2 d-flex align-items-center">
             <div class="pb-2 d-flex align-items-center">
                 <span class="min-width-140px text-secondary text-sm">Prescription Status</span>
                 <span class="min-width-140px text-secondary text-sm">Prescription Status</span>
                 <div class="d-inline-flex align-items-baseline">
                 <div class="d-inline-flex align-items-baseline">
@@ -410,11 +411,18 @@
                        v-on:click.prevent="transmit(currentPrescription)">Transmit</a>
                        v-on:click.prevent="transmit(currentPrescription)">Transmit</a>
                 </div>
                 </div>
             </div>
             </div>
-            <div v-if="!currentPrescription.has_hcp_pro_signed">
-                <hr class="my-2">
+            <hr class="my-2">
+            <div v-if="!currentPrescription.has_hcp_pro_signed" class="d-flex align-items-baseline">
+                <a v-if="currentPrescription.hcp_pro_id === {{$pro->id}}" href="#" class="font-weight-bold mr-3"
+                   v-on:click.prevent="signAsHcpPro(currentPrescription)">Sign</a>
                 <div v-if="currentPrescription.pro_declared_status === 'CANCELLED'" class="text-secondary font-weight-bold">CANCELLED</div>
                 <div v-if="currentPrescription.pro_declared_status === 'CANCELLED'" class="text-secondary font-weight-bold">CANCELLED</div>
                 <a v-else href="#" class="text-danger d-block" v-on:click.prevent="cancelItem()">Remove eRx</a>
                 <a v-else href="#" class="text-danger d-block" v-on:click.prevent="cancelItem()">Remove eRx</a>
             </div>
             </div>
+            <div v-else>
+                <i class="fa fa-check text-success mr-2"></i>
+                <span class="font-weight-bold text-success">Signed</span>
+            </div>
+
         </div>
         </div>
     </div>
     </div>
     @include('app.patient.prescriptions.drug-form')
     @include('app.patient.prescriptions.drug-form')
@@ -1444,7 +1452,8 @@ GROUP BY erx_category");
                         }, _data => {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                             if(!hasResponseError(_data)) {
                                 // nothing to do
                                 // nothing to do
-                                fastReload();
+                                // fastReload();
+                                hideMask();
                             }
                             }
                         }, 'json');
                         }, 'json');
                     },
                     },
@@ -1456,6 +1465,8 @@ GROUP BY erx_category");
                         this.currentPrescription = null;
                         this.currentPrescription = null;
                         this.currentPrescription = temp;
                         this.currentPrescription = temp;
 
 
+                        showMask();
+
                         // save erx
                         // save erx
                         $.post('/api/erx/updateClinicalDetail', {
                         $.post('/api/erx/updateClinicalDetail', {
                             uid: this.currentPrescription.uid,
                             uid: this.currentPrescription.uid,
@@ -1463,7 +1474,8 @@ GROUP BY erx_category");
                         }, _data => {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                             if(!hasResponseError(_data)) {
                                 // nothing to do
                                 // nothing to do
-                                fastReload();
+                                // fastReload();
+                                hideMask();
                             }
                             }
                         }, 'json');
                         }, 'json');
                     },
                     },
@@ -1552,7 +1564,7 @@ GROUP BY erx_category");
 
 
                                         $.post(form.attr('action'), form.serialize(), _data => {
                                         $.post(form.attr('action'), form.serialize(), _data => {
                                             if (!hasResponseError(_data)) {
                                             if (!hasResponseError(_data)) {
-                                                hideMask();
+
                                                 // refreshDynamicStagPopup();
                                                 // refreshDynamicStagPopup();
                                                 // $('.visit-segment[data-segment-template-name="intake_medications"]').find('.refresh-segment').trigger('click');
                                                 // $('.visit-segment[data-segment-template-name="intake_medications"]').find('.refresh-segment').trigger('click');
 
 
@@ -1577,7 +1589,9 @@ GROUP BY erx_category");
                                                 }, _data => {
                                                 }, _data => {
                                                     if(!hasResponseError(_data)) {
                                                     if(!hasResponseError(_data)) {
                                                         // nothing to do
                                                         // nothing to do
-                                                        fastReload();
+                                                        // fastReload();
+                                                        hideMask();
+                                                        form[0].reset();
                                                     }
                                                     }
                                                 }, 'json');
                                                 }, 'json');
 
 

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/behavior/CRAVINGS/last-plan.php

@@ -6,7 +6,7 @@
             <?php $plan = $parsedPlan; ?>
             <?php $plan = $parsedPlan; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $point->category . '/view-plan.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $point->category . '/view-plan.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">None</span>
     <span class="text-secondary text-sm">None</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/behavior/FOOD_TRIGGERS/last-plan.php

@@ -6,7 +6,7 @@
             <?php $plan = $parsedPlan; ?>
             <?php $plan = $parsedPlan; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $point->category . '/view-plan.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $point->category . '/view-plan.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">None</span>
     <span class="text-secondary text-sm">None</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/behavior/SELF_MONITORING/last-plan.php

@@ -6,7 +6,7 @@
             <?php $plan = $parsedPlan; ?>
             <?php $plan = $parsedPlan; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $point->category . '/view-plan.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $point->category . '/view-plan.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">None</span>
     <span class="text-secondary text-sm">None</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/behavior/SLEEP_HABITS/last-plan.php

@@ -6,7 +6,7 @@
             <?php $plan = $parsedPlan; ?>
             <?php $plan = $parsedPlan; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $point->category . '/view-plan.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $point->category . '/view-plan.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">None</span>
     <span class="text-secondary text-sm">None</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/exercise/AEROBIC_ACTIVITY/last-plan.php

@@ -6,7 +6,7 @@
             <?php $plan = $parsedPlan; ?>
             <?php $plan = $parsedPlan; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/exercise/' . $point->category . '/view-plan.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/exercise/' . $point->category . '/view-plan.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/exercise/NEAT/last-plan.php

@@ -6,7 +6,7 @@
             <?php $plan = $parsedPlan; ?>
             <?php $plan = $parsedPlan; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/exercise/' . $point->category . '/view-plan.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/exercise/' . $point->category . '/view-plan.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/exercise/STRENGTH_TRAINING/last-plan.php

@@ -6,7 +6,7 @@
             <?php $plan = $parsedPlan; ?>
             <?php $plan = $parsedPlan; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/exercise/' . $point->category . '/view-plan.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_plan/exercise/' . $point->category . '/view-plan.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/last-plan.php

@@ -3,7 +3,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -34,7 +34,7 @@
                 <?php endif; ?>
                 <?php endif; ?>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/nutrition/DAILY_INTAKE_CALORIES/last-plan.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/nutrition/DAILY_INTAKE_CARBOHYDRATES/last-plan.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/nutrition/FAST_FOOD/last-plan.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/nutrition/HIGH_SUGAR_BEVERAGES/last-plan.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/nutrition/PORTION_SIZES/last-plan.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/nutrition/SNACKS/last-plan.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/nutrition/VEGETABLES/last-plan.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_plan/nutrition/WATER_INTAKE/last-plan.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="inline-html-container"><?= $parsedPlan->value ?></div>
         <div class="text-secondary text-sm"></div>
         <div class="text-secondary text-sm"></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/behavior/CRAVINGS/last-review.php

@@ -6,7 +6,7 @@
             <?php $review = $parsedReview; ?>
             <?php $review = $parsedReview; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/behavior/FOOD_TRIGGERS/last-review.php

@@ -6,7 +6,7 @@
             <?php $review = $parsedReview; ?>
             <?php $review = $parsedReview; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/behavior/SELF_MONITORING/last-review.php

@@ -6,7 +6,7 @@
             <?php $review = $parsedReview; ?>
             <?php $review = $parsedReview; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/behavior/SLEEP_HABITS/last-review.php

@@ -6,7 +6,7 @@
             <?php $review = $parsedReview; ?>
             <?php $review = $parsedReview; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/exercise/AEROBIC_ACTIVITY/last-review.php

@@ -6,7 +6,7 @@
             <?php $review = $parsedReview; ?>
             <?php $review = $parsedReview; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/exercise/NEAT/last-review.php

@@ -6,7 +6,7 @@
             <?php $review = $parsedReview; ?>
             <?php $review = $parsedReview; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/exercise/STRENGTH_TRAINING/last-review.php

@@ -6,7 +6,7 @@
             <?php $review = $parsedReview; ?>
             <?php $review = $parsedReview; ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
             <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
         </div>
         </div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -28,7 +28,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/last-review.php

@@ -2,7 +2,7 @@
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container"><?= @$parsedReview->value ?></div>
         <div class="inline-html-container"><?= @$parsedReview->value ?></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -33,7 +33,7 @@
                 <?php endif; ?>
                 <?php endif; ?>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/nutrition/DAILY_INTAKE_CALORIES/last-review.php

@@ -3,7 +3,7 @@
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -25,7 +25,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/nutrition/DAILY_INTAKE_CARBOHYDRATES/last-review.php

@@ -3,7 +3,7 @@
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -25,7 +25,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 14 - 4
resources/views/app/patient/segment-templates/_child_review/nutrition/FAST_FOOD/edit-review.php

@@ -15,8 +15,13 @@ if (@$point) {
             ->first();
             ->first();
         if($previousChildReview && $previousChildReview->data) {
         if($previousChildReview && $previousChildReview->data) {
             $parsedReview = json_decode($previousChildReview->data);
             $parsedReview = json_decode($previousChildReview->data);
-            $previousValue = '<span class="text-sm">Meals per week:</span> ' . (@($parsedReview->mealsPerWeek) ? strip_tags($parsedReview->mealsPerWeek) : '-') . '<br>' .
-                '<span class="text-sm">Self-prepared meals per week:</span> ' . (@($parsedReview->selfPrepMealsPerWeek) ? strip_tags($parsedReview->selfPrepMealsPerWeek) : '-');
+            $previousValue = '';
+            if(@($parsedReview->mealsPerWeek)) {
+                $previousValue .= '<span class="text-sm">Meals per week: ' . strip_tags($parsedReview->mealsPerWeek) . '</span>';
+            }
+            if(@($parsedReview->selfPrepMealsPerWeek)) {
+                $previousValue .= '<span class="text-sm">Self-prepared meals per week: ' . strip_tags($parsedReview->selfPrepMealsPerWeek) . '</span>';
+            }
         }
         }
     }
     }
     else {
     else {
@@ -26,8 +31,13 @@ if (@$point) {
             ->first();
             ->first();
         if($previousChildReview && $previousChildReview->data) {
         if($previousChildReview && $previousChildReview->data) {
             $parsedReview = json_decode($previousChildReview->data);
             $parsedReview = json_decode($previousChildReview->data);
-            $previousValue = '<span class="text-sm">Meals per week:</span> ' . (@($parsedReview->mealsPerWeek) ? strip_tags($parsedReview->mealsPerWeek) : '-') . '<br>' .
-                '<span class="text-sm">Self-prepared meals per week:</span> ' . (@($parsedReview->selfPrepMealsPerWeek) ? strip_tags($parsedReview->selfPrepMealsPerWeek) : '-');
+            $previousValue = '';
+            if(@($parsedReview->mealsPerWeek)) {
+                $previousValue .= '<span class="text-sm">Meals per week: ' . strip_tags($parsedReview->mealsPerWeek) . '</span>';
+            }
+            if(@($parsedReview->selfPrepMealsPerWeek)) {
+                $previousValue .= '<span class="text-sm">Self-prepared meals per week: ' . strip_tags($parsedReview->selfPrepMealsPerWeek) . '</span>';
+            }
         }
         }
     }
     }
 }
 }

+ 6 - 2
resources/views/app/patient/segment-templates/_child_review/nutrition/FAST_FOOD/last-review.php

@@ -2,9 +2,13 @@
 <?php if ($point->lastChildReview): ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <?php if(@$parsedReview->mealsPerWeek): ?>
         <div class="inline-html-container text-dark"><span class="text-sm">Meals per week:</span> <?= @$parsedReview->mealsPerWeek ? strip_tags($parsedReview->mealsPerWeek) : '' ?></div>
         <div class="inline-html-container text-dark"><span class="text-sm">Meals per week:</span> <?= @$parsedReview->mealsPerWeek ? strip_tags($parsedReview->mealsPerWeek) : '' ?></div>
+        <?php endif; ?>
+        <?php if(@$parsedReview->selfPrepMealsPerWeek): ?>
         <div class="inline-html-container text-dark"><span class="text-sm">Self-prepared meals per week:</span> <?= @$parsedReview->selfPrepMealsPerWeek ? strip_tags($parsedReview->selfPrepMealsPerWeek) : '' ?></div>
         <div class="inline-html-container text-dark"><span class="text-sm">Self-prepared meals per week:</span> <?= @$parsedReview->selfPrepMealsPerWeek ? strip_tags($parsedReview->selfPrepMealsPerWeek) : '' ?></div>
-
+        <?php endif; ?>
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +30,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/nutrition/HIGH_SUGAR_BEVERAGES/last-review.php

@@ -3,7 +3,7 @@
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -25,7 +25,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/nutrition/PORTION_SIZES/last-review.php

@@ -3,7 +3,7 @@
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -25,7 +25,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/nutrition/SNACKS/last-review.php

@@ -4,7 +4,7 @@
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container text-dark"><span class="text-sm">Unhealthy snacks:</span> <?= @$parsedReview->unhealthySnacks ? strip_tags($parsedReview->unhealthySnacks) : '' ?></div>
         <div class="inline-html-container text-dark"><span class="text-sm">Unhealthy snacks:</span> <?= @$parsedReview->unhealthySnacks ? strip_tags($parsedReview->unhealthySnacks) : '' ?></div>
         <div class="inline-html-container text-dark"><span class="text-sm">Healthy snacks:</span> <?= @$parsedReview->healthySnacks ? strip_tags($parsedReview->healthySnacks) : '' ?></div>
         <div class="inline-html-container text-dark"><span class="text-sm">Healthy snacks:</span> <?= @$parsedReview->healthySnacks ? strip_tags($parsedReview->healthySnacks) : '' ?></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -26,7 +26,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/nutrition/VEGETABLES/last-review.php

@@ -3,7 +3,7 @@
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -25,7 +25,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/nutrition/WATER_INTAKE/last-review.php

@@ -3,7 +3,7 @@
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
     <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
         <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
-
+        <span class="screen-only">
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>
             <span class="text-sm">(updated on the patient's chart)</span>
         <?php else: ?>
         <?php else: ?>
@@ -25,7 +25,7 @@
                 </div>
                 </div>
             <?php endif; ?>
             <?php endif; ?>
         <?php endif; ?>
         <?php endif; ?>
-
+        </span>
     </div>
     </div>
 <?php else: ?>
 <?php else: ?>
     <span class="text-secondary text-sm">-</span>
     <span class="text-secondary text-sm">-</span>

+ 2 - 2
resources/views/app/patient/segment-templates/_custom_items/script.blade.php

@@ -43,7 +43,7 @@ saveCustomItem: function(_label) {
                 uid: _data.data
                 uid: _data.data
             });
             });
             Vue.nextTick(() => {
             Vue.nextTick(() => {
-                $('[data-segment-template-name="<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?>"]').find('[moe][initialized]').removeAttr('initialized');
+                $('[data-segment-template-name="<?= !!@$segment && @$segment->segmentTemplate && @$segment->segmentTemplate->internal_name ? $segment->segmentTemplate->internal_name : $segmentInternalName ?>"]').find('[moe][initialized]').removeAttr('initialized');
                 initMoes();
                 initMoes();
             });
             });
         }
         }
@@ -65,7 +65,7 @@ removeCustomItem: function(_item, _index) {
         if(!hasResponseError(_data)) {
         if(!hasResponseError(_data)) {
             this.customFields.splice(_index, 1);
             this.customFields.splice(_index, 1);
             Vue.nextTick(() => {
             Vue.nextTick(() => {
-                $('[data-segment-template-name="<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?>"]').find('textarea').first().trigger('input')
+                $('[data-segment-template-name="<?= !!@$segment && @$segment->segmentTemplate && @$segment->segmentTemplate->internal_name ? $segment->segmentTemplate->internal_name : $segmentInternalName ?>"]').find('textarea').first().trigger('input')
             });
             });
         }
         }
     });
     });

+ 6 - 3
resources/views/app/patient/segment-templates/history_family/edit.blade.php

@@ -337,7 +337,7 @@ if(!$contentData) {
 <script>
 <script>
     (function() {
     (function() {
 
 
-        window.segmentInitializers.<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?> = function() {
+        function init() {
 
 
             new Vue({
             new Vue({
                 el: '#edit-univ_history_family-container',
                 el: '#edit-univ_history_family-container',
@@ -350,7 +350,7 @@ if(!$contentData) {
                     $data: {
                     $data: {
                         handler: function(val, oldVal) {
                         handler: function(val, oldVal) {
                             let parent = $('#edit-univ_history_family-container').closest('form');
                             let parent = $('#edit-univ_history_family-container').closest('form');
-                            parent.find('[name="data"]').val(JSON.stringify(this.$data));
+                            parent.find('[name="data"]').val(JSON.stringify(this.$data)).trigger('save-trigger');
                         },
                         },
                         deep: true
                         deep: true
                     }
                     }
@@ -420,7 +420,10 @@ if(!$contentData) {
                 }
                 }
             });
             });
 
 
-        };
+        }
+
+        window.segmentInitializers.history_family = init;
+        addMCInitializer('edit-univ_history_family-container-{{$note->id}}', init, '#edit-univ_history_family-container');
 
 
     }).call(window);
     }).call(window);
 </script>
 </script>

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

@@ -156,7 +156,7 @@ for ($i = 0; $i < count($fields); $i++) {
 <script>
 <script>
     (function() {
     (function() {
 
 
-        window.segmentInitializers.<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?> = function() {
+        function init() {
 
 
             let model = <?= $contentData ? json_encode($contentData) : '{}' ?>;
             let model = <?= $contentData ? json_encode($contentData) : '{}' ?>;
             model.newCustomItemLabel = '';
             model.newCustomItemLabel = '';
@@ -223,7 +223,7 @@ for ($i = 0; $i < count($fields); $i++) {
                     $data: {
                     $data: {
                         handler: function(val, oldVal) {
                         handler: function(val, oldVal) {
                             let parent = $('#edit-univ_history_social-container').closest('form');
                             let parent = $('#edit-univ_history_social-container').closest('form');
-                            parent.find('[name="data"]').val(JSON.stringify(this.$data));
+                            parent.find('[name="data"]').val(JSON.stringify(this.$data)).trigger('save-trigger');
                         },
                         },
                         deep: true
                         deep: true
                     }
                     }
@@ -233,7 +233,10 @@ for ($i = 0; $i < count($fields); $i++) {
                 }
                 }
             });
             });
 
 
-        };
+        }
+
+        window.segmentInitializers.history_social = init;
+        addMCInitializer('edit-univ_history_social-container-{{$note->id}}', init, '#edit-univ_history_social-container');
 
 
     }).call(window);
     }).call(window);
 </script>
 </script>

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

@@ -157,7 +157,7 @@ for ($i = 0; $i < count($fields); $i++) {
 <script>
 <script>
     (function() {
     (function() {
 
 
-        window.segmentInitializers.<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?> = function() {
+        function init() {
 
 
             let model = <?= $contentData ? json_encode($contentData) : '{}' ?>;
             let model = <?= $contentData ? json_encode($contentData) : '{}' ?>;
             model.newCustomItemLabel = '';
             model.newCustomItemLabel = '';
@@ -224,7 +224,7 @@ for ($i = 0; $i < count($fields); $i++) {
                     $data: {
                     $data: {
                         handler: function(val, oldVal) {
                         handler: function(val, oldVal) {
                             let parent = $('#edit-univ_history_surgical-container').closest('form');
                             let parent = $('#edit-univ_history_surgical-container').closest('form');
-                            parent.find('[name="data"]').val(JSON.stringify(this.$data));
+                            parent.find('[name="data"]').val(JSON.stringify(this.$data)).trigger('save-trigger');
                         },
                         },
                         deep: true
                         deep: true
                     }
                     }
@@ -234,7 +234,10 @@ for ($i = 0; $i < count($fields); $i++) {
                 }
                 }
             });
             });
 
 
-        };
+        }
+
+        window.segmentInitializers.history_surgical = init;
+        addMCInitializer('edit-univ_history_surgical-container-{{$note->id}}', init, '#edit-univ_history_surgical-container');
 
 
     }).call(window);
     }).call(window);
 </script>
 </script>

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

@@ -5,6 +5,10 @@ use App\Models\Point;
 /** @var \App\Models\Client $patient */
 /** @var \App\Models\Client $patient */
 /** @var \App\Models\Note $note */
 /** @var \App\Models\Note $note */
 
 
+?>
+<div class="system_segment">
+<?php
+
 $allPoints = Point::getPlanPoints($patient, $note);
 $allPoints = Point::getPlanPoints($patient, $note);
 
 
 // allergies/meds/problems/goals/careteam
 // allergies/meds/problems/goals/careteam
@@ -64,4 +68,6 @@ foreach ($pointMap as $renderer => $points) {
 @include('app.patient.module-specific-summary-renderers.' . $renderer . '.plan', compact('points'))
 @include('app.patient.module-specific-summary-renderers.' . $renderer . '.plan', compact('points'))
 <?php
 <?php
 }
 }
+?>
+</div>
 
 

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

@@ -405,7 +405,7 @@ for ($i = 0; $i < count($fields); $i++) {
 
 
         }
         }
 
 
-        // window.segmentInitializers.<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?> = initROS;
+        window.segmentInitializers.omega_ros = initROS;
 
 
         addMCInitializer('init-ros-{{$note->id}}', initROS, '#edit-ros-container');
         addMCInitializer('init-ros-{{$note->id}}', initROS, '#edit-ros-container');
 
 

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

@@ -5,7 +5,145 @@ use App\Models\Point;
 /** @var \App\Models\Client $patient */
 /** @var \App\Models\Client $patient */
 /** @var \App\Models\Note $note */
 /** @var \App\Models\Note $note */
 
 
-$points = Point::getIntakePointsWithChildReview($patient, $note);
+$wizardLinks = [
+    [
+        "name" => 'Allergies',
+        "href" => "/allergies-center/{$note->client->uid}/{$note->uid}",
+        "initer" => "allergies-center-{$note->id}"
+    ],
+    [
+        "name" => 'Medications',
+        "href" => "/medications-center/{$note->client->uid}/{$note->uid}",
+        "initer" => "medications-center-{$note->id}"
+    ],
+    [
+        "name" => 'Problems',
+        "href" => "/problems-center/{$note->client->uid}/{$note->uid}",
+        "initer" => "problems-center-{$note->id}"
+    ],
+    [
+        "name" => 'Goals',
+        "href" => "/goals-center/{$note->client->uid}/{$note->uid}",
+        "initer" => "goals-center-{$note->id}"
+    ],
+    [
+        "name" => 'Care Team',
+        "href" => "/careteam-center/{$note->client->uid}/{$note->uid}",
+        "initer" => "careteam-center-{$note->id}"
+    ],
+    [
+        "name" => 'PMHx',
+        "title" => 'Past Medical History',
+        "href" => "/note-segment-view-by-name/{$note->uid}/past_medical_history/edit",
+        "initer" => "edit-univ_history_past_medical-container-{$note->id}"
+    ],
+    [
+        "name" => 'FHx',
+        "title" => 'Family History',
+        "href" => "/note-segment-view-by-name/{$note->uid}/history_family/edit",
+        "initer" => "edit-univ_history_family-container-{$note->id}"
+    ],
+    [
+        "name" => 'Soc Hx',
+        "title" => 'Social History',
+        "href" => "/note-segment-view-by-name/{$note->uid}/history_social/edit",
+        "initer" => "edit-univ_history_social-container-{$note->id}"
+    ],
+    [
+        "name" => 'Surg Hx',
+        "title" => 'Surgical History',
+        "href" => "/note-segment-view-by-name/{$note->uid}/history_surgical/edit",
+        "initer" => "edit-univ_history_surgical-container-{$note->id}"
+    ],
+    [
+        "name" => 'ROS',
+        "title" => 'Review Of Systems',
+        "href" => "/note-segment-view-by-name/{$note->uid}/omega_ros/edit",
+        "initer" => "init-ros-{$note->id}"
+    ],
+];
+
+?>
+
+<div class="mb-2">
+    @foreach($wizardLinks as $link)
+        @if(@$link['name'])
+            <a href="{{$link['href']}}"
+               open-in-stag-popup
+               popup-style="overflow-visible {{@$link['style']}}"
+               title="{!! @$link['title'] ?: $link['name'] !!}"
+               mc-initer="{{ @$link['initer']  }}"
+               class="mr-2 d-inline-block text-nowrap font-underline">{!! $link['name'] !!}</a>
+        @endif
+    @endforeach
+</div>
+
+<div class="system_segment">
+<?php
+
+$inPoints = Point::getPointsOfCategory($patient, 'ALLERGY');
+if(count($inPoints)) {
+?>
+    @include('app.patient.module-specific-summary-renderers.allergy.subjective', ['points' => $inPoints])
+<?php
+}
+
+$inPoints = Point::getPointsOfCategory($patient, 'MEDICATION');
+if(count($inPoints)) {
+?>
+    @include('app.patient.module-specific-summary-renderers.medication.subjective', ['points' => $inPoints])
+<?php
+}
+
+$inPoints = Point::getIntakePointsWithChildReview($patient, $note);
+
+// allergies/meds/problems/goals/careteam
+$topLevelPointToRendererMap = [
+    'ALLERGY' => 'allergy',
+    'MEDICATION' => 'medication',
+    'PROBLEM' => 'problem',
+    'GOAL' => 'goal',
+    'CARE_TEAM_MEMBER' => 'care_team_member'
+];
+
+$pointMap = [];
+
+foreach($inPoints as $point){
+    if(!isset($topLevelPointToRendererMap[$point->category])) continue;
+    $renderer = $topLevelPointToRendererMap[$point->category];
+    if(!isset($pointMap[$renderer])) $pointMap[$renderer] = [];
+    $pointMap[$renderer][] = $point;
+}
+
+foreach ($pointMap as $renderer => $points) {
+?>
+@include('app.patient.module-specific-summary-renderers.' . $renderer . '.subjective', compact('points'))
+<?php
+}
+
+// history, ros
+$topLevelPointToRendererMap = [
+    'PAST_MEDICAL_HISTORY' => 'past_medical_history',
+    'FAMILY_HISTORY' => 'history_family',
+    'SOCIAL_HISTORY' => 'history_social',
+    'SURGICAL_HISTORY' => 'history_surgical',
+    'ROS' => 'ros',
+];
+
+$pointMap = [];
+
+foreach($inPoints as $point){
+    if(!isset($topLevelPointToRendererMap[$point->category])) continue;
+    $renderer = $topLevelPointToRendererMap[$point->category];
+    if(!isset($pointMap[$renderer])) $pointMap[$renderer] = [];
+    $pointMap[$renderer][] = $point;
+}
+
+foreach ($pointMap as $renderer => $points) {
+?>
+@include('app.patient.module-specific-summary-renderers.' . $renderer . '.subjective', compact('points'))
+<?php
+}
 
 
 $topLevelPointToRendererMap = [
 $topLevelPointToRendererMap = [
     'HIGH_SUGAR_BEVERAGES' => 'nutrition',
     'HIGH_SUGAR_BEVERAGES' => 'nutrition',
@@ -36,7 +174,7 @@ $topLevelPointToRendererMap = [
 
 
 $pointMap = [];
 $pointMap = [];
 
 
-foreach($points as $point){
+foreach($inPoints as $point){
     if(!isset($topLevelPointToRendererMap[$point->category])) continue;
     if(!isset($topLevelPointToRendererMap[$point->category])) continue;
     $renderer = $topLevelPointToRendererMap[$point->category];
     $renderer = $topLevelPointToRendererMap[$point->category];
     if(!isset($pointMap[$renderer])) $pointMap[$renderer] = [];
     if(!isset($pointMap[$renderer])) $pointMap[$renderer] = [];
@@ -48,4 +186,6 @@ foreach ($pointMap as $renderer => $points) {
     @include('app.patient.module-specific-summary-renderers.' . $renderer . '.subjective', compact('points'))
     @include('app.patient.module-specific-summary-renderers.' . $renderer . '.subjective', compact('points'))
 <?php
 <?php
 }
 }
+?>
+</div>
 
 

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

@@ -196,7 +196,7 @@ for ($i = 0; $i < count($fields); $i++) {
 <script>
 <script>
     (function() {
     (function() {
 
 
-        window.segmentInitializers.<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?> = function() {
+        function init() {
 
 
             let model = <?= $contentData ? json_encode($contentData) : '{}' ?>;
             let model = <?= $contentData ? json_encode($contentData) : '{}' ?>;
             model.newCustomItemLabel = '';
             model.newCustomItemLabel = '';
@@ -263,7 +263,7 @@ for ($i = 0; $i < count($fields); $i++) {
                     $data: {
                     $data: {
                         handler: function(val, oldVal) {
                         handler: function(val, oldVal) {
                             let parent = $('#edit-univ_history_past_medical-container').closest('form');
                             let parent = $('#edit-univ_history_past_medical-container').closest('form');
-                            parent.find('[name="data"]').val(JSON.stringify(this.$data));
+                            parent.find('[name="data"]').val(JSON.stringify(this.$data)).trigger('save-trigger');
                         },
                         },
                         deep: true
                         deep: true
                     }
                     }
@@ -273,9 +273,12 @@ for ($i = 0; $i < count($fields); $i++) {
                 }
                 }
             });
             });
 
 
-            window.segmentInitializers.<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?> = function() {};
+            window.segmentInitializers.past_medical_history = function() {};
 
 
-        };
+        }
+
+        window.segmentInitializers.past_medical_history = init;
+        addMCInitializer('edit-univ_history_past_medical-container-{{$note->id}}', init, '#edit-univ_history_past_medical-container');
 
 
     }).call(window);
     }).call(window);
 </script>
 </script>

+ 3 - 0
resources/views/app/patient/wizard-partials/common-script.blade.php

@@ -327,6 +327,7 @@ parentSegment.find('#frm-add-{{$label}}')
                 $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
+                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
                 if(typeof refreshRHSSidebar !== 'undefined') refreshRHSSidebar();
                 if(typeof refreshRHSSidebar !== 'undefined') refreshRHSSidebar();
 
 
@@ -457,6 +458,7 @@ parentSegment.find('.frm-edit-{{$label}}')
                 $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
+                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
                 if(typeof refreshRHSSidebar !== 'undefined') refreshRHSSidebar();
                 if(typeof refreshRHSSidebar !== 'undefined') refreshRHSSidebar();
             }
             }
@@ -479,6 +481,7 @@ parentSegment.find('.frm-upsert-review-plan-{{$label}}')
                 $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
+                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
                 $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
                 refreshDynamicStagPopup();
                 refreshDynamicStagPopup();
             }
             }

+ 1 - 1
resources/views/app/patient/wizard-partials/show-plan.blade.php

@@ -4,7 +4,7 @@
         <div class="inline-html-container <?= $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container <?= $point->last_child_plan_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
             <?= @$parsedPlan->value ?>
             <?= @$parsedPlan->value ?>
         </div>
         </div>
-        <div class="d-flex align-items-baseline pt-1 border-top mt-1 mb-2">
+        <div class="screen-only d-flex align-items-baseline pt-1 border-top mt-1 mb-2">
             @if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id)
             @if ($point->last_child_plan_point_scoped_note_id === $patient->core_note_id)
                 <span class="text-sm">(updated on the patient's chart)</span>
                 <span class="text-sm">(updated on the patient's chart)</span>
             @else
             @else

+ 47 - 0
resources/views/document-templates-generic/client_authorization_letter/content.blade.php

@@ -0,0 +1,47 @@
+<div style="padding:15px 15px;font-family:sans-serif;font-size:15px;text-align:justify;">
+    <h2 style="margin-bottom:2px;">
+        <strong>
+        <center><u>AUTHORIZATION LETTER</u></center>
+        </strong>
+    </h2>
+    <br>
+    <br>
+    <p style="line-height:25px;">To whom it may concern:</p>
+    <br>
+    <p style="line-height:25px;">I, {Your Name}, a healthcare professional with NPI number {@NPI Number}, authorize Shalin Shah of
+        {@Practice Name} and/or his/her successor (“Authorized Person”) to sign and act on my behalf and take
+        all related actions to:</p>
+
+    <ol>
+        <li style="margin-bottom:10px;line-height:25px;">Filing and signing credentialing and enrollment applications with healthcare insurance carriers including Medicare, Medicaid, and commercial payors.</li>
+        <li style="margin-bottom:10px;line-height:25px;">Negotiating and signing contracts with health insurance companies</li>
+        <li style="margin-bottom:10px;line-height:25px;">CAQH maintenance and attestations</li>
+        <li style="margin-bottom:10px;line-height:25px;">Contacting licensing boards on my behalf for licensing matters</li>
+        <li style="margin-bottom:10px;line-height:25px;">NPPES maintenance</li>
+        <li style="margin-bottom:10px;line-height:25px;">Creating and managing health insurance portals for credentialing, enrollments, and billing matters.</li>
+    </ol>
+
+    <p style="line-height:25px;">I hereby authorize Authorized Person to sign on my behalf using digital signature, signature stamp, or similar mechanical/electronic signature for these enumerated purposes.
+        This authorization will remain in effect for the duration of my engagement with {@Practice Name} as a healthcare
+        provider/practitioner. </p>
+
+    <p style="line-height:25px;">In order for {@Practice Name} to access and verify my educational background, professional qualifications and
+        suitability for appointment, I also hereby authorize Authorized Person to make inquiries and consult with all
+        persons, places of employment, education, malpractice carriers, state licensing boards, or other similar
+        government and non-governmental entities who have or may have information bearing on my moral, ethical and
+        professional qualifications and competence to carry out the privileges I have requested.</p>
+
+    <p style="line-height:25px;">In case of any questions related to this Authorization Letter, feel free to contact me at <span style="padding-left:5px;">{Your Phone Number}</span> or
+        email me at {Your Email Address}.</p>
+
+    <br>
+
+    <p>Sincerely,</p>
+    <br>
+    <p style="padding-left: 4px"><img src="{company_pro_document.pro_signatures}" style="max-height: 60px"></p>
+    <p>
+        {Your Name} <br> <br>
+        {Your Mailing Address} <br> <br>
+        Date: {company_pro_document.pro_signed_at}
+    </p>
+</div>

+ 4 - 0
resources/views/document-templates-generic/client_authorization_letter/spec.json

@@ -0,0 +1,4 @@
+{
+  "title": "Client Authorization Letter",
+  "active": true
+}