Browse Source

Merge branch 'master' into dev-vj

Vijayakrishnan 3 năm trước cách đây
mục cha
commit
90377afdb5

BIN
app/Http/Controllers/.PracticeManagementController.php.swp


+ 14 - 7
app/Http/Controllers/PracticeManagementController.php

@@ -328,10 +328,11 @@ SELECT effective_date, count(*), sum(number_of_units) as units FROM bill WHERE c
 
     public function allNotes(Request $request)
     {
+        $filters = $request->all();
         $query = Note::query();
+        $query = $query->where('is_core_note', false);
+        
         
-        $filters = $request->all();
-
         $this->filterMultiQuery($request, $query, 'created_at', 'created_at_category', 'created_at_value_1', 'created_at_value_2');
         $this->filterMultiQuery($request, $query, 'effective_dateest', 'effective_date_category', 'effective_date_value_1', 'effective_date_value_2');
        
@@ -3655,8 +3656,12 @@ ORDER BY c.name_last, c.name_first
 	    JOIN bill AS b ON (b.note_id = n.id AND b.is_cancelled IS NOT TRUE AND b.code ILIKE '%treatment%')
             ";
         $where = "WHERE
-            n.is_signed_by_hcp IS TRUE AND
-            -- n.is_claim_closed IS NOT TRUE AND
+            
+		-- n.visit_number = 2 AND
+		n.is_signed_by_hcp IS TRUE AND
+            -- n.effective_dateest < '2022-03-01' AND
+	    -- n.id IN (SELECT note_id FROM segment WHERE summary_html ILIKE '%n95%') AND
+	    n.is_claim_closed IS NOT TRUE AND
             n.is_cancelled IS NOT TRUE AND 
             n.created_at::DATE >= '2022-01-01'::DATE AND
             c.client_engagement_status_category <> 'DUMMY' AND
@@ -3666,8 +3671,8 @@ ORDER BY c.name_last, c.name_first
             -- n.id NOT IN (SELECT note_id FROM claim WHERE note_id IS NOT NULL) AND
             c.is_part_b_primary = 'YES' AND
             c.latest_eligible_refresh_at::DATE >= '2022-01-01' AND
-            c.mpb_remaining = 0 AND
-            c.created_at::DATE >= '2022-01-01'::DATE
+            c.mpb_remaining = 0 -- AND
+            -- c.created_at::DATE >= '2022-01-01'::DATE
             ";
         $filters = [];
         if($request->input('f')) {
@@ -3683,7 +3688,9 @@ ORDER BY c.name_last, c.name_first
             $filters = '';
         }
         // $filters = '';
-        $orderBy = "ORDER BY c.id ASC, n.effective_dateest ASC";
+        $orderBy = "ORDER BY 
+		c.id ASC, 
+		n.id ASC, n.effective_dateest ASC";
 
         $countQuery = "SELECT count(*) {$from} {$where} {$filters}";
         // dd($countQuery);

+ 1 - 1
config/app.php

@@ -147,7 +147,7 @@ return [
     'googleSpreadsheetProductsSheetName' => env('GOOGLE_SPREADSHEET_PRODUCTS_SHEET_NAME'),
 
     'adminNoteHcpProUid' => env('ADMIN_NOTE_HCP_PRO_UID'),
-
+    @
     /*
     |--------------------------------------------------------------------------
     | Autoloaded Service Providers

+ 11 - 2
public/css/style.css

@@ -3569,7 +3569,16 @@ table.v-top th {
 .note_template_psych_followup_visit .edit-container [visit-moe]>form>div:last-child>.d-inline-flex {
     display: flex !important;
 }
-.segments-list .summary-container p>br:first-child:last-child,
-.segments-list .summary-container p:empty {
+<<<<<<< HEAD
+.cpc-cancelled {
+    pointer-events: none;
+    opacity: 0.4;
+    border: 1px dashed #333;
+    padding: 5px;
+}
+=======
+.note-container .segments-list p>br:first-child:last-child,
+.note-container .segments-list p:empty {
     display: none;
 }
+>>>>>>> c1e0c71f9c582039c8765ac74613532abceffe59

+ 1 - 1
resources/views/app/patient/note/_create-bill-only.blade.php

@@ -59,7 +59,7 @@
                                         @if($i == 20) {
                                         <option value="{{ 21/60 }}" selected>{{ 21 }} minutes</option>
                                         @else 
-                                            @if($i <= 30 || $i >= 60)
+                                            @if($i == 40 || $i <= 30 || $i >= 60)
                                             <option value="{{ $i/60 }}">{{ $i }} minutes</option>        
                                             @endif 
                                         @endif

+ 1 - 1
resources/views/app/patient/note/_create-bill.blade.php

@@ -60,7 +60,7 @@
                                     @if($i == 20) {
                                         <option value="{{ 21/60 }}" selected>{{ 21 }} minutes</option>
                                     @else 
-                                        @if($i <= 30 || $i >= 60)
+                                        @if($i == 40 || $i <= 30 || $i >= 60)
                                         <option value="{{ $i/60 }}">{{ $i }} minutes</option>        
                                         @endif 
                                     @endif

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

@@ -70,7 +70,7 @@
                 }
             }
         ?>
-        @if(!$rhsEdit)
+        @if(!$rhsEdit && !in_array($segment->display_title, ['Subjective', 'Plan']))
             <div class="inset-comment summary-container p-2">
                 {!! $html !!}
             </div>

+ 6 - 0
resources/views/app/patient/notes.blade.php

@@ -254,6 +254,9 @@
             @endif
             <th class="border-0 text-secondary">HCP Signed</th>
             <th class="border-0 text-secondary">ICDs</th>
+            @if($pro->pro_type == 'ADMIN')
+                <th class="border-0 text-secondary">Is Bill Closed</th>
+            @endif
             <th class="border-0 text-secondary">&nbsp;</th>
             <th class="border-0 text-secondary">Actions</th>
         </tr>
@@ -312,6 +315,9 @@
                         -
                     @endif
                 </td>
+                @if($pro->pro_type == 'ADMIN')
+                    <td>{{ $note->is_bill_closed ? 'YES':'NO' }}</td>
+                @endif
                 <td>
                     <div class="position-relative c-pointer text-center stag-tooltip">
                         <i class="fa fa-info-circle"></i>

+ 17 - 0
resources/views/app/patient/partials/undo-manual-determination.blade.php

@@ -0,0 +1,17 @@
+<div moe>
+	<a start show title="Cancel manual determination" class="text-danger">Cancel?</a>
+	<form url="/api/clientPrimaryCoverage/cancel" class="mcp-theme-1">
+		<input type="hidden" name="uid" value="{{ $cpc->uid }}">
+		<div class="mb-2">
+			<p>Cancel manual determination?</p>
+		</div>
+		<div class="mb-2">
+			<label class="font-weight-bold mb-1">Reason Memo:</label>
+			<input type="text" class="form-control form-control-sm" name="memo">
+		</div>
+		<div>
+			<button submit class="btn btn-sm btn-primary mr-1">Submit</button>
+			<button cancel class="btn btn-sm btn-default border">Cancel</button>
+		</div>
+	</form>
+</div>

+ 15 - 1
resources/views/app/patient/primary-coverage.blade.php

@@ -26,6 +26,20 @@
             $cpc->auto_detail_json = json_decode($cpc->auto_detail_json);
         @endphp
         <div class="d-flex align-items-center mb-2">
+            @if($cpc->is_manually_determined)
+                <div>
+                    <span class="d-inline bg-warning px-2 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
+                        @include('app.patient.partials.undo-manual-determination')
+                    @endif
+                    <span class="mx-1 text-muted text-sm">|</span>
+                </div>
+                
+            @else
+
+            @endif
             <h1 class="mr-2 mb-0">Is Covered: {{$cpc->is_covered}}</h1>
             @if($cpc->plan_type == 'MEDICARE')
                 @include('app.patient.primary-coverage-refresh', ['endpoint'=>'refreshCoverageForMedicare'])
@@ -62,7 +76,7 @@
             @endif
         </div>
 
-        <div class="mt-4">
+        <div class="mt-4 {{ $cpc->is_cancelled ? 'cpc-cancelled':'' }}">
           <div class="row">
             <div class="col-md-12">
               @include('app.patient.primary-coverage-view')

+ 8 - 0
resources/views/app/practice-management/notes-resolution-center-v2.blade.php

@@ -67,6 +67,14 @@
                                     <a href="/patients/view/{{$row->client_uid}}" class="text-nowrap d-block pl-2" target="top" native>Chart #: {{$row->chart_number}}</a>
                                     <span class="text-nowrap d-block pl-2">Pro: {{$row->hcp_name}}</span>
                                     <span class="text-nowrap d-block pl-2">Date: {{friendly_date($row->effective_dateest)}}</span>
+                                    <span class="text-nowrap d-block pl-2">Minutes: {{$row->minutes}}</span>
+					@for($i = 1; $i < 5; $i++)
+                                    		<span class="text-nowrap d-block pl-2">
+							@if($row->{"icd".$i}) 
+								{{ $row->{"icd".$i} }} {{$row->{"icd".$i."description"} }}
+							@endif
+						</span>
+					@endfor
                                 </div>
                             </td>
                         </tr>

+ 3 - 0
spec/rpt-queries.sql

@@ -92,3 +92,6 @@ group by mcp_pro_id
 
 
 -- DATE | MCP | COUNT
+
+UPDATE note SET visit_number = ((SELECT COUNT(*)
+ FROM note n WHERE n.id < note.id AND n.client_id = note.client_id AND n.is_cancelled IS NOT TRUE AND n.is_core_note IS FALSE) + 1) WHERE is_cancelled IS NOT TRUE;