Kaynağa Gözat

Note->hcpPro NPX checks

Vijayakrishnan 3 yıl önce
ebeveyn
işleme
f0c4bdbc2e

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

@@ -1,4 +1,4 @@
-<?php $noteRates = $note->hcpPro->noteRates(); ?>
+<?php $noteRates = $note->hcpPro ? $note->hcpPro->noteRates() : []; ?>
 @if(!$note->is_bill_closed && !$note->is_billing_marked_done)
     @if($note->hasUnacknowledgedCancelledBillsByPro($pro))
         <b class="ml-3 text-warning-dark">

+ 31 - 29
resources/views/app/patient/note/dashboard.blade.php

@@ -157,7 +157,7 @@ use App\Models\Handout;
 
             <div class="px-2 border-right">
                 <div class="d-flex">
-                    <span><span class="text-secondary">{{$note->hcpPro->is_hcp ? 'HCP' : 'Pro'}}:</span> {{$note->hcpPro->name_first}} {{$note->hcpPro->name_last}}</span>
+                    <span><span class="text-secondary">{{$note->hcpPro && $note->hcpPro->is_hcp ? 'HCP' : 'Pro'}}:</span> @if($note->hcpPro) {{$note->hcpPro->name_first}} {{$note->hcpPro->name_last}} @endif</span>
                 </div>
             </div>
 
@@ -357,35 +357,37 @@ use App\Models\Handout;
                                 @endif
                             </div>
                         @endif
-                        @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(!$isVisitTemplateBased)
-                                    <div moe relative
-                                         class="{{ $note->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }} screen-only"
-                                         title="{{ $note->hcp_pro_id !== $pro->id ? 'Only the note\'s HCP can sign' : '' }}">
-                                        <a class="" href="" show start>Sign As HCP</a>
-                                        <form url="/api/note/signAsHcp" right>
-                                            <input type="hidden" name="uid" value="{{$note->uid}}">
-                                            <p>Sign this note as HCP?</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>
+                        @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
-                                    <a native target="_blank"
-                                       open-in-stag-popup
-                                       update-parent
-                                       mc-initer="note-sign-confirmation-{{$note->id}}"
-                                       popup-style="stag-popup-md"
-                                       title="Confirm and Sign"
-                                       class="screen-only"
-                                       href="{{route('patients.view.notes.view.sign-confirmation', compact('patient', 'note'))}}">
-                                        Sign Note As {{$note->hcpPro->is_hcp ? 'HCP' : 'Pro'}}
-                                    </a>
+                                    @if(!$isVisitTemplateBased)
+                                        <div moe relative
+                                             class="{{ $note->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }} screen-only"
+                                             title="{{ $note->hcp_pro_id !== $pro->id ? 'Only the note\'s HCP can sign' : '' }}">
+                                            <a class="" href="" show start>Sign As HCP</a>
+                                            <form url="/api/note/signAsHcp" right>
+                                                <input type="hidden" name="uid" value="{{$note->uid}}">
+                                                <p>Sign this note as HCP?</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>
+                                    @else
+                                        <a native target="_blank"
+                                           open-in-stag-popup
+                                           update-parent
+                                           mc-initer="note-sign-confirmation-{{$note->id}}"
+                                           popup-style="stag-popup-md"
+                                           title="Confirm and Sign"
+                                           class="screen-only"
+                                           href="{{route('patients.view.notes.view.sign-confirmation', compact('patient', 'note'))}}">
+                                            Sign Note As {{$note->hcpPro->is_hcp ? 'HCP' : 'Pro'}}
+                                        </a>
+                                    @endif
                                 @endif
                             @endif
                         @endif

+ 5 - 3
resources/views/app/patient/note/partials/cpp-bills-claims-container.blade.php

@@ -28,9 +28,11 @@
                             <div class="mb-2">
                                 <select name="hcpCompanyProUid" class="form-control form-control-sm">
                                     <option value="">-- select --</option>
-                                    @foreach($note->hcpPro->companyPros as $companyPro)
-                                        <option value="{{$companyPro->uid}}">{{$companyPro->pro->displayName() . ' / ' . $companyPro->company->name}}</option>
-                                    @endforeach
+                                    @if($note->hcpPro)
+                                        @foreach($note->hcpPro->companyPros as $companyPro)
+                                            <option value="{{$companyPro->uid}}">{{$companyPro->pro->displayName() . ' / ' . $companyPro->company->name}}</option>
+                                        @endforeach
+                                    @endif
                                 </select>
                             </div>
                             <div class="mb-0">