@php
// Helper function to get test data value
$getData = function($key, $default = '') use ($testResult) {
if (!$testResult || !$testResult->test_data) return $default;
return data_get($testResult->test_data, $key, $default);
};
// Helper function to format date
$formatDate = function($date) {
if (!$date) return null;
try {
return \Carbon\Carbon::parse($date)->format('d/m/Y');
} catch (\Exception $e) {
return $date;
}
};
// 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']
];
@endphp
VTE Risk Assessment
Penilaian Risiko VTE
@php
// 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']
];
// Get data
$assessmentDate = $getData('assessment_date');
$additionalNotes = $getData('vte_data.additional_notes');
// Calculate total scores
$preScore = 0;
$admissionScore = 0;
$postScore = 0;
foreach (array_merge($preExistingFactors, $obstetricFactors, $transientFactors) as $factor) {
if ($getData('vte_data.' . $factor['key'] . '_pre')) {
$preScore += $factor['score'];
}
if ($getData('vte_data.' . $factor['key'] . '_admission')) {
$admissionScore += $factor['score'];
}
if ($getData('vte_data.' . $factor['key'] . '_post')) {
$postScore += $factor['score'];
}
}
// Check if any data exists
$hasData = $assessmentDate || $preScore > 0 || $admissionScore > 0 || $postScore > 0 || $additionalNotes;
@endphp
@if(!$hasData)
No VTE Risk Assessment Recorded
No VTE risk assessment data has been recorded for this appointment yet.
@else
Assessment Date
Tarikh penilaian
@if($assessmentDate)
{{ $formatDate($assessmentDate) }}
@else
Not recorded
@endif
SENARAI SEMAK RISIKO VTE SEMASA HAMIL DAN PUERPERIUM
Venous Thromboembolism Risk Assessment Checklist
| VTE risk factors |
VTE score |
Pre-pregnancy/ Booking |
Admission New Illness |
Post delivery |
| Pre-existing risk factors |
@foreach($preExistingFactors as $factor)
| {{ $factor['name'] }} |
{{ $factor['score'] }} |
@if($getData('vte_data.' . $factor['key'] . '_pre'))
@else
—
@endif
|
@if($getData('vte_data.' . $factor['key'] . '_admission'))
@else
—
@endif
|
@if($getData('vte_data.' . $factor['key'] . '_post'))
@else
—
@endif
|
@endforeach
| Obstetric risk factors |
@foreach($obstetricFactors as $factor)
| {{ $factor['name'] }} |
{{ $factor['score'] }} |
@if($getData('vte_data.' . $factor['key'] . '_pre'))
@else
—
@endif
|
@if($getData('vte_data.' . $factor['key'] . '_admission'))
@else
—
@endif
|
@if($getData('vte_data.' . $factor['key'] . '_post'))
@else
—
@endif
|
@endforeach
| Transient risk factors |
@foreach($transientFactors as $factor)
| {{ $factor['name'] }} |
{{ $factor['score'] }} |
@if($getData('vte_data.' . $factor['key'] . '_pre'))
@else
—
@endif
|
@if($getData('vte_data.' . $factor['key'] . '_admission'))
@else
—
@endif
|
@if($getData('vte_data.' . $factor['key'] . '_post'))
@else
—
@endif
|
@endforeach
| TOTAL SCORE |
{{ $preScore }} |
{{ $admissionScore }} |
{{ $postScore }} |
Risk Interpretation
Clinical guidelines
-
If total score ≥4 at any time: HIGH RISK - Thromboprophylaxis recommended
-
If total score ≥3 at any time: MODERATE RISK - Consider thromboprophylaxis if admitted to hospital
-
If total score <3: LOW RISK - Early mobilization and hydration
-
Reassess VTE risk if clinical condition changes
-
Based on Prevention & Treatment of Venous Thromboembolism in Pregnancy and Puerperium 2018
@if($additionalNotes)
Additional Clinical Notes
Catatan klinikal tambahan
@endif
@endif