|
@@ -13,86 +13,77 @@
|
|
|
</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
-<div class="mt-2 pt-2">
|
|
|
- @php
|
|
|
- $cpc = $patient->getPrimaryCoverage();
|
|
|
- @endphp
|
|
|
-</div>
|
|
|
- @if(!$cpc)
|
|
|
- <div class="alert alert-info">No coverage for this client</div>
|
|
|
- @else
|
|
|
- @php
|
|
|
- $cpc->auto_detail_json = json_decode($cpc->auto_detail_json);
|
|
|
- @endphp
|
|
|
- <div class="d-flex align-items-center mb-2">
|
|
|
- @if($cpc->is_manually_determined)
|
|
|
- <div>
|
|
|
- <span class="d-inline bg-warning px-2 rounded mr-1"><i class="fas fa-map-pin"></i> Manually Determined</span>
|
|
|
- @if($cpc->is_cancelled)
|
|
|
- <span class="mr-1 text-danger text-sm">Cancelled</span>
|
|
|
- @else
|
|
|
- @include('app.patient.partials.undo-manual-determination')
|
|
|
+<div class="page-tabs coverage-tabs-display mt-3">
|
|
|
+ <div class="links">
|
|
|
+ @if($patient->latestNewClientPrimaryCoverage)
|
|
|
+ <a class="c-pointer {{ $patient->getPrimaryCoverage()->id == $patient->latestNewClientPrimaryCoverage->id ? 'active':'' }}" data-link="latest_new_client_primary_coverage">
|
|
|
+ Latest New Client Primary Coverage
|
|
|
+ @if($patient->getPrimaryCoverage()->id == $patient->latestNewClientPrimaryCoverage->id)
|
|
|
+ <i class="fas fa-star ml-2"></i>
|
|
|
@endif
|
|
|
- <span class="mx-1 text-muted text-sm">|</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- @else
|
|
|
-
|
|
|
- @endif
|
|
|
- <h1 class="mr-2 mb-0">Is Covered: {{$cpc->is_covered}}</h1>
|
|
|
- @if($cpc->plan_type == 'MEDICARE')
|
|
|
- @include('app.patient.primary-coverage-refresh', ['endpoint'=>'refreshCoverageForMedicare'])
|
|
|
- <span class="mx-2 text-secondary text-sm">|</span>
|
|
|
- <a native target="_blank"
|
|
|
- open-in-stag-popup
|
|
|
- mc-initer="manual-determination-form-{{$patient->uid}}"
|
|
|
- title="Medicare Part B (Primary)"
|
|
|
- href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}">
|
|
|
- Manual Determination for Medicare Part B (Primary)
|
|
|
</a>
|
|
|
@endif
|
|
|
- @if($cpc->plan_type == 'MEDICAID')
|
|
|
- @include('app.patient.primary-coverage-refresh', ['endpoint'=>'refreshCoverageForMedicaid'])
|
|
|
- <span class="mx-2 text-secondary text-sm">|</span>
|
|
|
- <a native target="_blank"
|
|
|
- open-in-stag-popup
|
|
|
- mc-initer="manual-determination-form-{{$patient->uid}}"
|
|
|
- title="Medicaid (Primary)"
|
|
|
- href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}">
|
|
|
- Manual Determination for Medicaid (Primary)
|
|
|
- </a>
|
|
|
- @endif
|
|
|
- @if($cpc->plan_type == 'COMMERCIAL')
|
|
|
- @include('app.patient.primary-coverage-refresh', ['endpoint'=>'refreshCoverageForCommercial'])
|
|
|
- <span class="mx-2 text-secondary text-sm">|</span>
|
|
|
- <a native target="_blank"
|
|
|
- open-in-stag-popup
|
|
|
- mc-initer="manual-determination-form-{{$patient->uid}}"
|
|
|
- title="Commercial (Primary)"
|
|
|
- href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}">
|
|
|
- Manual Determination for Commercial (Primary)
|
|
|
+ @if($patient->latestAutoRefreshClientPrimaryCoverage)
|
|
|
+ <a class="c-pointer {{ $patient->getPrimaryCoverage()->id == $patient->latestAutoRefreshClientPrimaryCoverage->id ? 'active':'' }}" data-link="latest_auto_refresh_client_primary_coverage">
|
|
|
+ Latest Auto Refresh Client Primary Coverage
|
|
|
+ @if($patient->getPrimaryCoverage()->id == $patient->latestAutoRefreshClientPrimaryCoverage->id)
|
|
|
+ <i class="fas fa-star ml-2"></i>
|
|
|
+ @endif
|
|
|
</a>
|
|
|
@endif
|
|
|
+ @if($patient->latestManualClientPrimaryCoverage)
|
|
|
+ <a class="c-pointer {{ $patient->getPrimaryCoverage()->id == $patient->latestManualClientPrimaryCoverage->id ? 'active':'' }}" data-link="latest_manual_client_primary_coverage">
|
|
|
+ Latest Manual Client Primary Coverage
|
|
|
+ @if($patient->getPrimaryCoverage()->id == $patient->latestManualClientPrimaryCoverage->id)
|
|
|
+ <i class="fas fa-star ml-2"></i>
|
|
|
+ @endif
|
|
|
+ </a>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="mt-4 {{ $cpc->is_cancelled ? 'cpc-cancelled':'' }}">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12">
|
|
|
- @include('app.patient.primary-coverage-view')
|
|
|
+ <div class="page-tab">
|
|
|
+ @if($patient->latestNewClientPrimaryCoverage)
|
|
|
+ <div tab id="latest_new_client_primary_coverage" class="{{ $patient->getPrimaryCoverage()->id == $patient->latestNewClientPrimaryCoverage->id ? '':'d-none' }}">
|
|
|
+ @include('app.patient.partials.coverage-information', ['coverage' => $patient->latestNewClientPrimaryCoverage])
|
|
|
</div>
|
|
|
- </div>
|
|
|
- {{--
|
|
|
- @php
|
|
|
- dump(json_decode($cpc->toJson(JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)));
|
|
|
- @endphp
|
|
|
- --}}
|
|
|
- {{--
|
|
|
- @php
|
|
|
- dump($cpc->auto_detail_json);
|
|
|
- @endphp
|
|
|
- --}}
|
|
|
+ @endif
|
|
|
+ @if($patient->latestAutoRefreshClientPrimaryCoverage)
|
|
|
+ <div tab id="latest_auto_refresh_client_primary_coverage" class="{{ $patient->getPrimaryCoverage()->id == $patient->latestAutoRefreshClientPrimaryCoverage->id ? '':'d-none' }}">
|
|
|
+ @include('app.patient.partials.coverage-information', ['coverage' => $patient->latestAutoRefreshClientPrimaryCoverage])
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ @if($patient->latestManualClientPrimaryCoverage)
|
|
|
+ <div tab id="latest_manual_client_primary_coverage" class="{{ $patient->getPrimaryCoverage()->id == $patient->latestManualClientPrimaryCoverage->id ? '':'d-none' }}">
|
|
|
+ @include('app.patient.partials.coverage-information', ['coverage' => $patient->latestManualClientPrimaryCoverage])
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
- @endif
|
|
|
</div>
|
|
|
+
|
|
|
+<script>
|
|
|
+ (function($){
|
|
|
+ var coverageTabsComponent = {
|
|
|
+ initTabs: function(){
|
|
|
+ var section = $('.coverage-tabs-display');
|
|
|
+ var sectionContent = section.find('.page-tab');
|
|
|
+ var tabsLinks = section.find('.links a');
|
|
|
+
|
|
|
+ $.each(tabsLinks, function(i, link){
|
|
|
+ $(link).click(function(evt){
|
|
|
+ evt.preventDefault();
|
|
|
+ var target = $(link).data('link');
|
|
|
+ tabsLinks.removeClass('active');
|
|
|
+ $(link).addClass('active');
|
|
|
+ sectionContent.find('[tab]').addClass('d-none');
|
|
|
+ sectionContent.find('#'+target).removeClass('d-none');
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ init: function(){
|
|
|
+ this.initTabs();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ coverageTabsComponent.init();
|
|
|
+ })(jQuery);
|
|
|
+</script>
|
|
|
+
|
|
|
@endsection
|