瀏覽代碼

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

= 3 年之前
父節點
當前提交
ada3756e10

+ 2 - 2
app/Http/Controllers/PracticeManagementController.php

@@ -1376,7 +1376,7 @@ FROM claim
     left join app_session on claim.status_updated_by_session_id = app_session.id
     left join pro sp on app_session.pro_id = sp.id
 --WHERE claim.status IS NULL OR claim.status = 'NEW'
-WHERE (claim.status is NULL OR claim.status NOT IN ('CANCELLED', 'ABANDONED'))
+WHERE (claim.status is NULL OR claim.status NOT IN ('CANCELLED', 'ABANDONED'" . ($request->input('show-submitted') ? "" : ", 'SUBMITTED'") . "))
 -- AND claim.current_version_id IS NOT NULL
 AND (client.name_first ILIKE :q OR
      client.name_last ILIKE :q OR
@@ -1385,7 +1385,7 @@ AND (client.name_first ILIKE :q OR
 AND (claim.created_at >= :from AND claim.created_at <= :to)
 " . ($hcpPro ? "AND claim.pro_id = :hcp" : '') . "
 AND claim.id IN (SELECT mb_claim.claim_id FROM mb_claim)
-ORDER BY claim.created_at ASC
+ORDER BY claim.created_at DESC
 --OFFSET 0 LIMIT 15
 "), $params);
 

+ 12 - 2
app/Models/Client.php

@@ -279,9 +279,10 @@ class Client extends Model
     public function upcomingAppointments()
     {
         return $this->hasMany(Appointment::class, 'client_id', 'id')
-            // ->where('raw_start_time', '>', date('Y-m-d H:i:s'))
+            ->where('raw_date', '>=', date('Y-m-d'))
             ->whereIn('status', ['CREATED', 'CONFIRMED'])
-            ->orderBy('start_time', 'desc');
+            ->orderBy('start_time', 'desc')
+            ->limit(5);
     }
 
     public function appointmentsFromLastWeek()
@@ -635,4 +636,13 @@ class Client extends Model
         $count = Note::where('client_id', $this->id)->where('hcp_pro_id', $_pro->id)->where('is_cancelled', false)->where('new_or_fu_or_na', 'NEW')->count();
         return !!$count;
     }
+
+    public function recentNotes($_pro = null) {
+        $notes = Note::where('client_id', $this->id)->where('is_cancelled', false);
+        if($_pro) {
+            $notes = $notes->where('hcp_pro_id', $_pro->id);
+        }
+        $notes = $notes->orderBy('effective_dateest', 'DESC')->limit(5)->get();
+        return $notes;
+    }
 }

+ 1 - 0
public/css/style.css

@@ -480,6 +480,7 @@ input.search_field, textarea.search_field {
         z-index: 8;
         height: calc(100% - 55px);
         overflow-y: overlay;
+        padding-bottom: 4rem;
     }
     .main-row {
         padding-left: 180px;

+ 2 - 2
public/js/mc.js

@@ -177,14 +177,14 @@ function onFastLoaded(_data, _href, _history) {
                 }
                 window.top.currentMcUrl = window.top.location.href;
 
-                let activeLeftNavLink = $('#sidebarMenu .nav-item>.nav-link.active').first();
+                /*let activeLeftNavLink = $('#sidebarMenu .nav-item>.nav-link.active').first();
                 if(activeLeftNavLink.length) {
                     activeLeftNavLink[0].scrollIntoView({
                         behavior: "smooth",
                         block: "nearest",
                         inline: "nearest"
                     });
-                }
+                }*/
             }, 0);
         }
         else {

+ 35 - 5
resources/views/app/patients.blade.php

@@ -73,7 +73,8 @@
                     @if($showProgramsColumn)<th class="border-0">Program(s)</th>@endif
                     <th class="border-0">MCN</th>
                     <th class="border-0">PCP</th>
-                    {{--<th class="border-0">RMM</th>--}}
+                    <th class="border-0"><span class="text-nowrap">Recent Notes</span><br>(overall)</th>
+                    <th class="border-0"><span class="text-nowrap">Recent Notes</span><br>(me)</th>
                     <th class="border-0">Appointments</th>
                     <th class="border-0">Account</th>
                     <th class="border-0">Tags</th>
@@ -175,9 +176,38 @@
                         <td>
                             {{ $patient->mcp ? $patient->mcp->displayName() : '-' }}
                         </td>
-                        {{--<td>
-                            {{ $patient->rmm ? $patient->rmm->displayName() : '-' }}
-                        </td>--}}
+                        <td class="p-0">
+                            <?php $allNotes = $patient->recentNotes(); ?>
+                            <table class="table table-sm table-condensed table-bordered m-0 width-200px">
+                                <tbody>
+                                @foreach($allNotes as $note)
+                                    <tr>
+                                        <td>
+                                            <a href="{{route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $note])}}"><b class="text-nowrap">{{friendlier_date($note->effective_dateest)}}</b></a>
+                                            <br>
+                                            <span class="text-nowrap">{{$note->hcpPro->displayName()}}</span>
+                                        </td>
+                                        <td>{{$note->new_or_fu_or_na}}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </td>
+                        <td class="py-0 pl-2">
+                            <?php $myNotes = $patient->recentNotes($pro); ?>
+                            <table class="table table-sm table-condensed table-bordered m-0 width-200px">
+                                <tbody>
+                                @foreach($myNotes as $note)
+                                    <tr>
+                                        <td>
+                                            <a href="{{route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $note])}}"><b class="text-nowrap">{{friendlier_date($note->effective_dateest)}}</b></a>
+                                        </td>
+                                        <td>{{$note->new_or_fu_or_na}}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </td>
                         <td>
                             <table class="table table-sm border-0 my-0">
                                 <tbody>
@@ -189,7 +219,7 @@
                                             <div class="pb-0">
                                                 {{ friendly_date_time($appointment->start_time, false) }}, {{ friendly_time($appointment->raw_start_time) }}
                                                 <span class="d-inline-block text-secondary text-sm">({{ $appointment->timezone }})</span>
-                                                &nbsp;/&nbsp;
+                                                <br>
                                                 <b class="mr-1">{{$appointment->pro->displayName()}}</b>
                                                 <span class="text-secondary text-sm">({{ $appointment->status }})</span>
                                             </div>

+ 6 - 1
resources/views/app/practice-management/process-claims.blade.php

@@ -295,7 +295,12 @@
                     <div class="font-weight-bold py-3 font-size-14 text-success text-nowrap">
                         <i class="fa fa-check mr-2"></i>Other
                     </div>
-                    <select class="form-control form-control-sm ml-auto width-200px" v-model="doneStatus">
+                    <label class="my-0 ml-auto mr-3 d-inline-flex align-items-center">
+                        <input type="checkbox" {{request()->input('show-submitted') ? 'checked' : ''}}
+                            onchange="return fastLoad('/practice-management/process-claims?' + (this.checked ? 'show-submitted=1' : ''))">
+                        <span class="ml-1">Show Submitted</span>
+                    </label>
+                    <select class="form-control form-control-sm width-100px" v-model="doneStatus">
                         <option value="ALL">All</option>
                         <option value="PICKED_UP">Picked Up</option>
                         <option value="SUBMITTED">Submitted</option>

+ 15 - 0
resources/views/layouts/patient.blade.php

@@ -1031,4 +1031,19 @@
             addMCInitializer('patient-add-note-popup', init, '#patient-header')
         }).call(window);
     </script>
+    <script>
+        (function() {
+            function init() {
+                $('#sidebarMenu')
+                    .off('scroll')
+                    .on('scroll', function() {
+                        localStorage.sidebarMenuScrollTop = $(this).scrollTop();
+                    });
+                if(localStorage.sidebarMenuScrollTop) {
+                    $('#sidebarMenu').scrollTop(+localStorage.sidebarMenuScrollTop);
+                }
+            }
+            addMCInitializer('sidebarMenu', init, '#sidebarMenu')
+        }).call(window);
+    </script>
 @endsection