Explorar el Código

Merge branch 'cleanup' into cleanup-email-itengration

Samson Mutunga hace 1 año
padre
commit
c770c1c03a
Se han modificado 56 ficheros con 442 adiciones y 249 borrados
  1. 8 1
      .env.example
  2. 37 13
      app/Http/Controllers/AdminController.php
  3. 6 0
      config/app.php
  4. 11 2
      config/stag.php
  5. 4 1
      js-dev/mc.js
  6. 4 0
      public/unpoly/unpoly.min.css
  7. 0 0
      public/unpoly/unpoly.min.js
  8. 67 55
      resources/views/app/admin/points/filters.blade.php
  9. 2 2
      resources/views/app/admin/points/index.blade.php
  10. 23 28
      resources/views/app/admin/points/record-details.blade.php
  11. 25 7
      resources/views/app/admin/points/table.blade.php
  12. 1 1
      resources/views/app/patient/module-specific-summary-renderers/allergy/subjective.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/subjective.blade.php
  15. 17 5
      resources/views/app/patient/module-specific-summary-renderers/data-dump.blade.php
  16. 2 2
      resources/views/app/patient/module-specific-summary-renderers/exercise/subjective.blade.php
  17. 1 1
      resources/views/app/patient/module-specific-summary-renderers/goal/subjective.blade.php
  18. 1 1
      resources/views/app/patient/module-specific-summary-renderers/history_family/subjective.blade.php
  19. 1 1
      resources/views/app/patient/module-specific-summary-renderers/history_social/subjective.blade.php
  20. 1 1
      resources/views/app/patient/module-specific-summary-renderers/history_surgical/subjective.blade.php
  21. 8 9
      resources/views/app/patient/module-specific-summary-renderers/lifestyle_general/subjective.blade.php
  22. 2 2
      resources/views/app/patient/module-specific-summary-renderers/lifestyle_nutrition/subjective.blade.php
  23. 3 3
      resources/views/app/patient/module-specific-summary-renderers/lifestyle_physical_activity/subjective.blade.php
  24. 2 2
      resources/views/app/patient/module-specific-summary-renderers/lifestyle_sleep/subjective.blade.php
  25. 2 2
      resources/views/app/patient/module-specific-summary-renderers/lifestyle_social_relationships/subjective.blade.php
  26. 2 2
      resources/views/app/patient/module-specific-summary-renderers/lifestyle_stress/subjective.blade.php
  27. 2 2
      resources/views/app/patient/module-specific-summary-renderers/lifestyle_substance_use/subjective.blade.php
  28. 1 1
      resources/views/app/patient/module-specific-summary-renderers/medication/subjective.blade.php
  29. 1 1
      resources/views/app/patient/module-specific-summary-renderers/nutrition/subjective.blade.php
  30. 1 1
      resources/views/app/patient/module-specific-summary-renderers/past_medical_history/subjective.blade.php
  31. 1 1
      resources/views/app/patient/module-specific-summary-renderers/problem/plan.blade.php
  32. 1 1
      resources/views/app/patient/module-specific-summary-renderers/problem/subjective.blade.php
  33. 1 1
      resources/views/app/patient/module-specific-summary-renderers/ros/subjective.blade.php
  34. 1 1
      resources/views/app/patient/module-specific-summary-renderers/sleep_health_intake/subjective.blade.php
  35. 1 1
      resources/views/app/patient/module-specific-summary-renderers/weight_loss_intake/plan.blade.php
  36. 1 1
      resources/views/app/patient/module-specific-summary-renderers/weight_loss_intake/subjective.blade.php
  37. 2 2
      resources/views/app/patient/modules/lifestyle_general/edit.blade.php
  38. 18 18
      resources/views/app/patient/modules/weight_loss_intake/edit.blade.php
  39. 13 14
      resources/views/app/patient/note/dashboard.blade.php
  40. 3 3
      resources/views/app/patient/note/note-segment-list-rhs.blade.php
  41. 4 4
      resources/views/app/patient/note/note-segment-list.blade.php
  42. 1 1
      resources/views/app/patient/note/segment-slim.blade.php
  43. 7 6
      resources/views/app/patient/partials/coverage-information.blade.php
  44. 8 3
      resources/views/app/patient/prescriptions/lab-form.blade.php
  45. 7 1
      resources/views/app/patient/prescriptions/list.blade.php
  46. 7 7
      resources/views/app/patient/prescriptions/pdf/DRUG.blade.php
  47. 22 20
      resources/views/app/patient/prescriptions/pdf/pdf-preview.blade.php
  48. 5 5
      resources/views/app/patient/primary-coverage-form.blade.php
  49. 8 2
      resources/views/app/patient/segment-templates/lifestyle_general/edit.blade.php
  50. 8 2
      resources/views/app/patient/segment-templates/lifestyle_general/summary.blade.php
  51. 2 2
      resources/views/app/patient/segment-templates/omega_assessment_system/summary.blade.php
  52. 2 2
      resources/views/app/patient/segment-templates/sigma_assessment_system/summary.blade.php
  53. 0 1
      resources/views/layouts/no-mc-template.blade.php
  54. 79 0
      resources/views/layouts/template-simple.blade.php
  55. 1 1
      resources/views/layouts/template.blade.php
  56. 2 1
      routes/web.php

+ 8 - 1
.env.example

@@ -65,4 +65,11 @@ GOOGLE_SPREADSHEET_PRODUCTS_SHEET_NAME=records
 
 OPENTOK_API_KEY=46871644
 OPENTOK_API_SECRET=48c39d640cbcfb1032606d7c40ab5971290a5163
-OPENTOK_SESSION_ID=1_MX40Njg3MTY0NH5-MTU5NjQyMzcxMjQ4OX5PRnNIVmFDU2t2d3BnWG1YbkMvSWFRNk1-fg
+OPENTOK_SESSION_ID=1_MX40Njg3MTY0NH5-MTU5NjQyMzcxMjQ4OX5PRnNIVmFDU2t2d3BnWG1YbkMvSWFRNk1-fg
+
+DEFAULT_ERX_COMPANY_NAME='Scholar Medical Group MD LLC'
+DEFAULT_ERX_COMPANY_LINE_1='133 Rollins Ave'
+DEFAULT_ERX_COMPANY_LINE_2='Ste 3'
+DEFAULT_ERX_COMPANY_CITY='Rockville'
+DEFAULT_ERX_COMPANY_STATE='MD'
+DEFAULT_ERX_COMPANY_ZIP='20852'

+ 37 - 13
app/Http/Controllers/AdminController.php

@@ -730,34 +730,58 @@ class AdminController extends Controller
         return view('app.admin.patients_missing_default_settings', compact('patients', 'filters'));
     }
 
-    public function points(Request $request){
+    public function points(Request $request)
+    {
         $filters = $request->all();
         $points = Point::query();
-        $points = $points->where('is_removed','!=', true);
+        $points = $points->where('is_removed', '!=', true)
+            ->where('category', '!=', 'REVIEW')
+            ->where('category', '!=', 'PLAN');
 
-        if ($request->input('name')) {
-            $name = trim($request->input('name'));
-            if ($name) {
-                $points = $points->whereHas('client', function ($q) use ($name) {
-                    $q->where('name_first', 'ILIKE', '%' . $name . '%')
-                        ->orWhere('name_last', 'ILIKE', '%' . $name . '%');
-                });
-            }
-        }
+        $intentions = DB::select("SELECT intention, COUNT(intention) as count FROM point WHERE intention is not null and is_removed is not true  and category != 'REVIEW' and category != 'PLAN' GROUP BY intention ORDER BY intention ASC");
+        $categories = [];
+        $names = [];
 
         if ($request->input('mcp')) {
             $mcp = Pro::where('uid', trim($request->input('mcp')))->first();
             if ($mcp) {
-                $points = $points->where('created_by_pro_id', $mcp->id);
+              //  $points = $points->where('created_by_pro_id', $mcp->id);
             }
         }
 
+        $implodedIntentions = null;
+        if ($request->input('intentions')) {
+            $points = $points->whereIn('intention', $request->input('intentions'));
+            $implodedIntentions = join("','", $request->input('intentions'));
+            $categories = DB::select("SELECT category, COUNT(id) as count FROM point WHERE intention in ('" . $implodedIntentions . "') and is_removed is not true  and category != 'REVIEW' and category != 'PLAN' GROUP BY category ORDER BY category ASC");
+        }
+
+        if ($request->input('categories')) {
+            $points = $points->whereIn('category', $request->input('categories'));
+            $implodedCategories = join("','", $request->input('categories'));
+            $names = DB::select("select (data::json)->>'name' as name, count(id) as count from point where category in ('".$implodedCategories."') and is_removed is not true  and intention in ('".$implodedIntentions."')  and category != 'REVIEW' and category != 'PLAN' group by 1 order by 1 asc");
+        }
+
+        if ($request->input('names')){
+            $implodedNames = join("','", $request->input('names'));
+            $points = $points->whereRaw("(data::json)->>'name' in ('".$implodedNames."')");
+        }
+
         $points = $points->paginate(30);
 
         $_point = new Point;
         $tableName = $_point->getTable();
         $columns = Schema::getColumnListing($tableName);
-        return view('app.admin.points.index', compact('points', 'filters', 'columns'));
+
+
+        return view('app.admin.points.index', compact('points', 'filters', 'columns', 'intentions', 'categories', 'names'));
+    }
+
+    public function pointDetails(Request  $request, $uid){
+        $point = Point::where('uid', $uid)->first();
+        $tableName = $point->getTable();
+        $columns = Schema::getColumnListing($tableName);
+        return view('app.admin.points.record-details', compact('point', 'columns'));
     }
 
     public function messages(Request $request)

+ 6 - 0
config/app.php

@@ -85,6 +85,12 @@ return [
     'opentokApiSecret' => env('OPENTOK_API_SECRET'),
     'opentokSessionId' => env('OPENTOK_SESSION_ID'),
     'socketIoUrl' => env('SOCKET_IO_URL'),
+    'defaultErxCompanyName' => env('DEFAULT_ERX_COMPANY_NAME'),
+    'defaultErxCompanyLine_1' => env('DEFAULT_ERX_COMPANY_LINE_1'),
+    'defaultErxCompanyLine_2' => env('DEFAULT_ERX_COMPANY_LINE_2'),
+    'defaultErxCompanyCity' => env('DEFAULT_ERX_COMPANY_CITY'),
+    'defaultErxCompanyState' => env('DEFAULT_ERX_COMPANY_STATE'),
+    'defaultErxCompanyZip' => env('DEFAULT_ERX_COMPANY_ZIP'),
 
     /*
     |--------------------------------------------------------------------------

+ 11 - 2
config/stag.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 return [
     'authUrl' => env('AUTH_URL'),
@@ -72,9 +72,18 @@ return [
             'history_social/edit' => ['omega_history_social'],
             'history_surgical/edit' => ['omega_history_surgical'],
             'weight_loss_intake/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'lifestyle_general/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'lifestyle_physical_activity/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'lifestyle_sleep/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'lifestyle_social_relationships/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'lifestyle_stress/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'lifestyle_substances/edit' => ['omega_subjective_system', 'omega_plan_system'],
             'nutrition-center' => ['omega_subjective_system', 'omega_plan_system'],
             'exercise-center' => ['omega_subjective_system', 'omega_plan_system'],
             'behavior-center' => ['omega_subjective_system', 'omega_plan_system'],
+            'sleep_health_intake/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'lifestyle_social/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'lifestyle_nutrition/edit' => ['omega_subjective_system', 'omega_plan_system'],
         ],
     ]
-];
+];

+ 4 - 1
js-dev/mc.js

@@ -652,7 +652,10 @@ window.saveVisitForm = function(_trigger, _silent = false, _close = false, _done
                 '/api/visitPoint/addTopLevelBulkPreExisting'
             ];
             if(parentPopup.length && eps.indexOf(form.attr('url')) !== -1) {
+                console.log("Here 1")
                 refreshAffectedSegmentsByPopupKey(parentPopup.attr('stag-popup-key'));
+            }else{
+                console.log("Here 2")
             }
             if(typeof window.refreshRHSSidebar !== 'undefined') {
                 window.refreshRHSSidebar();
@@ -753,4 +756,4 @@ window.markEventAsConsumed = function(_e) {
     if(_e && _e.originalEvent) {
         _e.originalEvent.stagCosumed = true;
     }
-};
+};

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 4 - 0
public/unpoly/unpoly.min.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
public/unpoly/unpoly.min.js


+ 67 - 55
resources/views/app/admin/points/filters.blade.php

@@ -13,11 +13,11 @@
         flex-wrap: wrap;
     }
 
-    .filter-container>div {
+    .filter-container > div {
         width: 165px;
     }
 
-    .filter-container>div:not(:last-child) {
+    .filter-container > div:not(:last-child) {
         margin-right: 10px;
     }
 
@@ -26,70 +26,82 @@
         margin-bottom: 10px;
     }
 </style>
-<form id="admin-points-filters" method="GET" action="{{ route('admin.points') }}" class="filter-container" v-cloak>
-    <div class="sm-section">
+<form id="admin-points-filters" method="GET" action="{{ route('admin.points') }}" up-autosubmit>
+    <div class="">
+        <fieldset name="Intentions">
+            <legend>
+                Intentions
+            </legend>
+            @foreach($intentions as $intention)
+                <div class="d-inline-block">
+                    <label for="">
+                        <input type="checkbox" name="intentions[]" value="{{$intention->intention}}"
+                               @if(isset($filters['intentions']) && in_array($intention->intention, $filters['intentions'])) checked @endif>
+                        {{$intention->intention}}({{$intention->count}})
+                    </label>
+                </div>
+            @endforeach
+        </fieldset>
+    </div>
+
+    @if(isset($categories) && count($categories))
         <div class="">
-            <label>Name:</label>
-            <input name="name" class="form-control input-sm" v-model="filters.name">
+            <fieldset name="Categories">
+                <legend>
+                    Categories
+                </legend>
+                    <div class="d-inline-block">
+                        <select class="select2" name="categories[]" multiple>
+                            <option value="">--select--</option>
+                            @foreach($categories as $category)
+                                <option value="{{$category->category}}"
+                                        @if(isset($filters['categories']) && in_array($category->category, $filters['categories'])) selected @endif>
+                                    {{$category->category}}({{$category->count}})
+                                </option>
+                            @endforeach
+                        </select>
+
+                    </div>
+            </fieldset>
         </div>
-    </div>
+    @endif
+
+    @if(isset($names) && count($names))
+        <div class="">
+            <fieldset name="Names">
+                <legend>
+                    Data
+                </legend>
+
+                <div class="d-inline-block">
 
-    <div class="sm-section">
-        <div class="mcp-filter-container">
-            <label>MCP:</label>
+                    <select class="select2" name="names[]" multiple>
+                        <option value="">--select--</option>
+                        @foreach($names as $name)
+                            <option value="{{$name->name}}"
+                                    @if(isset($filters['names']) && in_array($name->name, $filters['names'])) selected @endif>
+                                {{$name->name}}({{$name->count}})
+                            </option>
+                        @endforeach
+                    </select>
+                </div>
+
+            </fieldset>
         </div>
-    </div>
+    @endif
+
 
     <div>
         <div class="">
             <label>&nbsp;</label>
             <div class=" d-flex">
-                <button type="button" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
-                <a href="#" v-on:click.prevent="fastLoad('{{route('admin.points')}}')" class="btn btn-link btn-sm text-danger">Clear</a>
+                <button class="btn btn-primary btn-sm mr-2"><i
+                        class="fas fa-filter"></i> Filter
+                </button>
+                <a href="{{ route('admin.points') }}"
+                   class="btn btn-link btn-sm text-danger">Clear</a>
             </div>
         </div>
     </div>
 </form>
 
-<?php
-$loadedFilters = @$filters;
-$allFilterKeys = [
-    'name',
-];
-for ($i = 0; $i < count($allFilterKeys); $i++) {
-    if (!isset($loadedFilters[$allFilterKeys[$i]]) || !$loadedFilters[$allFilterKeys[$i]]) {
-        $loadedFilters[$allFilterKeys[$i]] = '';
-    }
-}
-?>
-<script>
-    (function() {
-        function init() {
-            new Vue({
-                el: '#admin-points-filters',
-                delimiters: ['@{{', '}}'],
-                data: {
-                    filters: <?= json_encode($loadedFilters) ?>
-                },
-                methods: {
-                    init: function() {
-
-                    },
-                    doSubmit: function() {
-                        fastLoad("{{ route('admin.points') }}?" + $('#admin-points-filters').serialize());
-                        return false;
-                    }
-                },
-                mounted: function() {
-                    console.log(this.filters);
-                    this.init();
-                    let mcpSelect = $('<select name="mcp" class="form-control min-width-unset input-sm" provider-search data-pro-uid="{{request()->input('mcp')}}" provider-type="hcp"><option value="">--select--</option></select>').appendTo('.mcp-filter-container');
-                    initProSuggest();
-                },
-            });
-
-
-        }
-        addMCInitializer('admin-points-filters', init, '#admin-points-filters');
-    })();
-</script>

+ 2 - 2
resources/views/app/admin/points/index.blade.php

@@ -1,4 +1,4 @@
-@extends ('layouts/template')
+@extends ('layouts/template-simple')
 
 @section('content')
     <div class="p-3 mcp-theme-1" id="patients-list">
@@ -17,4 +17,4 @@
             </div>
         </div>
     </div>
-@endsection
+@endsection

+ 23 - 28
resources/views/app/admin/points/record-details.blade.php

@@ -1,29 +1,24 @@
-<div moe relative class="mt-1">
-    <a class="text-nowrap" href="" show start>View Details</a>
-    <form url="" right>
-        <div class="mb-2" style="width: 500px;">
-            <table class="table table-sm border w-100">
-                <tbody>
-                    @foreach($columns as $column)
-                    <tr>
-                        <th>{{ $column }}</th>
-                        <td class="text-wrap">
-                            @if($column === 'data')
-                            <?php 
+<div>
+    <div class="mb-2" style="width: 500px;">
+        <table class="table table-sm border w-100">
+            <tbody>
+            @foreach($columns as $column)
+                <tr>
+                    <th>{{ $column }}</th>
+                    <td class="text-wrap">
+                        @if($column === 'data')
+                                <?php
                                 $__data = json_decode($point->{$column}, true);
-                                parseRender($__data);
-                            ?>
-                            @else
-                            <?= $point->{$column} ?>
-                            @endif
-                        </td>
-                    </tr>
-                    @endforeach
-                </tbody>
-            </table>
-        </div>
-        <div>
-            <button class="btn btn-default border btn-sm" cancel>Close</button>
-        </div>
-    </form>
-</div>
+                                var_dump($__data);
+//                                parseRender($__data);
+                                ?>
+                        @else
+                                <?= $point->{$column} ?>
+                        @endif
+                    </td>
+                </tr>
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+</div>

+ 25 - 7
resources/views/app/admin/points/table.blade.php

@@ -6,11 +6,12 @@
                 <th class="border-0">Patient</th>
                 <th class="border-0">Note</th>
                 <th class="border-0">Creator Pro</th>
-                <th class="border-0">Parent Category</th>
-                <th class="border-0">Category</th>
                 <th class="border-0">Intetion</th>
+                <th class="border-0">Category</th>
                 <th class="border-0">ICD</th>
-                <th class="border-0"></th>                
+                <th class="border-0">Last Review</th>
+                <th class="border-0">Last Plan</th>
+                <th class="border-0"></th>
             </tr>
         </thead>
         <tbody>
@@ -33,12 +34,29 @@
                 <td>
                     {{ $point->creatorPro->displayName() }}
                 </td>
-                <td>{{ $point->parent_category }}</td>
-                <td>{{ $point->category }}</td>
                 <td>{{ $point->intention }}</td>
+                <td>{{ $point->category }}</td>
                 <td>{{ $point->icd }}</td>
                 <td>
-                    @include('app.admin.points.record-details')
+                    <b>{{ friendly_date_time($point->last_child_review_effective_date, false) }}</b>
+                    @if($point->last_child_review_scoped_note_uid)
+                        <a native target="_blank"
+                           href="/patients/view/{{ $point->note->client->uid }}/notes/view/{{ $point->last_child_review_point_scoped_note_uid }}">
+                            <b>View review note</b>
+                        </a>
+                    @endif
+                </td>
+                <td>
+                    <b>{{ friendly_date_time($point->last_child_plan_effective_date, false) }}</b>
+                    @if($point->last_child_plan_scoped_note_uid)
+                        <a native target="_blank"
+                           href="/patients/view/{{ $point->note->client->uid }}/notes/view/{{ $point->last_child_plan_point_scoped_note_uid }}">
+                            <b>View plan note</b>
+                        </a>
+                    @endif
+                </td>
+                <td>
+                    <a class="text-nowrap" href="{{route('admin.points.view', $point->uid)}}" up-layer="new modal right" up-target show start>View Details</a>
                 </td>
             </tr>
             @endforeach
@@ -48,4 +66,4 @@
 <div class="px-3 pt-3 d-flex align-items-center">
     {{$points->withQueryString()->links()}}
     <div class="ml-4 mb-3">Showing <b>{{$points->firstItem()}}</b> to <b>{{$points->lastItem()}}</b> (page {{$points->currentPage()}}) of <b>{{$points->total()}}</b> points</div>
-</div>
+</div>

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/allergies-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="allergies-center-{{$note->id}}"

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/behavior-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="behavior-center-{{$note->id}}"

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/careteam-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="careteam-center-{{$note->id}}"

+ 17 - 5
resources/views/app/patient/module-specific-summary-renderers/data-dump.blade.php

@@ -2,15 +2,27 @@
 if ($point->lastChildReview && $point->lastChildReview->data) {
     $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
     $contentData = $point->lastChildReview->data;
+    $y = 1;
     foreach ($contentData as $k => $v) {
         if((!!$v) && (!@$keysToSkip || !in_array($k, $keysToSkip))) {
             ?>
-            <div class="d-flex align-items-baseline">
-                <span class="text-secondary mr-2">{{sanitize_state_name($k)}}:</span>
-                <span>{{is_array($v) ? implode(", ", $v) : $v}}</span>
-            </div>
+            <tr>
+                <td class="pr-2 pl-0 width-40px">
+                  {{$y}}.
+                </td>
+                <td class="px-2 grow-till-300px">
+                    {{sanitize_state_name($k)}}
+                </td>
+                <td class="width-300px">
+                    <div class="pl-2">
+                        {{is_array($v) ? implode(", ", $v) : $v}}
+                    </div>
+                </td>
+                <td></td>
+            </tr>
             <?php
+        $y++;
         }
     }
 }
-?>
+?>

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/exercise-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="exercise-center-{{$note->id}}"
@@ -46,4 +46,4 @@
 
         </div>
     </div>
-@endif
+@endif

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/goals-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="goals-center-{{$note->id}}"

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

@@ -13,7 +13,7 @@ use App\Models\Segment;
 @if($points && count($points))
 
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/note-segment-view-by-name/{{$note->uid}}/history_family/edit",
            mc-initer="edit-univ_history_family-container-{{$note->id}}"

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

@@ -13,7 +13,7 @@ use App\Models\Segment;
 @if($points && count($points))
 
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/note-segment-view-by-name/{{$note->uid}}/history_social/edit",
            mc-initer="edit-univ_history_social-container-{{$note->id}}"

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

@@ -13,7 +13,7 @@ use App\Models\Segment;
 @if($points && count($points))
 
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/note-segment-view-by-name/{{$note->uid}}/history_surgical/edit",
            mc-initer="edit-univ_history_surgical-container-{{$note->id}}"

+ 8 - 9
resources/views/app/patient/module-specific-summary-renderers/lifestyle_general/subjective.blade.php

@@ -1,6 +1,8 @@
+
 @if($points && count($points))
+
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/module-view/{{$note->uid}}/lifestyle_general/edit"
            mc-initer="edit-univ_sub_lifestyle_general-container-{{$note->id}}"
@@ -10,14 +12,11 @@
         </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++; ?>
-                    <tr>
-                        <td>
-                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
-                        </td>
-                    </tr>
-                <?php endforeach; ?>
+                <?php for( $j = 0; $j < count($points); $j++): ?>
+                    <?php $point = $points[$j]; ?>
+                    @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                <?php endfor; ?>
             </table>
         </div>
     </div>
-@endif
+@endif

+ 2 - 2
resources/views/app/patient/module-specific-summary-renderers/lifestyle_nutrition/subjective.blade.php

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/module-view/{{$note->uid}}/lifestyle_nutrition/edit"
            mc-initer="edit-univ_sub_nutrition_assessment-container-{{$note->id}}"
@@ -20,4 +20,4 @@
             </table>
         </div>
     </div>
-@endif
+@endif

+ 3 - 3
resources/views/app/patient/module-specific-summary-renderers/lifestyle_physical_activity/subjective.blade.php

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/module-view/{{$note->uid}}/lifestyle_physical_activity/edit"
            mc-initer="edit-univ_sub_physical_activity_assessment-container-{{$note->id}}"
@@ -16,11 +16,11 @@
                 <?php $j = 0; foreach ($points as $point): $j++; ?>
                     <tr>
                         <td>
-                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                          @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
                         </td>
                     </tr>
                 <?php endforeach; ?>
             </table>
         </div>
     </div>
-@endif
+@endif

+ 2 - 2
resources/views/app/patient/module-specific-summary-renderers/lifestyle_sleep/subjective.blade.php

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/module-view/{{$note->uid}}/lifestyle_sleep/edit"
            mc-initer="edit-univ_sub_sleep_assessment-container-{{$note->id}}"
@@ -23,4 +23,4 @@
             </table>
         </div>
     </div>
-@endif
+@endif

+ 2 - 2
resources/views/app/patient/module-specific-summary-renderers/lifestyle_social_relationships/subjective.blade.php

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/module-view/{{$note->uid}}/lifestyle_social/edit"
            mc-initer="edit-univ_sub_social_relationships_assessment-container-{{$note->id}}"
@@ -23,4 +23,4 @@
             </table>
         </div>
     </div>
-@endif
+@endif

+ 2 - 2
resources/views/app/patient/module-specific-summary-renderers/lifestyle_stress/subjective.blade.php

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/module-view/{{$note->uid}}/lifestyle_stress/edit"
            mc-initer="edit-univ_sub_stress_assessment-container-{{$note->id}}"
@@ -23,4 +23,4 @@
             </table>
         </div>
     </div>
-@endif
+@endif

+ 2 - 2
resources/views/app/patient/module-specific-summary-renderers/lifestyle_substance_use/subjective.blade.php

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/module-view/{{$note->uid}}/lifestyle_substances/edit"
            mc-initer="edit-univ_sub_substance_use_assessment-container-{{$note->id}}"
@@ -23,4 +23,4 @@
             </table>
         </div>
     </div>
-@endif
+@endif

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/medications-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="medications-center-{{$note->id}}"

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/nutrition-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="nutrition-center-{{$note->id}}"

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

@@ -13,7 +13,7 @@ use App\Models\Segment;
 @if($points && count($points))
 
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            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}}"

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/problems-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="problems-center-{{$note->id}}"

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

@@ -1,6 +1,6 @@
 @if($points && count($points))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/problems-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="problems-center-{{$note->id}}"

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

@@ -13,7 +13,7 @@ use App\Models\Segment;
 @if($points && count($points))
 
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
            open-in-stag-popup
            href="/note-segment-view-by-name/{{$note->uid}}/omega_ros/edit",
            mc-initer="init-ros-{{$note->id}}"

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

@@ -25,7 +25,7 @@
     ?>
 @if($output && !!trim(strip_tags($output)))
 <div class="d-flex border-bottom">
-    <a class="mr-2 min-width-110px hide-if-note-signed"
+    <a class="mr-2 width-150px hide-if-note-signed"
       open-in-stag-popup
       href="/module-view/{{$note->uid}}/sleep_health_intake/edit"
       mc-initer="edit-sleep_health_intake-container-{{$note->id}}"

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

@@ -98,7 +98,7 @@
     ?>
     @if($output && !!trim(strip_tags($output)))
     <div class="d-flex border-bottom">
-        <a class="mr-2 min-width-110px hide-if-note-signed"
+        <a class="mr-2 width-150px hide-if-note-signed"
             open-in-stag-popup
            href="/module-view/{{$note->uid}}/weight_loss_intake/edit"
            mc-initer="edit-weight_loss_intake-container-{{$note->id}}"

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

@@ -22,7 +22,7 @@
     ?>
     @if($output && !!trim(strip_tags($output)))
         <div class="d-flex border-bottom">
-            <a class="mr-2 min-width-110px hide-if-note-signed"
+            <a class="mr-2 width-150px hide-if-note-signed"
                open-in-stag-popup
                href="/module-view/{{$note->uid}}/weight_loss_intake/edit"
                mc-initer="edit-weight_loss_intake-container-{{$note->id}}"

+ 2 - 2
resources/views/app/patient/modules/lifestyle_general/edit.blade.php

@@ -418,7 +418,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         handler: function(val, oldVal) {
                             let parent = $('#edit-univ_sub_lifestyle_general-container').closest('form');
                             parent.find('[name="data"]').val(JSON.stringify(this.data));
-
+                            console.log('Autosaving lifestyle on change');
                             // autosave on change
                             autoSaveSegment(parent.find('[submit]').first());
                         },
@@ -460,4 +460,4 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
         addMCInitializer('edit-univ_sub_lifestyle_general-container-{{$note->id}}', init, '#edit-univ_sub_lifestyle_general-container');
 
     })();
-</script>
+</script>

+ 18 - 18
resources/views/app/patient/modules/weight_loss_intake/edit.blade.php

@@ -79,7 +79,7 @@ $contentData = [
     "family_history_other" => [],
     "family_history_other_text" => "",
     "family_history_alcoholism" => "",
-    "fhdos" => "",    
+    "fhdos" => "",
     "age_periods_started" => "",
     "age_periods_ended" => "",
     "periods_frequency" => "",
@@ -322,8 +322,8 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 								<div class="form-check form-check-inline">
 									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-ornish_diet" value="ornish_diet">
 									<label class="form-check-label" for="pwl-ornish_diet">Ornish diet</label>
-								</div>							
-								
+								</div>
+
 								<div class="d-flex flex-grow-1 align-items-end">
 									<div class="form-check form-check-inline mr-3">
 										<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-other"
@@ -406,8 +406,8 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 								<div class="form-check form-check-inline">
 									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-contrave" value="contrave">
 									<label class="form-check-label" for="wlm-contrave">Contrave</label>
-								</div>				
-								
+								</div>
+
 								<div class="d-flex flex-grow-1 align-items-end">
 									<div class="form-check form-check-inline mr-3">
 										<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-other"
@@ -456,7 +456,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 									<input type="text" class="form-control inline" style="width:50px" v-model="data.breakfast_hour">
 									<label>:</label>
 								</div>
-								<div class="d-flex mr-3">									
+								<div class="d-flex mr-3">
 									<input type="text" class="form-control inline" style="width:50px" v-model="data.breakfast_min">
 									<label>a.m</label>
 								</div>
@@ -531,7 +531,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 								<div class="form-check form-check-inline">
 									<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-eating_out" value="eating_out">
 									<label class="form-check-label" for="ft-eating_out">Eating out</label>
-								</div>								
+								</div>
 								<div class="d-flex flex-grow-1 align-items-end">
 									<div class="form-check form-check-inline mr-3">
 										<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-other"
@@ -574,7 +574,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 								<div class="form-check form-check-inline">
 									<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-largr_portions" value="largr_portions">
 									<label class="form-check-label" for="fc-largr_portions">Large portions</label>
-								</div>								
+								</div>
 								<div class="d-flex flex-grow-1 align-items-end">
 									<div class="form-check form-check-inline mr-3">
 										<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-other"
@@ -613,10 +613,10 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 									<input type="text" class="form-control inline" style="width:50px" v-model="data.medical_history_mins">
 									<label>minutes</label>
 								</div>
-								<div class="d-flex mr-3 flex-grow-1">	
-									<label>Number of times per week:</label>								
+								<div class="d-flex mr-3 flex-grow-1">
+									<label>Number of times per week:</label>
 									<input type="text" class="form-control inline flex-grow-1" v-model="data.medical_history_no_of_times_per_week">
-									
+
 								</div>
 							</div>
 						</div>
@@ -629,8 +629,8 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 								<div class="d-flex mr-3">
 									<input type="text" class="form-control inline" v-model="data.sleeping_hours_per_night">
 								</div>
-								<div class="d-flex mr-3 flex-grow-1">	
-									<label>Do you feel rested in the morning?</label>								
+								<div class="d-flex mr-3 flex-grow-1">
+									<label>Do you feel rested in the morning?</label>
 									<input type="text" class="form-control inline flex-grow-1" v-model="data.feels_rested_in_morning">
 								</div>
 							</div>
@@ -825,12 +825,12 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 								<div class="form-check form-check-inline">
 									<input class="form-check-input" type="checkbox" v-model="data.women_only" id="wo-abnormal_menstruation" value="abnormal_menstruation">
 									<label class="form-check-label" for="wo-abnormal_menstruation">Abnormal/excessive menstruation</label>
-								</div>					
+								</div>
 								<div class="form-check form-check-inline">
 									<input class="form-check-input" type="checkbox" v-model="data.women_only" id="wo-facial_hair" value="facial_hair">
 									<label class="form-check-label" for="wo-facial_hair"> Facial hair</label>
-								</div>	
-								
+								</div>
+
 							</div>
 						</div>
 					</div>
@@ -889,7 +889,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         handler: function(val, oldVal) {
                             let parent = $('#edit-weight_loss_intake-container').closest('form');
                             parent.find('[name="data"]').val(JSON.stringify(this.data));
-
+                            console.log('Autosaving weightloss on change');
                             // autosave on change
                             autoSaveSegment(parent.find('[submit]').first());
                         },
@@ -924,4 +924,4 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
         addMCInitializer('edit-weight_loss_intake-container-{{$note->id}}', init, '#edit-weight_loss_intake-container');
 
     })();
-</script>
+</script>

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

@@ -145,7 +145,6 @@ use App\Models\Handout;
             @endif
         </h6>
     </div>
-
     <div class="card mb-0 {{ $note->is_cancelled ? 'cancelled-item' : '' }} border-0 rounded-0">
         <div class="card-header d-flex align-items-start px-3 py-2 border-bottom rounded-0" id="note-card-header">
             <div class="pr-3">
@@ -493,19 +492,19 @@ use App\Models\Handout;
                     "initer" => "behavior-center-{$note->id}"
                 ],
                 [], // for separator
-                [
-                    "name" => 'COVID-19 Intake',
-                    "title" => 'COVID-19 Intake',
-                    "href" => "/note-segment-view-by-name/{$note->uid}/covid_intake/edit",
-                    "initer" => "edit-module-covid-intake-{$note->id}"
-                ],
-                [
-                    "name" => 'COVID-19 Follow-up',
-                    "title" => 'COVID-19 Follow-up',
-                    "href" => "/note-segment-view-by-name/{$note->uid}/covid_follow-up/edit",
-                    "initer" => "covid-follow-up-{$note->id}"
-                ],
-                [], // for separator
+                // [
+                //     "name" => 'COVID-19 Intake',
+                //     "title" => 'COVID-19 Intake',
+                //     "href" => "/note-segment-view-by-name/{$note->uid}/covid_intake/edit",
+                //     "initer" => "edit-module-covid-intake-{$note->id}"
+                // ],
+                // [
+                //     "name" => 'COVID-19 Follow-up',
+                //     "title" => 'COVID-19 Follow-up',
+                //     "href" => "/note-segment-view-by-name/{$note->uid}/covid_follow-up/edit",
+                //     "initer" => "covid-follow-up-{$note->id}"
+                // ],
+                //[], // for separator
                 [
                     "name" => 'Lifestyle General',
                     "title" => 'Lifestyle General',

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

@@ -3,7 +3,7 @@
     $previousHeading = null;
     $previousSubHeading = null;
 
-    $suggestionModeOn = request()->get('suggestion_mode') == 'on' && $note->is_signed_by_hcp 
+    $suggestionModeOn = request()->get('suggestion_mode') == 'on' && $note->is_signed_by_hcp
 
     ?>
     @foreach($note->segmentsRight as $segment)
@@ -28,7 +28,7 @@
         <div>
 			@if($suggestionModeOn)
 				@include('app.patient.note.segment.suggestions_and_updates')
-			@else 
+			@else
 				@include('app.patient.note.segment')
 			@endif
 		</div>
@@ -39,4 +39,4 @@
     }
     ?>
 </div>
-@include('app.patient.note.segment_script-rhs')
+@include('app.patient.note.segment_script-rhs')

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

@@ -1,6 +1,6 @@
-<?php  
-    $suggestionModeOn = request()->get('suggestion_mode') == 'on' && $note->is_signed_by_hcp 
-?> 
+<?php
+    $suggestionModeOn = request()->get('suggestion_mode') == 'on' && $note->is_signed_by_hcp
+?>
 <div class="segments-list" id="note-segments-list">
     <?php
     $previousHeading = null;
@@ -33,7 +33,7 @@
                     @include('app.patient.note.segment')
                 @endif
             </div>
-           
+
     @endforeach
     <?php
     if (!empty($previousHeading)) {

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

@@ -31,7 +31,7 @@ $isOmegaHistorySegment = strpos($iName, 'omega_history_') === 0;
                         @if($note->is_signed_by_hcp && $segment->accepted_suggestion_summary_html)
                             {!! $segment->accepted_suggestion_summary_html !!}
                         @else
-                            {!! $segment->summary_html !!}
+                           {!! $segment->summary_html !!}
                         @endif
                     </div>
 

+ 7 - 6
resources/views/app/patient/partials/coverage-information.blade.php

@@ -3,6 +3,7 @@
         $cpc = $coverage;
         $latestCpc = $patient->latestClientPrimaryCoverage;
     @endphp
+
 </div>
     @if(!$cpc)
         <div class="alert alert-info">No coverage for this client</div>
@@ -12,15 +13,15 @@
             $creationStrategy = $cpc->creation_strategy ?? null;
             if($creationStrategy === 'NEW' || $creationStrategy === 'AUTO_REFRESH'){
                 if($cpc->plan_type === 'MEDICARE'){
-                   $cpc->auto_detail_json = json_decode($cpc->auto_medicare_detail_json ?? null); 
+                   $cpc->auto_detail_json = json_decode($cpc->auto_medicare_detail_json ?? null);
                 }
                 if($cpc->plan_type === 'MEDICID'){
-                    $cpc->auto_detail_json = json_decode($cpc->auto_medicaid_detail_json ?? null); 
+                    $cpc->auto_detail_json = json_decode($cpc->auto_medicaid_detail_json ?? null);
                 }
                 if($cpc->plan_type === 'COMMERCIAL'){
-                    $cpc->auto_detail_json = json_decode($cpc->auto_commercial_detail_json ?? null); 
+                    $cpc->auto_detail_json = json_decode($cpc->auto_commercial_detail_json ?? null);
                 }
-                
+
             }
         ?>
         <div class="d-flex align-items-center mb-2">
@@ -28,7 +29,7 @@
             <span class="mx-1 text-muted text-sm">|</span>
             @if($cpc->is_manually_determined)
                 <div>
-                    <span class="d-inline bg-warning px-2 py-1 rounded mr-1"><i class="fas fa-map-pin"></i> Manually Determined</span> 
+                    <span class="d-inline bg-warning px-2 py-1 rounded mr-1"><i class="fas fa-map-pin"></i> Manually Determined</span>
                     @if($cpc->is_cancelled)
                     <span class="mr-1 text-danger text-sm">Cancelled</span>
                     @else
@@ -36,7 +37,7 @@
                     @endif
                     <span class="mx-1 text-muted text-sm">|</span>
                 </div>
-                
+
             @else
 
             @endif

+ 8 - 3
resources/views/app/patient/prescriptions/lab-form.blade.php

@@ -42,9 +42,14 @@
                     </div>
                 </div>
                 <div class="col-6 pl-2 border-left">
-                    <div class="d-flex align-items-baseline mb-1">
-                        <span class="text-secondary mr-3">ICDs</span>
-                        <a href="#" v-on:click.prevent="addICD(item)">Add ICD</a>
+                    <div class="d-flex align-items-baseline justify-content-between w-100 mb-1">
+                        <div class="d-flex">
+                          <span class="text-secondary mr-3">ICDs</span>
+                          <a href="#" v-on:click.prevent="addICD(item)">Add ICD</a>
+                        </div>
+                        <a href="#" v-if="currentPrescription_LAB.clinicalDetailJson.items.length > 1" v-on:click.prevent="removeTestSet(item)">
+                            <i class="fa fa-times-circle text-danger on-hover-opaque"></i>
+                        </a>
                     </div>
                     <div v-for="(icd, icdIndex) in item.icds" class="d-flex align-items-baseline mb-1">
                         <input type="text" class="min-width-unset form-control form-control-sm width-100px mr-2"

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

@@ -402,7 +402,7 @@
                     <div v-else>-</div>
                 </div>
             </div>
-            <div class="pb-2 d-flex align-items-start" v-if="currentPrescription.has_hcp_pro_signed">
+            <div class="pb-2 d-flex align-items-start" v-if="currentPrescription.has_hcp_pro_signed || proType == 'ADMIN'">
                 <span class="min-width-140px text-secondary text-sm">PDF</span>
                 <div class="d-flex align-items-baseline">
                     <a class="pdf-viewer-trigger d-block mb-1" native target="_blank"
@@ -525,6 +525,7 @@ GROUP BY erx_category");
                 el: '#prescriptions-{{$patient->id}}',
                 delimiters: ['@{{', '}}'],
                 data: {
+                    proType: "{{$pro->pro_type}}",
                     includeCancelled: '',
 
                     prescriptions: <?= json_encode($prescriptions) ?>,
@@ -867,6 +868,10 @@ GROUP BY erx_category");
                             ]
                         });
                     },
+                    removeTestSet: function(_item, _new = false) {
+                      var index = this[(_new ? 'new' : 'current') + 'Prescription_' + this.currentPrescriptionType].clinicalDetailJson.items.indexOf(_item);
+                      this[(_new ? 'new' : 'current') + 'Prescription_' + this.currentPrescriptionType].clinicalDetailJson.items.splice(index, 1);
+                    },
                     addTest: function(_item) {
                         for (let i = 0; i < _item.tests.length; i++) {
                             if(!_item.tests[i].desc) {
@@ -1616,6 +1621,7 @@ GROUP BY erx_category");
                 },
                 mounted: function() {
                     let self = this;
+
                     $(document).on('pro-changed', '.erx-hcp-pro-select', function() {
                         self.currentPrescriptionHcpPro.newHcpProUid = this.value;
                     });

+ 7 - 7
resources/views/app/patient/prescriptions/pdf/DRUG.blade.php

@@ -27,7 +27,7 @@ if($coverage) {
 }
 ?>
 <section style="padding-top: 0.1rem;">
-    <table style="width:100%;font-size:14px; margin-bottom:1rem;border-collapse: collapse;table-layout:fixed;">
+    <table style="width:100%;font-size:14px; margin-bottom:1rem;border-collapse: collapse; {{$payerName == 'Medicare' ? '' : 'table-layout:fixed'}};">
       <tr>
         <td style="vertical-align:top;padding: 5px;">
           <h4 style="line-height:20px;margin:0;text-transform:uppercase;">{{ $patient->displayName() }}</h4>
@@ -44,8 +44,8 @@ if($coverage) {
         <td style="vertical-align:top;padding: 5px;">
           <h4 style="line-height:20px;margin:0;">INSURANCE</h4>
           <span style="font-size:13px;line-height:20px;display:block">{{$payerName}}</span>
-          <span style="font-size:13px;line-height:20px;display:block">Member ID: {{$memberID}}</span>
-          <span style="font-size:13px;line-height:20px;display:block">Insurance Contact:</span>
+          {{-- <span style="font-size:13px;line-height:20px;display:block">Member ID: {{$memberID}}</span> --}}
+          <!-- <span style="font-size:13px;line-height:20px;display:block">Insurance Contact:</span> -->
         </td>
       </tr>
     </table>
@@ -72,16 +72,16 @@ if($coverage) {
                         </p>
                         <div style="">
                             @if(@$item->frequency)
-                                <p style="margin: 0.5rem 0;">Frequency: {{ $item->frequency }}</p>
+                                <p style="margin: 0.5rem 0;"><span style="opacity: 0.7;">Frequency:</span> <span style="opacity:1">{{ $item->frequency }}</span> </p>
                             @endif
                             @if(@$item->instructions)
-                                <p style="margin: 0.5rem 0;">Instructions: {{ $item->instructions }}</p>
+                                <p style="margin: 0.5rem 0;"><span style="opacity: 0.7;">Instructions:</span> <span style="opacity:1">{{ $item->instructions }}</span> </p>
                             @endif
                             @if(isset($item->dispense))
-                                <p style="margin: 0.5rem 0;">Dispense: {{ $item->dispense }}</p>
+                                <p style="margin: 0.5rem 0;"><span style="opacity: 0.7;">Dispense:</span> <span style="opacity:1">{{ $item->dispense }}</span> </p>
                             @endif
                             @if(isset($item->refills))
-                                <p style="margin: 0.5rem 0;">Refills: {{ $item->refills }}</p>
+                                <p style="margin: 0.5rem 0;"><span style="opacity: 0.7;">Refills:</span> <span style="opacity:1">{{ $item->refills }}</span> </p>
                             @endif
                         </div>
                     </div>

+ 22 - 20
resources/views/app/patient/prescriptions/pdf/pdf-preview.blade.php

@@ -16,12 +16,12 @@
         $hcpCompanyProPayer = $note->hcpCompanyProPayer;
         $hcpCompanyLocation = $note->hcpCompanyLocation;
     }
-    $companyName = $hcpCompany ? $hcpCompany->name : 'Scholar Medical Group MD LLC';
-    $addressLine1 = $hcpCompanyLocation ? $hcpCompanyLocation->line1 : '133 Rollins Ave';
-    $addressLine2 = $hcpCompanyLocation ? $hcpCompanyLocation->line2 : 'Ste 3';
-    $city = $hcpCompanyLocation ? $hcpCompanyLocation->city : 'Rockville';
-    $state = $hcpCompanyLocation ? $hcpCompanyLocation->state : 'MD';
-    $zip = $hcpCompanyLocation ? $hcpCompanyLocation->zip : '20852';
+    $companyName = $hcpCompany ? $hcpCompany->name : config('app.defaultErxCompanyName');
+    $addressLine1 = $hcpCompanyLocation ? $hcpCompanyLocation->line1 : config('app.defaultErxCompanyLine_1');
+    $addressLine2 = $hcpCompanyLocation ? $hcpCompanyLocation->line2 : config('app.defaultErxCompanyLine_2');
+    $city = $hcpCompanyLocation ? $hcpCompanyLocation->city : config('app.defaultErxCompanyCity');
+    $state = $hcpCompanyLocation ? $hcpCompanyLocation->state : config('app.defaultErxCompanyState');
+    $zip = $hcpCompanyLocation ? $hcpCompanyLocation->zip : config('app.defaultErxCompanyZip');
     ?>
     <?php
     use App\Models\Erx;
@@ -32,32 +32,34 @@
 </head>
 <body>
 <div style="margin: 0; padding: .3rem; font-family: sans-serif">
-    <header style="padding: 0; border: 0; margin: 0">
-        <div style="text-align: center">
-            <h3 style="margin-bottom:1px;line-height:5px;">{{ $prescription->hcpPro->displayName(true) }}</h3>
-            <h4 style="margin-bottom:1px;line-height:5px;">{{$companyName}}</h4>
-            <h4 style="margin-bottom:1px;line-height:3px;font-weight:400;">{{$addressLine1}}, {{$addressLine2}}</h4>
-            <h4 style="margin-bottom:1rem;line-height:3px;font-weight:400;">{{$city}}, {{$state}} {{$zip}}</h4>
+    <header style="padding: 0; border: 0; margin: 0;">
+      <div style="width:100%;">
+        <div style="text-align: left">
+          <h3 style="margin-bottom:1px;line-height:5px;">{{ $prescription->hcpPro->displayName(true) }}</h3>
+          <h4 style="margin-bottom:1px;line-height:5px;">{{$companyName}}</h4>
+          <h4 style="margin-bottom:1px;line-height:3px;font-weight:400;">{{$addressLine1}}, {{$addressLine2}}</h4>
+          <h4 style="margin-bottom:1rem;line-height:3px;font-weight:400;">{{$city}}, {{$state}} {{$zip}}</h4>
         </div>
-        <div style="text-align:center;">
-          <span style="width:33.33%; display:inline-block;">Phone: (800) 707-9705</span>
-          <span style="width:33.33%; display:inline-block;">Fax: (800) 878-1414</span>
-          <span style="width:33.33%; display:inline-block;">NPI: {{$prescription->hcpPro->hcp_npi}}</span>
+        <div style="text-align:right;margin-top:-80px;padding-bottom:0px;">
+          <span style="margin-bottom:5px;display:block;">Phone: (800) 707-9705</span>
+          <span style="margin-bottom:5px;display:block;">Fax: (800) 878-1414</span>
+          <span style="margin-bottom:5px;display:block;">NPI: {{$prescription->hcpPro->hcp_npi}}</span>
         </div>
+      </div>
     </header>
-
-    <hr style="border-top: 2px solid #5ca4e8; border-bottom: 0; margin-top:-5px; margin-bottom:.5rem;">
+    <hr style="border-top: 2px solid #5ca4e8; border-bottom: 0; margin-top:10px; margin-bottom:.5rem;">
 
     @include('app.patient.prescriptions.pdf.' . $prescription->erx_category)
 
+    <hr style="border-top: 1px solid #dedede; border-bottom: 0; margin-top:10px; margin-bottom:.5rem;">
     <?php if($prescription->logistics_detail_json): ?>
         <?php $logistics = json_decode($prescription->logistics_detail_json); ?>
-        <hr style="margin: 0 0 0.5rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">
+        <hr style="margin: 0 0 0.5rem 0; border:0; border-color: #bbb">
         <div style="font-size: 14px; opacity: 0.75; ">
             <p style="margin: 0.5rem 0;"><b>{{ $logistics->facilityName }}</b></p>
             <p style="margin: 0.5rem 0;">{{$logistics->facilityCity}} {{$logistics->facilityState}} {{$logistics->facilityZip}}</p>
             <p style="margin: 0.5rem 0;">Phone: {{$logistics->facilityPhone}}</p>
-            <p style="margin: 0.5rem 0;">Fax: {{$logistics->facilityFax}}</p>
+            @if($logistics->facilityFax)<p style="margin: 0.5rem 0;">Fax: {{$logistics->facilityFax}}</p>@endif
         </div>
     <?php endif; ?>
 

+ 5 - 5
resources/views/app/patient/primary-coverage-form.blade.php

@@ -35,19 +35,19 @@ $cpc = $patient->getPrimaryCoverage();
 				<div class="row" v-show="insuranceCardType == 'commercial'">
 					<div class="form-group col-md-6">
 						<label class="control-label">Insurance</label>
-						<input type="text" name="carrierFreeText" class="form-control input-sm">
+						<input type="text" name="carrierFreeText" class="form-control input-sm" value="{{$cpc->carrier_free_text}}">
 					</div>
 					<div class="form-group col-md-6">
 						<label class="control-label">ID Number</label>
-						<input type="text" name="commercialMemberIdentifier" class="form-control input-sm">
+						<input type="text" name="commercialMemberIdentifier" class="form-control input-sm" value="{{$cpc->commercial_member_identifier}}">
 					</div>
 					<div class="form-group col-md-6">
 						<label class="control-label">Group Number</label>
-						<input type="text" name="commercialGroupNumber" class="form-control input-sm">
+						<input type="text" name="commercialGroupNumber" class="form-control input-sm" value="{{$cpc->commercial_group_number}}">
 					</div>
 					<div class="form-group col-md-6">
 						<label class="control-label">Support Phone Number</label>
-						<input type="text" name="primaryInsurancePhoneNumberForHcps" class="form-control input-sm phone" stag-input-phone>
+						<input type="text" name="primaryInsurancePhoneNumberForHcps" class="form-control input-sm phone"  stag-input-phone value="{{$cpc->primary_insurance_phone_number_for_hcps}}">
 					</div>
 				</div>
 
@@ -393,7 +393,7 @@ $cpc = $patient->getPrimaryCoverage();
 						});
 					},
 					init: function() {
-						
+
 					}
 				},
 				mounted: function() {

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

@@ -6,6 +6,10 @@ use App\Models\Point;
 /** @var Note $note */
 /** @var Point $point */
 
+if(!@$sessionKey) {
+    $sessionKey = request()->cookie('sessionKey');
+}
+
 $contentData = [
     "current_overall_health_level" => '',
     "sleep" => '',
@@ -25,7 +29,9 @@ $contentData = [
     "gain_other_description" => '',
 ];
 
-$point = Point::getGlobalSingletonOfCategory($patient, 'LIFESTYLE_GENERAL', true);
+$point = Point::getOrCreateOnlyTopLevelPointOfCategory($note, 'LIFESTYLE_GENERAL', $sessionKey, true);
+
+//$point = Point::getGlobalSingletonOfCategory($patient, 'LIFESTYLE_GENERAL', true);
 
 if ($point && @$point->data) {
     $contentData = $point->data;
@@ -34,7 +40,7 @@ if ($point && @$point->data) {
 <div class="p-3 mcp-theme-1">
 
     <div visit-moe close-on-save close-on-cancel class="d-block">
-        <form show url="/api/visitPoint/upsertGlobalSingleton" class="mcp-theme-1">
+        <form show url="/api/visitPoint/upsertChildReview" class="mcp-theme-1">
             <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
             <input type="hidden" name="category" value="LIFESTYLE_GENERAL">
             <input type="hidden" name="data">

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

@@ -6,14 +6,20 @@ use App\Models\Note;
 /** @var Client $patient */
 /** @var Note $note */
 
-$point = Point::getGlobalSingletonOfCategory($patient, 'LIFESTYLE_GENERAL', false);
+if(!@$sessionKey) {
+    $sessionKey = request()->cookie('sessionKey');
+}
+
+$point = Point::getOrCreateOnlyTopLevelPointOfCategory($note, 'LIFESTYLE_GENERAL', $sessionKey, true);
+
+//$point = Point::getGlobalSingletonOfCategory($patient, 'LIFESTYLE_GENERAL', false);
 
 if ($point && @$point->data) {
     $contentData = $point->data;
 ?>
 
     <div id="v3_sleep_assessment_section" class="mt-3">
-
+        <h1>Summary is here</h1>
         <div class="row">
 
             <div class="col-md-12">

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

@@ -29,7 +29,7 @@ foreach ($points as $point) {
 
 {{--@if($allergies && count($allergies))
     <div class="d-flex mb-1">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/allergies-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="allergies-center-{{$note->id}}"
@@ -45,7 +45,7 @@ foreach ($points as $point) {
 
 @if($problems && count($problems))
     <div class="d-flex mb-1">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/problems-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="problems-center-{{$note->id}}"

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

@@ -28,7 +28,7 @@ foreach ($points as $point) {
 
 {{--@if($allergies && count($allergies))
     <div class="d-flex mb-1">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/allergies-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="allergies-center-{{$note->id}}"
@@ -44,7 +44,7 @@ foreach ($points as $point) {
 
 @if($problems && count($problems))
     <div class="d-flex mb-1">
-        <a class="mr-2 min-width-110px "
+        <a class="mr-2 width-150px "
            open-in-stag-popup
            href="/problems-center/{{$note->client->uid}}/{{$note->uid}}"
            mc-initer="problems-center-{{$note->id}}"

+ 0 - 1
resources/views/layouts/no-mc-template.blade.php

@@ -357,7 +357,6 @@
             });
 
 
-
         });
     </script>
     @endif

+ 79 - 0
resources/views/layouts/template-simple.blade.php

@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="csrf-token" content="{{ csrf_token() }}">
+
+    <title>{{ config('app.name') }}</title>
+    <link rel="icon" href="/img/icon.svg">
+
+    <!-- Fonts -->
+    <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
+
+
+    {{-- Quill RTE --}}
+
+    <script src="/js/jquery-3.5.1.min.js"></script>
+    <script src="/select2/select2.min.js"></script>
+
+    <!-- <link href="{{ asset('bootstrap-4.5.0/css/bootstrap.css') }}" rel="stylesheet"> -->
+    <link rel="stylesheet" href="/unpoly/unpoly.min.css">
+    <link rel="stylesheet" href="/select2/select2.min.css">
+    <link rel="stylesheet" href="/fontawesome-free-5.13.1-web/css/all.min.css">
+    <link href="{{ asset('/css/app.css') }}?v={{config('app.asset_version')}}" rel="stylesheet">
+    <link href="{{ asset('/css/style.css') }}?v={{config('app.asset_version')}}" rel="stylesheet">
+    <link href="{{ asset('/css/yemi.css') }}?v={{config('app.asset_version')}}" rel="stylesheet">
+    <link rel="stylesheet" href="{{ asset('/css/toastr.min.css') }}">
+    <link href="{{asset('/css/z.css')}}?v={{config('app.asset_version')}}" rel=stylesheet>
+    <!-- Styles -->
+
+
+    @yield('head')
+</head>
+
+<body>
+
+    <nav class="navbar navbar-expand-md navbar-dark stag-primary-bg py-1 mcp-theme-1 px-2">
+        <a class="navbar-brand" href="/">
+            <img src="/img/logo_white.svg" alt="Leadership Health">
+        </a>
+        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navBar" aria-controls="navBar" aria-expanded="false" aria-label="Toggle navigation">
+            <span class="navbar-toggler-icon"></span>
+        </button>
+
+        <div class="collapse navbar-collapse" id="navBar">
+            <ul class="navbar-nav mr-auto">
+                    <li class="nav-item"><a class="nav-link" href="{{ route('admin.dashboard') }}"><i class="mr-1 fas fa-home"></i> Home</a> </li>
+                    <li class="nav-item"><a class="nav-link" href="{{ route('admin.points') }}"><i class="mr-1 fas fa-user"></i> Points</a> </li>
+            </ul>
+        </div>
+
+    </nav>
+
+    <main role="main" class="stag-content px-0">
+        @yield('content')
+    </main><!-- /.container -->
+
+    <!-- shortcut/suggest component -->
+    <link href="/css/shortcut.css?v={{config('app.asset_version')}}" rel=stylesheet>
+
+    <script src="/unpoly/unpoly.min.js"></script>
+
+
+    <script>
+        up.compiler('.select2', function(element) {
+                $('.select2').select2({
+                    display: 'none'
+                });
+
+                $('.select2').on('change', function (e) {
+                    up.submit('form')
+                });
+
+        })
+
+    </script>
+</body>
+
+</html>

+ 1 - 1
resources/views/layouts/template.blade.php

@@ -275,7 +275,7 @@
                             <a class="dropdown-item" href="{{ route('admin.patientsMissingDefasultSettings') }}">Patients Missing Default Settings</a>
                             <a class="dropdown-item" href="{{ route('management-stats') }}">Management Stats</a>
                             <a class="dropdown-item" href="{{ route('messages') }}">Messages</a>
-                            <a class="dropdown-item" href="{{ route('admin.patients-notes-points-filter') }}">Patients Notes Points Filter</a>
+                            <a class="dropdown-item" target="_blank"  native href="{{ route('admin.points') }}">Points</a>
                         </div>
                     </li>
                     <li class="nav-item dropdown">

+ 2 - 1
routes/web.php

@@ -282,7 +282,8 @@ Route::middleware('pro.auth')->group(function () {
         Route::get('get-create-new-patient-script-template', 'AdminController@getCreateNewPatientScriptTemplate')->name('getCreateNewPatientScriptTemplate');
         Route::get('patients-missing-defult-settings', 'AdminController@patientsMissingDefasultSettings')->name('patientsMissingDefasultSettings');
         Route::get('points', 'AdminController@points')->name('points');
-        Route::get('patients-notes-points-filter', 'AdminController@patientsNotesPointsFilter')->name('patients-notes-points-filter');
+        Route::get('/points/view/{uid}', 'AdminController@pointDetails')->name('points.view');
+//        Route::get('patients-notes-points-filter', 'AdminController@patientsNotesPointsFilter')->name('patients-notes-points-filter');
     });
     Route::middleware('pro.auth.admin')->group(function () {
         Route::get('mgmt-stats', [ManagementStatsController::class, 'index'])->name('management-stats');

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio