@php if(isset($json)){ $tb_procedure = DB::table('tb_procedure')->where('procedure_name',$json->procedurename)->first(); if(isset($json->user_in_case)){ $lists = json_decode($json->user_in_case); $user_list = DB::table('users')->whereIn('id',$lists)->get(); } }else{ $tb_procedure = DB::table('tb_procedure')->where('procedure_name','EGD')->first(); } @endphp

{{ @$json->procedurename }}{{ @$text }}

{{-- --}}
Case ID : @if(@$case->case_id != 0){{ @$case->case_id }}@endif{{ @$text }}
{{-- --}}
HN : {{ @$patient->hn }}{{ @$text }}
Name : {{ @$patient->firstname }} {{ @$patient->lastname }}{{ @$text }}
Gender / Age : {{ @$gender }}{{ @$text }}   /   {{ age(@$patient->birthdate) }}{{ @$text }}
Endoscopist : {{ @$json->doctorname }}{{ @$text }}
Attendant : {{-- --}}
@if(isset($user_list)) @foreach ($user_list as $cl)
{{@$cl->user_prefix}} {{@$cl->user_firstname}} {{@$cl->user_lastname}}
{{@$cl->user_type}}
@endforeach @endif
Room :
{{select_users($room,@$json->room,'room_name',['room_name'],'room','เลือกห้อง','form-control editroom savejson')}}
Patient in time :
Start time :
Withdrawal time :
End time :
Scope :

IMAGE 0

@php $count_img = 0; $dir = '../ScreenRecord'; $str = ''; if (is_dir($dir)) { if ($dh = opendir($dir)) { // dd(readdir($dh)); while (($file = readdir($dh)) !== false) { $pic = explode('_',$file); if($pic[0]==$case->case_id){ if(substr($file,-3) == "jpg" || substr($file,-3) == "png"){ $count_img++; } } } closedir($dh); } } if (is_dir($dir)) { if ($dh = opendir($dir)) { // $reversed = array_reverse($dh); $arr = array(); while (($file = readdir($dh)) !== false) { $pic = explode('_',$file); if($pic[0]==$case->case_id){ if(substr($file,-3) == "jpg" || substr($file,-3) == "png"){ $arr[] = $file; } } } $invert = array_reverse($arr); foreach ($invert as $key) { $str .= "