@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 '-'; try { return \Carbon\Carbon::parse($date)->format('d/m/Y'); } catch (\Exception $e) { return '-'; } }; // Helper function to format time $formatTime = function($time) { if (!$time) return '-'; try { return \Carbon\Carbon::parse($time)->format('h:i A'); } catch (\Exception $e) { return $time; } }; // Helper function to check if BP is high $isHighBP = function($bp) { if (!$bp) return false; // Extract systolic (first number) if (preg_match('/(\d+)/', $bp, $matches)) { $systolic = intval($matches[1]); return $systolic >= 140; } return false; }; @endphp @extends('layouts.mother') @section('content')

Blood Pressure Monitoring

Pemantauan Tekanan Darah & Pre-Eclampsia

@if($testResult)

Nota Penting

Untuk: Ibu yang mempunyai indikasi

* Jika tempoh kehamilan ≥ 22 minggu

@php $date = $getData('date'); $time = $getData('time'); $bp = $getData('blood_pressure'); $fhr = $getData('fetal_heart_rate'); $protein = $getData('urine_protein'); $symptoms = $getData('symptoms'); $hasData = $date || $bp || $fhr || $protein || $symptoms; @endphp @if($hasData)

Date & Time

When was the blood pressure measured?

{{ $formatDate($date) }}
{{ $formatTime($time) }}

Blood Pressure & Vital Signs

Your blood pressure and related measurements

@if($bp) {{ $bp }} mmHg @if($isHighBP($bp)) ⚠️ High @else ✓ Normal @endif @else Not recorded @endif

Normal: <140/90 mmHg

@if($fhr) {{ $fhr }} bpm @else Not recorded @endif

Normal: 110-160 bpm

@if($protein) {{ $protein }} @else Not recorded @endif

Normal: Negative or trace

Symptoms & Observations

Recorded symptoms or clinical observations

@if($symptoms) {{ $symptoms }} @else No symptoms recorded @endif

Common symptoms to watch for: Headache, blurred vision, epigastric pain, swelling (edema), nausea/vomiting

@if($testResult->performed_by_nurse_id)

Nurse Information

Recorded by

{{ $testResult->performedByNurse->name ?? 'N/A' }}
{{ $testResult->performed_at ? \Carbon\Carbon::parse($testResult->performed_at)->format('d/m/Y H:i') : 'N/A' }}
@if($testResult->signature_data)
Nurse Signature
@endif
@endif @else

No Blood Pressure Monitoring Data

This test has not been recorded yet.

Back to Record
@endif @endif
@endsection