|
@@ -0,0 +1,2147 @@
|
|
|
|
+<?php
|
|
|
|
+/** @var App\Models\Note $note */
|
|
|
|
+/** @var App\Models\Pro $pro */
|
|
|
|
+/** @var App\Models\Section $section */
|
|
|
|
+/** @var $allSections */
|
|
|
|
+?>
|
|
|
|
+@extends ('layouts.patient')
|
|
|
|
+
|
|
|
|
+@section('inner-content')
|
|
|
|
+
|
|
|
|
+ <?php
|
|
|
|
+ $hasBills = false;
|
|
|
|
+ if($note->bills->count()) {
|
|
|
|
+ foreach ($note->bills as $bill) {
|
|
|
|
+ if(!$bill->is_cancelled) {
|
|
|
|
+ $hasBills = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+
|
|
|
|
+ {{--
|
|
|
|
+ @if(!count($pro->companyProPayers) || /* pro has no assoc with any payer */
|
|
|
|
+ ($patient->is_part_b_primary !== 'YES' && !$patient->non_mc_primary_payer_id) || /* patient is not part_b and has no primary non-mc payer */
|
|
|
|
+ ($patient->is_part_b_primary === 'YES' && !$pro->isAssociatedWithMCPayer()) || /* patient is part_b but pro has no mc payer assoc */
|
|
|
|
+ ($patient->is_part_b_primary !== 'YES' && $patient->non_mc_primary_payer_id && /* patient is not part_b and has non-mc-primary, but pro has no assoc with that payer */
|
|
|
|
+ !$pro->isAssociatedWithNonMCPayer($patient->non_mc_primary_payer_id))
|
|
|
|
+ )
|
|
|
|
+ <div class="alert alert-warning mcp-theme-1 p-3 hide-inside-ticket-popup">
|
|
|
|
+ <div class="font-size-14 font-weight-bold">
|
|
|
|
+ <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
|
|
|
|
+ This patient may not be covered for this visit. Please check with practice administrator.
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ --}}
|
|
|
|
+
|
|
|
|
+ <div id="note-single-header" class="pb-3 d-flex align-items-start screen-only">
|
|
|
|
+ <h6 class="my-0 text-secondary d-flex align-items-center w-100">
|
|
|
|
+ <a href="/patients/view/{{ $patient->uid }}/notes" class="small text-decoration-none mr-3">
|
|
|
|
+ <i class="fa fa-chevron-left"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <div class="mr-auto d-inline-flex align-items-center">
|
|
|
|
+ <span class="text-dark font-weight-bold">Note (univ *)
|
|
|
|
+ <span class="text-secondary font-weight-normal">{{ $note->is_cancelled ? '(CANCELLED)' : '' }}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @if($pro->pro_type === 'ADMIN')
|
|
|
|
+ <a href="#" class="print-note ml-3 btn btn-sm btn-primary text-white font-weight-bold invisible"><i class="fa fa-print"></i> Print</a>
|
|
|
|
+ <?php
|
|
|
|
+ $isBad = false;
|
|
|
|
+ $isGood = false;
|
|
|
|
+ if($note->detail_json) {
|
|
|
|
+ $parsed = json_decode($note->detail_json);
|
|
|
|
+ $isBad = $parsed && @$parsed->isBad;
|
|
|
|
+ $isGood = $parsed && @$parsed->isGood;
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ @if(!$isBad)
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a href="#" start show class="print-note ml-2 btn btn-sm btn-danger text-white font-weight-bold invisible"><i class="fa fa-exclamation-triangle"></i> Mark as Bad Note</a>
|
|
|
|
+ <form url="/api/note/markNoteAsBad" class="mcp-theme-1">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p class="min-width-200px">Mark this note as <b>bad</b>?</p>
|
|
|
|
+ <div>
|
|
|
|
+ <button submit class="btn btn-sm btn-success mr-1">Yes</button>
|
|
|
|
+ <button cancel class="btn btn-sm btn-default border">No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a href="#" start show class="print-note ml-2 btn btn-sm btn-info text-white font-weight-bold invisible"><i class="fa fa-undo"></i> Marked as bad! Click to undo.</a>
|
|
|
|
+ <form url="/api/note/undoMarkNoteAsBad" class="mcp-theme-1">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p class="min-width-200px">Mark this note as <b>not bad</b>?</p>
|
|
|
|
+ <div>
|
|
|
|
+ <button submit class="btn btn-sm btn-success mr-1">Yes</button>
|
|
|
|
+ <button cancel class="btn btn-sm btn-default border">No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if(!$isGood)
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a href="#" start show class="print-note ml-2 btn btn-sm btn-success text-white font-weight-bold invisible"><i class="fa fa-check"></i> Mark as Good Note</a>
|
|
|
|
+ <form url="/api/note/markNoteAsGood" class="mcp-theme-1">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p class="min-width-200px">Mark this note as <b>good</b>?</p>
|
|
|
|
+ <div>
|
|
|
|
+ <button submit class="btn btn-sm btn-success mr-1">Yes</button>
|
|
|
|
+ <button cancel class="btn btn-sm btn-default border">No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a href="#" start show class="print-note ml-2 btn btn-sm btn-info text-white font-weight-bold invisible"><i class="fa fa-undo"></i> Marked as good! Click to undo.</a>
|
|
|
|
+ <form url="/api/note/undoMarkNoteAsGood" class="mcp-theme-1">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p class="min-width-200px">Mark this note as <b>not good</b>?</p>
|
|
|
|
+ <div>
|
|
|
|
+ <button submit class="btn btn-sm btn-success mr-1">Yes</button>
|
|
|
|
+ <button cancel class="btn btn-sm btn-default border">No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ @if($patient->has_mcp_done_onboarding_visit !== 'YES')
|
|
|
|
+ <div class="ml-auto">
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a start show class="font-weight-bold">Mark as Onboarding Visit Note</a>
|
|
|
|
+ <form url="/api/client/updateMcpOnboardingVisitInfo" class="mcp-theme-1" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$patient->uid}}">
|
|
|
|
+ <input type="hidden" name="mcpOnboardingVisitNoteUid" value="{{$note->uid}}">
|
|
|
|
+ <input type="hidden" name="hasMcpDoneOnboardingVisit" value="YES">
|
|
|
|
+ <input type="hidden" name="mcpOnboardingVisitDate" value="{{$note->effective_dateest}}">
|
|
|
|
+ <p class="min-width-200px">Mark this patient's onboarding as completed using this note?</p>
|
|
|
|
+ <div>
|
|
|
|
+ <button submit class="btn btn-sm btn-success mr-1">Yes</button>
|
|
|
|
+ <button cancel class="btn btn-sm btn-default border">No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </h6>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="card mb-0 {{ $note->is_cancelled ? 'cancelled-item' : '' }}">
|
|
|
|
+ <div class="card-header d-flex align-items-start px-3 py-2 border-bottom" id="note-card-header">
|
|
|
|
+ <div class="pr-2">
|
|
|
|
+ {{$note->title}}
|
|
|
|
+ @if(!$note->is_signed_by_hcp || $pro->pro_type === 'ADMIN')
|
|
|
|
+ <div moe>
|
|
|
|
+ <a href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/note/putTitle">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <input type="text" name="title" value="{{$note->title}}" class="form-control form-control-sm"
|
|
|
|
+ placeholder="Title">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ <div class="px-2 border-left border-right">
|
|
|
|
+ <div class="d-flex">
|
|
|
|
+ <span class="mr-2">{{friendly_date_time($note->effective_dateest, false, '')}}</span>
|
|
|
|
+ @if(!$note->is_signed_by_hcp || $pro->pro_type === 'ADMIN')
|
|
|
|
+ <span moe class="ml-auto">
|
|
|
|
+ <a href="" show start><i class="fa fa-calendar"></i></a>
|
|
|
|
+ <form url="/api/note/putEffectiveDateEST">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label for="" class="text-secondary text-sm">Effective date EST</label>
|
|
|
|
+ <input type="date" name="effectiveDateEST" value="{{$note->effective_dateest}}" class="form-control form-control-sm">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ {{--<div class="px-2 border-left border-right">
|
|
|
|
+ <div class="d-flex">
|
|
|
|
+ <span class="mr-2">{{friendly_time($note->effective_time, '')}}</span>
|
|
|
|
+ @if(!$note->is_signed_by_hcp)
|
|
|
|
+ <span moe class="ml-auto">
|
|
|
|
+ <a href="" show start><i class="fa fa-clock"></i></a>
|
|
|
|
+ <form url="/api/note/putEffectiveTime">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label for="" class="text-secondary text-sm">Effective time </label>
|
|
|
|
+ <input type="time" name="effectiveTime" value="{{ date("H:i", strtotime($note->effective_time)) }}" class="form-control form-control-sm">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>--}}
|
|
|
|
+
|
|
|
|
+ <div class="px-2 border-right">
|
|
|
|
+ <div class="d-flex">
|
|
|
|
+ <span class="mr-2"><span class="text-secondary">HCP:</span> {{$note->hcpPro->name_display}}</span>
|
|
|
|
+ @if(!$note->is_signed_by_hcp || $pro->pro_type === 'ADMIN')
|
|
|
|
+ <div moe class="ml-auto">
|
|
|
|
+ <a href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/note/putHcp">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select provider-search data-pro-uid="{{ @$note->hcpPro->uid }}"
|
|
|
|
+ name="hcpProUid" class="form-control form-control-sm">
|
|
|
|
+ <option value="">-- Select HCP Pro --</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @if($performer->pro->pro_type == 'ADMIN' || ($note->allyPro && $note->allyPro->uid === $performer->pro->uid))
|
|
|
|
+ <span class="px-2 border-right d-flex">
|
|
|
|
+ @if($note->allyPro)
|
|
|
|
+ <span class="mr-2"><span class="text-secondary">NA:</span> {{$note->allyPro->name_first}} {{$note->allyPro->name_last}}</span>
|
|
|
|
+ @if($performer->pro->pro_type == 'ADMIN')
|
|
|
|
+ <span class="d-inline-block" moe>
|
|
|
|
+ <a class="text-danger" href="" show start>
|
|
|
|
+ <i class="fa fa-times"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <form url="/api/note/removeNa">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p>Remove NA?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @else
|
|
|
|
+ <span class="mr-2"><span class="text-secondary">NA:</span> - </span>
|
|
|
|
+ <span class="d-block" moe>
|
|
|
|
+ <a class="" href="" show start>
|
|
|
|
+ <i class="fa fa-edit"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <form url="/api/note/putNa">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <label for="" class="control-label">NA</label>
|
|
|
|
+ <select provider-search
|
|
|
|
+ name="naProUid" class="form-control form-control-sm">
|
|
|
|
+ <option value="">-- Select Ally Pro --</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <div class="px-2 border-right">
|
|
|
|
+ <div class="d-flex">
|
|
|
|
+ <span class="mr-2"><span class="text-secondary">Type:</span> {{$note->new_or_fu_or_na ? ($note->new_or_fu_or_na === 'NEW' ? 'New Patient' : $note->new_or_fu_or_na) : '-'}}</span>
|
|
|
|
+ @if(!$note->is_signed_by_hcp || $pro->pro_type === 'ADMIN')
|
|
|
|
+ <div moe class="ml-auto">
|
|
|
|
+ <a href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/note/updateNewOrFuOrNa">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select name="newOrFuOrNa" class="form-control form-control-sm" required>
|
|
|
|
+ <option value="">-- select --</option>
|
|
|
|
+ <option value="NEW" {{ $note->new_or_fu_or_na === "NEW" ? "selected" : "" }}>New</option>
|
|
|
|
+ <option value="FU" {{ $note->new_or_fu_or_na === "FU" ? "selected" : "" }}>Follow-up</option>
|
|
|
|
+ <option value="NA" {{ $note->new_or_fu_or_na === "NA" ? "selected" : "" }}>N/A</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="px-2">
|
|
|
|
+ <div class="d-flex">
|
|
|
|
+ <span class="mr-2"><span class="text-secondary">Method:</span> {{$note->method ? $note->method : '-'}}</span>
|
|
|
|
+ @if(!$note->is_signed_by_hcp || $pro->pro_type === 'ADMIN')
|
|
|
|
+ <div moe class="ml-auto">
|
|
|
|
+ <a href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/note/updateMethod">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select name="method" class="form-control form-control-sm note-method-select" required>
|
|
|
|
+ <option value="AUDIO" {{ $note->method === "AUDIO" ? "selected" : "" }}>Audio</option>
|
|
|
|
+ <option value="VIDEO" {{ $note->method === "VIDEO" ? "selected" : "" }}>Video</option>
|
|
|
|
+ <option value="IN_CLINIC" {{ $note->method === "IN_CLINIC" ? "selected" : "" }}>In-Clinic</option>
|
|
|
|
+ <option value="HOUSE_CALL" {{ $note->method === "HOUSE_CALL" ? "selected" : "" }}>House Call</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group if-in-clinic">
|
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Location</label>
|
|
|
|
+ <select name="hcpCompanyLocationUid" class="form-control">
|
|
|
|
+ <option value=""></option>
|
|
|
|
+ @foreach($pro->companyLocations() as $location)
|
|
|
|
+ <option value="{{$location->uid}}" {{$location->id === $note->hcp_company_location_id ? 'selected' : ''}}>{{$location->line1}} {{$location->city}}</option>
|
|
|
|
+ @endforeach
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="ml-auto d-flex align-items-start">
|
|
|
|
+ <div class="">
|
|
|
|
+ <div>
|
|
|
|
+ @if($note->is_signed_by_hcp)
|
|
|
|
+ <span class="text-secondary">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ Note Signed
|
|
|
|
+ @if($pro->pro_type == 'ADMIN')
|
|
|
|
+ <span moe class="ml-2 d-none">
|
|
|
|
+ <a class="" href="" show start>Undo sign?</a>
|
|
|
|
+ <form url="/api/note/adminUndoSignAsHcp" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p>Undo sign?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <div moe
|
|
|
|
+ class="{{ $note->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
|
|
|
|
+ title="{{ $note->hcp_pro_id !== $pro->id ? 'Only the note\'s HCP can sign' : '' }}">
|
|
|
|
+ <a class="" href="" show start>Sign Note 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>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @if($note->allyPro)
|
|
|
|
+ <div class="mx-4">
|
|
|
|
+ <div>
|
|
|
|
+ @if($note->is_signed_by_ally)
|
|
|
|
+ <span class="text-secondary">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ Note Signed By NA
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <div moe
|
|
|
|
+ class="{{ $note->ally_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
|
|
|
|
+ title="{{ $note->ally_pro_id !== $pro->id ? 'Only the note\'s Ally can sign' : '' }}">
|
|
|
|
+ <a class="" href="" show start>Sign Note As NA</a>
|
|
|
|
+ <form url="/api/note/signAsAlly" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p>Sign this NA?</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>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if($note->is_cancelled || (!$note->is_cancelled && !$note->is_signed_by_hcp))
|
|
|
|
+ <div class="ml-2 pl-2 border-left">
|
|
|
|
+ <div class="d-flex justify-content-end">
|
|
|
|
+ @if(!$note->is_cancelled)
|
|
|
|
+ <div moe relatve
|
|
|
|
+ class="{{ $hasBills ? 'moe-disabled' : '' }}"
|
|
|
|
+ title="{{ $hasBills ? 'Cannot cancel note since it has un-cancelled bills in it' : '' }}">
|
|
|
|
+ <a class="text-danger" href="" show start>Cancel</a>
|
|
|
|
+ <form url="/api/note/cancel" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p class="small mb-2">Are you sure you want to cancel this note?</p>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <textarea name="memo" id="" cols="30" rows="5" placeholder="Memo" class="memo-textarea form-control form-control-sm"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <button class="btn btn-sm btn-danger mr-2" submit>Yes</button>
|
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-secondary font-weight-bold">CANCELLED</span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="card-body p-0">
|
|
|
|
+ <div class="note-container">
|
|
|
|
+ <div class="note-lhs-tree" id="note-lhs-tree">
|
|
|
|
+ <?php
|
|
|
|
+ $previousHeading = null;
|
|
|
|
+ $sectionTemplates = $note->noteTemplate->sectionTemplatesRaw();
|
|
|
|
+ ?>
|
|
|
|
+ @foreach($sectionTemplates as $sectionTemplate)
|
|
|
|
+ <?php
|
|
|
|
+ if($sectionTemplate->heading !== $previousHeading) {
|
|
|
|
+ if(!empty($previousHeading)) {
|
|
|
|
+ echo '</div></div>'; // <!-- end the previous parent section -->
|
|
|
|
+ }
|
|
|
|
+ if(!empty($sectionTemplate->heading)) {
|
|
|
|
+ echo '<div class="note-tree-node note-tree-heading">' .
|
|
|
|
+ '<a class="">' . $sectionTemplate->heading . '</a>' .
|
|
|
|
+ '<div class="note-tree-children">'; // <!-- open new node -->
|
|
|
|
+ }
|
|
|
|
+ $previousHeading = $sectionTemplate->heading;
|
|
|
|
+ }
|
|
|
|
+ echo '<div class="note-tree-node">' .
|
|
|
|
+ '<a native target="_top" data-section-template-name="' . $sectionTemplate->internal_name . '" href="#" >' . $sectionTemplate->title . '</a>' .
|
|
|
|
+ '</div>';
|
|
|
|
+ ?>
|
|
|
|
+ @endforeach
|
|
|
|
+ <?php
|
|
|
|
+ if(!empty($previousHeading)) {
|
|
|
|
+ echo '</div></div>'; // <!-- close any open parent section -->
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="note-rhs-content">
|
|
|
|
+ <div>
|
|
|
|
+ <div class="">
|
|
|
|
+ <div>
|
|
|
|
+ <?php
|
|
|
|
+ $shortCutsObject = [];
|
|
|
|
+ foreach ($pro->allShortcuts() as $shortcut) {
|
|
|
|
+
|
|
|
|
+ // %replaceables%
|
|
|
|
+ $shortcut->text = str_replace("%AGE%", $patient->age_in_years, $shortcut->text);
|
|
|
|
+ $shortcut->text = str_replace("%GENDER%", $patient->sex, $shortcut->text);
|
|
|
|
+ $shortcut->text = str_replace("%NAME%", $patient->displayName(), $shortcut->text);
|
|
|
|
+
|
|
|
|
+ $shortCutsObject[] = [
|
|
|
|
+ "name" => $shortcut->shortcut,
|
|
|
|
+ "value" => $shortcut->text
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ <script>window.userShortcuts = <?= json_encode($shortCutsObject); ?>;</script>
|
|
|
|
+ <?php
|
|
|
|
+ $shortcuts = "";
|
|
|
|
+ $latestSectionTS = 0;
|
|
|
|
+ ?>
|
|
|
|
+ <div class="{{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }}">
|
|
|
|
+ @include('app.patient.note.note-section-list')
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <span class="d-none latest-section-ts">{{ $latestSectionTS }}</span>
|
|
|
|
+
|
|
|
|
+ <div class="p-3 border-bottom">
|
|
|
|
+ <div class="">
|
|
|
|
+ <div class="d-flex align-items-center mb-2">
|
|
|
|
+ <p class="font-weight-bold text-secondary m-0 font-size-14">ERx/Orders Summary</p>
|
|
|
|
+ <span class="mx-2 text-secondary screen-only">|</span>
|
|
|
|
+ <a href="/patients/view/{{$patient->uid}}/tickets/erx/create?popupmode=1¬e-uid={{$note->uid}}"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ class="ticket-popup-trigger note-dashboard-action d-block text-nowrap screen-only">
|
|
|
|
+ + ERx
|
|
|
|
+ </a>
|
|
|
|
+ <span class="mx-2 text-secondary screen-only">|</span>
|
|
|
|
+ <a href="/patients/view/{{$patient->uid}}/tickets/lab/create?popupmode=1¬e-uid={{$note->uid}}"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ class="ticket-popup-trigger note-dashboard-action d-block text-nowrap screen-only">
|
|
|
|
+ + Lab
|
|
|
|
+ </a>
|
|
|
|
+ <span class="mx-2 text-secondary screen-only">|</span>
|
|
|
|
+ <a href="/patients/view/{{$patient->uid}}/tickets/imaging/create?popupmode=1¬e-uid={{$note->uid}}"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ class="ticket-popup-trigger note-dashboard-action d-block text-nowrap screen-only">
|
|
|
|
+ + Imaging
|
|
|
|
+ </a>
|
|
|
|
+ <span class="mx-2 text-secondary screen-only">|</span>
|
|
|
|
+ <a href="/patients/view/{{$patient->uid}}/tickets/other/create?popupmode=1¬e-uid={{$note->uid}}"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ class="ticket-popup-trigger note-dashboard-action d-block text-nowrap screen-only">
|
|
|
|
+ + Other
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="p-3 border">
|
|
|
|
+
|
|
|
|
+ <p class="font-weight-bold text-secondary mb-2 mr-2">Associated with this note</p>
|
|
|
|
+ <div>
|
|
|
|
+ @if($ticketsOnNote && count($ticketsOnNote))
|
|
|
|
+ <table class="table table-sm table-bordered mb-0">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr class="bg-light">
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">Created</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">Type</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">Pro</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">View</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">Status</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0">Detail</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($ticketsOnNote as $ticket)
|
|
|
|
+ <?php $data = json_decode($ticket->data); ?>
|
|
|
|
+ @if($ticket->category === 'erx' || $ticket->category === 'lab' || $ticket->category === 'imaging')
|
|
|
|
+ <tr class="{{$ticket->is_open ? '' : 'bg-light on-hover-opaque'}}">
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ {{friendly_time($ticket->created_at)}}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ {{$ticket->category}}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ @if($ticket->orderingPro)
|
|
|
|
+ @if($ticket->orderingPro->id !== $pro->id)
|
|
|
|
+ <b>{{$ticket->orderingPro->displayName()}}</b>
|
|
|
|
+ @else
|
|
|
|
+ You
|
|
|
|
+ @endif
|
|
|
|
+ @else
|
|
|
|
+ -
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ <div class="d-flex align-items-center flex-nowrap">
|
|
|
|
+ <a href="/patients/view/{{$ticket->patient->uid}}/tickets/{{$ticket->category}}/{{$ticket->uid}}?popupmode=1"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ class="ticket-popup-trigger note-dashboard-action d-block text-nowrap mr-3">
|
|
|
|
+ View
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ {{$ticket->is_open ? 'Open' : 'Closed'}}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ @if($ticket->category === 'erx')
|
|
|
|
+ <div class="font-size-13 mb-1">{{$data->medication}}</div>
|
|
|
|
+ <div class="d-flex align-items-center flex-wrap text-secondary">
|
|
|
|
+ @if($data->strength)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span>{{$data->strength}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->route)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span>{{$data->route}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->frequency)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span>{{$data->frequency}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->dispense)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span>Dispense:</span> {{$data->dispense}}
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->frequency)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span><span>Refills:</span> {{$data->refills}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->dispense)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span><span>Purpose:</span> {{$data->purpose}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if($ticket->category === 'lab' || $ticket->category === 'imaging')
|
|
|
|
+ @if(@$data->tests && is_array($data->tests))
|
|
|
|
+ <div>
|
|
|
|
+ <span class="text-secondary">Tests:</span>
|
|
|
|
+ {{implode(", ", $data->tests)}}
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if(@$data->icds && is_array($data->icds))
|
|
|
|
+ <div>
|
|
|
|
+ <span class="text-secondary">ICDs:</span>
|
|
|
|
+ {{implode(", ", $data->icds)}}
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endif
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-secondary">None</div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <hr class="my-2">
|
|
|
|
+
|
|
|
|
+ <p class="font-weight-bold text-secondary mb-2 mr-2">Others open as of {{friendlier_date(date('Y-m-d'))}}</p>
|
|
|
|
+ @if($otherOpenTickets && count($otherOpenTickets))
|
|
|
|
+ <table class="table table-sm table-bordered mb-0">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr class="bg-light">
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">Created</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">Type</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">Pro</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">View</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-30px">Status</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0">Detail</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($otherOpenTickets as $ticket)
|
|
|
|
+ <?php $data = json_decode($ticket->data); ?>
|
|
|
|
+ @if($ticket->category === 'erx' || $ticket->category === 'lab' || $ticket->category === 'imaging' || $ticket->category === 'other')
|
|
|
|
+ <tr class="{{$ticket->is_open ? '' : 'bg-light on-hover-opaque'}}">
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ {{friendly_time($ticket->created_at)}}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ {{$ticket->category}}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ @if($ticket->orderingPro)
|
|
|
|
+ @if($ticket->orderingPro->id !== $pro->id)
|
|
|
|
+ <b>{{$ticket->orderingPro->displayName()}}</b>
|
|
|
|
+ @else
|
|
|
|
+ You
|
|
|
|
+ @endif
|
|
|
|
+ @else
|
|
|
|
+ -
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ <div class="d-flex align-items-center flex-nowrap">
|
|
|
|
+ <a href="/patients/view/{{$ticket->patient->uid}}/tickets/{{$ticket->category}}/{{$ticket->uid}}?popupmode=1"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ class="ticket-popup-trigger note-dashboard-action d-block text-nowrap mr-3">
|
|
|
|
+ View
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2 text-nowrap">
|
|
|
|
+ {{$ticket->is_open ? 'Open' : 'Closed'}}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ @if($ticket->category === 'erx')
|
|
|
|
+ <div class="font-size-13 mb-1">{{$data->medication}}</div>
|
|
|
|
+ <div class="d-flex align-items-center flex-wrap text-secondary">
|
|
|
|
+ @if($data->strength)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span>{{$data->strength}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->route)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span>{{$data->route}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->frequency)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span>{{$data->frequency}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->dispense)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span>Dispense:</span> {{$data->dispense}}
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->frequency)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span><span>Refills:</span> {{$data->refills}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($data->dispense)
|
|
|
|
+ <span class="d-inline-flex align-items-center">
|
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
|
+ <span><span>Purpose:</span> {{$data->purpose}}</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if($ticket->category === 'lab' || $ticket->category === 'imaging')
|
|
|
|
+ @if(@$data->tests && is_array($data->tests))
|
|
|
|
+ <div>
|
|
|
|
+ <span class="text-secondary">Tests:</span>
|
|
|
|
+ {{implode(", ", $data->tests)}}
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if(@$data->icds && is_array($data->icds))
|
|
|
|
+ <div>
|
|
|
|
+ <span class="text-secondary">ICDs:</span>
|
|
|
|
+ {{implode(", ", $data->icds)}}
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ @if($ticket->category === 'other')
|
|
|
|
+ <div>
|
|
|
|
+ {{$data->title}}
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endif
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-secondary">None</div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="p-3 border-bottom">
|
|
|
|
+ <div class="">
|
|
|
|
+ <div class="d-flex align-items-center mb-2">
|
|
|
|
+ <p class="font-weight-bold text-secondary m-0 font-size-14">Supply Orders Summary</p>
|
|
|
|
+ <span class="mx-2 text-secondary screen-only">|</span>
|
|
|
|
+ <a native target="_blank"
|
|
|
|
+ class="screen-only"
|
|
|
|
+ open-in-stag-popup
|
|
|
|
+ update-parent
|
|
|
|
+ mc-initer="patient-supply-orders"
|
|
|
|
+ title="{{$patient->displayName()}} - Supply Orders"
|
|
|
|
+ href="/patients/view/{{$patient->uid}}/supply-orders?popupmode=1¬e-uid={{$note->uid}}&filter=active">
|
|
|
|
+ Manage Supply Orders
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="p-3 border">
|
|
|
|
+
|
|
|
|
+ <p class="font-weight-bold text-secondary mb-2 mr-2">Associated with this note</p>
|
|
|
|
+ <div>
|
|
|
|
+ @if($supplyOrdersOnNote && count($supplyOrdersOnNote))
|
|
|
|
+ <table class="table table-sm table-bordered mb-0">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr class="bg-light">
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Title</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Reason</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Created At</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Pro Signed?</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Cancelled?</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Shipment</div></th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($supplyOrdersOnNote as $iSupplyOrder)
|
|
|
|
+ <tr class="">
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ {{ $iSupplyOrder->product->title }}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->reason }}</td>
|
|
|
|
+ <td class="px-2">{{ friendlier_date_time($iSupplyOrder->created_at) }}</td>
|
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->is_signed_by_pro ? $iSupplyOrder->signedPro->displayName() : '-' }}</td>
|
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->is_cancelled ? 'Yes' : 'No' }}</td>
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ @if($iSupplyOrder->shipment_id)
|
|
|
|
+ <i class="fa fa-building"></i>
|
|
|
|
+ {{$iSupplyOrder->shipment->status ? $iSupplyOrder->shipment->status : 'CREATED'}}
|
|
|
|
+ @elseif($iSupplyOrder->is_cleared_for_shipment)
|
|
|
|
+ <span class="text-info">
|
|
|
|
+ <i class="fa fa-user-nurse"></i>
|
|
|
|
+ Cleared for shipment
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-warning-mellow">
|
|
|
|
+ <i class="fa fa-user-nurse"></i>
|
|
|
|
+ Not cleared for shipment
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-secondary">None</div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <hr class="my-2">
|
|
|
|
+
|
|
|
|
+ <p class="font-weight-bold text-secondary mb-2 mr-2">Others as of {{friendlier_date(date('Y-m-d'))}}</p>
|
|
|
|
+ @if($otherOpenSupplyOrders && count($otherOpenSupplyOrders))
|
|
|
|
+ <table class="table table-sm table-bordered mb-0">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr class="bg-light">
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Title</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Reason</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Created At</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Pro Signed?</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Cancelled?</div></th>
|
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"><div class="text-ellipsis">Shipment</div></th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($otherOpenSupplyOrders as $iSupplyOrder)
|
|
|
|
+ <tr class="">
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ {{ $iSupplyOrder->product->title }}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->reason }}</td>
|
|
|
|
+ <td class="px-2">{{ friendlier_date_time($iSupplyOrder->created_at) }}</td>
|
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->is_signed_by_pro ? $iSupplyOrder->signedPro->displayName() : '-' }}</td>
|
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->is_cancelled ? 'Yes' : 'No' }}</td>
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ @if($iSupplyOrder->shipment_id)
|
|
|
|
+ <i class="fa fa-building"></i>
|
|
|
|
+ {{$iSupplyOrder->shipment->status ? $iSupplyOrder->shipment->status : 'CREATED'}}
|
|
|
|
+ @elseif($iSupplyOrder->is_cleared_for_shipment)
|
|
|
|
+ <span class="text-info">
|
|
|
|
+ <i class="fa fa-user-nurse"></i>
|
|
|
|
+ Cleared for shipment
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-warning-mellow">
|
|
|
|
+ <i class="fa fa-user-nurse"></i>
|
|
|
|
+ Not cleared for shipment
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-secondary">None</div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="p-3 border-bottom">
|
|
|
|
+ <div class="">
|
|
|
|
+ <div class="d-flex align-items-center mb-2">
|
|
|
|
+ <p class="font-weight-bold text-secondary m-0 mr-2">ICDs</p>
|
|
|
|
+ @include('app/patient/note/_create-note-reason')
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex align-items-start flex-wrap">
|
|
|
|
+ @if(count($note->reasons))
|
|
|
|
+ @foreach ($note->reasons as $reason)
|
|
|
|
+ <span class="badge badge-info p-2 mb-2 mr-2">
|
|
|
|
+ {{ $reason->description}} ({{ $reason->code }})
|
|
|
|
+ </span>
|
|
|
|
+ @endforeach
|
|
|
|
+ @else
|
|
|
|
+ <div class="alert alert-info">No note reasons</div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @if($pro->pro_type === 'ADMIN')
|
|
|
|
+ <div class="p-3 border-bottom screen-only">
|
|
|
|
+ <div>
|
|
|
|
+ <h2 class="font-weight-bold text-secondary">Bills & Claims Summary</h2>
|
|
|
|
+ <div class="d-flex justify-content-center align-items-start">
|
|
|
|
+ <table class="w-25 flex-grow-1 table-bordered table-condensed table-sm table-striped">
|
|
|
|
+ <tbody>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Bill Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->bill_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Is Billing Closed</td>
|
|
|
|
+ <td>{{$note->is_bill_closed ? 'Yes' : 'No'}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Bill Summary</td>
|
|
|
|
+ <td>{{$note->bill_summary ? $note->bill_summary : '-'}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Bill Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->bill_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Billing Closed At</td>
|
|
|
|
+ <td>{{friendlier_date_time($note->bill_closed_at)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ <table class="w-25 flex-grow-1 table-bordered table-condensed table-sm table-striped ml-2">
|
|
|
|
+ <tbody>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Claim Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->claim_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Is Claiming Closed</td>
|
|
|
|
+ <td>{{$note->is_claim_closed ? 'Yes' : 'No'}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Claim Summary</td>
|
|
|
|
+ <td>{{$note->claim_summary ? $note->claim_summary : '-'}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Claim Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->claim_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">Claiming Closed At</td>
|
|
|
|
+ <td>{{$note->claim_closed_at ? friendlier_date_time($note->claim_closed_at) : '-'}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ <table class="w-25 flex-grow-1 table-bordered table-condensed table-sm table-striped ml-2">
|
|
|
|
+ <tbody>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">HCP Bill Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->hcp_bill_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">NA Bill Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->na_bill_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">RMM Bill Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->rmm_bill_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">RME Bill Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->rme_bill_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">RMS Bill Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->rms_bill_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">RMG Bill Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->rmg_bill_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">CM Bill Total Exp.</td>
|
|
|
|
+ <td>${{friendly_money($note->cm_bill_total_expected)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ <table class="w-25 flex-grow-1 table-bordered table-condensed table-sm table-striped ml-2">
|
|
|
|
+ <tbody>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">HCP Bill Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->hcp_bill_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">NA Bill Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->na_bill_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">RMM Bill Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->rmm_bill_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">RME Bill Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->rme_bill_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">RMS Bill Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->rms_bill_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">RMG Bill Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->rmg_bill_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary">CM Bill Total Paid</td>
|
|
|
|
+ <td>${{friendly_money($note->cm_bill_total_paid)}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <!-- <tr>
|
|
|
|
+ <td class="text-secondary">HCP Company Pro</td>
|
|
|
|
+ <td>{{$note->hcp_company_pro_id}}</td>
|
|
|
|
+ </tr>-->
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ @if($note->method === 'IN_CLINIC' || $pro->pro_type === 'ADMIN')
|
|
|
|
+ <div class="p-3 border-bottom screen-only">
|
|
|
|
+ <div class="ml-auto d-inline-flex align-items-center">
|
|
|
|
+
|
|
|
|
+ <span class="text-secondary font-weight-bold">Pro: </span>
|
|
|
|
+ <b>{{$note->hcpPro ? $note->hcpPro->displayName() : '-'}}</b>
|
|
|
|
+
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <span>
|
|
|
|
+ <span class="text-secondary font-weight-bold">Payer 1°: </span>
|
|
|
|
+ <b>
|
|
|
|
+ {{$note->hcpCompanyProPayer && $note->hcpCompanyProPayer->company ? $note->hcpCompanyProPayer->company->name : '-'}}
|
|
|
|
+ /
|
|
|
|
+ {{$note->hcpCompanyProPayer && $note->hcpCompanyProPayer->payer ? $note->hcpCompanyProPayer->payer->name : '-'}}
|
|
|
|
+ </b>
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-primary" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/note/putHcpCompanyProPayer">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select name="hcpCompanyProPayerUid" class="form-control form-control-sm">
|
|
|
|
+ <option value="">-- select --</option>
|
|
|
|
+ @foreach($note->hcpPro->companyProPayers as $companyProPayer)
|
|
|
|
+ <option value="{{$companyProPayer->uid}}">{{$companyProPayer->company->name}} / {{$companyProPayer->payer->name}}</option>
|
|
|
|
+ @endforeach
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @if($note->hcpCompanyProPayer && $note->hcpCompanyProPayer->payer)
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-danger" href="" show start><i class="fa fa-trash-alt"></i></a>
|
|
|
|
+ <form url="/api/note/wipeHcpCompanyProPayer">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p>Wipe payer from this note?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </span>
|
|
|
|
+
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <span>
|
|
|
|
+ <span class="text-secondary font-weight-bold">Payer 2°: </span>
|
|
|
|
+ </span>
|
|
|
|
+
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <span>
|
|
|
|
+ <span class="text-secondary font-weight-bold">Location: </span><b>{{$note->hcpCompanyLocation ? $note->hcpCompanyLocation->line1 . ', ' . $note->hcpCompanyLocation->city : '-'}}</b>
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-primary" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/note/putHcpCompanyLocation">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select name="hcpCompanyLocationUid" class="form-control form-control-sm">
|
|
|
|
+ <option value="">-- select --</option>
|
|
|
|
+ @if($note->hcpCompany && $note->hcpCompany->locations)
|
|
|
|
+ @foreach($note->hcpCompany->locations as $location)
|
|
|
|
+ <option value="{{$location->uid}}">{{$location->line1 . ', ' . $location->city}}</option>
|
|
|
|
+ @endforeach
|
|
|
|
+ @endif
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @if($note->hcpCompanyLocation)
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-danger" href="" show start><i class="fa fa-trash-alt"></i></a>
|
|
|
|
+ <form url="/api/note/wipeHcpCompanyLocation">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
|
+ <p>Wipe location from this note?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ {{-- bills --}}
|
|
|
|
+ @if($pro->pro_type === 'ADMIN' || ($note->hcpPro && $pro->id === $note->hcpPro->id) || ($note->allyPro && $pro->id === $note->allyPro->id))
|
|
|
|
+ @if($note->bills->count())
|
|
|
|
+ <div class="p-3 border-bottom">
|
|
|
|
+ <div class="d-flex align-items-center mb-2">
|
|
|
|
+ <p class="font-weight-bold text-secondary font-size-13 m-0">Bills</p>
|
|
|
|
+ @if($pro->pro_type === 'ADMIN' || ($note->hcpPro && $pro->id === $note->hcpPro->id))
|
|
|
|
+ @include('app/patient/note/_create-bill')
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ @if($pro->pro_type === 'ADMIN')
|
|
|
|
+ <table class="table table-sm tabe-striped mb-0 table-bordered">
|
|
|
|
+ <thead class="bg-light">
|
|
|
|
+ <tr class="text-secondary">
|
|
|
|
+ <?php /* <th class="border-bottom-0"></th> */ ?>
|
|
|
|
+ <th class="border-bottom-0">Date</th>
|
|
|
|
+ <th class="border-bottom-0">Service</th>
|
|
|
|
+ <th class="border-bottom-0">Billable</th>
|
|
|
|
+ <th class="border-bottom-0">HCP</th>
|
|
|
|
+ <th class="border-bottom-0 screen-only">Total</th>
|
|
|
|
+ <th class="border-bottom-0">Sign</th>
|
|
|
|
+ <th class="border-bottom-0 screen-only">Bal Post Date</th>
|
|
|
|
+ <th class="border-bottom-0">Verification</th>
|
|
|
|
+ <th class="border-bottom-0">Cancellation</th>
|
|
|
|
+ <th class="border-bottom-0 screen-only">Payment</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach ($note->bills as $bill)
|
|
|
|
+ <tr class="{{$bill->is_cancelled ? 'bg-light text-secondary' : ''}}">
|
|
|
|
+ <?php /* <td class="p-0">
|
|
|
|
+ <table class="table-striped table-sm table-condensed border border-left-0 border-top-0 border-bottom-0">
|
|
|
|
+ <tbody>
|
|
|
|
+ <tr><td>collected_amount</td><td>{{$bill->collected_amount}}</td></tr>
|
|
|
|
+ <tr><td>effective_date</td><td>{{$bill->effective_date}}</td></tr>
|
|
|
|
+ <tr><td>has_hcp_been_paid</td><td>{{$bill->has_hcp_been_paid}}</td></tr>
|
|
|
|
+ <tr><td>hcp_expected_payment_amount</td><td>{{$bill->hcp_expected_payment_amount}}</td></tr>
|
|
|
|
+ <tr><td>hcp_payment_amount</td><td>{{$bill->hcp_payment_amount}}</td></tr>
|
|
|
|
+ <tr><td>is_cancelled</td><td>{{$bill->is_cancelled}}</td></tr>
|
|
|
|
+ <tr><td>hcp_payment_pro_transaction_id</td><td>{{$bill->hcp_payment_pro_transaction_id}}</td></tr>
|
|
|
|
+ <tr><td>balance_post_date</td><td>{{$bill->balance_post_date}}</td></tr>
|
|
|
|
+ <tr><td>is_verified</td><td>{{$bill->is_verified}}</td></tr>
|
|
|
|
+ <tr><td>is_cancellation_acknowledged</td><td>{{$bill->is_cancellation_acknowledged}}</td></tr>
|
|
|
|
+ <tr><td>is_cancelled_by_administrator</td><td>{{$bill->is_cancelled_by_administrator}}</td></tr>
|
|
|
|
+ <tr><td>total_expected</td><td>{{$bill->total_expected}}</td></tr>
|
|
|
|
+ <tr><td>total_paid</td><td>{{$bill->total_paid}}</td></tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </td> */ ?>
|
|
|
|
+ <td class="text-nowrap">{{friendlier_date_time($bill->effective_date, false)}}</td>
|
|
|
|
+ <td>{{$bill->code}}</td>
|
|
|
|
+ <td class="">
|
|
|
|
+ @if(strpos(strtolower($bill->code), 'treatment services') !== FALSE)
|
|
|
|
+ <?php
|
|
|
|
+ $totalSeconds = $bill->number_of_units * 3600;
|
|
|
|
+ $remainder = $totalSeconds % 60;
|
|
|
|
+ if ($remainder !== 0) {
|
|
|
|
+ if ($remainder < 30) {
|
|
|
|
+ $totalSeconds = $totalSeconds - $remainder;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ $totalSeconds = $totalSeconds + (60 - $remainder);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ {{ time_in_hrminsec($totalSeconds) }}
|
|
|
|
+ @else
|
|
|
|
+ @if(!!$bill->number_of_units)
|
|
|
|
+ {{ $bill->number_of_units }} unit(s)
|
|
|
|
+ @else
|
|
|
|
+ -
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="">
|
|
|
|
+ <div class="text-nowrap font-weight-bold text-secondary">{{ $bill->hcp->displayName() }} (HCP)</div>
|
|
|
|
+ <div class="text-nowrap mt-1 screen-only">
|
|
|
|
+ <span class="text-secondary">Paid: </span>
|
|
|
|
+ <span>{{ $bill->has_hcp_been_paid ? 'Yes' : 'No' }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ @if(!$bill->has_hcp_been_paid)
|
|
|
|
+ <div class="text-nowrap mt-1 screen-only">
|
|
|
|
+ <span class="text-secondary">Expected: </span>
|
|
|
|
+ <span class="font-weight-bold">${{ $bill->hcp_expected_payment_amount }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-nowrap mt-1 screen-only">
|
|
|
|
+ <span class="text-secondary">Amount: </span>
|
|
|
|
+ <span class="font-weight-bold">${{ $bill->hcp_payment_amount }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if($bill->ally)
|
|
|
|
+ <hr>
|
|
|
|
+ <div class="text-nowrap font-weight-bold text-secondary">{{ $bill->ally->displayName() }} (NA)</div>
|
|
|
|
+ <div class="text-nowrap mt-1 screen-only">
|
|
|
|
+ <span class="text-secondary">Paid: </span>
|
|
|
|
+ <span>{{ $bill->has_na_been_paid ? 'Yes' : 'No' }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ @if(!$bill->has_na_been_paid)
|
|
|
|
+ <div class="text-nowrap mt-1 screen-only">
|
|
|
|
+ <span class="text-secondary">Expected: </span>
|
|
|
|
+ <span class="font-weight-bold">${{ $bill->na_expected_payment_amount }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-nowrap mt-1 screen-only">
|
|
|
|
+ <span class="text-secondary">Amount: </span>
|
|
|
|
+ <span class="font-weight-bold">${{ $bill->na_payment_amount }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ </td>
|
|
|
|
+ <td class="pr-3 screen-only">
|
|
|
|
+ @if($bill->has_hcp_been_paid)
|
|
|
|
+ <span class="text-secondary">Paid. </span>
|
|
|
|
+ <span class="font-weight-bold">${{ friendly_money($bill->total_paid) }}</span>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-secondary">Exp. </span>
|
|
|
|
+ <span class="font-weight-bold">{{ $bill->total_expected ? '$' . friendly_money($bill->total_expected) : '-' }}</span>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ @if(!$bill->is_cancelled)
|
|
|
|
+ @if($bill->is_signed_by_hcp)
|
|
|
|
+ <span class="d-block text-secondary text-nowrap">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ HCP Signed
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <span moe
|
|
|
|
+ class="d-block {{ $bill->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
|
|
|
|
+ title="{{ $bill->hcp_pro_id !== $pro->id ? 'Only the bill\'s HCP can sign' : '' }}">
|
|
|
|
+ <a class="" href="" show start>Sign As HCP</a>
|
|
|
|
+ <form url="/api/bill/signAsHcp">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Sign this bill 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>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ @if($bill->is_signed_by_na)
|
|
|
|
+ <span class="d-block text-secondary text-nowrap">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ NA Signed
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <span moe
|
|
|
|
+ class="d-block {{ $bill->na_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
|
|
|
|
+ title="{{ $bill->na_pro_id !== $pro->id ? 'Only the bill\'s NA can sign' : '' }}">
|
|
|
|
+ <a class="" href="" show start>Sign As NA</a>
|
|
|
|
+ <form url="/api/bill/signAsNa">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Sign this bill as NA?</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>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="screen-only">
|
|
|
|
+ @if(!$bill->is_cancelled)
|
|
|
|
+ <span class="d-block" moe>
|
|
|
|
+ <a class="" href="" show start>
|
|
|
|
+ {{$bill->balance_post_date ? friendlier_date_time($bill->balance_post_date, false) : '(not set)' }}
|
|
|
|
+ </a>
|
|
|
|
+ <form url="/api/bill/updateBalancePostDate">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Update Balance Post Date</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <input type="date" class="text form-control form-control-sm" name="balancePostDate" value="{{$bill->balance_post_date}}" placeholder="balance post date"><br>
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td> <!-- verification -->
|
|
|
|
+ @if($pro->pro_type === 'ADMIN' && !$bill->is_cancelled)
|
|
|
|
+ @if(!$bill->is_verified)
|
|
|
|
+ <div class="text-warning-mellow font-weight-bold">Not Verified</div>
|
|
|
|
+ <span class="d-block mt-1" moe>
|
|
|
|
+ <a href="" show start>Mark Verified</a>
|
|
|
|
+ <form url="/api/bill/markAsVerified">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Mark As Verfified?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-success font-weight-bold"><i class="fa fa-check"></i> Verified</div>
|
|
|
|
+ <span class="d-block mt-1" moe>
|
|
|
|
+ <a class="" href="" show start>Undo</a>
|
|
|
|
+ <form url="/api/bill/undoMarkAsVerified">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Undo Mark As Verfified?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td> <!-- cancellation -->
|
|
|
|
+ @if($bill->is_cancelled)
|
|
|
|
+ <div class="text-warning-mellow font-weight-bold">Cancelled</div>
|
|
|
|
+ @if($bill->cancellation_memo)
|
|
|
|
+ <div class="text-dark text-sm font-italic my-1">{{$bill->cancellation_memo}}</div>
|
|
|
|
+ @endif
|
|
|
|
+ @if($bill->is_cancelled_by_administrator)
|
|
|
|
+ <div class="text-secondary text-sm">(by Administrator)</div>
|
|
|
|
+ @endif
|
|
|
|
+ <div moe class="mt-1">
|
|
|
|
+ <a class="" href="" show start>Update Memo</a>
|
|
|
|
+ <form url="/api/bill/updateCancellationMemo">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Update Cancellation Memo</p>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <textarea class="text form-control form-control-sm" name="cancellationMemo" placeholder="">{{$bill->cancellation_memo ? $bill->cancellation_memo : 'Insufficient documentation for billable service.'}}</textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <span class="d-block" moe relative="">
|
|
|
|
+ <a class="text-danger" href="" show start>Cancel</a>
|
|
|
|
+ <form url="/api/bill/markCancelled" right="">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p class="mb-2">Cancel this bill?</p>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary">Cancellation Memo</label>
|
|
|
|
+ <textarea type="text" name="memo" placeholder="Memo" class="form-control form-control-sm">Insufficient documentation for billable service.</textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-danger btn-sm" submit>Yes</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ @if($bill->is_cancelled && !$bill->is_cancellation_acknowledged)
|
|
|
|
+ <div class="mt-2 text-secondary">
|
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
|
+ Not Acknowledged
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-block mt-1" moe>
|
|
|
|
+ <a class="" href="" show start>Ack. Cancellation</a>
|
|
|
|
+ <form url="/api/bill/acknowledgeCancellation">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Acknowledge Cancellation?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ {{--<input type="text" class="text form-control form-control-sm" name="cancellationMemo" value="{{$bill->cancellation_memo}}" placeholder=""><br>--}}
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ @if($bill->is_cancellation_acknowledged && !$note->is_billing_marked_done)
|
|
|
|
+ <div class="mt-2 text-secondary">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ Acknowledged
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-block mt-1" moe>
|
|
|
|
+ <a class="" href="" show start>Undo Cancellation Ack.</a>
|
|
|
|
+ <form url="/api/bill/undoAcknowledgeCancellation">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Undo Acknowledge Cancellation?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ </td>
|
|
|
|
+ <td class="screen-only"> <!-- submit payment -->
|
|
|
|
+ <div class="my-1">
|
|
|
|
+ @if(!$bill->is_cancelled && !$bill->has_hcp_been_paid )
|
|
|
|
+ @if(+$bill->hcp_expected_payment_amount && $bill->is_signed_by_hcp)
|
|
|
|
+ <span class="d-block" moe relative="">
|
|
|
|
+ <a class="font-weight-bold" href="" show start>Submit Payment For HCP</a>
|
|
|
|
+ <form url="/api/bill/payHcpAmount" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Submit Payment</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <input type="text" class="text form-control form-control-sm" name="hcpPaymentAmount" value="{{$bill->hcp_expected_payment_amount}}" placeholder="amount"><br>
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ @if(!+$bill->hcp_expected_payment_amount)
|
|
|
|
+ <div class="mb-1 text-danger">
|
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
|
+ HCP expected amount is invalid
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if(!$bill->is_signed_by_hcp)
|
|
|
|
+ <div class="mb-1 text-danger">
|
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
|
+ HCP has not signed the bill
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ <div class="my-1">
|
|
|
|
+ @if(!$bill->is_cancelled && !$bill->has_na_been_paid && $bill->ally)
|
|
|
|
+ @if(+$bill->na_expected_payment_amount && $bill->is_signed_by_na)
|
|
|
|
+ <span class="d-block" moe relative="">
|
|
|
|
+ <a class="font-weight-bold" href="" show start>Submit Payment For NA</a>
|
|
|
|
+ <form url="/api/bill/payNaAmount" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Submit Payment For NA</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <input type="text" class="text form-control form-control-sm" name="naPaymentAmount" value="{{$bill->na_expected_payment_amount}}" placeholder="amount"><br>
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ @if(!+$bill->na_expected_payment_amount)
|
|
|
|
+ <div class="mb-1 text-danger">
|
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
|
+ NA expected amount is invalid
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if(!$bill->is_signed_by_na)
|
|
|
|
+ <div class="mb-1 text-danger">
|
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
|
+ NA has not signed the bill
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ @else
|
|
|
|
+ <table class="table table-sm tabe-striped mb-3 border-left border-right border-bottom">
|
|
|
|
+ <thead class="bg-light">
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="border-bottom-0 pl-3">HCP</th>
|
|
|
|
+ @if($note->ally_pro_id === $pro->id)
|
|
|
|
+ <th class="border-bottom-0 pl-3">NA</th>
|
|
|
|
+ @endif
|
|
|
|
+ <th class="border-bottom-0 w-25 pl-3">Service</th>
|
|
|
|
+ {{--<th class="border-bottom-0 w-25 pl-2">Reason</th>--}}
|
|
|
|
+ <th class="border-bottom-0 pl-3">Billable</th>
|
|
|
|
+ <th class="border-bottom-0 pl-2">Amount</th>
|
|
|
|
+ <th class="border-bottom-0"></th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach ($note->bills as $bill)
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="pl-3">{{ $bill->hcp->displayName() }}</td>
|
|
|
|
+ @if($note->ally_pro_id === $pro->id)
|
|
|
|
+ <td class="pl-3">{{ $note->allyPro->displayName() }}</td>
|
|
|
|
+ @endif
|
|
|
|
+ <td class="pl-3 {{ $bill->is_cancelled ? 'text-secondary' : '' }}">{{$bill->code}}</td>
|
|
|
|
+ {{--<td class="pl-2">
|
|
|
|
+ {{ $bill->reason1 }}
|
|
|
|
+ <div class="text-secondary small">{{ $bill->reason2 }}</div>
|
|
|
|
+ </td>--}}
|
|
|
|
+ <td class="pl-3">
|
|
|
|
+ @if(strpos(strtolower($bill->code), 'treatment services') !== FALSE)
|
|
|
|
+ <?php
|
|
|
|
+ $totalSeconds = $bill->number_of_units * 3600;
|
|
|
|
+ $remainder = $totalSeconds % 60;
|
|
|
|
+ if ($remainder !== 0) {
|
|
|
|
+ if ($remainder < 30) {
|
|
|
|
+ $totalSeconds = $totalSeconds - $remainder;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ $totalSeconds = $totalSeconds + (60 - $remainder);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ {{ time_in_hrminsec($totalSeconds) }}
|
|
|
|
+ @else
|
|
|
|
+ @if(!!$bill->number_of_units)
|
|
|
|
+ {{ $bill->number_of_units }} unit(s)
|
|
|
|
+ @else
|
|
|
|
+ -
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="pl-2">
|
|
|
|
+ @if($bill->hcp_pro_id === $pro->id)
|
|
|
|
+ @if($bill->has_hcp_been_paid)
|
|
|
|
+ <span class="text-dark">Processed:</span><span class="font-weight-bold text-success ml-2">${{ $bill->hcp_payment_amount }}</span>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-dark">Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->hcp_expected_payment_amount ? '$' . $bill->hcp_expected_payment_amount : '-' }}</span>
|
|
|
|
+ @endif
|
|
|
|
+ @elseif($bill->na_pro_id === $pro->id)
|
|
|
|
+ @if($bill->has_na_been_paid)
|
|
|
|
+ <span class="text-dark">Processed:</span><span class="font-weight-bold text-success ml-2">${{ $bill->na_payment_amount }}</span>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-dark">Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->na_expected_payment_amount ? '$' . $bill->na_expected_payment_amount : '-' }}</span>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ @if(!$bill->is_cancelled)
|
|
|
|
+ @if($bill->is_signed_by_hcp)
|
|
|
|
+ <span class="d-block text-secondary">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ HCP Signed
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <span moe
|
|
|
|
+ class="d-block {{ $bill->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
|
|
|
|
+ title="{{ $bill->hcp_pro_id !== $pro->id ? 'Only the bill\'s HCP can sign' : '' }}">
|
|
|
|
+ <a class="" href="" show start>Sign as HCP</a>
|
|
|
|
+ <form url="/api/bill/signAsHcp">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Sign this bill 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>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($bill->na_pro_id === $pro->id)
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ @if($bill->is_signed_by_na)
|
|
|
|
+ <span class="d-block text-secondary">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ NA Signed
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <span moe
|
|
|
|
+ class="d-block {{ $bill->na_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
|
|
|
|
+ title="{{ $bill->hcp_pro_id !== $pro->id ? 'Only the bill\'s NA can sign' : '' }}">
|
|
|
|
+ <a class="" href="" show start>Sign as NA</a>
|
|
|
|
+ <form url="/api/bill/signAsNa">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Sign this bill as NA?</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>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ @if(!$bill->has_hcp_been_paid && $pro->pro_type === 'ADMIN')
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <span class="d-block" moe>
|
|
|
|
+ <a class="text-danger" href="" show start>Submit Payment</a>
|
|
|
|
+ <form url="/api/bill/payHcpAmount">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Submit payment:</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <input type="text" class="text form-control form-control-sm" name="hcpPaymentAmount" value="{{$bill->hcp_expected_payment_amount}}" placeholder="amount"><br>
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if(!$bill->has_na_been_paid && $bill->ally && $pro->pro_type === 'ADMIN')
|
|
|
|
+ <span class="d-block" moe relative="">
|
|
|
|
+ <a class="font-weight-bold" href="" show start>Submit Payment For NA</a>
|
|
|
|
+ <form url="/api/bill/payNaAmount" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Submit Payment For NA</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <input type="text" class="text form-control form-control-sm" name="naPaymentAmount" value="{{$bill->na_expected_payment_amount}}" placeholder="amount"><br>
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @if($bill->is_cancelled)
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <span class="d-block text-secondary">
|
|
|
|
+ Cancelled
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <span class="d-block" moe>
|
|
|
|
+ <a class="text-danger" href="" show start>Cancel</a>
|
|
|
|
+ <form url="/api/bill/markCancelled" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
|
+ <p>Cancel this bill?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-danger btn-sm" submit>Yes</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <div class="p-3 d-flex border-bottom">
|
|
|
|
+ <p class="font-weight-bold mb-0 text-secondary">No bills in this note</p>
|
|
|
|
+ @include('app/patient/note/_create-bill')
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ {{-- claims --}}
|
|
|
|
+ @if($pro->pro_type === 'ADMIN')
|
|
|
|
+ @if($note->claims->count())
|
|
|
|
+ <div class="screen-only p-3">
|
|
|
|
+ <div class="d-flex align-items-center mb-2">
|
|
|
|
+ <p class="font-weight-bold text-secondary m-0">Claims</p>
|
|
|
|
+ @include('app/patient/note/_create-claim')
|
|
|
|
+ <div class="ml-auto">
|
|
|
|
+ <select class="form-control form-control-sm"
|
|
|
|
+ onchange="fastLoad('{{route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $note])}}?claims-filter=' + this.value)">
|
|
|
|
+ <option value="active" {{!request('claims-filter') || request('claims-filter') === 'active' ? 'selected' : ''}}>Active Claims</option>
|
|
|
|
+ <option value="all" {{request('claims-filter') === 'all' ? 'selected' : ''}}>All Claims</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <table class="table table-sm tabe-striped mb-3 border-left border-right border-bottom">
|
|
|
|
+ <thead class="bg-light">
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="border-bottom-0 pl-2">IID</th>
|
|
|
|
+ <th class="border-bottom-0">Details</th>
|
|
|
|
+ <th class="border-bottom-0">Status</th>
|
|
|
|
+ <th class="border-bottom-0">Submissions</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach ($note->claims as $claim)
|
|
|
|
+ @if($claim->status !== 'CANCELLED' || request('claims-filter') === 'all')
|
|
|
|
+ <tr class="bg-secondary on-hover-opaque">
|
|
|
|
+ <td colspan="5" class="pt-0 pb-1"></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="{{ $claim->status === 'CANCELLED' ? 'text-secondary bg-light on-hover-opaque' : '' }}">
|
|
|
|
+ <td class="pl-2">
|
|
|
|
+ <div>{{ $claim->iid }}</div>
|
|
|
|
+ <div class="text-sm text-secondary font-weight-bold mt-1">Current Version:</div>
|
|
|
|
+ <div class="text-sm text-secondary">{{$claim->currentVersion ? friendlier_date_time($claim->currentVersion->created_at) : '-'}}</div>
|
|
|
|
+ @if($claim->status === 'CANCELLED')
|
|
|
|
+ <div class="text-secondary font-weight-bold text-sm mt-1">[CANCELLED]</div>
|
|
|
|
+ @else
|
|
|
|
+ <div moe class="text-left mt-1" title="Cancel Claim">
|
|
|
|
+ <a class="" href="" show start>Cancel</a>
|
|
|
|
+ <form url="/api/claim/updateStatus">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$claim->uid}}">
|
|
|
|
+ <input type="hidden" name="status" value="CANCELLED">
|
|
|
|
+ <p>Cancel this claim?</p>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label for="" class="control-label">Cancellation Memo</label>
|
|
|
|
+ <textarea name="memo" class="form-control"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="p-0 border-left border-right">
|
|
|
|
+ @if($claim->lines->count())
|
|
|
|
+ <table class="table table-sm table-condensed border-0 mb-0">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr class="bg-light">
|
|
|
|
+ <th class="border-0">CPT</th>
|
|
|
|
+ <th class="border-0">DOS</th>
|
|
|
|
+ <th class="border-0">ICDs</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody class="pb-3">
|
|
|
|
+ @foreach($claim->lines as $line)
|
|
|
|
+ <tr class="claim-line">
|
|
|
|
+ <td>{{$line->cpt}}
|
|
|
|
+ <div>Units: <b>{{!@$line->units ? 1 : $line->units}}</b></div>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="text-nowrap">{{friendlier_date($line->date_of_service)}}</td>
|
|
|
|
+ <td>
|
|
|
|
+ @if(count($line->claimLineIcds))
|
|
|
|
+ @foreach($line->claimLineIcds as $icd)
|
|
|
|
+ <div>
|
|
|
|
+ <b class="c-pointer border-secondary border-bottom" title="{{$icd->description}}">{{$icd->code}}</b>
|
|
|
|
+ </div>
|
|
|
|
+ @endforeach
|
|
|
|
+ @else
|
|
|
|
+ <p>No ICDs set</p>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ @else
|
|
|
|
+ <p>No lines for this claim</p>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="border-right p-0">
|
|
|
|
+
|
|
|
|
+ <!-- payer, company, location -->
|
|
|
|
+ <div class="p-1">
|
|
|
|
+ <div class="mt-1">
|
|
|
|
+ <div>
|
|
|
|
+ <span class="text-secondary text-sm">Payer (1°): </span>
|
|
|
|
+ <b>{{$claim->primaryPayer ? $claim->primaryPayer->name : '-'}}</b>
|
|
|
|
+ @if(0 && $claim->status !== 'CANCELLED')
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-primary" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/claim/putPrimaryPayer">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$claim->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select name="primaryPayerUid" class="form-control form-control-sm">
|
|
|
|
+ <option value="">-- select --</option>
|
|
|
|
+ @foreach($note->hcpPro->companyProPayers as $companyProPayer)
|
|
|
|
+ <option value="{{$companyProPayer->payer->uid}}"
|
|
|
|
+ {{$claim->primaryPayer && $claim->primaryPayer->uid === $companyProPayer->payer->uid ? 'selected' : ''}}>{{$companyProPayer->payer->name}}</option>
|
|
|
|
+ @endforeach
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @if($claim->primaryPayer)
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-danger" href="" show start><i class="fa fa-trash-alt"></i></a>
|
|
|
|
+ <form url="/api/claim/wipePrimaryPayer">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$claim->uid}}">
|
|
|
|
+ <p>Wipe payer from this claim?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ <div class="py-1 border-bottom d-flex align-items-center">
|
|
|
|
+ <span class="text-secondary text-sm pr-1">Status: </span>
|
|
|
|
+ <div>
|
|
|
|
+ {{$claim->status ? $claim->status : '(not set)'}}
|
|
|
|
+ @if($claim->status !== 'CANCELLED')
|
|
|
|
+ <span moe class="d-inline-block text-left ml-1" title="Update Status">
|
|
|
|
+ <a class="" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/claim/updateStatus">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$claim->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label for="" class="control-label">Status</label>
|
|
|
|
+ <select name="status" class="form-control form-control-sm" required>
|
|
|
|
+ <option value="">-- select --</option>
|
|
|
|
+ <option value="NEW" {{$claim->status === 'NEW' ? 'selected' : ''}}>New</option>
|
|
|
|
+ <option value="PICKED_UP" {{$claim->status === 'PICKED_UP' ? 'selected' : ''}}>Picked Up</option>
|
|
|
|
+ <option value="SUBMITTED" {{$claim->status === 'SUBMITTED' ? 'selected' : ''}}>Submitted</option>
|
|
|
|
+ <option value="IN_PROCESS" {{$claim->status === 'IN_PROCESS' ? 'selected' : ''}}>In Process</option>
|
|
|
|
+ <option value="ACCEPTED" {{$claim->status === 'ACCEPTED' ? 'selected' : ''}}>Accepted</option>
|
|
|
|
+ <option value="REJECTED" {{$claim->status === 'REJECTED' ? 'selected' : ''}}>Rejected</option>
|
|
|
|
+ <option value="ABANDONED" {{$claim->status === 'ABANDONED' ? 'selected' : ''}}>Abandoned</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label for="" class="control-label">Status Memo</label>
|
|
|
|
+ <textarea name="memo" class="form-control"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ @if($claim->status_memo)
|
|
|
|
+ <div class="text-secondary font-italic text-sm">{{$claim->status_memo}}</div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="mt-1">
|
|
|
|
+ <span class="text-secondary text-sm">Payer (2°): </span>
|
|
|
|
+ <b>-</b>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="mt-1">
|
|
|
|
+ <span class="text-secondary text-sm">Company: </span>
|
|
|
|
+ <b>{{$claim->companyPro && $claim->companyPro->company ? $claim->companyPro->company->name : '-'}}</b>
|
|
|
|
+ @if(0 && $claim->status !== 'CANCELLED')
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-primary" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/claim/putCompanyPro">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$claim->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select name="companyProUid" class="form-control form-control-sm">
|
|
|
|
+ <option value="">-- select --</option>
|
|
|
|
+ @foreach($note->hcpPro->companyProPayers as $companyProPayer)
|
|
|
|
+ <option value="{{$companyProPayer->companyPro->uid}}"
|
|
|
|
+ {{$claim->companyPro && $claim->companyPro->uid === $companyProPayer->companyPro->uid ? 'selected' : ''}}>{{$companyProPayer->company->name}}</option>
|
|
|
|
+ @endforeach
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @if($claim->companyPro && $claim->companyPro->company)
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-danger" href="" show start><i class="fa fa-trash-alt"></i></a>
|
|
|
|
+ <form url="/api/claim/wipeCompanyPro">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$claim->uid}}">
|
|
|
|
+ <p>Wipe company from this claim?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="mt-1">
|
|
|
|
+ <span class="text-secondary text-sm">Location: </span>
|
|
|
|
+ <b>{{$claim->companyLocation ? $claim->companyLocation->line1 . ', ' . $claim->companyLocation->city : '-'}}</b>
|
|
|
|
+ @if(0 && $claim->status !== 'CANCELLED')
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-primary" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/claim/putCompanyLocation">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$claim->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select name="companyLocationUid" class="form-control form-control-sm">
|
|
|
|
+ <option value="">-- select --</option>
|
|
|
|
+ @if($claim->company && $claim->company->locations)
|
|
|
|
+ @foreach($claim->company->locations as $location)
|
|
|
|
+ <option value="{{$location->uid}}"
|
|
|
|
+ {{$claim->companyLocation && $claim->companyLocation->uid === $location->uid ? 'selected' : ''}}>
|
|
|
|
+ {{$location->line1 . ', ' . $location->city}}
|
|
|
|
+ </option>
|
|
|
|
+ @endforeach
|
|
|
|
+ @endif
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @if($claim->companyLocation)
|
|
|
|
+ <span moe class="ml-1">
|
|
|
|
+ <a class="text-danger" href="" show start><i class="fa fa-trash-alt"></i></a>
|
|
|
|
+ <form url="/api/claim/wipeCompanyLocation">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$claim->uid}}">
|
|
|
|
+ <p>Wipe location from this claim?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="p-0 border-left border-right">
|
|
|
|
+ <table class="table table-sm table-condensed border-0 mb-0">
|
|
|
|
+ @if($claim->status !== 'CANCELLED')
|
|
|
|
+ <thead>
|
|
|
|
+ <tr class="">
|
|
|
|
+ <th colspan="3" class="border-top-0 border-bottom">
|
|
|
|
+ <div>
|
|
|
|
+ <span moe class="d-block" title="Submit Claim">
|
|
|
|
+ <a class="" href="" show start>Generate Submission to Payer (1°)</a>
|
|
|
|
+ <form url="/api/mbClaim/createFromClaimForPrimaryPayer">
|
|
|
|
+ <input type="hidden" name="claimUid" value="{{$claim->uid}}">
|
|
|
|
+ <p>Generate Submission?</p>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ @endif
|
|
|
|
+ @if(count($claim->mbClaims))
|
|
|
|
+ <thead>
|
|
|
|
+ <tr class="bg-light">
|
|
|
|
+ <th class="border-0">Created</th>
|
|
|
|
+ <th class="border-0">Status</th>
|
|
|
|
+ <th class="border-0"> </th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody class="pb-3">
|
|
|
|
+ @foreach($claim->mbClaims as $mbClaim)
|
|
|
|
+ <tr>
|
|
|
|
+ <td>
|
|
|
|
+ @if($mbClaim->claim_version_id !== $claim->current_version_id)
|
|
|
|
+ <i class="fa fa-exclamation-triangle text-warning-mellow text-sm" title="This submission was generated using an older version of the claim"></i>
|
|
|
|
+ @else
|
|
|
|
+ <i class="fa fa-asterisk text-secondary text-sm" title="This submission is up to date"></i>
|
|
|
|
+ @endif
|
|
|
|
+ <a native target="_blank"
|
|
|
|
+ open-in-stag-popup
|
|
|
|
+ title="Submission Details"
|
|
|
|
+ href="{{route('mb-claim', ['patient' => $patient, 'mbClaim' => $mbClaim])}}">
|
|
|
|
+ {{ friendlier_date_time($mbClaim->created_at) }}
|
|
|
|
+ </a>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ {{$mbClaim->status}}
|
|
|
|
+ @if($mbClaim->status_memo)
|
|
|
|
+ <div class="font-italic text-secondary text-sm">{{$mbClaim->status_memo}}</div>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="text-right pr-2">
|
|
|
|
+ <span moe relative title="Submit Claim">
|
|
|
|
+ <a class="" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/mbClaim/updateStatus" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$mbClaim->uid}}">
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <label for="" class="control-label">Status</label>
|
|
|
|
+ <select name="status" class="form-control form-control-sm" required>
|
|
|
|
+ <option value="">-- select --</option>
|
|
|
|
+ <option value="NEW" {{$mbClaim->status === 'NEW' ? 'selected' : ''}}>New</option>
|
|
|
|
+ <option value="PROCESSING" {{$mbClaim->status === 'PROCESSING' ? 'selected' : ''}}>Processing</option>
|
|
|
|
+ <option value="SUBMITTED" {{$mbClaim->status === 'SUBMITTED' ? 'selected' : ''}}>Submitted</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <label for="" class="control-label">Status Memo</label>
|
|
|
|
+ <textarea name="memo" class="form-control"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </span>
|
|
|
|
+ <a class="ml-1" target="_blank" native href="/api/mbClaim/downloadEDI/{{$mbClaim->uid}}" show start><i class="fa fa-file-download"></i></a>
|
|
|
|
+ <a class="ml-1 text-success" href="" show start><i class="fa fa-arrow-right"></i></a>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ @else
|
|
|
|
+ <tbody>
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="3">
|
|
|
|
+ <p class="p-1 text-secondary m-0">No submissions in this claim</p>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ @endif
|
|
|
|
+ </table>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endif
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <div class="screen-only my-3 px-3 d-flex">
|
|
|
|
+ <p class="font-weight-bold mb-0 text-secondary">No claims in this note</p>
|
|
|
|
+ @include('app/patient/note/_create-claim')
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <div class="border-top p-3 screen-only">
|
|
|
|
+ @if($note->addendums->count())
|
|
|
|
+ <div class="">
|
|
|
|
+ <div class="d-flex align-items-center mb-2">
|
|
|
|
+ <p class="font-weight-bold text-secondary m-0">Addendums</p>
|
|
|
|
+ @include('app/patient/note/_create-addendum')
|
|
|
|
+ </div>
|
|
|
|
+ <table class="table table-sm tabe-striped border-left border-right border-bottom m-0">
|
|
|
|
+ <thead class="bg-light">
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="border-bottom-0 pl-2 w-75">Addendum</th>
|
|
|
|
+ <th class="border-bottom-0">Created</th>
|
|
|
|
+ <th class="border-bottom-0 delete-column"></th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach ($note->addendums as $addendum)
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="pl-2">{{ $addendum->memo }}</td>
|
|
|
|
+ <td class="">{{ friendly_date_time($addendum->created_at, false)}}</td>
|
|
|
|
+ <td>
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <div moe relative class="mr-2">
|
|
|
|
+ <a href="" show start><i class="fa fa-pencil-alt"></i></a>
|
|
|
|
+ <form url="/api/noteAddendum/updateMemo" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$addendum->uid}}">
|
|
|
|
+ <div class="mb-2 d-block">
|
|
|
|
+ <label class="d-block text-sm text-secondary mb-1">Addendum</label>
|
|
|
|
+ <textarea class="form-control form-control-sm" name="memo" rows="5">{{$addendum->memo}}</textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm mr-1" submit>Submit</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ <div moe relative class="mr-1">
|
|
|
|
+ <a href="" show start class="text-danger"><i class="fa fa-trash"></i></a>
|
|
|
|
+ <form url="/api/noteAddendum/remove" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$addendum->uid}}">
|
|
|
|
+ <p>Remove this addendum?</p>
|
|
|
|
+ <div class="form-group mb-0">
|
|
|
|
+ <button class="btn btn-danger btn-sm mr-1" submit>Yes</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>No</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <div class="d-flex">
|
|
|
|
+ <p class="font-weight-bold mb-0 text-secondary">No addendums in this note</p>
|
|
|
|
+ @include('app/patient/note/_create-addendum')
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="screen-only">
|
|
|
|
+ @include('app/patient/note/_cancel-signed-note')
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="note-templates-underlay"></div>
|
|
|
|
+ @include('app.patient.note.dashboard_script')
|
|
|
|
+ @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'rx', 'class' => 'wide', 'noEditLink' => true])
|
|
|
|
+ <script>
|
|
|
|
+ (function() {
|
|
|
|
+ function init() {
|
|
|
|
+ fixTreeTopAndHeight();
|
|
|
|
+ $(window).on('resize', fixTreeTopAndHeight);
|
|
|
|
+ $(window).on('scroll', fixTreeTopAndHeight);
|
|
|
|
+ $('.note-tree-node>a[data-section-template-name]')
|
|
|
|
+ .off('click.scroll-to-section')
|
|
|
|
+ .on('click.scroll-to-section', function() {
|
|
|
|
+ let section = $('div.note-section[data-section-template-name="' + $(this).attr('data-section-template-name') + '"]').first();
|
|
|
|
+ if(section.length) {
|
|
|
|
+ section[0].scrollIntoView({
|
|
|
|
+ behavior: "smooth",
|
|
|
|
+ block: "center",
|
|
|
|
+ inline: "center"
|
|
|
|
+ });
|
|
|
|
+ section.addClass('spot-highlight');
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ section.removeClass('spot-highlight');
|
|
|
|
+ }, 1500);
|
|
|
|
+ $('.note-tree-node.active').removeClass('active');
|
|
|
|
+ $(this).closest('.note-tree-node').addClass('active');
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function fixTreeTopAndHeight() {
|
|
|
|
+ let tree = $('#note-lhs-tree'), noteCardHeader = $('#note-card-header'),
|
|
|
|
+ resultTop = (noteCardHeader.offset().top + noteCardHeader.outerHeight(true)) - $(window).scrollTop();
|
|
|
|
+ if(resultTop <= 55) {
|
|
|
|
+ tree.addClass('fixed');
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ tree.removeClass('fixed');
|
|
|
|
+ tree.css('height', 'calc(100vh - ' + resultTop + 'px)');
|
|
|
|
+ tree.css('max-height', 'calc(100vh - ' + resultTop + 'px)');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ addMCInitializer('note-tree', init, '#note-lhs-tree');
|
|
|
|
+ })();
|
|
|
|
+ </script>
|
|
|
|
+@endsection
|