POST-DIAGNOSTIC (ICD-10) :
@php $icd10 = jsonDecode(@$json->texticd10); $diag = jsonDecode(@$json->diagnostic); $overall_diagnosis = true; // dd($diag); $check_idc10 = 0; @endphp @if(isset($json->texticd10)) @foreach($icd10 as $icd) @php $code = ""; @endphp @foreach($diag as $ag) @php if($ag!=null){ $check = strpos($icd,$ag); if($check>-1){ $aaaa = DB::table('tb_diagnostic')->where('diagnostic_name',$ag)->first(); $code = @$aaaa->icd10.""; } } @endphp @endforeach @if($icd!="") @if($code=="") {{$icd}} @else {{$code}}  {{$icd}} @endif
@php $check_idc10 = 1; @endphp @endif @endforeach @else @php $overall_diagnosis = false; @endphp @endif @isset($json->overall_diagnosis) {!!nl2br($json->overall_diagnosis)!!} @else @if($overall_diagnosis) @else N/A @endif @endisset