@php use App\Models\User; use App\Models\SchoolHealthPhysician; use App\Models\NutritionistHistoryEvaluationSection; use App\Models\PsychologistHistoryAssessmentSection; @endphp @extends('admin.main') @section('content')
@php $queryString = !empty($details) && !empty($details['gr_number']) ? 'grno=' . $details['gr_number'] : ''; $queryString .= !empty($details) && !empty($details['name']) ? '&name=' . $details['name'] : ''; $queryString .= !empty($details) && !empty($details['dob']) ? '&dob=' . $details['dob'] : ''; $queryString .= !empty($details) && !empty($details['age']) ? '&age=' . $details['age'] : ''; $queryString .= !empty($details) && !empty($details['gender']) ? '&gender=' . $details['gender'] : ''; $queryString .= !empty($details) && !empty($details['school']) ? '&school=' . $details['school'] : ''; $queryString .= !empty($details) && !empty($details['address']) ? '&address=' . $details['address'] : ''; $queryString .= !empty($details) && !empty($details['emergency_contact_number']) ? '&emergency_contact_number=' . $details['emergency_contact_number'] : ''; if (!empty($area)) { foreach ($area as $item) { if (!empty($details) && !empty($details['area']) && $details['area'] == $item->id) { $queryString .= !empty($details) && !empty($details['area']) ? '&area=' . $item->id : ''; } } } if (!empty($area)) { foreach ($city as $item) { if (!empty($details) && !empty($details['city']) && $details['city'] == $item->id) { $queryString .= !empty($details) && !empty($details['city']) ? '&city=' . $item->id : ''; } } } $queryString .= !empty($details) && !empty($details['guardianname']) ? '&guardianname=' . $details['guardianname'] : ''; $queryString .= !empty($details) && !empty($details['blood_group']) ? '&blood_group=' . $details['blood_group'] : ''; @endphp @if (auth()->guard('admin')->check() && (auth()->guard('admin')->user()->role == 1 || auth()->guard('admin')->user()->role == 2)) @endif       @if (auth()->guard('admin')->check() && (auth()->guard('admin')->user()->role == 1 || auth()->guard('admin')->user()->role == 2)) @endif       @if (auth()->guard('admin')->check() && (auth()->guard('admin')->user()->role == 1 || auth()->guard('admin')->user()->role == 2)) @endif @if (auth()->guard('admin')->check() && (auth()->guard('admin')->user()->role == 1 || auth()->guard('admin')->user()->role == 2)) @endif {{-- --}} {{-- --}} {{-- --}} {{--

Student Details

@if (Session::has('error_message')) @endif @if (Session::has('success_message')) @endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@php // Define the default image path $defaultImage = asset('uploads/student/profile_images/default.png'); // Check if the profile image exists $profileImagePath = $details['profile_image'] ?? null; $imagePath = public_path("uploads/student/profile_images/{$profileImagePath}"); $profileImageUrl = file_exists($imagePath) ? asset('uploads/student/profile_images/' . $profileImagePath) : $defaultImage; @endphp Profile Image
{{-- --}}
@php $classLabels = [ "0" => "Play group", "00" => "KG-1", "000" => "KG-2" ]; @endphp
{{-- --}}

Screening

Medical History

@if($medical_history_id->isNotEmpty()) @foreach($medical_history_id as $medical_id) @endforeach @endif
@if (!empty($medicalComplain)) @foreach ($medicalComplain as $medicalComplai) {{-- Visit - {{ date('M-d-Y', strtotime($medicalComplai['created_at'])) }} --}} @endforeach @endif @if (!empty($StudentBiodata)) @foreach ($StudentBiodata as $StudentBiodat) @php $SchoolHealthPhysician = SchoolHealthPhysician::where('deleted', 0) ->where('Follow_up_Required', 'yes') ->where('StudentBiodataId', $StudentBiodat->id) ->get() ->toArray(); @endphp @if (!empty($SchoolHealthPhysician)) @foreach ($SchoolHealthPhysician as $SchoolHealthPhysicia) Followup - {{ date('M-d-Y', strtotime($SchoolHealthPhysicia['created_at'])) }} @endforeach @endif @php $NutritionistHistoryEvaluationSection = NutritionistHistoryEvaluationSection::where( 'deleted', 0, ) ->where('Follow_up_Required1', 'yes') ->where('StudentBiodataId', $StudentBiodat->id) ->get() ->toArray(); @endphp @if (!empty($NutritionistHistoryEvaluationSection)) @foreach ($NutritionistHistoryEvaluationSection as $NutritionistHistoryEvaluationSectio) Followup - {{ date('M-d-Y', strtotime($NutritionistHistoryEvaluationSectio['created_at'])) }} @endforeach @endif @php $PsychologistHistoryAssessmentSection = PsychologistHistoryAssessmentSection::where( 'deleted', 0, ) ->where('Follow_up_Required2', 'yes') ->where('StudentBiodataId', $StudentBiodat->id) ->get() ->toArray(); @endphp @if (!empty($PsychologistHistoryAssessmentSection)) @foreach ($PsychologistHistoryAssessmentSection as $PsychologistHistoryAssessmentSectio) Followup - {{ date('M-d-Y', strtotime($PsychologistHistoryAssessmentSectio['created_at'])) }} @endforeach @endif @endforeach @endif {{-- --}}

Additional Details - {{count($StudentBiodata)}}

@if (!empty($StudentBiodata)) @foreach ($StudentBiodata as $key => $StudentBiodat)

@if ($key == 0) {{-- Additional Details --}} @endif

{{ \Carbon\Carbon::parse($StudentBiodat['created_at'])->format('d M Y, H:i') }}
@php $CountTotal = 0; $CountLow = 0; $CountHigh = 0; $SchoolHealthPhysician5 = SchoolHealthPhysician::where('deleted', 0) ->where('StudentBiodataId', $StudentBiodat['id']) ->first(); if (!empty($SchoolHealthPhysician5)) { $Blood_pressure_result = $SchoolHealthPhysician5['Blood_pressure_result']; if ($Blood_pressure_result == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($Blood_pressure_result == 'High') { $CountHigh += 1; $CountTotal += 1; } $BloodPressureDiastolicResult = $SchoolHealthPhysician5['BloodPressureDiastolicResult']; if ($BloodPressureDiastolicResult == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($BloodPressureDiastolicResult == 'High') { $CountHigh += 1; $CountTotal += 1; } $TemperatureResult = $SchoolHealthPhysician5['TemperatureResult']; if ($TemperatureResult == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($TemperatureResult == 'High') { $CountHigh += 1; $CountTotal += 1; } $PulseResult = $SchoolHealthPhysician5['PulseResult']; if ($PulseResult == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($PulseResult == 'High') { $CountHigh += 1; $CountTotal += 1; } $RespiratoryRateResult = $SchoolHealthPhysician5['RespiratoryRateResult']; if ($RespiratoryRateResult == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($RespiratoryRateResult == 'High') { $CountHigh += 1; $CountTotal += 1; } $WeightResult = $SchoolHealthPhysician5['WeightResult']; if ($WeightResult == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($WeightResult == 'High') { $CountHigh += 1; $CountTotal += 1; } $HeightResult = $SchoolHealthPhysician5['WeightResult']; if ($HeightResult == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($HeightResult == 'High') { $CountHigh += 1; $CountTotal += 1; } $BMIResult = $SchoolHealthPhysician5['BMIResult']; if ($BMIResult == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($BMIResult == 'High') { $CountHigh += 1; $CountTotal += 1; } } $NutritionistHistoryEvaluationSection2 = NutritionistHistoryEvaluationSection::where( 'deleted', 0, ) ->where('StudentBiodataId', $StudentBiodat['id']) ->first(); if (!empty($NutritionistHistoryEvaluationSection2)) { $HeightResult1 = $NutritionistHistoryEvaluationSection2['HeightResult1']; if ($HeightResult1 == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($HeightResult1 == 'High') { $CountHigh += 1; $CountTotal += 1; } $WeightResult1 = $NutritionistHistoryEvaluationSection2['WeightResult1']; if ($WeightResult1 == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($WeightResult1 == 'High') { $CountHigh += 1; $CountTotal += 1; } $BMIResult1 = $NutritionistHistoryEvaluationSection2['BMIResult1']; if ($BMIResult1 == 'Low') { $CountLow += 1; $CountTotal += 1; } if ($BMIResult1 == 'High') { $CountHigh += 1; $CountTotal += 1; } } @endphp
{{ $CountTotal }}
Medical History
@php $StudentBiodat_created_by_updated_by = $StudentBiodat['created_by'] == 0 ? $StudentBiodat['updated_by'] : $StudentBiodat['created_by']; $UserDetails = user::where('id', $StudentBiodat_created_by_updated_by)->first(); @endphp
@if (!empty($UserDetails)) {{ $UserDetails['fullname'] }} @endif
@php /* School Health Physician */ $SchoolHealthPhysician5 = SchoolHealthPhysician::where('deleted', 0) ->where('StudentBiodataId', $StudentBiodat['id']) ->first(); if (!empty($SchoolHealthPhysician5)) { $Blood_pressure_result = $SchoolHealthPhysician5['Blood_pressure_result']; if ($Blood_pressure_result == 'Low') { echo 'Blood Pressure (Systolic) Low'; } if ($Blood_pressure_result == 'High') { echo 'Blood Pressure (Systolic) High'; } $BloodPressureDiastolicResult = $SchoolHealthPhysician5['BloodPressureDiastolicResult']; if ($BloodPressureDiastolicResult == 'Low') { echo 'Blood Pressure (Diastolic) Low '; } if ($BloodPressureDiastolicResult == 'High') { echo 'Blood Pressure (Diastolic) High'; } $TemperatureResult = $SchoolHealthPhysician5['TemperatureResult']; if ($TemperatureResult == 'Low') { echo 'Temperature Low '; } if ($TemperatureResult == 'High') { echo 'Temperature High'; } $PulseResult = $SchoolHealthPhysician5['PulseResult']; if ($PulseResult == 'Low') { echo 'Pulse Low '; } if ($PulseResult == 'High') { echo 'Pulse Low '; } $RespiratoryRateResult = $SchoolHealthPhysician5['RespiratoryRateResult']; if ($RespiratoryRateResult == 'Low') { echo 'Respiratory Rate Low '; } if ($RespiratoryRateResult == 'High') { echo 'Respiratory Rate Low '; } $WeightResult = $SchoolHealthPhysician5['WeightResult']; if ($WeightResult == 'Low') { echo 'Weight Low '; } if ($WeightResult == 'High') { echo 'Weight Low '; } $HeightResult = $SchoolHealthPhysician5['WeightResult']; if ($HeightResult == 'Low') { echo 'Height Low '; } if ($HeightResult == 'High') { echo 'Height Low '; } $BMIResult = $SchoolHealthPhysician5['BMIResult']; if ($BMIResult == 'Low') { echo 'BMI Low '; } if ($BMIResult == 'High') { echo 'BMI Low '; } } /* Nutritionist History & Evaluation Section */ $NutritionistHistoryEvaluationSection2 = NutritionistHistoryEvaluationSection::where( 'deleted', 0, ) ->where('StudentBiodataId', $StudentBiodat['id']) ->first(); if (!empty($NutritionistHistoryEvaluationSection2)) { $HeightResult1 = $NutritionistHistoryEvaluationSection2['HeightResult1']; if ($HeightResult1 == 'Low') { echo 'Height (cm)Low
'; } if ($HeightResult1 == 'High') { echo 'Height (cm) Low
'; } $WeightResult1 = $NutritionistHistoryEvaluationSection2['WeightResult1']; if ($WeightResult1 == 'Low') { echo 'Weight (kg) Low
'; } if ($WeightResult1 == 'High') { echo 'Weight (kg) Low
'; } $BMIResult1 = $NutritionistHistoryEvaluationSection2['BMIResult1']; if ($BMIResult1 == 'Low') { echo 'BMI (auto-generated) Low
'; } if ($BMIResult1 == 'High') { echo 'BMI (auto-generated) Low
'; } } @endphp {{-- --}}
@endforeach @endif {{-- @if (!empty($Prescription) ) --}}

Prescription - {{count($Prescription)}}

{{-- @endif --}} @if (!empty($Prescription)) @foreach ($Prescription as $key => $Prescriptio)

@if ($key == 0) {{-- Prescription --}} @endif

{{ \Carbon\Carbon::parse($Prescriptio['created_at'])->format('d M Y, H:i') }}
@php $detailsUser = user::find($Prescriptio['DoctorID']); @endphp {{ $detailsUser['fullname'] ?? '' }}
{{ $Prescriptio['Reason'] ?? '' }}
{{ $Prescriptio['Prescription'] ?? '' }}
@endforeach @endif

Aids - {{count($Aids)}}

@if (!empty($Aids)) @foreach ($Aids as $key => $Aid)
{{ \Carbon\Carbon::parse($Aid['created_at'])->format('d M Y, H:i') }}
@php $detailsUser = user::find($Aid['DoctorID']); @endphp {{ $detailsUser['fullname'] ?? '' }}
{{ $Aid['Reason'] ?? '' }}
{{ $Aid['Aids'] ?? '' }}
@endforeach @endif

Labs - {{count($Labs)}}

@if (!empty($Labs)) @foreach ($Labs as $key => $Lab)

@if ($key == 0) {{-- Labs --}} @endif

{{ \Carbon\Carbon::parse($Lab['created_at'])->format('d M Y, H:i') }}
{{ $Lab['title'] ?? '' }}
@php $detailsUser = user::find($Lab['created_by']); @endphp {{ $detailsUser['fullname'] ?? '' }}
@if (!empty($Lab['document_names'])) @php $documents = explode('|', $Lab['document_names']); @endphp @else No documents available @endif
@endforeach @endif
@endsection