{{-- VTE Risk Assessment Test Data for PDF --}}
@php // Pre-existing risk factors (EXACT as per user specification) $preExistingFactors = [ ['name' => 'Previous VTE', 'score' => 4, 'key' => 'previous_vte'], ['name' => 'High risk thrombophilia', 'score' => 3, 'key' => 'high_risk_thrombophilia'], ['name' => 'Medical comorbidities ', 'score' => 3, 'key' => 'medical_comorbidities'], ['name' => 'Obesity: BMI ≥40kg/m²', 'score' => 2, 'key' => 'obesity_40'], ['name' => 'Obesity: BMI 30–39 kg/m²', 'score' => 1, 'key' => 'obesity_30_39'], ['name' => 'Family history of VTE', 'score' => 1, 'key' => 'family_history_vte'], ['name' => 'Low risk thrombophilia ', 'score' => 1, 'key' => 'low_risk_thrombophilia'], ['name' => 'Current smoker ≥10/day', 'score' => 1, 'key' => 'current_smoker'], ['name' => 'Gross varicose veins', 'score' => 1, 'key' => 'varicose_veins'] ]; // Obstetric risk factors (EXACT as per user specification) $obstetricFactors = [ ['name' => 'Caesarean section', 'score' => 2, 'key' => 'caesarean_section'], ['name' => 'Pre eclampsia', 'score' => 1, 'key' => 'preeclampsia'], ['name' => 'IVF (1st trimester risk only)', 'score' => 1, 'key' => 'ivf_first_trimester'], ['name' => 'Rotational instrumental delivery', 'score' => 1, 'key' => 'rotational_delivery'], ['name' => 'PPH ≥1000mls / requires transfusion', 'score' => 1, 'key' => 'pph'], ['name' => 'Stillbirth (current)', 'score' => 1, 'key' => 'stillbirth'], ['name' => 'Prolonged labour >24h', 'score' => 1, 'key' => 'prolonged_labour'] ]; // Transient risk factors (EXACT as per user specification) $transientFactors = [ ['name' => 'Surgical procedures ', 'score' => 4, 'key' => 'surgical_procedures'], ['name' => 'Hyperemesis gravidarum / OHSS', 'score' => 4, 'key' => 'hyperemesis_ohss'], ['name' => 'Systemic / Postpartum infection', 'score' => 1, 'key' => 'systemic_infection'], ['name' => 'Immobility / Admission >3 days', 'score' => 1, 'key' => 'immobility_admission'], ['name' => 'Long distance travel >4h', 'score' => 1, 'key' => 'long_distance_travel'] ]; // Calculate total scores $preScore = 0; $admissionScore = 0; $postScore = 0; foreach (array_merge($preExistingFactors, $obstetricFactors, $transientFactors) as $factor) { if (data_get($testData, 'vte_data.' . $factor['key'] . '_pre')) { $preScore += $factor['score']; } if (data_get($testData, 'vte_data.' . $factor['key'] . '_admission')) { $admissionScore += $factor['score']; } if (data_get($testData, 'vte_data.' . $factor['key'] . '_post')) { $postScore += $factor['score']; } } $maxScore = max($preScore, $admissionScore, $postScore); $riskLevel = 'Low Risk'; $riskColor = '#10B981'; if ($maxScore >= 3) { $riskLevel = 'High Risk'; $riskColor = '#EF4444'; } elseif ($maxScore >= 2) { $riskLevel = 'Intermediate Risk'; $riskColor = '#F59E0B'; } @endphp
Risk Level: {{ $riskLevel }} (Max Score: {{ $maxScore }})
@if(data_get($testData, 'assessment_date'))

Assessment Date: {{ \Carbon\Carbon::parse(data_get($testData, 'assessment_date'))->format('d/m/Y') }}

@endif {{-- Pre-existing Risk Factors --}} @foreach($preExistingFactors as $factor) @endforeach {{-- Obstetric Risk Factors --}} @foreach($obstetricFactors as $factor) @endforeach {{-- Transient Risk Factors --}} @foreach($transientFactors as $factor) @endforeach {{-- Total Scores --}}
Risk Factor Score Pre-pregnancy/
Booking
Admission
New Illness
Post delivery
Pre-existing risk factors
{{ $factor['name'] }} {{ $factor['score'] }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_pre') ? '✓' : '—' }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_admission') ? '✓' : '—' }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_post') ? '✓' : '—' }}
Obstetric risk factors
{{ $factor['name'] }} {{ $factor['score'] }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_pre') ? '✓' : '—' }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_admission') ? '✓' : '—' }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_post') ? '✓' : '—' }}
Transient risk factors
{{ $factor['name'] }} {{ $factor['score'] }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_pre') ? '✓' : '—' }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_admission') ? '✓' : '—' }} {{ data_get($testData, 'vte_data.' . $factor['key'] . '_post') ? '✓' : '—' }}
TOTAL SCORE: {{ $preScore }} {{ $admissionScore }} {{ $postScore }}
@if(data_get($testData, 'vte_data.additional_notes'))

Additional Notes:

{{ data_get($testData, 'vte_data.additional_notes') }}

@endif @if(data_get($testData, 'name') || data_get($testData, 'signature'))

Responsible Person: {{ data_get($testData, 'name', 'N/A') }}

@if(data_get($testData, 'signature'))
Signature
@endif
@endif