@extends('layout.backend') @section('title', 'Médicos') @section('scripts') @parent @endsection @section('content') {{-- BARRA DE BOTÕES --}} {{-- ALERTAS --}} @include('components.widget.alerts') {{-- FILTROS --}} {{__('common.filter.speciality')}} {{__('common.filter.agreement')}} {{__('common.filter.surgeon')}} {{__('common.filter.name')}} ou CRM {{__('common.filter.cooperationLevel')}} {{__('common.filter.visitPriority')}} {{__('common.filter.hlc37')}} {{__('common.filter.responsible')}} {{-- CORPO --}} {{-- Atalho para mostrar todas as cooperações, se user tiver acesso a isso --}} @can('doctor-colih') @if($data['cooperationLevel']!=='All')
(int)$data['cooperationLevel'] >= 4 && (int)$data['cooperationLevel'] !== 8, 'alert-info' => (int)$data['cooperationLevel']==3, 'alert-danger' => (int)$data['cooperationLevel']<=2 || (int)$data['cooperationLevel'] == 8] )> Mostrando apenas médicos @if((int)$data['cooperationLevel'] == 9) favoráveis. @elseif($data['cooperationLevel']==3) desconhecidos. @elseif((int)$data['cooperationLevel'] == 8) desfavoráveis. @else de cooperação {{ \App\Enums\Doctor\DoctorCooperationLevels::labels(false)[$data['cooperationLevel']] ?? '' }}. @endif (int)$data['cooperationLevel'] >= 4 && (int)$data['cooperationLevel'] !== 8, 'btn-info' => (int)$data['cooperationLevel']==3, 'btn-danger' => (int)$data['cooperationLevel']<=2 || (int)$data['cooperationLevel'] == 8] )> Mostrar todos
@endif @endcan @if(isset($data['cooperationLevel']) && $data['cooperationLevel'] !== 'All') Mostrar todos os médicos @endif @foreach($doctors as $doctor) {{-- nome --}} {{-- Cooperação --}} @can('doctor-colih')
{!! $doctor->cooperation_level_string !!}
@endcan {{-- especialidades --}}
@if($doctor->specialities) @foreach($doctor->specialities as $speciality) {{$speciality->speciality->name }}{{!$loop->last ? ', ': ''}} @endforeach @else Sem especialidade cadastrada @endif
{{-- tipos de pagamento --}}
@if($doctor->has_sus)
SUS
@endif @if($doctor->agreements && $doctor->agreements->count() >0)
Convênios
@endif @if($doctor->private_practice)
@endif @if($doctor->hlc_37)
@endif
{{-- VISITAS E CASOS --}}
@can('view-visits') @php $visit = $doctor->lastDateVisitDetails @endphp @if($visit)
{{ \App\Helpers\AppHelper::convertDateToCarbon($visit->date)->locale('pt_BR')->isoFormat('MMM/YY') }}
@else
Não visitado
@endif @endcan @can('view-cases')
cases->count()>1 ? "s" : "")." com cooperação" : "Sem casos registrados"}}"> {{ ($doctor->cases && $doctor->cases->count() >0) ? $doctor->cases->count() : '0' }}
@endcan
{{--flags --}}
@can('doctor-confidential') @if($doctor->surgeon)
Cirurgião
@endif @endcan @if($doctor->accept_emergencies)
Emergências
@endif @if($doctor->accept_children)
@endif @if($doctor->accept_babies)
@endif @if($doctor->accept_telemedicine)
Telemedicina
@endif
{{-- Endereços --}}
@php $currentRegion = null; $addresses = $doctor->addresses ->map(fn($address) => [ 'region_name' => $address->region_name, 'city_name' => $address->city_name ]) ->unique(fn($item) => $item['region_name'] . '-' . $item['city_name']) ->sortBy(['region_name', 'city_name']) ->values() ->toArray(); @endphp
@foreach($addresses as $index => $address) @if($currentRegion !== $address['region_name']) @if(!is_null($currentRegion)) {{-- Close previous row properly --}} @endif @if($data['isMultipleRegions']) @endif @endif
{!! $index === 0 ? '' : '' !!}
{{ $address['region_name'] }}
{{ $address['city_name'] }} @php $currentRegion = $address['region_name']; @endphp @else {{ ', ' . $address['city_name'] }} @endif @endforeach @if(!is_null($currentRegion))
$doctor->user && !$doctor->user->trashed(), "text-danger" => !$doctor->user || $doctor->user->trashed() ]) data-placement="top" data-tooltip="tooltip" data-delay=500 title="Especialidades"> @if($doctor->user) $doctor->user->trashed()])> @if($doctor->user->trashed()) @endif {{$doctor->user->shortName}} @else Não designado @endif
{{-- ações --}} @if (Gate::allows('edit-doctor') || (Gate::allows('doctor-edit-mine') && ($doctor->user_id ?? 0) == auth()->id() ) ) @endif @if (Gate::allows('audit-doctor') ) @endif @if(!$doctor->trashed()) @endif
@endforeach
{{--- DELETE MODAL --}}
{!! Form::select('reason', \App\Data\Doctor::getDeleteReasons(), null, ['class' => 'form-control', 'id' => 'reason']) !!}
Campo obrigatório.
{!! Form::textarea('observations', null, ['id' => 'observations', 'class' => 'form-control', 'style' => 'height: 100px']) !!}
@endsection