root 3 роки тому
батько
коміт
fb33647b98

+ 68 - 0
app/Models/CareMonth.php

@@ -204,4 +204,72 @@ class CareMonth extends Model
         }
     
     }
+
+    public function calculateBillabilityForRmm(){
+
+        if(!$this->rmmPro) {
+            return [
+                'billable' => false,
+                'reason' => 'RMM not set on the care month.'
+            ];
+        }
+
+        $strategy = $this->rmm_payment_strategy;
+        if(!$strategy){
+            return [
+                'billable' => false,
+                'reason' => 'RPM strategy has not been set.'
+            ];
+        }
+
+        $rmmRpmPaymentAmount =  $this->rmm_payment_amount;
+        $has16PlusDays = $this->number_of_days_with_remote_measurements >= 16;
+        $hasRmmBilled20Minutes = $this->rm_total_time_in_seconds_by_rmm_pro >= 1200;
+        $hasMcpInteracted = $this->has_mcp_interacted_with_client_about_rm;
+        if($strategy == 'X16_DAYS'){
+            //only check for 16 days
+            if($has16PlusDays){
+                return [
+                    'billable' => true,
+                    'amount' => $rmmRpmPaymentAmount
+                ];
+            } else {
+                //not billable
+                return [
+                    'billable' => false,
+                    'reason' => "This care month does not have 16 or more measurement days."
+                ];
+            }
+        }
+
+        if($strategy == 'X16_DAYS_20_MINS_ON_OWN_MCP_COM_DURING_CM'){
+            if ($has16PlusDays && $hasRmmBilled20Minutes && $hasMcpInteracted) {
+                return [
+                    'billable' => true,
+                    'amount' => $rmmRpmPaymentAmount
+                ];
+            } else {
+                if(!$has16PlusDays){
+                    return [
+                        'billable' => false,
+                        'reason' => 'Care month does not have 16 or more measurement days.'
+                    ];
+                }
+                if(!$hasRmmBilled20Minutes){
+                    return [
+                        'billable' => false,
+                        'reason' => 'Care month does not have 20 minutes in entries.'
+                    ];
+                }
+                if(!$hasMcpInteracted){
+                    return [
+                        'billable' => false,
+                        'reason' => 'Care month does not have MCP interaction.'
+                    ];
+                }
+
+            }
+        }
+
+    }
 }

+ 2 - 2
resources/views/app/dashboard-dna.blade.php

@@ -145,7 +145,7 @@
                             <div class="card mb-4">
                                 <div class="card-header pl-2">
                                     <strong>
-                                        Measurements Pending Stamping
+                                        Recent Measurements
                                     </strong>
                                 </div>
                                 <div class="card-body p-0">
@@ -272,7 +272,7 @@
             function onDateChange(_newDate) {
                 // ajax load appts list as markup directly from server
                 selectedDate = _newDate;
-                $.get('/pro-dashboard-events-display/' + selectedDate + '/' + selectedDate, function (_data) {
+                $.get('/pro-dashboard-events-display/' + selectedDate + '/' + selectedDate + '?for=na', function (_data) {
                     let apptscontainer = $('#dna-dashboard-appointments');
                     apptscontainer.html(_data);
                     initFastLoad(apptscontainer);

+ 6 - 2
resources/views/app/dna/care-months.blade.php

@@ -19,6 +19,7 @@
                 <thead class="bg-light">
                     <tr>
                         <th class="border-0">Chart #</th>
+                        <th class="border-0">Care Month</th>
                         <th class="border-0">Name</th>
                         <th class="border-0">DOB</th>
                         <th class="border-0">Age</th>
@@ -39,10 +40,13 @@
                             </a>
                         </td>
                         <td class="text-nowrap">
-                            <a native target="_blank" href="{{route('patients.view.dashboard', $careMonth->client)}}">
-                                {{$careMonth->client->displayName()}}
+                            <a native target="_blank" href="{{route('patients.view.care-months.view.dashboard', ['patient' => $careMonth->client, 'careMonth' => $careMonth])}}">
+                                {{friendly_month($careMonth->start_date)}}
                             </a>
                         </td>
+                        <td class="text-nowrap">
+                            {{$careMonth->client->displayName()}}
+                        </td>
                         <td class="text-nowrap">{{ friendly_date_time($careMonth->client->dob, false) }}</td>
                         <td>{{ $careMonth->client->age_in_years ?  $careMonth->client->age_in_years : '-' }}</td>
                         <td>{{ $careMonth->client->sex }}</td>

+ 9 - 4
resources/views/app/dna/dashboard/cancelled_appointments_pending_ack.blade.php

@@ -16,13 +16,18 @@ $cancelledApptsPendingAck = $performer->pro->cancelledAppointmentsPendingAckReco
                 @foreach($cancelledApptsPendingAck as $appointment)
                 <tr class="{{$appointment->bgColor}}">
                     <td>
-                        <a native target="_blank" href="/patients/view/{{$appointment->clientUid}}" class="font-weight-bold d-block">
-                            {{$appointment->client->name_first }} {{$appointment->client->name_last }}
-                        </a>
+                        <div class="d-flex align-items-baseline">
+                            <a native target="_blank" href="/patients/view/{{$appointment->clientUid}}" class="font-weight-bold d-block">
+                                {{$appointment->client->name_first }} {{$appointment->client->name_last }}
+                            </a>
+                            @if($appointment->pro)
+                                <span class="mx-2 text-secondary">•</span>
+                                <span class="text-secondary font-weight-normal">{{$appointment->pro->displayName()}}</span>
+                            @endif
+                        </div>
                         <div class="mt-1">
                             <a native target="_blank" href="/patients/view/{{$appointment->clientUid}}/calendar/{{$appointment->uid}}">
                                 {{ friendly_date_time($appointment->start_time) }} - {{ friendly_date_time($appointment->end_time) }}</a>
-                            <span class="text-secondary">{{ friendly_timezone($appointment->timezone) }}</span>
                         </div>
                         @if($appointment->title)
                         <span class="d-inline-block mt-1 text-secondary text-sm">

+ 5 - 3
resources/views/app/dna/dashboard/encounters_in_progress.blade.php

@@ -25,7 +25,7 @@
                                 {{$row->client->chart_number}}
                             </td>
                             <td>
-                                <a href="{{ route('patients.view.dashboard', $row->client) }}">
+                                <a native target="_blank" href="{{ route('patients.view.dashboard', $row->client) }}">
                                     {{$row->client->displayName()}}
                                 </a>
                             </td>
@@ -39,10 +39,12 @@
                                 @include('app.patient.coverage_column_renderer', ['patient'=>$row->client])
                             </td>
                             <td class="text-nowrap">
-                                {{$row->client->mcp->name_display ?? '' }}
+                                {{$row->hcpPro->displayName()}}
                             </td>
                             <td class="text-nowrap">
-                                {{friendly_date($row->effective_dateest)}}
+                                <a native target="_blank" href="{{ route('patients.view.notes.view.dashboard', ['patient' => $row->client, 'note' => $row]) }}">
+                                    {{friendly_date($row->effective_dateest)}}
+                                </a>
                             </td>
                         </tr>
                         @endforeach

+ 1 - 1
resources/views/app/dna/dashboard/encounters_pending_my_review.blade.php

@@ -46,7 +46,7 @@
                             @include('app.patient.coverage_column_renderer', ['patient'=>$row->client])
                         </td>
                         <td class="text-nowrap">
-                            {{$row->hcpPro->name_display ?? '' }}
+                            {{$row->hcpPro->displayName()}}
                         </td>
                         <td class="text-nowrap">
                             {{friendly_date($row->effective_dateest)}}

+ 1 - 1
resources/views/app/dna/dashboard/measurements-pending-stamping.blade.php

@@ -16,7 +16,7 @@
         @foreach($measurementsPendingReviewAsDna as $row)
             <tr>
                 <td class="pl-2">
-                    <a href="{{ route('patients.view.dashboard', $row->client) }}">
+                    <a href="/patients/view/{{$row->client->uid}}/care-months/view/{{$row->careMonth->uid}}">
                         {{$row->client->displayName()}}
                     </a>
                 </td>

+ 1 - 1
resources/views/app/generic-bills/add-bill-form/Note.blade.php

@@ -3,7 +3,7 @@
 <?php $genericCompanyPro = $genericPro->defaultCompanyPro; ?>
 
 {{-- if no defaultCompanyPro on this pro, STOP --}}
-@if(!$genericPro->defaultCompanyPro)
+@if(!$genericCompanyPro)
     <form url="/api/bill/createForGeneric">
         <div class="border rounded bg-aliceblue p-2 text-nowrap">
             <div class="mb-2 font-weight-bold">

+ 11 - 2
resources/views/app/generic-bills/add-bill-form/_default-fields.blade.php

@@ -1,10 +1,19 @@
 @if($pro && $pro->pro_type === 'ADMIN')
     <div class="mb-2 min-width-300px">
         <label for="" class="text-secondary text-sm">Company Pro</label>
-        <div class="p-2 border bg-light rounded">{{$genericCompanyPro->pro->displayName()}} / {{$genericCompanyPro->company->name}}</div>
+        <div class="p-2 border bg-light rounded">
+            @if(@$genericCompanyPro)
+                {{$genericCompanyPro->pro->displayName()}} / {{$genericCompanyPro->company->name}}
+            @else
+                <span class="text-danger">(not set)</span>
+            @endif
+        </div>
     </div>
 @endif
-<input type="hidden" name="genericCompanyProUid" value="{{$genericCompanyPro->uid}}">
+<input type="hidden" name="genericProUid" value="{{$genericPro->uid}}">
+@if(@$genericCompanyPro)
+    <input type="hidden" name="genericCompanyProUid" value="{{$genericCompanyPro->uid}}">
+@endif
 @if(@$note)
     <input type="hidden" name="optionalNoteUid" value="{{$note->uid}}">
 @endif

+ 9 - 3
resources/views/app/mcp/dashboard/appointments-list.blade.php

@@ -14,9 +14,15 @@
                 @foreach($appointments as $appointment)
                     <tr class="{{$appointment->bgColor}}">
                         <td>
-                            <a href="/patients/view/{{$appointment->clientUid}}" class="font-weight-bold d-block">
-                                {{$appointment->clientName }}
-                            </a>
+                            <div class="d-flex align-items-baseline">
+                                <a href="/patients/view/{{$appointment->clientUid}}" class="font-weight-bold d-block">
+                                    {{$appointment->clientName }}
+                                </a>
+                                @if(request()->input('for') === 'na')
+                                    <span class="mx-2 text-secondary">•</span>
+                                    <span class="text-secondary font-weight-normal">{{$appointment->proName}}</span>
+                                @endif
+                            </div>
                             <div class="mt-1">
                                 <a href="/patients/view/{{$appointment->clientUid}}/calendar/{{$appointment->uid}}">
                                     {{ $appointment->friendlyStartTime }} - {{ $appointment->friendlyEndTime }}</a>

+ 121 - 52
resources/views/app/patient/care-month/dashboard.blade.php

@@ -338,64 +338,133 @@
                                     </div>
                                 @endif
 
-                                <div class="mt-2 d-flex align-items-baseline">
-                                    <span class="font-weight-bold text-secondary mr-1">Billing:</span>
-                                    <div>
-                                @if($careMonth->mcpRmGenericBill == null )
-                                    
-                                    @php 
-                                        $rpmBillability = $careMonth->calculateBillabilityForMcp();
-                                    @endphp 
-
-                                    @if(!$rpmBillability['billable'])
-                                        <div class="alert alert-info">{{$rpmBillability['reason']}}</div>
-                                    @else 
-                                        <div moe relative class="d-inline-block">
-                                            <a class="font-weight-bold" href="" show start>Bill ${{$rpmBillability['amount']}}</a>
-                                            <form url="/api/careMonth/generateRmGenericBillForMcpAndAutoSign">
-                                                <input type="hidden" name="uid" value="{{$careMonth->uid}}">
-                                                <p>Bill ${{$rpmBillability['amount']}} for this care month?</p>
-                                                <div class="mb-0">
-                                                    <button class="btn btn-success btn-sm" submit>Bill &amp; Sign</button>
-                                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
-                                                </div>
-                                            </form>
-                                        </div>   
-                                    @endif
-                                @else 
-                                    <div class="font-weight-bold text-success d-inline-flex align-items-baseline">
-                                        <i class="fa fa-check mr-1"></i>
-                                        <span>Billed: ${{$careMonth->mcpRmGenericBill->generic_pro_expected_payment_amount}}</span>
-                                        @if($careMonth->mcpRmGenericBill->is_signed_by_generic_pro)
-                                            <span class="text-success ml-1 text-sm">(Signed)</span>
-                                        @else 
-                                            <div moe relative class="d-inline-block text-sm ml-2">
-                                                <a class="font-weight-bold" href="" show start>Sign</a>
-                                                <form url="/api/bill/signAsGenericPro" right>
-                                                    <input type="hidden" name="uid" value="{{$careMonth->mcpRmGenericBill->uid}}">
-                                                    <p>Sign this bill?</p>
-                                                    <div class="mb-0">
-                                                        <button class="btn btn-success btn-sm" submit>Sign</button>
-                                                        <button class="btn btn-default border btn-sm" cancel>Cancel</button>
-                                                    </div>
-                                                </form>
-                                            </div>
+                                {{-- mcp billing --}}
+                                @if($performer->pro->pro_type == 'ADMIN' || $careMonth->mcp && $pro->id === $careMonth->mcp->id)
+                                    <div class="mt-2 d-flex align-items-baseline">
+                                        @if($performer->pro->pro_type == 'ADMIN')
+                                            <span class="font-weight-bold text-secondary mr-1">Billing (MCP):</span>
+                                        @else
+                                            <span class="font-weight-bold text-secondary mr-1">Billing:</span>
                                         @endif
-                                        <div moe relative class="d-inline-block text-sm ml-2">
-                                            <a class="font-weight-normal text-danger" href="" show start>Cancel</a>
-                                            <form url="/api/bill/markCancelled" right>
-                                                <input type="hidden" name="uid" value="{{$careMonth->mcpRmGenericBill->uid}}">
-                                                <p class="text-dark font-weight-normal">Cancel this bill?</p>
-                                                <div class="mb-0">
-                                                    <button class="btn btn-primary btn-sm" submit>Cancel</button>
-                                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                        <div>
+                                            @if($careMonth->mcpRmGenericBill == null )
+                                                @php
+                                                    $rpmBillability = $careMonth->calculateBillabilityForMcp();
+                                                @endphp
+                                                @if(!$rpmBillability['billable'])
+                                                    <div class="alert alert-info">{{$rpmBillability['reason']}}</div>
+                                                @else
+                                                    <div moe relative class="d-inline-block">
+                                                        <a class="font-weight-bold" href="" show start>Bill ${{$rpmBillability['amount']}}</a>
+                                                        <form url="/api/careMonth/generateRmGenericBillForMcpAndAutoSign">
+                                                            <input type="hidden" name="uid" value="{{$careMonth->uid}}">
+                                                            <p>Bill ${{$rpmBillability['amount']}} for this care month?</p>
+                                                            <div class="mb-0">
+                                                                <button class="btn btn-success btn-sm" submit>Bill &amp; Sign</button>
+                                                                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                            </div>
+                                                        </form>
+                                                    </div>
+                                                @endif
+                                            @else
+                                                <div class="font-weight-bold text-success d-inline-flex align-items-baseline">
+                                                    <i class="fa fa-check mr-1"></i>
+                                                    <span>Billed: ${{$careMonth->mcpRmGenericBill->generic_pro_expected_payment_amount}}</span>
+                                                    @if($careMonth->mcpRmGenericBill->is_signed_by_generic_pro)
+                                                        <span class="text-success ml-1 text-sm">(Signed)</span>
+                                                    @else
+                                                        <div moe relative class="d-inline-block text-sm ml-2">
+                                                            <a class="font-weight-bold" href="" show start>Sign</a>
+                                                            <form url="/api/bill/signAsGenericPro" right>
+                                                                <input type="hidden" name="uid" value="{{$careMonth->mcpRmGenericBill->uid}}">
+                                                                <p>Sign this bill?</p>
+                                                                <div class="mb-0">
+                                                                    <button class="btn btn-success btn-sm" submit>Sign</button>
+                                                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                                </div>
+                                                            </form>
+                                                        </div>
+                                                    @endif
+                                                    <div moe relative class="d-inline-block text-sm ml-2">
+                                                        <a class="font-weight-normal text-danger" href="" show start>Cancel</a>
+                                                        <form url="/api/bill/markCancelled" right>
+                                                            <input type="hidden" name="uid" value="{{$careMonth->mcpRmGenericBill->uid}}">
+                                                            <p class="text-dark font-weight-normal">Cancel this bill?</p>
+                                                            <div class="mb-0">
+                                                                <button class="btn btn-primary btn-sm" submit>Cancel</button>
+                                                                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                            </div>
+                                                        </form>
+                                                    </div>
                                                 </div>
-                                            </form>
+                                            @endif
                                         </div>
                                     </div>
                                 @endif
+
+                                {{-- rmm billing --}}
+                                @if($performer->pro->pro_type == 'ADMIN' || $careMonth->rmmPro && $pro->id === $careMonth->rmmPro->id)
+                                    <div class="mt-2 d-flex align-items-baseline">
+                                        @if($performer->pro->pro_type == 'ADMIN')
+                                            <span class="font-weight-bold text-secondary mr-1">Billing (RMM):</span>
+                                        @else
+                                            <span class="font-weight-bold text-secondary mr-1">Billing:</span>
+                                        @endif
+                                        <div>
+                                            @if($careMonth->rmmRmGenericBill == null )
+                                                @php
+                                                    $rpmBillability = $careMonth->calculateBillabilityForRmm();
+                                                @endphp
+                                                @if(!$rpmBillability['billable'])
+                                                    <div class="font-weight-bold">{{$rpmBillability['reason']}}</div>
+                                                @else
+                                                    <div moe relative class="d-inline-block">
+                                                        <a class="font-weight-bold" href="" show start>Bill ${{$rpmBillability['amount']}}</a>
+                                                        <form url="/api/careMonth/generateRmGenericBillForRmmAndAutoSign">
+                                                            <input type="hidden" name="uid" value="{{$careMonth->uid}}">
+                                                            <p>Bill ${{$rpmBillability['amount']}} for this care month?</p>
+                                                            <div class="mb-0">
+                                                                <button class="btn btn-success btn-sm" submit>Bill &amp; Sign</button>
+                                                                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                            </div>
+                                                        </form>
+                                                    </div>
+                                                @endif
+                                            @else
+                                                <div class="font-weight-bold text-success d-inline-flex align-items-baseline">
+                                                    <i class="fa fa-check mr-1"></i>
+                                                    <span>Billed: ${{$careMonth->rmmRmGenericBill->generic_pro_expected_payment_amount}}</span>
+                                                    @if($careMonth->rmmRmGenericBill->is_signed_by_generic_pro)
+                                                        <span class="text-success ml-1 text-sm">(Signed)</span>
+                                                    @else
+                                                        <div moe relative class="d-inline-block text-sm ml-2">
+                                                            <a class="font-weight-bold" href="" show start>Sign</a>
+                                                            <form url="/api/bill/signAsGenericPro" right>
+                                                                <input type="hidden" name="uid" value="{{$careMonth->rmmRmGenericBill->uid}}">
+                                                                <p>Sign this bill?</p>
+                                                                <div class="mb-0">
+                                                                    <button class="btn btn-success btn-sm" submit>Sign</button>
+                                                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                                </div>
+                                                            </form>
+                                                        </div>
+                                                    @endif
+                                                    <div moe relative class="d-inline-block text-sm ml-2">
+                                                        <a class="font-weight-normal text-danger" href="" show start>Cancel</a>
+                                                        <form url="/api/bill/markCancelled" right>
+                                                            <input type="hidden" name="uid" value="{{$careMonth->rmmRmGenericBill->uid}}">
+                                                            <p class="text-dark font-weight-normal">Cancel this bill?</p>
+                                                            <div class="mb-0">
+                                                                <button class="btn btn-primary btn-sm" submit>Yes</button>
+                                                                <button class="btn btn-default border btn-sm" cancel>No</button>
+                                                            </div>
+                                                        </form>
+                                                    </div>
+                                                </div>
+                                            @endif
+                                        </div>
                                     </div>
-                                </div>
+                                @endif
 
                                 <div class="mt-2">
                                     {{-- rm reasons --}}

+ 39 - 13
resources/views/app/patient/coverage_column_renderer.blade.php

@@ -1,9 +1,9 @@
-<div class="d-flex align-items-center">
-    <?php 
-        $coverage = $patient->getPrimaryCoverage();
-        $coverageStatus = $patient->getPrimaryCoverageStatus();
+<div class="d-flex align-items-baseline">
+    <?php
+    $coverage = $patient->getPrimaryCoverage();
+    $coverageStatus = $patient->getPrimaryCoverageStatus();
     ?>
-    
+
     @if($coverageStatus === 'YES')
         <i class="fa fa-check-circle text-success"></i>
     @elseif($coverageStatus === 'NO')
@@ -20,18 +20,26 @@
         @elseif($coverage && $coverage->plan_type == 'COMMERCIAL' && !$coverage->auto_commercial_is_match_found)
             <i class="fa fa-times text-danger"></i>
         @else
-        <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
+            <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
         @endif
     @endif
-    
-    @if($coverage)
-        @if($coverage->plan_type === 'MEDICAID' && $coverage->mcdPayer)
-            <span class="ml-2 {{ @$truncateName ? 'coverage-payer-name':'' }}" title="{{$coverage->mcdPayer->name}}">{{$coverage->mcdPayer->name}}</span>
-        @elseif($coverage->plan_type === 'COMMERCIAL' && $coverage->payer)
-            <span class="ml-2 {{ @$truncateName ? 'coverage-payer-name':'' }}" title="{{$coverage->payer->name}}">{{$coverage->payer->name}}</span>
+
+    <div class="ml-2">
+        @if($coverage)
+            @if($coverage->plan_type === 'MEDICAID' && $coverage->mcdPayer)
+                <span class="{{ @$truncateName ? 'coverage-payer-name':'' }}"
+                      title="{{$coverage->mcdPayer->name}}">{{$coverage->mcdPayer->name}}</span>
+            @elseif($coverage->plan_type === 'COMMERCIAL' && $coverage->payer)
+                <span class="{{ @$truncateName ? 'coverage-payer-name':'' }}"
+                      title="{{$coverage->payer->name}}">{{$coverage->payer->name}}</span>
+            @else
+                <span class="{{ @$truncateName ? 'coverage-payer-name':'' }}"
+                      title="{{$coverage->insuranceDisplayName()}}">{{$coverage->insuranceDisplayName()}}</span>
+            @endif
         @else
-            <span class="ml-2 {{ @$truncateName ? 'coverage-payer-name':'' }}" title="{{$coverage->insuranceDisplayName()}}">{{$coverage->insuranceDisplayName()}}</span>
+            <small class="ml-2 text-muted">(No insurance)</small>
         @endif
+<<<<<<< HEAD
     @else
         <small class="ml-2 text-muted">(No insurance)</small>
     @endif
@@ -48,3 +56,21 @@
         @endif
     @endif
 @endif
+=======
+        <div class="">
+            @if($coverage)
+                @if($coverage && $coverage->plan_type === 'MEDICARE')
+                    @if(@$patient->mpb_remaining !== null)
+                        <span class="text-muted d-block text-sm">Deductible: {{format_number(@$patient->mpb_remaining)}}</span>
+                    @endif
+                @endif
+                @if($coverage->plan_type === 'COMMERCIAL')
+                    @if(@$coverage->deductible_amount !== null)
+                        <span class="text-muted d-block text-sm">Deductible: {{format_number(@$coverage->deductible_amount)}}</span>
+                    @endif
+                @endif
+            @endif
+        </div>
+    </div>
+</div>
+>>>>>>> a9a2330bfd002853a7adea9d2e38abd44071358b

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

@@ -633,9 +633,7 @@ use App\Models\Handout;
                         @endif
                         @if($note->hcpPro)
                             @if(!$note->is_signed_by_hcp )
-                                @if($note->hcp_pro_id !== $pro->id)
-                                    <span class="text-sm text-secondary screen-only">Only the note's HCP can sign</span>
-                                @else
+                                @if($note->hcp_pro_id === $pro->id)
                                     @if(!$isVisitTemplateBased)
                                         <div moe relative
                                              class="{{ $note->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }} screen-only"
@@ -747,7 +745,7 @@ use App\Models\Handout;
                 @if(!$note->is_signed_by_ally)
                     <span class="ml-1">
                         Please review and
-                        <span moe class="d-inline">
+                        <span moe relative class="d-inline-block">
                             <a class="font-weight-bold" href="" show start>sign</a>
                             <form url="/api/note/signAsAlly">
                                 <input type="hidden" name="uid" value="{{$note->uid}}">

+ 1 - 1
resources/views/layouts/patient-header.blade.php

@@ -94,7 +94,7 @@ $addressParts .= implode(", ", $addressPart2);
                     </div>
                 </form>
             </div>
-            <h6 class="ml-3">{{$patient->age_in_years}} Y, {{$patient->sex}}</h6>
+            <h6 class="ml-3">{{$patient->age_in_years}} Y {{$patient->sex}}</h6>
             <h6 class="d-inline-flex align-items-baseline ml-2">
                 <span><i class="chart mr-2">#{{$patient->chart_number}}</i></span>
                 <div class="on-hover-show d-inline-block on-hover-opaque">

+ 12 - 11
resources/views/layouts/patient.blade.php

@@ -230,19 +230,20 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 						<a class="nav-link {{ strpos($routeName, 'patients.view.primary-coverage') === 0 ? 'active' : '' }}" href="{{ route('patients.view.primary-coverage', $patient) }}">Primary Coverage</a>
 					</li>
 					@if($performer->pro->pro_type == 'ADMIN' || $performer->pro->id == $patient->default_na_pro_id)
-					<li class="nav-item">
-						<a class="nav-link {{ strpos($routeName, 'patients.view.mcp-requests') === 0 ? 'active' : '' }}" href="{{ route('patients.view.mcp-requests', $patient) }}">MCP Requests</a>
-					</li>
-					<li class="nav-item">
-						<a class="nav-link {{ strpos($routeName, 'patients.view.eligible-refreshes') === 0 ? 'active' : '' }}" href="{{ route('patients.view.eligible-refreshes', $patient) }}">Eligible Refreshes</a>
-					</li>
 					<li class="nav-item">
 						<a class="nav-link {{ strpos($routeName, 'patients.view.insurance-coverage') === 0 ? 'active' : '' }}" href="{{ route('patients.view.insurance-coverage-history', $patient) }}">Insurance Coverage History</a>
 					</li>
-
-					<li class="nav-item">
-						<a class="nav-link {{ strpos($routeName, 'patients.view.claims-resolver') === 0 ? 'active' : '' }}" href="{{ route('patients.view.claims-resolver', $patient) }}">Claims Resolver</a>
-					</li>
+						@if($performer->pro->pro_type == 'ADMIN')
+							<li class="nav-item">
+								<a class="nav-link {{ strpos($routeName, 'patients.view.mcp-requests') === 0 ? 'active' : '' }}" href="{{ route('patients.view.mcp-requests', $patient) }}">MCP Requests</a>
+							</li>
+							<li class="nav-item">
+								<a class="nav-link {{ strpos($routeName, 'patients.view.eligible-refreshes') === 0 ? 'active' : '' }}" href="{{ route('patients.view.eligible-refreshes', $patient) }}">Eligible Refreshes</a>
+							</li>
+							<li class="nav-item">
+								<a class="nav-link {{ strpos($routeName, 'patients.view.claims-resolver') === 0 ? 'active' : '' }}" href="{{ route('patients.view.claims-resolver', $patient) }}">Claims Resolver</a>
+							</li>
+						@endif
 					@endif
 					<li class="nav-item">
 						<a class="nav-link {{ strpos($routeName, 'patients.view.accounts') === 0 ? 'active' : '' }}" href="{{ route('patients.view.accounts', $patient) }}">Linked Accounts</a>
@@ -361,7 +362,7 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 						<span class="mr-2"><b>Best Time to Call:</b> {{ $patient->best_time_to_call ?? '-' }}</span>
 						@include('app.patient.partials.update-best-time-to-call')
 					</div>
-					
+
 				</div>
 				@endif
 				{{--<div class="text-container border-bottom d-flex align-items-center mcp-theme-1 px-3">