@include('layouts.shared/title-meta', ['title' => $form->title ?? 'Doctor Survey']) @include('layouts.shared/head-css', ['mode' => $mode ?? '', 'demo' => $demo ?? '']) @php $byCode = []; foreach ($questions ?? [] as $question) { if (isset($question->code)) { $byCode[$question->code] = $question; } } $submitted = $submitted_formdata ?? null; $val = function ($code) use ($byCode, $submitted) { if (is_object($submitted) && isset($submitted->{$code}) && $submitted->{$code} !== '' && $submitted->{$code} !== null) { return $submitted->{$code}; } if (is_array($submitted) && isset($submitted[$code]) && $submitted[$code] !== '' && $submitted[$code] !== null) { return $submitted[$code]; } if (isset($byCode[$code]->value) && $byCode[$code]->value !== '' && $byCode[$code]->value !== null) { return $byCode[$code]->value; } return ''; }; $show = function ($code) use ($val) { $value = $val($code); return $value !== '' && $value !== null ? $value : '—'; }; $fileUrl = function ($url) { $url = trim((string) $url); if ($url === '') { return ''; } if (!preg_match('#^https?://#i', $url)) { return rtrim((string) env('AWS_URL'), '/') . '/' . ltrim($url, '/'); } return $url; }; $isImageUrl = function ($url) { $ext = strtolower(pathinfo((string) parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION)); return in_array($ext, ['jpg', 'jpeg', 'png', 'gif', 'webp'], true); }; $products = [ 'Asthalin Inhaler' => 'asthalin_inhaler', 'Asthalin Rotacap' => 'asthalin_rotacap', 'Aerocort Inhaler' => 'aerocort_inhaler', 'Aerocort Rotacap' => 'aerocort_rotacap', 'Aerocort Forte Rotacap' => 'aerocort_forte_rotacap', ]; $therapies = [ 'Nebulization Respules / Month' => 'neb_respules', 'Foracort Inhaler Units / Month' => 'foracort_inhaler_units', 'Foracort Rotacaps Units / Month' => 'foracort_rotacaps_units', 'Asthalin Syrup Units / Month' => 'asthalin_syrup_units', 'Levolin Syrup Units / Month' => 'levolin_syrup_units', 'Deriphyllin Units / Month' => 'deriphyllin_units', 'Betnesol Tablet Units / Month' => 'beclomethasone_units', 'Methylprednisolone Units / Month' => 'methylprednisolone_units', 'Prednisolone Units / Month' => 'prednisolone_units', 'Cough Syrups Units / Month' => 'cough_syrups_units', ]; $photos = [ 'Visiting Card' => 'visiting_card', 'Rx Pad' => 'rx_pad', 'Doctor Board' => 'doctor_board', ]; $degree = (string) $val('degree'); if (strcasecmp($degree, 'Other') === 0 && $val('doctor_other_degree') !== '') { $degree = $val('doctor_other_degree'); } $specialty = (string) $val('specialty'); if (strcasecmp($specialty, 'Other') === 0 && $val('doctor_other_speciality') !== '') { $specialty = $val('doctor_other_speciality'); } @endphp

Doctor Survey Review

Review the submitted doctor survey before you approve or reject

@if(isset($form->user_info->name) && $form->user_info->name !== '')

Submitted by: {{ $form->user_info->name }}

@endif
Doctor details
Date{{ $show('record_date') }}
Doctor Name{{ $show('doctor_name') }}
MSL Code{{ $show('msl_code') }}
Registration Number{{ $show('doctor_registration_number') }}
Mobile Number{{ $show('mobile_number') }}
Legacy Code{{ $show('legacy_code') }}
Degree{{ $degree !== '' ? $degree : '—' }}
Specialty{{ $specialty !== '' ? $specialty : '—' }}
Doctor Address{{ $show('doctor_location') }}
Doctor Pincode{{ $show('doctor_pincode') }}
Doctor Type{{ $show('doctor_type') }}
Total Patients / Day{{ $show('total_patients') }}
Respiratory Patients / Day{{ $show('respiratory_patients') }}
Manager Joint Visit{{ $show('manager_joint_visit') }}
Attached Chemist{{ $show('attached_chemist_name') }}
No. of Staff{{ $show('no_of_staff') }}
Doctor Prescription
@foreach($products as $label => $code) @endforeach
Product Prescribed Units / Month
{{ $label }} {{ $show($code) }} {{ $val($code.'_units') !== '' ? $val($code.'_units') : '—' }}
Other therapies
@foreach($therapies as $label => $code)
{{ $label }} {{ $show($code) }}
@endforeach
Photos
@php $anyPhoto = false; @endphp @foreach($photos as $label => $code) @php $url = $fileUrl($val($code)); @endphp @if($url !== '') @php $anyPhoto = true; @endphp
{{ $label }}
@if($isImageUrl($url))
{{ $label }}
@endif

Open {{ strtolower($label) }}

@endif @endforeach @if(!$anyPhoto)

No photos uploaded.

@endif
@include('form.rapport-team3.partials.survey-preview-styles')