root vor 3 Jahren
Ursprung
Commit
12c5401d19

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


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

@@ -3294,23 +3294,37 @@ ORDER BY c.name_last, c.name_first
             c.uid as client_uid,
             n.effective_dateest,
             n.uid,
-            n.detail_json
+            n.detail_json,
+	    n.is_claim_closed,
+            ROUND(b.number_of_units * 60) as minutes,
+
+ n.note_reason_icd1 AS icd1,
+ n.note_reason_icd1description AS icd1description,
+ n.note_reason_icd2 AS icd2,
+ n.note_reason_icd2description AS icd2description,
+ n.note_reason_icd3 AS icd3,
+ n.note_reason_icd3description AS icd3description,
+ n.note_reason_icd4 AS icd4,
+ n.note_reason_icd4description AS icd4description,
+ n.note_reason_memo AS icd_memo
+
             ";
         $from = "FROM note AS n
-            JOIN pro AS hcp ON n.hcp_pro_id = hcp.id
-            JOIN pro AS na ON n.ally_pro_id = na.id
+            LEFT JOIN pro AS hcp ON n.hcp_pro_id = hcp.id
+            LEFT JOIN pro AS na ON n.ally_pro_id = na.id
             JOIN client AS c ON n.client_id = c.id
+	    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.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
             c.name_first NOT ILIKE '%test%' AND 
             c.name_last NOT ILIKE '%test%' AND
             n.id IN (SELECT note_id FROM bill WHERE code ILIKE '%treatment%' AND bill.is_cancelled IS NOT TRUE AND note_id IS NOT NULL) AND
-            n.id NOT IN (SELECT note_id FROM claim WHERE note_id IS NOT NULL) AND
+            -- 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
@@ -3337,7 +3351,7 @@ ORDER BY c.name_last, c.name_first
         $countResult = DB::select($countQuery);
         $total = $countResult[0]->count;
 
-	$defaultPageSize = 25;
+	$defaultPageSize = 50;
 
         $page = $request->input('page') ?: 1;
         $perPage = $request->input('per_page') ?: $defaultPageSize;

+ 3 - 2
app/Models/Segment.php

@@ -37,7 +37,7 @@ class Segment extends Model
         return $this->hasOne(SegmentSummarySuggestion::class, 'id', 'accepted_segment_summary_suggestion_id');
     }
 
-    public function getRecalculatedHtml($performer, $sessionKey){
+    public function getRecalculatedHtml($performer, $sessionKey, $getSummaryOnly = false){
         $pro = $performer->pro;
         $segment = $this; 
         $segmentTemplate = $this->segmentTemplate;
@@ -64,7 +64,8 @@ class Segment extends Model
             'intake_supplements',
             'plan_supplements'
         ];
-        if(!in_array($segmentTemplate->internal_name, $wizardPowered)) {
+	$editHtml = null;
+        if(!in_array($segmentTemplate->internal_name, $wizardPowered) && !$getSummaryOnly) {
             $editHtml = view('app.patient.segment-templates.' . $segmentTemplate->internal_name . '/edit', $data)->render();
         }
 

+ 16 - 0
resources/views/app/patient/note/resolve.blade.php

@@ -22,6 +22,22 @@
 
         <div class="d-flex align-items-center mb-2 mx-3">
 
+		<div moe>
+    <a href="" start show class="">Memo to Shawn: </a> <b>{{ @$parsedDetailJson->memo_to_shawn }}</b> &nbsp;
+
+    <form url="/api/note/upsertDetailJsonKeyVal" class="mcp-theme-1">
+        <input type="hidden" name="uid" value="{{$note->uid}}" class="form-control input-sm" />
+        <input type="hidden" name="key" value="memo_to_shawn" class="form-control input-sm" />
+        <div class="form-group">
+            <textarea name="val" class="form-control" >{{ @$parsedDetailJson->memo_to_shawn }}</textarea>
+        </div>
+        <div class="form-group text-nowrap mb-0">
+            <button class="btn btn-sm btn-primary" submit>Submit</button>
+            <button class="btn btn-sm btn-default border" close>Close</button>
+        </div>
+    </form>
+</div>
+
             @if(@$parsedDetailJson->farah_decision)
                 <span class="mr-2">Farah:</span>
                 <span class="mr-3">

+ 2 - 3
resources/views/app/patient/note/segment/suggestions_and_updates.blade.php

@@ -1,4 +1,3 @@
-
 <?php $iName = $segment->segmentTemplate->internal_name; ?>
 <?php $isLSSegment = strpos($iName, 'lifestyle_') === 0; ?>
 <div class="ml-2">
@@ -106,14 +105,14 @@
         @endif 
         <hr>
         <div class="d-block mt-1" moe>
-            <a href="" start>Propose suggestion</a>
+            <a href="" start show>Propose suggestion</a>
             <form url="/api/segment/proposeSegmentSummarySuggestion">
                 <input type="hidden" name="uid" value="{{$segment->uid}}">
                 <textarea name="proposedSuggestedSummaryHtml" rte>
                     @if($segment->accepted_suggestion_summary_html)
                         {!! $segment->accepted_suggestion_summary_html !!}
                     @else 
-                        {!! $segment->getRecalculatedHtml($performer, $performer->session_key)['summaryHtml'] !!}
+                        {!! true ? $segment->getRecalculatedHtml($performer, $performer->session_key, true)['summaryHtml'] : '' !!}
                     @endif 
                 </textarea>
                 @if($performer->pro->pro_type == 'ADMIN')

+ 37 - 11
resources/views/app/practice-management/notes-resolution-center.blade.php

@@ -2,6 +2,11 @@
 
 @section('content')
 
+	<style>tr.bgyellow td, tr.bgyellow th { background-color: lightyellow; }</style>
+	<style>tr.bggreen td, tr.bggreen th { background-color: #caffca; }</style>
+	<style>tr.bgblue td, tr.bgblue th { background-color: #d0f2fd; }</style>
+	<style>tr.claim-closed td:not(:first-child), tr.claim-closed th:not(:first-child) { background-color: lightgray; }</style>
+
     <div id="notes-resolution-center" class="p-3 mcp-theme-1">
 
         <div class="d-flex align-items-baseline">
@@ -27,19 +32,23 @@
         <table class="table table-sm table-bordered table-striped">
             <thead>
             <tr>
-                <th class="border-bottom-0 text-nowrap text-right pr-2">Visit #</th>
+                <th class="border-bottom-0 text-nowrap text-right pr-2">V#</th>
                 <th class="border-bottom-0 text-nowrap">Name</th>
                 <th class="border-bottom-0 text-nowrap">MCP</th>
-                <th class="border-bottom-0 text-nowrap">NA</th>
-                <th class="border-bottom-0 text-nowrap">Chart #</th>
+                <th class="border-bottom-0 text-nowrap d-none">NA</th>
+                <th class="border-bottom-0 text-nowrap d-none">Chart #</th>
                 <th class="border-bottom-0 text-nowrap">Date</th>
+                <th class="border-bottom-0 text-nowrap">Minutes</th>
+                <th class="border-bottom-0 text-nowrap">Note ICDs</th>
                 <th class="border-bottom-0 text-nowrap">Note Link</th>
                 <th class="border-bottom-0 text-nowrap">Farah Green?</th>
                 <th class="border-bottom-0 text-nowrap">Shawn Review?</th>
+                <th class="border-bottom-0 text-nowrap">Memo to Shawn</th>
                 <th class="border-bottom-0 text-nowrap">Shawn Green?</th>
                 <th class="border-bottom-0 text-nowrap">Shawn Reject?</th>
+                <th class="border-bottom-0 text-nowrap">Claiming Closed?</th>
                 <th class="border-bottom-0 text-nowrap">Kyle Billed?</th>
-                <th class="border-bottom-0 w-50"></th>
+                <th class="border-bottom-0 w-50 d-none"></th>
             </tr>
             </thead>
             <tbody>
@@ -64,24 +73,41 @@
                     }
                     $prevChartNumber = $row->chart_number;
                 @endphp
-                <tr>
+                <tr class="{{ $visitCount > 2 ? 'bgyellow':'' }} {{ $visitCount == 1 ? 'bggreen':'' }} {{ $visitCount == 2 ? 'bgblue':'' }} {{ $row->is_claim_closed ? 'claim-closed' : '' }}">
                     <td class="text-nowrap text-right pr-2">{{$visitCount}}</td>
                     <td class="text-nowrap">{{$row->client_name}}</td>
                     <td class="text-nowrap">{{$row->hcp_name}}</td>
-                    <td class="text-nowrap">{{$row->na_name}}</td>
-                    <td class="text-nowrap">{{$row->chart_number}}</td>
+                    <td class="text-nowrap d-none">{{$row->na_name}}</td>
+                    <td class="text-nowrap d-none">{{$row->chart_number}}</td>
                     <td class="text-nowrap">{{friendly_date($row->effective_dateest)}}</td>
+                    <td class="text-nowrap">{{ $row->minutes }}</td>
+                    <td class="text-nowrap">
+			<div class="">
+			@if($row->icd1) <div>{{$row->icd1}} {{$row->icd1description}}</div>@endif
+			@if($row->icd2) <div>{{$row->icd2}} {{$row->icd2description}}</div>@endif
+			@if($row->icd3) <div>{{$row->icd3}} {{$row->icd3description}}</div>@endif
+			@if($row->icd4) <div>{{$row->icd4}} {{$row->icd4description}}</div>@endif
+			@if($row->icd_memo) <div>{{$row->icd_memo}}</div>@endif
+			</div>
+		    </td>
                     <td class="text-nowrap">
-                        <a open-in-stag-popup update-parent title="Note: {{$row->client_name}}  -  {{friendly_date($row->effective_dateest)}}" href="/resolve-note/{{$row->client_uid}}/{{$row->uid}}">View</a>
-                        <a class="ml-2" href="/patients/view/{{$row->client_uid}}/notes/view/{{$row->uid}}"><i class="fa fa-external-link"></i></a>
+                        <a open-in-stag-popup update-parent title="Note: {{$row->client_name}}  -  {{friendly_date($row->effective_dateest)}}" href="/resolve-note/{{$row->client_uid}}/{{$row->uid}}">View</a>&nbsp;
+			<a href="/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->uid }}?suggestion_mode=on" target="popup" onclick="window.open("/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->uid }}?suggestion_mode=on",'popup','width=600,height=600,scrollbars=no,resizable=no'); return false;"><i class="fa fa-arrow-right"></i></a>
                     </td>
                     <td class="font-weight-bold text-success">{!! @$parsedDetailJson->farah_decision && @$parsedDetailJson->farah_decision === 'green' ? '<i class="fa fa-check"></i> Yes' : '' !!}</td>
                     <td class="font-weight-bold text-warning-dark">{!! @$parsedDetailJson->farah_decision && @$parsedDetailJson->farah_decision === 'red' ? '<i class="fa fa-exclamation-triangle"></i> Yes' : '' !!}</td>
+                    <td class="font-weight-bold">{{ @$parsedDetailJson->memo_to_shawn }}</td>
                     <td class="font-weight-bold text-success">{!! @$parsedDetailJson->shawn_decision && @$parsedDetailJson->shawn_decision === 'green' ? '<i class="fa fa-check"></i> Yes' : '' !!}</td>
                     <td class="font-weight-bold text-danger">{!! @$parsedDetailJson->shawn_decision && @$parsedDetailJson->shawn_decision === 'red' ? '<i class="fa fa-times"></i> Rejected' : '' !!}</td>
+                    <td class="font-weight-bold text-success">{{ $row->is_claim_closed }}</td>
                     <td class="font-weight-bold text-success">{!! @$parsedDetailJson->kyle_billed && @$parsedDetailJson->kyle_billed === 'yes' ? '<i class="fa fa-check"></i> Yes' : '' !!}</td>
-                    <td>
-                        <a href="/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->uid }}?suggestion_mode=on">Go to note</a>
+                    <td class="d-none">
+		
+			<a href="/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->uid }}?suggestion_mode=on" target="popup" 
+				onclick="window.open("/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->uid }}?suggestion_mode=on",'popup','width=600,height=600,scrollbars=no,resizable=no'); return false;"></a>
+
+                        <a open-in-stag-popup update-parent title="Note: {{$row->client_name}}  -  {{friendly_date($row->effective_dateest)}} - SUGGESTION MODE" 
+				href="/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->uid }}?suggestion_mode=on">Go to note</a>
                     </td>
                 </tr>
             @endforeach