{{$hospital[0]->hospital_name}}
{{$hospital[0]->hospital_address}}
Tel :{{$hospital[0]->hospital_tel}}

Discharge Report


{{$casedata->procedure_name}}

Patient Name : {{$casedata->firstname." ".$casedata->lastname}} HN : {{ $casedata->hn }}
Date of birth/Age : {{$casedata->birthdate}} ({{age($casedata->birthdate)}}) Gender : {{ $casedata->gender_name }}
Date of procedure : {{$casedata->case_dateappointment}} Time Start : {{ $casedata->capture_start }}
Referring Physician : {{$casedata->refer}} End :{{ $casedata->capture_end }}           Withdrawal :
Endoscopist : {{$doctor01[0]->name}}
Nurse,Assist / Anes : @if($nurse01[0]->name!=""), {{$nurse01[0]->name}} @endif @if($nurse02[0]->name!=""), {{$nurse02[0]->name}} @endif @if($nurse03[0]->name!=""), {{$nurse03[0]->name}} @endif @if($nurse04[0]->name!=""), {{$nurse04[0]->name}} @endif @if($anes[0]->name!="") / {{$anes[0]->name}} @endif
Endoscope : @php $i =0; @endphp @foreach($photoselect as $p) @php $ex = explode('_',$p->photo_name); $keep[$i] = $ex[1]; $i++; @endphp @endforeach @php if($keep==null){ $b=array(); }else{ $b = array_unique ($keep); } @endphp @foreach($b as $c) @php if($c!="self") { $showscope = DB::table('tb_scope')->where('scope_id','=',$c)->first(); echo " "; } @endphp @endforeach
"; echo $showscope->scope_name; echo "

@forelse ($photoselectonly as $p) @if($startpic>=$photostart && $startpic<=$photoend) @endif @empty @endforelse
{{$p->photo_num}}
{{$p->mainpartsub_name}}
@if($p->photo_additional!="") {{$p->photo_additional}}
@endif {{$p->photo_gastrolesion}}


@if($paperend=="true")
Patient Signature___________________________________({{$casedata->firstname}} {{$casedata->lastname}})
(04/05/2025)
@php $datapic = DB::table('tb_case') ->join('patient','patient.id','tb_case.case_patientid') ->where('case_id',$casedata->case_id) ->first(); $file_start = fopen("images/ori-esign.txt", "r") or die("Unable to open file!"); $str_start = fread($file_start,filesize("images/ori-esign.txt")); fclose($file_start); $check_file = file_exists("store/".$datapic->hn."/".$casedata->case_id.".txt"); if($check_file==1){ $file_end = fopen("store/".$datapic->hn."/".$casedata->case_id.".txt", "r") or die("Unable to open file!"); $str_end = fread($file_end,filesize("store/".$datapic->hn."/".$casedata->case_id.".txt")); fclose($file_end); }else{ $file_end = fopen("images/ori-esign.txt", "r") or die("Unable to open file!"); $str_end = fread($file_end,filesize("images/ori-esign.txt")); fclose($file_end); } @endphp @if($str_start==$str_end) Signature___________________________, MD @else @endif
(04/05/2025)



Report by EndoCapture
@endif @if(!$paperend) @endif