@php $rightto = DB::table('patient') ->leftjoin('dd_righttotreatment','dd_righttotreatment.id','patient.righttotreatment') ->where('patient.hn',$casedata->case_hn)->first(); $ward = "-"; $refer= "-"; if(isset($this_json->ward)){ if($this_json->ward != ''){ $ward = $this_json->ward; } } if(isset($this_json->refer)){ if($this_json->refer != ''){ $refer = $this_json->refer; } } @endphp
PATIENT NAME :{{$casedata->prefix.$casedata->firstname." ".$casedata->lastname}} HN : {{ $casedata->hn }}       Ward :{{$ward}}
GENDER : {{@$casedata->gender_name }}   Age : {{age($casedata->birthdate)}} Treatment Coverage :{{$json->righttotreatment}}
DATE OF PROCEDURE : {{swapDATE($casedata->case_dateappointment)}} TIME START : {{$totaltime}}
ENDOSCOPIST : {{$doctor[1]}} ENDOSCOPE : @foreach($scopeall as $scope) {{$scope}} @endforeach
CONSULTANT : {{$doctor[2]}} @if($doctor[3]!=""),{{$doctor[3]}}@endif
NURSE, ASSIST : {{$nurse[1]}} @if($nurse[2]!="") ,{{$nurse[2]}}@endif @if($nurse[3]!="") ,{{$nurse[3]}}@endif @if($nurse[4]!="")
{{$nurse[4]}}@endif