SECTION 3: PERSONAL MEDICAL HISTORY
Pre-existing Diseases:
@forelse($patient->medical_history_diseases ?? [] as $dis)
{{ $dis }}
@empty
None recorded
@endforelse
Diagnosis Date:
{{ $patient->medical_history_diagnosis_date?->format('Y-m-d') ?? 'N/A' }}
Details:
{{ $patient->medical_history_details ?? 'N/A' }}
Current Treatment:
{{ $patient->medical_history_treatment ?? 'N/A' }}
SECTION 4: SURGICAL HISTORY
| Procedure |
Year |
Hospital |
Complications |
@forelse($patient->surgical_history ?? [] as $surg)
| {{ $surg['procedure'] ?? 'N/A' }} |
{{ $surg['year'] ?? 'N/A' }} |
{{ $surg['hospital'] ?? 'N/A' }} |
{{ $surg['complications'] ?? 'N/A' }} |
@empty
| No surgeries logged |
@endforelse
SECTION 5: ALLERGIES
Drug Allergies:
{{ $patient->drug_allergies ?? 'None' }}
Food Allergies:
{{ $patient->food_allergies ?? 'None' }}
Other Allergies:
{{ $patient->other_allergies ?? 'None' }}
Reaction / Severity:
{{ $patient->allergy_reaction ?? 'N/A' }}
SECTION 6: MEDICATION HISTORY
| Medication |
Dose |
Frequency |
Reason |
@forelse($patient->current_medications ?? [] as $med)
| {{ $med['medication'] ?? 'N/A' }} |
{{ $med['dose'] ?? 'N/A' }} |
{{ $med['frequency'] ?? 'N/A' }} |
{{ $med['reason'] ?? 'N/A' }} |
@empty
| No current medications logged |
@endforelse
Medication Adherence: {{ $patient->medication_adherence ?? 'N/A' }}
Reason for poor adherence: {{ $patient->medication_adherence_reason ?? 'N/A' }}
SECTION 7: IMMUNIZATION HISTORY (Esquema de Vacunación)
Childhood Vaccinations:
@php
$childhoodVaccs = ['BCG', 'Polio', 'Pentavalent', 'PCV', 'Rotavirus', 'Measles'];
$loggedVaccs = $patient->immunization_history ?? [];
@endphp
@foreach($childhoodVaccs as $v)
{{ $v }}
@endforeach
Adult Vaccinations:
@php
$adultVaccs = ['COVID-19', 'Tetanus', 'Hepatitis B'];
@endphp
@foreach($adultVaccs as $v)
{{ $v }}
@endforeach
SECTION 11: FAMILY HISTORY
| Disease |
Relationship |
Age of Onset |
@forelse($patient->family_history ?? [] as $hist)
| {{ $hist['disease'] ?? 'N/A' }} |
{{ $hist['relationship'] ?? 'N/A' }} |
{{ $hist['age_of_onset'] ?? 'N/A' }} years |
@empty
| No family history illnesses recorded |
@endforelse
SECTION 8: FEMALE REPRODUCTIVE HEALTH
Age at Menarche: {{ $patient->menarche_age ?? 'N/A' }} years
Cycle: {{ $patient->menstrual_cycle ?? 'N/A' }}
LMP: {{ $patient->lmp?->format('Y-m-d') ?? 'N/A' }}
Pregnancy & Birth History
Pregnancies (Gravida)
{{ $patient->gravida ?? 0 }}
Births (Para)
{{ $patient->para ?? 0 }}
Abortions
{{ $patient->abortions ?? 0 }}
Living Children
{{ $patient->living_children ?? 0 }}
Current Contraception Method: {{ $patient->contraceptive_method ?? 'None' }}
ANC Visits (if pregnant): {{ $patient->anc_visits ?? 'N/A' }}
Gestational Age (weeks): {{ $patient->anc_gestational_age ?? 'N/A' }}
ANC Risk Factors: {{ $patient->anc_risk_factors ?? 'None' }}
SECTION 8: MALE REPRODUCTIVE HEALTH
Fertility Concerns:
{{ $patient->fertility_concerns ?? 'None logged' }}
Sexual Health Concerns:
{{ $patient->sexual_health_concerns ?? 'None logged' }}
SECTION 9: LIFESTYLE & BEHAVIOUR
Tobacco Use: {{ $patient->tobacco_use ?? 'Never' }}
@if(($patient->tobacco_use ?? '') != 'Never' && $patient->tobacco_use)
Type: {{ $patient->tobacco_type }}, Duration: {{ $patient->tobacco_duration }}, Qty: {{ $patient->tobacco_quantity }}
@endif
Alcohol Use Frequency: {{ $patient->alcohol_use ?? 'None' }}
Nutrition & Physical Activity
Height
{{ $patient->height ?? 'N/A' }} cm
Weight
{{ $patient->weight ?? 'N/A' }} kg
BMI
{{ $patient->bmi ?? 'N/A' }}
Waist Circumference
{{ $patient->waist_circumference ?? 'N/A' }} cm
Diet Pattern: {{ $patient->diet_pattern ?? 'N/A' }}
Physical Activity Level: {{ $patient->physical_activity_level ?? 'N/A' }}
Fruit Intake: {{ $patient->fruit_intake ?? 'N/A' }}
Vegetable Intake: {{ $patient->vegetable_intake ?? 'N/A' }}
Sugar/Salt Intake: {{ $patient->sugar_intake ?? 'N/A' }} / {{ $patient->salt_intake ?? 'N/A' }}
Staple Foods:
@forelse($patient->staple_foods ?? [] as $food)
{{ $food }}
@empty
None specified
@endforelse
SECTION 10: OCCUPATIONAL & ENVIRONMENTAL RISKS
Occupational Exposures/Risks:
@forelse($patient->occupational_risks ?? [] as $risk)
{{ $risk }}
@empty
No occupational exposures
@endforelse
Environmental Hazards/Risks:
@forelse($patient->environmental_risks ?? [] as $risk)
{{ $risk }}
@empty
No environmental hazards
@endforelse
SECTION 12: PHYSICAL EXAMINATION (Baseline)
@php
$pe = $patient->physical_examination ?? [];
@endphp
@if(!empty($pe))
Exam Date: {{ $pe['date'] ?? 'N/A' }}
Healthcare Worker: {{ $pe['worker'] ?? 'N/A' }}
Vital Signs Findings
Blood Pressure
{{ data_get($pe, 'vitals.blood_pressure', 'N/A') }}
Heart Rate
{{ data_get($pe, 'vitals.heart_rate', 'N/A') }} bpm
Resp. Rate
{{ data_get($pe, 'vitals.respiratory_rate', 'N/A') }} /min
Temperature
{{ data_get($pe, 'vitals.temperature', 'N/A') }} °C
SpO2
{{ data_get($pe, 'vitals.oxygen_saturation', 'N/A') }} %
General Examination Findings
Appearance: {{ data_get($pe, 'general.appearance', 'N/A') }}
Nutrition status: {{ data_get($pe, 'general.nutrition', 'N/A') }}
Hydration: {{ data_get($pe, 'general.hydration', 'N/A') }}
Systemic Examination Findings
@foreach(['cardiovascular', 'respiratory', 'neurological', 'musculoskeletal', 'abdominal', 'skin'] as $system)
{{ ucfirst($system) }}: {{ data_get($pe, "systems.{$system}", 'Not Examined') }}
@endforeach
@else
No baseline physical exam recorded
@endif
SECTION 13: SCREENING RECORD
@php
$scr = $patient->screening_record ?? [];
@endphp
@if(!empty($scr))
Non-Communicable Disease Screening
BP Check: {{ data_get($scr, 'ncd.blood_pressure', 'N/A') }}
Glucose: {{ data_get($scr, 'ncd.blood_glucose', 'N/A') }}
Cholesterol: {{ data_get($scr, 'ncd.cholesterol', 'N/A') }}
Cancer Screening: {{ data_get($scr, 'ncd.cancer', 'N/A') }}
Infectious Disease Screening
HIV: {{ data_get($scr, 'infectious.hiv', 'N/A') }}
TB Screening: {{ data_get($scr, 'infectious.tb', 'N/A') }}
Malaria: {{ data_get($scr, 'infectious.malaria', 'N/A') }}
STI/Hepatitis: {{ data_get($scr, 'infectious.sti_hep', 'N/A') }}
@else
No screening records on file
@endif
SECTION 14: DISPENSARY CLASSIFICATION
Patient Category:
@if($patient->dispensary_group)
{{ $patient->dispensary_group }}
@else
Unclassified
@endif
Active Risk Factors (Group 2):
@forelse($patient->dispensary_risk_factors ?? [] as $rf)
{{ $rf }}
@empty
None
@endforelse
Chronic Conditions (Group 3):
{{ $patient->dispensary_chronic_conditions ?? 'N/A' }}
Disability & Support Required (Group 4):
Condition: {{ $patient->dispensary_disability_condition ?? 'N/A' }}
Support: {{ $patient->dispensary_disability_support ?? 'N/A' }}
SECTION 15: HEALTH PROBLEM LIST
| Problem |
Date Identified |
Status |
@forelse($patient->health_problem_list ?? [] as $prob)
| {{ $prob['problem'] ?? 'N/A' }} |
{{ $prob['date_identified'] ?? 'N/A' }} |
@php
$stColors = ['Active' => 'bg-danger', 'Resolved' => 'bg-success', 'Chronic' => 'bg-warning'];
$stColor = $stColors[$prob['status'] ?? ''] ?? 'bg-secondary';
@endphp
{{ $prob['status'] ?? 'N/A' }}
|
@empty
| No health problems listed |
@endforelse
SECTION 16: INDIVIDUAL CARE PLAN
@php
$plan = $patient->individual_care_plan ?? [];
@endphp
@if(!empty($plan))
Preventive Care Actions:
@forelse(data_get($plan, 'preventive_care', []) as $pc)
{{ $pc }}
@empty
None specified
@endforelse
Treatment Plan:
Diagnosis: {{ data_get($plan, 'treatment.diagnosis', 'N/A') }}
Medication: {{ data_get($plan, 'treatment.medication', 'N/A') }}
Follow-up: {{ data_get($plan, 'treatment.follow_up', 'N/A') }}
Referral History:
Referred To: {{ data_get($plan, 'referral.referred_to', 'None') }}
Reason: {{ data_get($plan, 'referral.reason', 'N/A') }}
Outcome: {{ data_get($plan, 'referral.outcome', 'N/A') }}
@else
No individual care plan established
@endif
@forelse ($patient->consultations as $index => $consult)
SOAP Notes
Subjective:
{{ $consult->reason_for_admission ?? 'N/A' }}
Illness history: {{ $consult->history_of_current_illness ?? 'N/A' }}
Objective (Physical Exam):
{{ $consult->clinical_notes ?? 'N/A' }}
Assessment (Diagnosis):
@forelse ($consult->chronic_diseases ?? [] as $illness)
{{ ucfirst($illness) }}
@empty
No diagnoses flagged
@endforelse
Plan (Treatment & Follow-up):
{{ $consult->evolution_treatment ?? 'N/A' }}
Follow-up type: {{ str_replace('_', ' ', ucfirst($consult->follow_up_plan ?? 'N/A')) }}
@if (!empty($consult->vitals))
Blood Pressure
{{ data_get($consult->vitals, 'blood_pressure', 'N/A') }}
Pulse Rate
{{ data_get($consult->vitals, 'pulse', 'N/A') }} bpm
Temperature
{{ data_get($consult->vitals, 'temperature', 'N/A') }} °C
Weight
{{ data_get($consult->vitals, 'weight', 'N/A') }} kg
@endif
SECTION 18: HOME VISIT RECORD DETAILS
Visit Date: {{ $consult->homeVisit->scheduled_at->format('Y-m-d') }}
Reason: {{ $consult->homeVisit->notes ?? 'Regular checkup' }}
Status: {{ ucfirst($consult->homeVisit->status) }}
@empty
No clinical consultations found in record history.
@endforelse
ATTACHMENTS & SUPPORTING DOCUMENTS
| Document |
Description |
Size |
Uploaded By |
Uploaded At |
Action |
@forelse ($patient->attachments as $attachment)
|
@php
$ext = pathinfo($attachment->file_name, PATHINFO_EXTENSION);
$icon = match(strtolower($ext)) {
'pdf' => 'bi-file-pdf-fill text-danger',
'jpg', 'jpeg', 'png', 'gif', 'webp' => 'bi-file-image-fill text-success',
'doc', 'docx' => 'bi-file-word-fill text-primary',
'xls', 'xlsx' => 'bi-file-excel-fill text-success',
default => 'bi-file-earmark-fill text-secondary'
};
@endphp
{{ $attachment->file_name }}
|
{{ $attachment->description ?? 'N/A' }} |
{{ number_format($attachment->file_size / 1024, 1) }} KB |
{{ $attachment->uploader->name }} |
{{ $attachment->created_at->format('Y-m-d H:i') }} |
|
@empty
| No documents uploaded yet. |
@endforelse