Forráskód Böngészése

updated process-notes-work

root 4 éve
szülő
commit
994febc680

+ 28 - 6
app/Http/Controllers/PracticeManagementController.php

@@ -1102,7 +1102,7 @@ ORDER BY claim.created_at ASC
     public function processNotes(Request  $request) {
 
         $mode = $request->input('mode') ? $request->input('mode') : '1';
-        if($mode < 1 || $mode > 5) $mode = 1;
+        if(($mode < 1 || $mode > 5) && $mode != 8) $mode = 1;
 
         $counts = [
             "picked" => Note::where('is_cancelled', false)
@@ -1151,6 +1151,16 @@ ORDER BY claim.created_at ASC
                 ->where('is_claim_closed', true)
                 ->whereRaw("(SELECT count(id) FROM claim WHERE note_id = note.id AND is_cancelled IS FALSE AND status != 'CANCELLED' AND status != 'SUBMITTED') > 0")
                 ->count(),
+ // has unsubmitted claims MARKED GOOD!
+            "mode-8" => Note::where('is_cancelled', false)
+                ->where('is_signed_by_hcp', true)
+                ->whereRaw("((detail_json)::json->>'isGood')::text = 'true'")
+//                ->whereNull('current_note_pickup_for_processing_id')
+                ->where('is_billing_marked_done', true)
+                ->where('is_bill_closed', true)
+//              ->where('is_claim_closed', true)
+//              ->whereRaw("(SELECT count(id) FROM claim WHERE note_id = note.id AND is_cancelled IS FALSE AND status != 'CANCELLED' AND status != 'SUBMITTED') > 0")
+                ->count(),
             // all good
             "mode-6" => Note::where('is_cancelled', false)
                 ->where('is_signed_by_hcp', true)
@@ -1179,7 +1189,7 @@ ORDER BY claim.created_at ASC
                     ->where('is_signed_by_hcp', false)
                     ->whereRaw("((detail_json)::json->>'isBad' is null OR ((detail_json)::json->>'isBad')::text != 'true')")
                     ->whereNull('current_note_pickup_for_processing_id')
-                    ->orderBy('effective_dateest', 'ASC')
+                    ->orderBy('effective_dateest', 'DESC')
                     ->first();
                 break;
             case 2:
@@ -1188,7 +1198,7 @@ ORDER BY claim.created_at ASC
                     ->whereRaw("((detail_json)::json->>'isBad' is null OR ((detail_json)::json->>'isBad')::text != 'true')")
                     ->whereNull('current_note_pickup_for_processing_id')
                     ->where('is_billing_marked_done', false)
-                    ->orderBy('effective_dateest', 'ASC')
+                    ->orderBy('effective_dateest', 'DESC')
                     ->first();
                 break;
             case 3:
@@ -1198,7 +1208,7 @@ ORDER BY claim.created_at ASC
                     ->whereNull('current_note_pickup_for_processing_id')
                     ->where('is_billing_marked_done', true)
                     ->where('is_bill_closed', false)
-                    ->orderBy('effective_dateest', 'ASC')
+                    ->orderBy('effective_dateest', 'DESC')
                     ->first();
                 break;
             case 4:
@@ -1209,7 +1219,7 @@ ORDER BY claim.created_at ASC
                     ->where('is_billing_marked_done', true)
                     ->where('is_bill_closed', true)
                     ->where('is_claim_closed', false)
-                    ->orderBy('effective_dateest', 'ASC')
+                    ->orderBy('effective_dateest', 'DESC')
                     ->first();
                 break;
             case 5:
@@ -1221,7 +1231,19 @@ ORDER BY claim.created_at ASC
                     ->where('is_bill_closed', true)
                     ->where('is_claim_closed', true)
                     ->whereRaw("(SELECT count(id) FROM claim WHERE note_id = note.id AND is_cancelled IS FALSE AND status != 'CANCELLED' AND status != 'SUBMITTED') > 0")
-                    ->orderBy('effective_dateest', 'ASC')
+                    ->orderBy('effective_dateest', 'DESC')
+                    ->first();
+                break;
+	    case 8:
+		 $note = Note::where('is_cancelled', false)
+                ->where('is_signed_by_hcp', true)
+                ->whereRaw("((detail_json)::json->>'isGood')::text = 'true'")
+//                ->whereNull('current_note_pickup_for_processing_id')
+                ->where('is_billing_marked_done', true)
+                ->where('is_bill_closed', true)
+//              ->where('is_claim_closed', true)
+//              ->whereRaw("(SELECT count(id) FROM claim WHERE note_id = note.id AND is_cancelled IS FALSE AND status != 'CANCELLED' AND status != 'SUBMITTED') > 0")
+                    ->orderBy('effective_dateest', 'DESC')
                     ->first();
                 break;
         }

+ 7 - 0
public/js/mc.js

@@ -15,6 +15,10 @@ window.top.addEventListener('popstate', function (event) {
 });
 $(document).ready(function () {
 
+	var originalLocationPath = window.location.pathname;
+	var params = window.location.search;
+	// TODO make it so if param 'xy' is passed in, it doesn't go to parent
+	var noMcStuffOnLoad = originalLocationPath.indexOf('notes') >= 0;
 
     if(!window.noMc){
         if (window.location.pathname === window.top.location.pathname) {
@@ -59,6 +63,9 @@ $(document).ready(function () {
     if (target.indexOf('/mc') === 0) {
         target = target.split('/mc')[1];
     }
+	if(noMcStuffOnLoad){
+		target = originalLocationPath;
+	}
     if(!window.noMc){
         fastLoad(target, true, false, true);
     }

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

@@ -49,9 +49,11 @@
                     <a href="#" class="print-note ml-3 btn btn-sm btn-primary text-white font-weight-bold invisible"><i class="fa fa-print"></i> Print</a>
                     <?php
                     $isBad = false;
-                    if($note->detail_json) {
+                    $isGood = false;
+		    if($note->detail_json) {
                         $parsed = json_decode($note->detail_json);
                         $isBad = $parsed && @$parsed->isBad;
+			$isGood = $parsed && @$parsed->isGood;
                     }
                     ?>
                     @if(!$isBad)
@@ -68,7 +70,7 @@
                         </div>
                     @else
                         <div moe relative>
-                            <a href="#" start show class="print-note ml-2 btn btn-sm btn-info text-white font-weight-bold invisible"><i class="fa fa-undo"></i> Undo mark as Bad Note</a>
+                            <a href="#" start show class="print-note ml-2 btn btn-sm btn-info text-white font-weight-bold invisible"><i class="fa fa-undo"></i> Marked as bad! Click to undo.</a>
                             <form url="/api/note/undoMarkNoteAsBad" class="mcp-theme-1">
                                 <input type="hidden" name="uid" value="{{$note->uid}}">
                                 <p class="min-width-200px">Mark this note as <b>not bad</b>?</p>
@@ -79,6 +81,31 @@
                             </form>
                         </div>
                     @endif
+		     @if(!$isGood)
+                        <div moe relative>
+                            <a href="#" start show  class="print-note ml-2 btn btn-sm btn-success text-white font-weight-bold invisible"><i class="fa fa-exclamation-triangle"></i> Mark as Good Note</a>
+                            <form url="/api/note/markNoteAsGood" class="mcp-theme-1">
+                                <input type="hidden" name="uid" value="{{$note->uid}}">
+                                <p class="min-width-200px">Mark this note as <b>good</b>?</p>
+                                <div>
+                                    <button submit class="btn btn-sm btn-success mr-1">Yes</button>
+                                    <button cancel class="btn btn-sm btn-default border">No</button>
+                                </div>
+                            </form>
+                        </div>
+                    @else
+                        <div moe relative>
+                            <a href="#" start show class="print-note ml-2 btn btn-sm btn-info text-white font-weight-bold invisible"><i class="fa fa-undo"></i> Marked as good! Click to undo.</a>
+                            <form url="/api/note/undoMarkNoteAsGood" class="mcp-theme-1">
+                                <input type="hidden" name="uid" value="{{$note->uid}}">
+                                <p class="min-width-200px">Mark this note as <b>not good</b>?</p>
+                                <div>
+                                    <button submit class="btn btn-sm btn-success mr-1">Yes</button>
+                                    <button cancel class="btn btn-sm btn-default border">No</button>
+                                </div>
+                            </form>
+                        </div>
+                    @endif
                 @endif
             </div>
             @if($patient->has_mcp_done_onboarding_visit !== 'YES')

+ 4 - 3
resources/views/app/practice-management/billing-report.blade.php

@@ -26,7 +26,7 @@
                     <th>Claims</th>
                     <th>Bills</th>
                     <th>ICDs</th>
-                    <th>Submissions</th>
+                    <th>Status</th>
                 </tr>
                 </thead>
                 <tbody>
@@ -71,9 +71,10 @@
                         </td>
                         <td class="text-nowrap border-left-0">
                             @foreach($row->note->claims as $claim)
-                                @foreach($claim->mbClaims as $mbClaim )
+                                {{ $claim->status }}<br/>
+				<?php foreach($claim->mbClaims as $mbClaim ): continue; ?>
                                 {{$mbClaim->status}} {{$mbClaim->status_memo}}
-                                @endforeach
+                               	<?php endforeach; ?>
                             @endforeach
                         </td>
                     </tr>

+ 45 - 8
resources/views/app/practice-management/process-notes.blade.php

@@ -9,11 +9,18 @@
         case 3: $modeLabel = 'Billing Not Closed'; break;
         case 4: $modeLabel = 'Claiming Not Closed'; break;
         case 5: $modeLabel = 'Has Unsubmitted Claims'; break;
+	case 8: $modeLabel = 'Claiming Not Closed - Note Good!'; break;
     }
     ?>
     <div id="process-notes" class="p-3 mcp-theme-1">
         <div class="d-flex align-items-baseline pb-3 border-bottom mb-3">
             <h2 class="font-size-16 font-weight-bold m-0">Process Notes</h2>
+		<div class=" d-flex align-items-center justify-content-center">
+            <button class="btn btn-primary font-weight-normal px-4 ml-3" id="btn-pick">
+                <b class="">{{$modeLabel}} ({{$counts["mode-" . $mode]}})</b>&nbsp;&nbsp;<i class="fa fa-arrow-right"></i>&nbsp;&nbsp;Pick Up Next Available Note
+            </button>
+        </div>
+
 <!--            <a class="ml-auto" href="{{route('practice-management.picked-notes')}}">Picked Notes ({{$counts['picked']}})</a>
             <span class="mx-2 text-secondary">|</span>-->
             <a class="ml-auto text-danger" href="{{route('practice-management.bad-notes')}}">Bad Notes ({{$counts['bad']}})</a>
@@ -47,7 +54,12 @@
                 <div class="text-nowrap">Claiming Not Closed</div>
                 <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-4"]}}</div>
             </a>
-            <a href="{{route('practice-management.process-notes')}}?mode=5"
+            <a href="{{route('practice-management.process-notes')}}?mode=8"
+               class="process-notes-badge mr-3 {{$mode === '8' ? 'active' : ''}}" data-index="8">
+                <div class="text-nowrap">Claiming Not Closed - Note Good!</div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-8"]}}</div>
+            </a>
+	    <a href="{{route('practice-management.process-notes')}}?mode=5"
                class="process-notes-badge mr-3 {{$mode === '5' ? 'active' : ''}}" data-index="5">
                 <div class="text-nowrap">Has Unsubmitted Claims</div>
                 <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-5"]}}</div>
@@ -68,12 +80,24 @@
             </div>
         </div>
 
-        <div class="pt-5 d-flex align-items-center justify-content-center">
-            <button class="btn btn-primary font-size-14 font-weight-normal px-4" id="btn-pick">
-                <b class="font-size-14">{{$modeLabel}} ({{$counts["mode-" . $mode]}})</b>&nbsp;&nbsp;<i class="fa fa-arrow-right"></i>&nbsp;&nbsp;Pick Up Next Available Note
-            </button>
-        </div>
 
+	<hr>
+
+	<style>
+        .iframes iframe {
+                width: 100%;
+                height: 800px;
+        }
+        </style>
+        <div class="row iframes">
+                <div class="col-md-6">
+                        <iframe id="target-chart" native></iframe>
+                </div>
+                <div class="col-md-6">
+                        <iframe id="target-note" native></iframe>
+                </div>
+        </div>
+	<iframe id="junk" style="width:100px; height:100px"></iframe>
     </div>
     <script>
         (function() {
@@ -92,6 +116,7 @@
                 $('#btn-pick')
                     .off('click')
                     .on('click', function() {
+			showMask();
                         $.get('{{route('practice-management.get-next-note', ['mode' => $mode])}}', _data => {
                             if(_data) {
 
@@ -102,8 +127,19 @@
                                     uid: noteUid
                                 }, _data => {
                                     if (!hasError(_data)) {
-
-                                        // open in popup
+					var here = window.location.pathname;					
+					var notePrefix = 'https://care.leadershiphealth.org';
+					var noteUrl = notePrefix + '/patients/view/' + clientUid + '/notes/view/' + noteUid;
+					var chartUrl = notePrefix + '/patients/view/' + clientUid + '/notes?xy=1';
+					$('#target-chart').attr('src', chartUrl);
+					$('#target-note').attr('src', noteUrl);
+					
+					// @Vj, why doesn't this show?
+					setTimeout(function(){ $('#junk').attr('src', notePrefix + '/' + here) }, 5000);
+                                        
+					hideMask();
+					// open in popup
+					return;
                                         openDynamicStagPopup(
                                             '/patients/view/' + clientUid + '/notes/view/' + noteUid,
                                             'note-single',
@@ -115,6 +151,7 @@
 
                             }
                             else {
+				hideMask();
                                 toastr.error('No notes available for pickup in the selected mode')
                             }
                         }, 'json');

+ 150 - 0
resources/views/app/practice-management/xxx-pnb.php

@@ -0,0 +1,150 @@
+@extends ('layouts/template')
+
+@section('content')
+    <?php
+    $modeLabel = '';
+    switch(+$mode) {
+        case 1: $modeLabel = 'Not Yet Signed'; break;
+        case 2: $modeLabel = 'Billing Not Marked Done'; break;
+        case 3: $modeLabel = 'Billing Not Closed'; break;
+        case 4: $modeLabel = 'Claiming Not Closed'; break;
+        case 5: $modeLabel = 'Has Unsubmitted Claims'; break;
+    }
+    ?>
+    <div id="process-notes" class="p-3 mcp-theme-1">
+        <div class="d-flex align-items-baseline pb-3 border-bottom mb-3">
+            <h2 class="font-size-16 font-weight-bold m-0">Process Notes</h2>
+
+		<button class="btn btn-primary font-weight-normal px-4 ml-3" id="btn-picker">
+                	<b class="">{{$modeLabel}} ({{$counts["mode-" . $mode]}})</b>&nbsp;&nbsp;<i class="fa fa-arrow-right"></i>&nbsp;&nbsp;Pick Up Next Available Note
+            	</button>
+
+<!--            <a class="ml-auto" href="{{route('practice-management.picked-notes')}}">Picked Notes ({{$counts['picked']}})</a>
+            <span class="mx-2 text-secondary">|</span>-->
+            <a class="ml-auto text-danger" href="{{route('practice-management.bad-notes')}}">Bad Notes ({{$counts['bad']}})</a>
+            <span class="mx-2 text-secondary">|</span>
+            <a class="" href="{{route('practice-management.done-notes')}}">Done Notes ({{$counts['mode-6']}})</a>
+        </div>
+        <div class="d-flex align-items-center border-bottom mb-3 pb-3">
+            <span class="mr-3">Notes: </span>
+            <a href="{{route('practice-management.process-notes')}}?mode=1"
+               class="process-notes-badge mr-3 {{$mode === '1' ? 'active' : ''}}" data-index="1">
+                <div class="text-nowrap">Not Yet Signed</div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-1"]}}</div>
+            </a>
+            <a href="{{route('practice-management.process-notes')}}?mode=2"
+               class="process-notes-badge mr-3 {{$mode === '2' ? 'active' : ''}}" data-index="2">
+                <div class="text-nowrap">Billing Not Marked Done</div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-2"]}}</div>
+            </a>
+            <a href="{{route('practice-management.process-notes')}}?mode=3"
+               class="process-notes-badge mr-3 {{$mode === '3' ? 'active' : ''}}" data-index="3">
+                <div class="text-nowrap">Billing Not Closed</div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-3"]}}</div>
+            </a>
+<!--            <a href="{{route('practice-management.process-notes')}}?mode=4"
+               class="process-notes-badge mr-3 {{$mode === '4' ? 'active' : ''}}" data-index="4">
+                <div class="text-nowrap">Claims Not Created</div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-4"]}}</div>
+            </a>-->
+            <a href="{{route('practice-management.process-notes')}}?mode=4"
+               class="process-notes-badge mr-3 {{$mode === '4' ? 'active' : ''}}" data-index="4">
+                <div class="text-nowrap">Claiming Not Closed</div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-4"]}}</div>
+            </a>
+            <a href="{{route('practice-management.process-notes')}}?mode=5"
+               class="process-notes-badge mr-3 {{$mode === '5' ? 'active' : ''}}" data-index="5">
+                <div class="text-nowrap">Has Unsubmitted Claims</div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-5"]}}</div>
+            </a>
+            <div class="ml-auto process-notes-badge success" data-index="6">
+                <div class="text-nowrap">
+                    <i class="fa fa-check"></i>&nbsp;
+                    All Claims Submitted
+                </div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-6"]}}</div>
+            </div>
+            <div class="process-notes-badge ml-3 error" data-index="7">
+                <div class="text-nowrap">
+                    <i class="fa fa-exclamation-triangle"></i>&nbsp;
+                    Bad
+                </div>
+                <div class="text-right font-size-16 font-weight-bold">{{$counts["mode-7"]}}</div>
+            </div>
+        </div>
+	<style>
+	.iframes iframe {
+		width: 100%;
+		height: 400px;
+	}
+	</style>
+	<div class="row iframes">
+		<div class="col-md-6">
+			<iframe id="target-chart" native></iframe>
+		</div>
+		<div class="col-md-6">
+			<iframe id="target-note" native></iframe>
+		</div>
+	</div>
+
+    </div>
+    <script>
+        (function() {
+            function init() {
+
+                function hasError(_data) {
+                    let msg = 'Unknown error!';
+                    if (_data) {
+                        if (_data.success) return false;
+                        else if (_data.message) msg = _data.message;
+                    }
+                    toastr.error(msg);
+                    return true;
+                }
+
+                $('#btn-picker')
+                    
+                    .off('click')
+                    
+		    .on('click', function() {
+
+			showMask();
+
+                        $.get('{{route('practice-management.get-next-note', ['mode' => $mode])}}', _data => {
+                            if(_data) {
+
+                                let clientUid = _data.client_uid, noteUid = _data.uid;
+
+                                // mark as picked up
+                                $.post('/api/note/pickUpForProcessing', {
+                                    uid: noteUid
+                                }, _data => {
+                                    if (!hasError(_data)) {
+					var noteSrc =  'https://care.leadershiphealth.org/patients/view/' + clientUid + '/notes/view/' + noteUid;
+					var chartSrc =  'https://care.leadershiphealth.org/patients/view/' + clientUid + '/notes';
+					$('#target-chart').attr('src', chartSrc);
+					$('#target-note').attr('src', noteSrc);
+                                        // open in popup
+					openDynamicStagPopup(
+                                            '/patients/view/' + clientUid + '/notes/view/' + noteUid,
+                                            'note-single',
+                                            'Note - {{$modeLabel}}',
+                                            true
+                                        );
+                                    }
+                                }, 'json');
+
+                            }
+                            else {
+                                toastr.error('No notes available for pickup in the selected mode')
+                            }
+                        }, 'json');
+			hideMask();
+                        return false;
+                    });
+            }
+            // addMCInitializer('process-notes', init, '#process-notes')
+        }).call(window);
+    </script>
+
+@endsection

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

@@ -0,0 +1,368 @@
+<!DOCTYPE html>
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    <title>{{ config('app.name') }}</title>
+
+    <!-- Fonts -->
+    <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
+
+    {{-- mc initializers --}}
+    <script src="/js/mc-init.js?v={{config('app.asset_version')}}"></script>
+
+    {{-- vue --}}
+    <script src="/js/vue.js"></script>
+
+    {{-- Quill RTE --}}
+    <script>
+        window.stagQuillConfig = {
+            toolbar: ['bold', 'italic', 'underline', { 'list': 'ordered'}, { 'list': 'bullet' }],
+            keyboard: {
+                bindings: {
+                    handleEnter: {
+                        key: 13,
+                        handler: function() {
+                            if(!$('.stag-shortcuts:visible').length) return true;
+                        }
+                    }
+                }
+            }
+        };
+    </script>
+    <link href="/quill/quill.snow.css" rel="stylesheet">
+    <script src="/quill/quill.js"></script>
+
+    <!-- <link href="{{ asset('bootstrap-4.5.0/css/bootstrap.css') }}" rel="stylesheet"> -->
+    <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 -->
+
+    <script src="{{ asset('js/app.js') }}?v={{config('app.asset_version')}}" type="application/javascript"></script>
+    <script src="/js/jquery-3.5.1.min.js"></script>
+    <script src="/js/jquery.form.min.js"></script>
+    <script src="{{ asset('js/toastr.min.js') }}" type="application/javascript"></script>
+    <script src="/js/yemi.js?v={{config('app.asset_version')}}" type="application/javascript"></script>
+
+    {{-- med ac --}}
+    <link href='/css/autocomplete-lhc.min.css' rel="stylesheet">
+    <script src='/js/autocomplete-lhc.js'></script>
+
+    {{-- inline bootstrap datepicker --}}
+{{--    <link href='/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css' rel="stylesheet">
+    <script src='/bootstrap-datepicker/js/bootstrap-datepicker.min.js'></script>--}}
+
+    <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
+    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
+
+    {{-- pdfjs --}}
+    <script src="https://mozilla.github.io/pdf.js/build/pdf.js"></script>
+
+    {{-- WebSockets --}}
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.5.0/sockjs.min.js"
+            integrity="sha512-5yJ548VSnLflcRxWNqVWYeQZnby8D8fJTmYRLyvs445j1XmzR8cnWi85lcHx3CUEeAX+GrK3TqTfzOO6LKDpdw=="
+            crossorigin="anonymous"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/stomp.js/2.3.3/stomp.min.js"
+            integrity="sha512-iKDtgDyTHjAitUDdLljGhenhPwrbBfqTKWO1mkhSFH3A7blITC9MhYon6SjnMhp4o0rADGw9yAC6EW4t5a4K3g=="
+            crossorigin="anonymous"></script>
+
+    @yield('head')
+</head>
+
+<body>
+    <div id="mask" style="background: rgba(0, 0, 0, 0) url(&quot;/vanillaspin.gif&quot;) no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 9999; width: 100%; height: 100%; display: none;">
+    </div>
+    <div id="moe-form-mask" style="background: rgba(0, 0, 0, .1) no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 97; width: 100%; height: 100%; display: none;">
+    </div>
+
+
+
+    <nav class="navbar navbar-expand-md navbar-dark stag-primary-bg py-1 mcp-theme-1 px-2">
+        <a class="navbar-brand" href="{{ route('dashboard') }}">
+            <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('dashboard') }}"><i class="mr-1 fas fa-home"></i> Home</a> </li>
+                <li class="nav-item"><a class="nav-link" href="{{ route('patients') }}"><i class="mr-1 fas fa-user-injured"></i> Patients</a> </li>
+                @if($pro && ($pro->can_add_patients || $pro->pro_type== 'ADMIN'))
+                <li class="nav-item"><a class="nav-link" href="{{ route('new-patient') }}"><i class="mr-1 fas fa-user-plus"></i> New Patient</a> </li>
+<!--                <li class="nav-item"><a class="nav-link" href="{{ route('new-non-mcn-patient') }}"><i class="mr-1 fas fa-user-plus"></i> New Non Medicare Patient</a> </li>-->
+                @endif
+                <li class="nav-item dropdown">
+                    <a class="nav-link dropdown-toggle" href="#" id="practice-management" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="mr-1 fas fa-tasks"></i> Practice</a>
+                    <div class="dropdown-menu mcp-theme-1" aria-labelledby="practice-management">
+                        {{--<a class="dropdown-item" href="{{ route('practice-management.dashboard') }}">Dashboard</a>--}}
+                        @if($pro && $pro->pro_type == 'ADMIN')
+                            <a class="dropdown-item" href="/practice-management/rates/all">Payment Rates</a>
+                        @endif
+                        {{--<a class="dropdown-item" href="{{ route('practice-management.previousBills') }}">Previous Bills</a>--}}
+                        <a class="dropdown-item" href="{{ route('practice-management.financialTransactions') }}">Financial Transactions</a>
+                        <a class="dropdown-item" href="/practice-management/bills/not-yet-signed">Pending Bills to Sign</a>
+                        <a class="dropdown-item" href="/practice-management/notes/not-yet-signed">Pending Notes to Sign</a>
+                        <a class="dropdown-item" href="{{ route('unmapped-sms') }}">Unmapped SMS</a>
+                        <a class="dropdown-item" href="{{ route('practice-management.myTickets') }}">My Tickets</a>
+                        <a class="dropdown-item" href="{{ route('practice-management.myTextShortcuts') }}">My Text Shortcuts</a>
+                        <a class="dropdown-item" href="{{ route('practice-management.myFavorites') }}">My Favorites</a>
+                        <a class="dropdown-item" href="{{ route('practice-management.proAvailability') }}">Pro Availability</a>
+                        <a class="dropdown-item" href="{{ route('practice-management.proCalendar') }}">Pro Calendar</a>
+                        <a class="dropdown-item" href="{{ route('practice-management.remoteMonitoringReport') }}">Remote Monitoring Report</a>
+
+                        <a class="dropdown-item" href="{{ route('practice-management.billingManager') }}">Billing Manager</a>
+                        <a class="dropdown-item" href="{{ route('practice-management.billing-report') }}">Billing Report</a>
+
+                        @if($pro && $pro->pro_type == 'ADMIN')
+                            <a class="dropdown-item" href="{{ route('practice-management.processingBillMatrix') }}">Processing Bills</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.cellularMeasurements') }}">Cellular Measurements</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.cellularDeviceManager') }}">Cellular Device Manager</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.medicarePartBClaims') }}">Medicare Part B Claims</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.patientClaimSummary') }}">Patient Claim Summary</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.claims') }}">Claim Matrix</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.process-claims') }}">Process Claims</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.process-notes') }}">Process Notes</a>
+{{--                            <a class="dropdown-item" href="{{ route('practice-management.hcpBillMatrix') }}">HCP Bill Matrix</a>--}}
+                            @if(false)
+                                <a class="dropdown-item" href="{{ route('practice-management.treatmentServiceUtil') }}">Treatment Service Util.</a>
+                            @endif
+                            <a class="dropdown-item" href="{{ route('practice-management.tickets') }}">Tickets</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.supply-orders') }}">Supply Orders</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.shipments') }}">Shipments</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.packs-multi-print') }}">Print Pack Labels</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.handouts') }}">Handouts</a>
+                        @endif
+                    </div>
+                </li>
+            </ul>
+            {{-- if pro is working on a client and is not in tht client --}}
+            <div class="current-work mr-2">
+                @include('app/current-work')
+            </div>
+            <a href="#" class="mr-2 text-white small" onclick="return fastReload()"><i class="fa fa-sync"></i></a>
+            <div class="d-inline-flex pr-2 mcp-theme-1 position-relative">
+                <input id="patient-search" type="search" class="form-control form-control-sm outline-0" autocomplete="off" placeholder="Search Patients">
+                <div class="patient-search-results suggestions-outer position-absolute d-none">
+
+                </div>
+            </div>
+            <div class="d-flex align-items-center">
+
+                <div class="dropdown">
+                    <a class="nav-link dropdown-toggle text-white pl-1 pr-0" href="#" id="account-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+                        <span class="text-white my-0 small">Hi, <b title="Cell# {{$pro->cell_number}}">{{ $pro->name_first }}!</b></span>
+                    </a>
+                    <div class="dropdown-menu dropdown-menu-right mcp-theme-1 pt-0 pb-1" aria-labelledby="account-menu">
+                        @if($performer->logged_in_as_pro_from_admin_pro_app_session_id)
+                            <form action="{{route('back-to-admin-pro')}}" method="post" target="_top" class="d-block pt-1">
+                                @csrf
+                                <button class="d-block ml-2 back-to-admin-button">
+                                    Back to Admin
+                                </button>
+                            </form>
+                        @endif
+                        @if($pro->pro_type == 'ADMIN')
+                            <a href="{{route('log-in-as')}}" native target="_top" class="d-block ml-2 pt-1">Log In As</a>
+                        @endif
+                        @if($pro->pro_type == 'ADMIN')
+                            <a native target="_top" class="d-block ml-2 pt-1"
+                               href="{{config('stag.adminPortalUrl')}}/pro_log_in_with_session_key/{{$performer->session_key}}" title="">
+                                Admin
+                            </a>
+                        @endif
+                        <a native target="_top" class="d-block ml-2 pt-1" href="{{config('stag.authUrl')}}" title="">
+                            Return to Home
+                        </a>
+                        <a native target="_top" href="{{route('logout')}}" class="d-block ml-2 pt-1">
+                            Sign Out
+                        </a>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <a href="#" class="stag_rhs_toggle d-none d-md-block text-white" title="Toggle Video Pane">
+            <i class="fa fa-arrow-right"></i>
+        </a>
+    </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="/js/shortcut.js?v={{config('app.asset_version')}}" type="application/javascript"></script>
+
+    <!-- pro suggest component -->
+    <script src="/js/pro-suggest.js?v={{config('app.asset_version')}}" type="application/javascript"></script>
+
+    <!-- script to handle history/back/forward for mc/xxx pages
+    + all other JS initialization needed in fastLoaded pages  -->
+    <script src="/js/find-event-handlers.js?v={{config('app.asset_version')}}" type="application/javascript"></script>
+    <script src="/js/mc.js?v={{config('app.asset_version')}}" type="application/javascript"></script>
+
+    <form url="/api/proTextShortcut/create" id="create-shortcut-form" class="mcp-theme-1">
+        <input type="hidden" name="proUid" value="{{ $pro->uid  }}">
+        <div class="mb-2">
+            <input type="text" class="form-control form-control-sm" name="shortcut" value="" placeholder="Shortcut Name" required>
+        </div>
+        <div class="mb-2">
+            <textarea name="text" class="form-control form-control-sm" rows="3" id="selected-sc-text" placeholder="Content" required></textarea>
+        </div>
+        <div class="mb-0">
+            <button class="btn btn-primary btn-sm" type="submit">Save</button>
+            <button class="btn btn-default border btn-sm ml-1" type="reset">Cancel</button>
+        </div>
+    </form>
+
+    <script>
+        $(document).ready(function() {
+            window.toggleChildLinks = function(_element) {
+                $(_element).closest('.nav-item').toggleClass('nav-child-collapsed');
+                return false;
+            }
+            const debounce = (func, wait) => {
+                let timeout;
+                return function executedFunction(...args) {
+                    const later = () => {
+                        clearTimeout(timeout);
+                        func(...args);
+                    };
+                    clearTimeout(timeout);
+                    timeout = setTimeout(later, wait);
+                };
+            };
+            var lastTerm = '';
+            var returnedFunction = debounce(function() {
+                var term = $.trim($('#patient-search').val());
+                if (!!term && lastTerm !== term) {
+                    $.get('/patients-suggest?term=' + term, function(_data) {
+                        $('.patient-search-results.suggestions-outer').html(_data).removeClass('d-none');
+                    });
+                    lastTerm = term;
+                } else {
+                    $('.patient-search-results.suggestions-outer').addClass('d-none');
+                }
+            }, 250);
+            $('#patient-search')
+                .off('keydown')
+                .on('keydown', function(e) {
+                    var activeItem = $('.patient-search-results.suggestions-outer .suggest-item.active');
+                    switch (e.which) {
+                        case 27:
+                            $('.patient-search-results.suggestions-outer').addClass('d-none');
+                            return false;
+                        case 38:
+                            if (activeItem.prev().length) {
+                                activeItem.prev()
+                                    .addClass('active')
+                                    .siblings().removeClass('active');
+                                activeItem = $('.patient-search-results.suggestions-outer .suggest-item.active');
+                                if (activeItem.length) {
+                                    activeItem[0].scrollIntoView();
+                                }
+                            }
+                            return false;
+                        case 40:
+                            if (activeItem.next().length) {
+                                activeItem.next()
+                                    .addClass('active')
+                                    .siblings().removeClass('active');
+                                activeItem = $('.patient-search-results.suggestions-outer .suggest-item.active');
+                                if (activeItem.length) {
+                                    activeItem[0].scrollIntoView();
+                                }
+                            }
+                            return false;
+                        case 13:
+                            if (activeItem.length) {
+                                activeItem.first().click();
+                            }
+                            return false;
+                        default:
+                            window.setTimeout(onQueryChange, 50);
+                            break;
+                    }
+                })
+                .on('keypress paste', function(e) {
+                    window.setTimeout(onQueryChange, 50);
+                })
+                .on('blur', function(e) {
+                    $('.patient-search-results.suggestions-outer').addClass('d-none');
+                    return false;
+                });
+
+            function onQueryChange() {
+                var term = $.trim($('#patient-search').val());
+                if (!!term) {
+                    $('.patient-search-results.suggestions-outer')
+                        .html('<span class="d-block no-suggest-items">Searching...</span>')
+                        .removeClass('d-none');
+                    returnedFunction();
+                } else {
+                    $('.patient-search-results.suggestions-outer').addClass('d-none');
+                }
+            }
+            $(document).on('mousedown', '.suggest-item.patient-suggest[data-target-uid]', function() {
+                $('#patient-search').val('');
+                $('.patient-search-results.suggestions-outer').addClass('d-none');
+                fastLoad('/patients/view/' + $(this).attr('data-target-uid'), true, false, false);
+                return false;
+            });
+        });
+    </script>
+    <script src="/js/click-to-copy.js?v={{config('app.asset_version')}}"></script>
+    <script src="/js/stag-popup.js?v={{config('app.asset_version')}}"></script>
+    <script src="/js/option-list.js?v={{config('app.asset_version')}}"></script>
+    @include('app/pdf/viewer')
+    @if(config('app.enableSockets'))
+    <script>
+        window.socketClient = Stomp.over(new SockJS("{{ config('app.backend_ws_url') }}"));
+        window.socketClient.debug = function(str) {};
+        window.socketClient.connect({}, (frame) => {
+
+            window.socketClient.send("/app/register", {},     // register self
+                JSON.stringify({
+                    sessionKey: '{{$performer->session_key}}'
+                })
+            );
+
+            window.socketClient.subscribe("/user/topic/myCurrentProClientWork", function(message) {
+                console.log("You have a client pro work: ", message);
+                $.get('/current-work', function(_data) {
+                    $('.current-work').html(_data);
+                    //initFastLoad($('.current-work'));
+                    fastReload();
+                });
+            });
+
+            window.socketClient.subscribe("/user/topic/killMyCurrentProClientWork", function(message) {
+                console.log("You have killed your current pro client work: ", message);
+                $.get('/current-work', function(_data) {
+                    $('.current-work').html(_data);
+                    //initFastLoad($('.current-work'));
+                    fastReload();
+                });
+            });
+
+
+
+        });
+    </script>
+    @endif
+    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.24/fc-3.3.2/fh-3.1.8/datatables.min.css"/>
+    <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.24/fc-3.3.2/fh-3.1.8/datatables.min.js"></script>
+</body>
+
+</html>

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

@@ -11,7 +11,7 @@
     <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
 
     {{-- mc initializers --}}
-    <script src="/js/mc-init.js?v={{config('app.asset_version')}}"></script>
+    <script src="xxx/js/mc-init.js?v={{config('app.asset_version')}}"></script>
 
     {{-- vue --}}
     <script src="/js/vue.js"></script>
@@ -202,7 +202,7 @@
     <script>
         window.noMc = true;
     </script>
-    <script src="/js/mc.js?v={{config('app.asset_version')}}" type="application/javascript"></script>
+    <script src="xxx/js/mc.js?v={{config('app.asset_version')}}" type="application/javascript"></script>
 
     <form url="/api/proTextShortcut/create" id="create-shortcut-form" class="mcp-theme-1">
         <input type="hidden" name="proUid" value="{{ $pro->uid  }}">