ソースを参照

Notes processing center UI

Vijayakrishnan 3 年 前
コミット
21a95c5d33

+ 11 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -1593,6 +1593,17 @@ ORDER BY claim.created_at DESC
         return  view('app.practice-management.process-notes', compact('mode', 'counts'));
     }
 
+    public function notesProcessingCenter(Request  $request) {
+
+        $notes = Note::where('is_cancelled', false);
+
+        // filters
+
+        $notes = $notes->orderBy('effective_dateest')->paginate();
+
+        return  view('app.practice-management.notes-processing-center', compact('notes'));
+    }
+
     public function getNextNote(Request $request, $mode)
     {
         $note = null;

+ 5 - 0
app/Models/NotePickupForProcessing.php

@@ -13,4 +13,9 @@ class NotePickupForProcessing extends Model
         return $this->hasOne(Pro::class, 'id', 'pro_id');
     }
 
+    public function note()
+    {
+        return $this->hasOne(Note::class, 'id', 'note_id');
+    }
+
 }

+ 4 - 0
app/Models/Pro.php

@@ -577,4 +577,8 @@ class Pro extends Model
         return $this->hasOne(CompanyPro::class, 'id', 'default_company_pro_id');
     }
 
+    public function currentNotePickupForProcessing() {
+        return $this->hasOne(NotePickupForProcessing::class, 'id', 'current_note_pickup_for_processing_id');
+    }
+
 }

+ 10 - 0
public/css/style.css

@@ -1889,4 +1889,14 @@ table.dashboard-stats-table th {
 }
 .inline-html-container p {
     margin-bottom: 0;
+}
+body.in-iframe>.navbar {
+    display: none !important;
+}
+body.in-iframe .stag-content {
+    padding-top: 0 !important;
+}
+body.in-iframe .main-row > .sidebar {
+    top: 0;
+    height: 100%;
 }

+ 6 - 1
public/js/mc.js

@@ -231,7 +231,7 @@ function fastLoad(_href, _history = true, _useCache = true, _replaceState = fals
     if (_href === '') _href = '/';
 
     // push state
-    if (_history) {
+    if (_history && window.parent === window.top) {
         var target = _href;
         if (target.indexOf('//') !== -1) {
             target = target.split('//')[1];
@@ -248,6 +248,11 @@ function fastLoad(_href, _history = true, _useCache = true, _replaceState = fals
         }
     }
 
+    // dont show top nav if in iframe
+    if(window !== window.top && window.parent !== window.top) {
+        $('body').addClass('in-iframe');
+    }
+
     if (_useCache && !!fastCache[_href]) {
         onFastLoaded(fastCache[_href], _href, _history);
     } else {

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

@@ -72,8 +72,8 @@
                         <td class="text-nowrap border-left-0">
                             @foreach($row->note->claims as $claim)
                                 {{ $claim->status }}<br/>
-				<?php foreach($claim->mbClaims as $mbClaim ): continue; ?>
-                                {{$mbClaim->status}} {{$mbClaim->status_memo}}
+				                <?php foreach($claim->mbClaims as $mbClaim ): continue; ?>
+                                    {{$mbClaim->status}} {{$mbClaim->status_memo}}
                                	<?php endforeach; ?>
                             @endforeach
                         </td>

+ 278 - 0
resources/views/app/practice-management/notes-processing-center.blade.php

@@ -0,0 +1,278 @@
+@extends ('layouts/template')
+
+@section('content')
+    <style>
+      .iframes iframe {
+        width: 100%;
+        height: 800px;
+      }
+    </style>
+    <div id="notes-processing-center" class="p-3 mcp-theme-1">
+        <div class="card">
+
+            <div class="card-header p-2 d-flex align-items-center">
+                <strong class="mr-4">
+                    <i class="fas fa-user-injured"></i>
+                    Notes Processing Center
+                </strong>
+            </div>
+
+            <div class="card-header px-2 pt-2 pb-0 align-items-center bg-white">
+                <form id="filter-form" class="d-flex flex-wrap align-items-center">
+                    <div class="mr-2 mb-2 width-150px min-width-unset">
+                        <label class="text-secondary mb-1">Pro</label>
+                        <select class="form-control form-control-sm min-width-unset" name="proUid" provider-search
+                                required>
+                            <option value="">-- Select Pro --</option>
+                        </select>
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">Pro signed</label>
+                        <select class="form-control form-control-sm min-width-unset" name="proSigned">
+                            <option value="">All</option>
+                            <option value="yes">Yes</option>
+                            <option value="no">No</option>
+                        </select>
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">Billing marked done</label>
+                        <select class="form-control form-control-sm min-width-unset" name="billingMarkedDone">
+                            <option value="">All</option>
+                            <option value="yes">Yes</option>
+                            <option value="no">No</option>
+                        </select>
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">Billing Closed</label>
+                        <select class="form-control form-control-sm min-width-unset" name="billingClosed">
+                            <option value="">All</option>
+                            <option value="yes">Yes</option>
+                            <option value="no">No</option>
+                        </select>
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">Claiming Closed</label>
+                        <select class="form-control form-control-sm min-width-unset" name="claimingClosed">
+                            <option value="">All</option>
+                            <option value="yes">Yes</option>
+                            <option value="no">No</option>
+                        </select>
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">All claims submitted</label>
+                        <select class="form-control form-control-sm min-width-unset" name="allClaimsSubmitted">
+                            <option value="">All</option>
+                            <option value="yes">Yes</option>
+                            <option value="no">No</option>
+                        </select>
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">Good/Bad</label>
+                        <select class="form-control form-control-sm min-width-unset" name="goodBad">
+                            <option value="">All</option>
+                            <option value="good">Good</option>
+                            <option value="bad">Bad</option>
+                            <option value="unclassified">Unclassified</option>
+                        </select>
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">Date From</label>
+                        <input type="date" name="startDate" class="form-control form-control-sm min-width-unset">
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">Date To</label>
+                        <input type="date" name="endDate" class="form-control form-control-sm min-width-unset">
+                    </div>
+                    <div class="mr-2 mb-2 width-150px">
+                        <label class="text-secondary mb-1">MC Part B</label>
+                        <select class="form-control form-control-sm min-width-unset" name="mcPartB">
+                            <option value="">All</option>
+                            <option value="yes">Yes</option>
+                            <option value="no">No</option>
+                        </select>
+                    </div>
+                </form>
+
+
+
+            </div>
+            <div class="card-body p-0">
+
+                <table class="table table-sm table-condensed table-bordered border-0 p-0 m-0">
+                    <thead class="bg-light">
+                    <tr>
+                        <th>Patient</th>
+                        <th>Date</th>
+                        <th>HCP</th>
+                        <th>New/FU</th>  <!-- and method -->
+                        <th>ICDs</th>
+                        <th>HCP <br>signed?</th>
+                        <th>Billing <br>marked done?</th>
+                        <th>Billing <br>closed?</th>
+                        <th>Claiming <br>closed?</th>
+                        <th>Bills</th>
+                        <th>Claims</th>
+                        <th>Pickup</th>
+                        <th>Preview</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    @foreach ($notes as $note)
+                        <?php $isCurrent = $note->currentNotePickupForProcessing && $note->currentNotePickupForProcessing->note && $note->currentNotePickupForProcessing->note->id === $note->id; ?>
+                        <tr class="{{$isCurrent ? 'bg-aliceblue' : ''}}">
+                            <td>
+                                <a href="/patients/view/{{ $note->client->uid }}">
+                                    {{ $note->client->displayName() }}
+                                </a>
+                            </td>
+                            <td>
+                                <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}" class="font-weight-bold">
+                                    {{ friendly_date_time($note->effective_dateest, false) }}
+                                </a>
+                            </td>
+                            <td>
+                                {{$note->hcpPro ? $note->hcpPro->displayName() : '-'}}
+                            </td>
+                            <td>
+                                {{$note->new_or_fu_or_na}}
+                                @if($note->method)
+                                    <span class="text-secondary text-sm ml-1">({{$note->method}})</span>
+                                @endif
+                            </td>
+                            <td>
+                                <div class="d-flex flex-wrap width-100px">
+                                    @foreach($note->reasons as $reason)
+                                        <span class="border-bottom c-pointer mr-2 mb-1" title="{{$reason->description}}">{{$reason->code}}</span>
+                                    @endforeach
+                                </div>
+                            </td>
+                            <td>
+                                @if($note->is_signed_by_hcp)
+                                    <i class="fa fa-check text-info"></i>
+                                @else
+                                    <i class="fa fa-times text-warning-mellow"></i>
+                                @endif
+                            </td>
+                            <td>
+                                @if($note->is_billing_marked_done)
+                                    <i class="fa fa-check text-info"></i>
+                                @else
+                                    <i class="fa fa-times text-warning-mellow"></i>
+                                @endif
+                            </td>
+                            <td>
+                                @if($note->is_bill_closed)
+                                    <i class="fa fa-check text-info"></i>
+                                @else
+                                    <i class="fa fa-times text-warning-mellow"></i>
+                                @endif
+                            </td>
+                            <td>
+                                @if($note->is_claim_closed)
+                                    <i class="fa fa-check text-info"></i>
+                                @else
+                                    <i class="fa fa-times text-warning-mellow"></i>
+                                @endif
+                            </td>
+                            <td>
+                                @foreach($note->bills as $bill)
+                                    @if(!$bill->is_cancelled)
+                                        <div class="mb-1 d-flex align-items-baseline">
+                                            <b>{{$bill->code}}</b>
+                                            <?php
+                                            $mins = round($bill->number_of_units * 60);
+                                            ?>
+                                            <span class="ml-2">{{$mins}} min{{$mins !== 1 ? 's' : ''}}</span>
+                                        </div>
+                                    @endif
+                                @endforeach
+                            </td>
+                            <td>
+                                @foreach($note->claims as $claim)
+                                    @if(!$claim->is_cancelled && $claim->lines->count())
+                                        @foreach($claim->lines as $line)
+                                        <div class="mb-1 d-flex align-items-baseline">
+                                            <b>{{$line->cpt}}</b>
+                                            <span class="ml-2">{{friendlier_date($line->date_of_service)}}</span>
+                                            <span class="ml-2">
+                                                @if(count($line->claimLineIcds))
+                                                    @foreach($line->claimLineIcds as $icd)
+                                                        <span class="c-pointer border-bottom" title="{{$icd->description}}">{{$icd->code}}</span>
+                                                    @endforeach
+                                                @endif
+                                            </span>
+                                        </div>
+                                        @endforeach
+                                    @endif
+                                @endforeach
+                            </td>
+                            <td>
+                                @if($isCurrent)
+                                    <span class="text-info font-weight-bold">CURRENT</span>
+                                @else
+                                    <a href="#" data-uid="{{$note->uid}}" class="pick-up-for-processing">Pickup</a>
+                                @endif
+                            </td>
+                            <td>
+                                <a native target="_blank"
+                                   open-in-stag-popup
+                                   update-parent
+                                   mc-initer="note-single"
+                                   title="Note Details"
+                                   href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}">
+                                    Preview
+                                </a>
+                            </td>
+                        </tr>
+                    @endforeach
+                    </tbody>
+                </table>
+
+                {{ $notes->withQueryString()->links() }}
+
+            </div>
+        </div>
+        @if($pro->currentNotePickupForProcessing && $pro->currentNotePickupForProcessing->note)
+            <?php
+            $cnPatientUid = $pro->currentNotePickupForProcessing->note->client->uid;
+            $cnNoteUid = $pro->currentNotePickupForProcessing->note->uid;
+            ?>
+            <div class="row iframes pt-5">
+                <div class="col-md-5">
+                    <iframe id="target-chart" data-src="/patients/view/{{$cnPatientUid}}/notes" native></iframe>
+                </div>
+                <div class="col-md-7">
+                    <iframe id="target-note" data-src="/patients/view/{{$cnPatientUid}}/notes/view/{{$cnNoteUid}}" native></iframe>
+                </div>
+            </div>
+        @endif
+    </div>
+
+    <script>
+        (function () {
+            function init() {
+                $('.pick-up-for-processing')
+                    .off('click')
+                    .on('click', function() {
+                         $.post('/api/note/pickUpForProcessing', {
+                             uid: $(this).attr('data-uid')
+                         }, _data => {
+                             if(!hasResponseError(_data)) {
+                                 fastReload();
+                             }
+                         }, 'json');
+                         return false;
+                    });
+                @if($pro->currentNotePickupForProcessing && $pro->currentNotePickupForProcessing->note)
+                    $('#target-chart').attr('src', $('#target-chart').attr('data-src'));
+                    $('#target-note').attr('src', $('#target-note').attr('data-src'));
+                    window.setTimeout(() => {
+                        $('.row.iframes')[0].scrollIntoView();
+                    }, 250);
+                @endif
+            }
+            addMCInitializer('notes-processing-center', init, '#notes-processing-center')
+        }).call(window);
+    </script>
+
+@endsection

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

@@ -136,6 +136,7 @@
                             <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.notes-processing-center') }}">Notes Processing Center</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>

+ 1 - 0
routes/web.php

@@ -102,6 +102,7 @@ Route::middleware('pro.auth')->group(function () {
         Route::get('rm-launch-and-clean', 'PracticeManagementController@rmLaunchAndClean')->name('rm-launch-and-clean');
         Route::get('process-claims', 'PracticeManagementController@processClaims')->name('process-claims');
         Route::get('process-notes', 'PracticeManagementController@processNotes')->name('process-notes');
+        Route::get('notes-processing-center', 'PracticeManagementController@notesProcessingCenter')->name('notes-processing-center');
         Route::get('picked-notes', 'PracticeManagementController@pickedNotes')->name('picked-notes');
         Route::get('bad-notes', 'PracticeManagementController@badNotes')->name('bad-notes');
         Route::get('done-notes', 'PracticeManagementController@doneNotes')->name('done-notes');