@if($data->added_by_id == $practitioner->id || ($data->practitioner_id == $practitioner->id && $data->added_by_id == ''))
@endif
{{ $data->temp_appointment->appointment_type ?? "" }} {{$data->temp_appointment->app_date ?? ""}}
Notes updated {{$data->updatedDate}} {{ $data->appointmentAddedBy ?? ""}}
{{-- {{$data->practitioner_new_name->first_name ?? ""}} {{$data->practitioner_new_name->last_name ?? ""}}
--}}
{{$data->practitioner_name?? ""}}
@foreach($data->question_list as $question)
@if($question->name == 'food_recall_diary' && $question->display_header == 1)
{{str_replace("_"," ",ucfirst($question->header))}}
@foreach($question->options as $option)
@if($option->answer !='')
{{ucfirst($option->title)}}
{{$option->answer}}
@endif
@endforeach
@elseif($question->name == 'yes_no_question' && $question->display_header == 1)
{{str_replace("_"," ",ucfirst($question->header))}}
@if($question->sub_header !='')
{{ucfirst($question->sub_header)}}
@endif
@foreach($question->options as $option)
@if($option->answer !='')
{{ucfirst($option->title)}}
@if($option->answer == 1) Yes @else No @endif
@endif
@endforeach
@elseif($question->name == 'multiple_choice' && count($question->options) != 0)
@if($question->answer !='')
{{str_replace("_"," ",ucfirst($question->header))}}
@if($question->sub_header !='')
{{ucfirst($question->sub_header)}}
@endif
@foreach($question->options as $option)
@if($question->answer == $option->id)
{{ucfirst($option->title)}}
@endif
@endforeach
@endif
@elseif($question->name == 'checklist' && $question->display_header == 1)
{{ucfirst($question->header)}}
@if($question->sub_header !='')
{{ucfirst($question->sub_header)}}
@endif
@foreach($question->options as $option)
@if($option->answer == 1)
{{$option->title}}
@endif
@endforeach
@elseif($question->name == 'prescriptions')
@if(isset($data->prescribedProducts) && count($data->prescribedProducts) >= 1)
Prescribed Products
@foreach($data->prescribedProducts as $p)
{{$p->product_name ?? ""}}
{{$p->suggested_use}}
@endforeach
@endif
@elseif($question->name == 'recommendations' && $data->notes !='')
@if(count($data->recommendation_file) >= 1 || $data->notes->recommendations !='')
Recommendations
{{$data->notes->recommendations ?? ""}}
@endif
@if(isset($data->recommendation_file))
@foreach ($data->recommendation_file as $f)
@endforeach
@endif
@elseif($question->name == 'custom_section')
@if($question->display_section_header == 1)
{{str_replace("_"," ",ucfirst($question->section_header))}}
{{ucfirst($question->section_sub_header)}}
@endif
@foreach($question->sequence_questions as $val)
@if($val->type == 'yes_no_question' && $val->display_header == 1)
{{str_replace("_"," ",ucfirst($val->header))}}
{{ucfirst($val->sub_header)}}
@foreach($val->options as $option)
@if($option->answer != '')
{{ucfirst($option->title)}}
@if($option->answer == 1) Yes @else No @endif
@endif
@endforeach
@elseif($val->type == 'multiple_choice' && count($val->options) != 0)
@if($val->answer !='')
{{str_replace("_"," ",ucfirst($val->header))}}
{{ucfirst($val->sub_header)}}
@foreach($val->options as $option)
@if($val->answer == $option->id)
{{ucfirst($option->title)}}
@endif
@endforeach
@endif
@elseif($val->type == 'checklist' && $val->display_header == 1)
{{ucfirst($val->header)}}
{{ucfirst($val->sub_header)}}
@foreach($val->options as $option)
@if($option->answer == 1)
{{$option->title}}
@endif
@endforeach
@else
@if($val->answer !='')
{{str_replace("_"," ",ucfirst($val->header))}}
{{ucfirst($val->sub_header)}}
{{$val->answer}}@if($val->type =='scale')/10 @endif
@endif
@endif
@endforeach
@elseIf($question->type == 'chart')
@if($question->answer !='')
{{str_replace("_"," ",ucfirst($question->header))}}
@if($question->sub_header !='')
{{ucfirst($question->sub_header)}}
@endif
@php
$getType=Common::getStoolChart();
@endphp
@foreach ($getType as $key=>$type)
@if($key == $question->answer)
Type {{$key}} - {{$type}}
@endif
@endforeach
@endif
@else
@if($question->answer !='')
{{str_replace("_"," ",ucfirst($question->header))}}
@if($question->sub_header !='')
{{ucfirst($question->sub_header)}}
@endif
{{$clean_text}}@if($question->type =='scale' || $question->type =='scale_one_two')/10 @endif
@endif
@endif
@endforeach