resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
@@ -0,0 +1,503 @@
{{-- blood transfusion --}}
<div class="row">
{{-- <label for="other_operation_name"> {{ __('antenatal.blood_tranfusion_checkbox') }} </label><br> --}}
{{-- blood transfusion --}}
<div class="col-md-4">
<p>{{ __('antenatal.blood_transfusion') }}</p>
<hr>
<div class="row">
<div class="col-md-2">
<input class="form-check-input" name="blood_transfusion_available[]" type="checkbox"
@checked($latest_existing_antenatal_mother_history?->surgical_history == '2')
id="show_blood_transfusion_input" value="1">&nbsp;
<label class="form-check-label" name="blood_transfusion_available" for="show_blood_transfusion_input">
{{ __('antenatal.yes') }} </label>
</div>
<div class="row"
style="{{ $latest_existing_antenatal_mother_history?->surgical_history == '2' ? '' : 'display:none;' }}"
id="blood_transfusion_input">
<div class="col-md-4">
<label class="form-check-label" name="blood_transfusion_available"
for="blood_transfusion_available"> &nbsp;
{{ __('antenatal.why') }} </label>
</div>
<div class="col-md-8">
{{-- why --}}
<input type="text" class="form-control col-sm-12" name="blood_transfusion_details"
value="{{ $latest_existing_antenatal_mother_history?->surgical_history_blood_transfusion ?? '' }}">
</div>
</div>
</div>
</div>
@php
$fracture_details = !empty($latest_existing_antenatal_mother_history->fracture_details)?
json_decode($latest_existing_antenatal_mother_history->fracture_details, true):[];
$pelvis_display = (!empty($fracture_details[0]['date']) || !empty($fracture_details[0]['details']))?
'':'display:none;';
$spine_display = (!empty($fracture_details[1]['date']) || !empty($fracture_details[1]['details']))?
'':'display:none;';
$femur_display = (!empty($fracture_details[2]['date']) || !empty($fracture_details[2]['details']))?
'':'display:none;';
@endphp
{{-- fractures --}}
<div class="col-md-8">
<p>{{ __('antenatal.fractures') }}</p>
<hr>
<div class="row">
{{-- pelvis --}}
<div class="col-md-3">
<div class="form-check">
<input class="form-check-input" name="fractures[]" type="checkbox" id="show_pelvis_fracture_input"
{{ in_array('1', explode(',', $latest_existing_antenatal_mother_history?->fractures)) ? 'checked'
: '' }}
value="1" @if (is_array(old('fractures')) && in_array('1', old('fractures'))) checked
@endif>&nbsp;
<label class="form-check-label" id="1" for="show_pelvis_fracture_input">{{ __('antenatal.pelvis')
}}</label>
<br><br>
{{-- add pelvis fracture inputs --}}
<div id="pelvis_fracture_input"
style="{{ in_array('1', explode(',', $latest_existing_antenatal_mother_history?->fractures)) ? '' : 'display:none;' }}">
<div class="input-group">
<input type="text" name="pelvis_fracture_date" placeholder="Specify date"
value="{{ $fracture_details[0]['date'] ?? '' }}"
class="form-control prevent_future_pelvis_date">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<input type="text" name="pelvis_fracture_details" placeholder="Details" style="margin-top:8px;"
value="{{ $fracture_details[0]['details'] ?? '' }}" class="form-control">
</div>
</div>
</div>
{{-- spine --}}
<div class="col-md-3">
<div class="form-check">
<input class="form-check-input" name="fractures[]" type="checkbox" id="show_spine_fracture_input" {{
in_array('2', explode(',', $latest_existing_antenatal_mother_history?->fractures)) ? 'checked' :
'' }}
value="2" @if (is_array(old('fractures')) && in_array('2', old('fractures'))) checked
@endif>&nbsp;
<label class="form-check-label" id="2" for="show_spine_fracture_input">{{ __('antenatal.spine')
}}</label>
<br><br>
{{-- add spine fracture inputs --}}
<div id="spine_fracture_input"
style="{{ in_array('2', explode(',', $latest_existing_antenatal_mother_history?->fractures)) ? '' : 'display:none;' }}">
<div class="input-group">
<input type="text" name="spine_fracture_date" placeholder="Specify date"
value="{{ $fracture_details[1]['date'] ?? '' }}"
class="form-control prevent_future_spine_date">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<input type="text" name="spine_fracture_details" placeholder="Details" style="margin-top:8px;"
value="{{ $fracture_details[1]['details'] ?? '' }}" class="form-control">
</div>
</div>
</div>
{{-- femur --}}
<div class="col-md-3">
<div class="form-check">
<input class="form-check-input" name="fractures[]" type="checkbox" id="show_femur_fracture_input" {{
in_array('3', explode(',', $latest_existing_antenatal_mother_history?->fractures)) ? 'checked' :
'' }}
value="3" @if (is_array(old('fractures')) && in_array('3', old('fractures'))) checked
@endif>&nbsp;
<label class="form-check-label" id="3" for="show_femur_fracture_input">{{ __('antenatal.femur')
}}</label>
<br><br>
{{-- add femur fracture inputs --}}
<div id="femur_fracture_input"
style="{{ in_array('3', explode(',', $latest_existing_antenatal_mother_history?->fractures)) ? '' : 'display:none;' }}">
<div class="input-group">
<input type="text" name="femur_fracture_date" placeholder="Specify date"
value="{{ $fracture_details[2]['date'] ?? '' }}"
class="form-control prevent_future_femur_date">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<input type="text" name="femur_fracture_details" placeholder="Details" style="margin-top:8px;"
value="{{ $fracture_details[2]['details'] ?? '' }}" class="form-control">
</div>
</div>
</div>
{{-- other fractures --}}
<div class="col-md-3">
<div class="form-check">
<input class="form-check-input" name="fractures[]" type="checkbox" id="show_other_fracture_input"
value="4" @if (is_array(old('fractures')) && in_array('4', old('fractures'))) checked
@endif>&nbsp;
<label class="form-check-label" id="4" for="show_other_fracture_input">{{ __('antenatal.others')
}}</label>
<br><br>
{{-- add other_fractures fracture inputs --}}
<div id="other_fracture_input" style="display: none;">
<input type="text" name="other_fracture_details" placeholder="Details" style="margin-top:8px;"
class="form-control">
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="form-group col-sm-2">
{{ Form::label('blood_group', __('maternity.blood_group')) }}
{{ Form::select('blood_group', $blood_groups, $existing_blood_transfusion->blood_group_id ?? '', ['class' =>
'form-control col-sm-12']) }}
</div>
{{-- <div class="col-sm-5">
<span class="label label-primary">{{ __('maternity.blood_transfusion') }}</span>
<div class="table-responsive">
<table class="table color-table success-table" id="table_2">
<thead>
<th class="text-center">#</th>
<th>{{ __('maternity.date') }}</th>
<th>{{ __('maternity.number_of_units') }}</th>
<th>{{ __('maternity.comments') }}</th>
</thead>
<tbody>
@foreach ($anc_blood_transfusion as $blood_transfusion)
<tr>
<td></td>
<td>{{ streamline_date($blood_transfusion->transfusion_date) }}</td>
<td>{{ $blood_transfusion->number_of_units }}</td>
<td>{{ $blood_transfusion->comments }}</td>
</tr>
@endforeach
<tr>
<td><input type="checkbox" name="chk" id="chk" /></td>
<td>
<div class="form-group">
<div class="input-group">
{{ Form::text('transfusion_date[]', '', ['class' => 'form-control transfusion-date',
'readonly']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</td>
<td><input type="number" class="form-control col-sm-12" name="no_of_units[]">
</td>
<td><input type="text" class="form-control col-sm-12" name="transfusion_comment[]"></td>
</tr>
</tbody>
</table>
<a class="add_field_button_2 label label-info" onclick="addBloodTransfusionRow('table_2');"
style="color: white;">{{ __('maternity.add_row') }}</a>
<a class="add_field_button_2 label label-danger" onclick="deleteRowData('table_2')" style="color: white;">{{
__('maternity.delete_row') }}</a>
</div>
</div> --}}
<div class="col-sm-5">
{{-- anc_v --}}
{{-- <span class="label label-primary">{{ __('maternity.blood_transfusion') }}</span>
<div class="table-responsive">
<table class="table color-table success-table" id="table_2">
<thead>
<th class="text-center">#</th>
<th>{{ __('maternity.date') }}</th>
<th>{{ __('maternity.number_of_units') }}</th>
<th>{{ __('maternity.comments') }}</th>
</thead>
<tbody>
@foreach ($anc_blood_transfusion as $blood_transfusion)
<tr>
<td></td>
<td>{{ streamline_date($blood_transfusion->transfusion_date) }}</td>
<td>{{ $blood_transfusion->number_of_units }}</td>
<td>{{ $blood_transfusion->comments }}</td>
</tr>
@endforeach
<tr>
<td><input type="checkbox" name="chk" id="chk" /></td>
<td>
<div class="form-group">
<div class="input-group">
{{ Form::text('transfusion_date[]', '', ['class' => 'form-control transfusion-date',
'readonly']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</td>
<td><input type="number" class="form-control col-sm-12" name="no_of_units[]">
</td>
<td><input type="text" class="form-control col-sm-12" name="transfusion_comment[]"></td>
</tr>
</tbody>
</table>
<a class="add_field_button_2 label label-info" onclick="addBloodTransfusionRow('table_2');"
style="color: white;">{{ __('maternity.add_row') }}</a>
<a class="add_field_button_2 label label-danger" onclick="deleteRowData('table_2')" style="color: white;">{{
__('maternity.delete_row') }}</a>
</div> --}}
{{-- updated blood transfusion --}}
<span class="label label-primary">{{ __('maternity.blood_transfusion') }}</span>
<table class="table color-table inverse-table table-responsive table-borderless"
id="blood_transfusion_details_table">
<thead class="thead-light">
<th>{{ __('maternity.date') }}</th>
<th>{{ __('maternity.number_of_units') }}</th>
<th>{{ __('maternity.comments') }}</th>
<th></th>
</thead>
<tbody id="blood_transfusion_data">
@foreach ($anc_blood_transfusion as $blood_transfusion)
<tr>
<td>{{ streamline_date($blood_transfusion->transfusion_date) }}</td>
<td>{{ $blood_transfusion->number_of_units }}</td>
<td>{{ $blood_transfusion->comments }}</td>
</tr>
@endforeach
<tr>
<td>
<div class="form-group">
<div class="input-group">
{{ Form::text('transfusion_date[]', '', ['class' => 'form-control transfusion-date',
'readonly', 'id' => 'transfusion_date_1']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</td>
<td><input type="number" class="form-control col-sm-12" name="no_of_units[]"
id="transfusion_unit_1">
<td><input type="text" class="form-control col-sm-12" name="transfusion_comment[]"
id="transfusion_comment_1"></td>
<td></td>
</tr>
</tbody>
</table>
<button type="button" class="btn add_tour_itenaries_button label label-inverse"
style="background-color:#4c5667;"
onclick="add_blood_transfusion_row('blood_transfusion_details_table','blood_transfusion_data')">Add
Row</button>
</div>
<div class="col-sm-5">
<div class="row">
<div class="col-sm-3">
<br><br>
<small class="control-label"><strong>{{ __('maternity.vdrl_status') }}</strong></small><br><br>
<small class="control-label"><strong>{{ __('maternity.hiv_status') }}</strong></small>
</div>
<div class="col-sm-9">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
{{ Form::label('result', __('maternity.result')) }}
<input type="text" name="vdrl_result"
value="{{ $latest_existing_maternity_inpatient_data->vdrl_result ?? $latest_existing_anc_hiv_info->vdrl_result ?? '' }}"
class="form-control col-sm-12"><br>
{{ Form::select('hiv_result', $hiv_statuses,
$latest_existing_maternity_inpatient_data->hiv_result_usaid ??
$latest_existing_anc_hiv_info->hiv_result ?? '', ['class' => 'form-control
col-sm-12', 'id' => 'hiv_result']) }}
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
{{ Form::label('date', __('maternity.date')) }}
{{--
Carbon\Carbon::parse($latest_existing_maternity_inpatient_data->vdrl_date)->format('d/m/Y')
?? '' --}}
<div class="input-group">
{{-- {{ Form::text(
'vdrl_date',
isset($latest_existing_maternity_inpatient_data->vdrl_date) ?
Carbon\Carbon::parse($latest_existing_maternity_inpatient_data->vdrl_date)->format('d/m/Y')
: '',
['class' => 'form-control', 'readonly', 'id' => 'datepicker-autoclose3'],
) }} --}}
{{-- {{ Form::text(
'vdrl_date',
Carbon\Carbon::parse($latest_existing_maternity_inpatient_data->vdrl_date)->format('d/m/Y')
??
Carbon\Carbon::parse($latest_existing_anc_hiv_info->vdrl_date)->format('d/m/Y') ?? ''
,
['class' => 'form-control', 'readonly', 'id' => 'datepicker-autoclose3'],
) }} --}}
{{ Form::text(
'vdrl_date',
isset($latest_existing_maternity_inpatient_data->vdrl_date)
?
Carbon\Carbon::parse($latest_existing_maternity_inpatient_data->vdrl_date)->format('d/m/Y')
: (isset($latest_existing_anc_hiv_info->vdrl_date)
? Carbon\Carbon::parse($latest_existing_anc_hiv_info->vdrl_date)->format('d/m/Y')
: ''),
['class' => 'form-control', 'readonly', 'id' => 'datepicker-autoclose3']
) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<br>
<div class="input-group">
{{-- {{ Form::text('hiv_date',
isset($latest_existing_maternity_inpatient_data->hiv_date) ?
Carbon\Carbon::parse($latest_existing_maternity_inpatient_data->hiv_date)->format('d/m/Y')
: '', ['class' => 'form-control datePicker', 'readonly', 'id' =>
'datepicker-autoclose4']) }} --}}
{{ Form::text('hiv_date',
isset($latest_existing_maternity_inpatient_data->hiv_date)
?
Carbon\Carbon::parse($latest_existing_maternity_inpatient_data->hiv_date)->format('d/m/Y')
: (isset($latest_existing_anc_hiv_info->hiv_date)
? Carbon\Carbon::parse($latest_existing_anc_hiv_info->hiv_date)->format('d/m/Y')
: ''),
['class' => 'form-control datePicker', 'readonly', 'id' =>
'datepicker-autoclose4']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
{{ Form::label('location', __('maternity.location')) }}
<input type="text" name="vdrl_location" class="form-control col-sm-12"
value="{{ $latest_existing_maternity_inpatient_data->vdrl_location ?? $latest_existing_anc_hiv_info->vdrl_location ?? '' }}"><br>
<input type="text" name="hiv_location" class="form-control col-sm-12"
value="{{ $latest_existing_maternity_inpatient_data->hiv_location ?? $latest_existing_anc_hiv_info->hiv_location ?? '' }}">
</div>
</div>
</div>
</div>
@php
// $existing_hiv_date = null;
$existing_hiv_date = isset($latest_existing_maternity_inpatient_data->hiv_date)
? Carbon\Carbon::parse($latest_existing_maternity_inpatient_data->hiv_date)
: '';
// $existing_hiv_date = \Carbon\Carbon::parse($latest_existing_maternity_inpatient_data->hiv_date) ;
$currentDate = \Carbon\Carbon::now();
$hiv_date_exceeds_three_months = '';
if (isset($latest_existing_maternity_inpatient_data->hiv_date)) {
if ($existing_hiv_date->diffInMonths($currentDate) >= 3) {
$hiv_date_exceeds_three_months = $existing_hiv_date;
}
} else {
}
@endphp
<script>
// Pass variable to javascript
var existingHivDate = {!! json_encode($hiv_date_exceeds_three_months) !!};
console.log("hiv date in php: ", existingHivDate);
</script>
<div class="col-sm-12">
@if (isset($latest_existing_maternity_inpatient_data->hiv_date))
@if ($existing_hiv_date->diffInMonths($currentDate) >= 3)
{{-- <div class="alert alert-warning">IF NOT HAD HIV TEST WITHIN PAST 3 MONTHS SEND TEST SAMPLE
</div> --}}
@endif
@else
@endif
<div id="alertboxx"></div>
</div>
</div>
<div class="row" id="hiv_positive_div" style="display: none;">
<div class="form-group col-sm-4">
{{ Form::label('art_treatment_center', __('maternity.art_treatment_center')) }}
<input type="text" name="art_treatment_center" class="form-control col-sm-12">
</div>
<div class="form-group col-sm-4">
{{ Form::label('art_treatment_number', __('maternity.art_treatment_number')) }}
<input type="text" name="art_treatment_number" class="form-control col-sm-12">
</div>
<div class="form-group col-sm-4" style="margin-top: 11%;">
<button class="btn btn-outline-success">{{ __('maternity.art_clinic_record') }}</button>
</div>
</div>
</div>
</div>
<hr>
@@ -0,0 +1,249 @@
{{-- DELIVERY PLAN INCLUDE FILE --}}
<div class="row">
<div class="col-sm-12">
<span class="label label-primary">{{ __('maternity.delivery_plan') }}</span><br><br>
</div>
</div>
<div class="row">
<div class="col-md-3">
{{-- person you live with --}}
<div class="form-group">
<label for="person_you_live_with">{{ __('maternity.person_you_live_with') }}</label>
<div class="input-group">
<input type="text" class="form-control col-sm-12" name="person_you_live_with"
value="{{ $latest_existing_delivery_plan->live_in_support ?? '' }}">
</div>
</div>
{{-- transport facility --}}
<div class="form-group">
<label for="transport_means_to_facility">{{ __('maternity.means_of_transport_to_facility') }}</label>
<select name="transport_means_to_facility" class="form-select form-control">
<option value="null" {{ old('transport_means_to_facility')=='null' ? 'selected' : '' }}> -- Select
-- </option>
<option value="1" {{ old('transport_means_to_facility')=='1' ? 'selected' : '' }}
@if(isset($latest_existing_delivery_plan->transport_means))
@selected($latest_existing_delivery_plan->transport_means == '1')
@endif
>
Foot </option>
<option value="2" {{ old('transport_means_to_facility')=='2' ? 'selected' : '' }}
@if(isset($latest_existing_delivery_plan->transport_means))
@selected($latest_existing_delivery_plan->transport_means == '2')
@endif
>
Motor bike</option>
<option value="3" {{ old('transport_means_to_facility')=='3' ? 'selected' : '' }}
@if(isset($latest_existing_delivery_plan->transport_means))
@selected($latest_existing_delivery_plan->transport_means == '3')
@endif
>
Private car</option>
<option value="4" {{ old('transport_means_to_facility')=='4' ? 'selected' : '' }}
@if(isset($latest_existing_delivery_plan->transport_means))
@selected($latest_existing_delivery_plan->transport_means == '4')
@endif>
Public means</option>
</select>
</div>
</div>
<div class="col-md-3">
{{-- person to accompany you --}}
<div class="form-group">
<label for="person_to_accompany_you">{{ __('maternity.person_to_accompany_you') }}</label>
<div class="input-group">
<input type="text" class="form-control col-sm-12" name="person_to_accompany_you"
value="{{ $latest_existing_delivery_plan->emergency_support ?? '' }}">
</div>
</div>
{{-- person to look after home --}}
<div class=" form-group">
<label for="person_to_look_after_home">{{ __('maternity.person_to_look_after_home') }}</label>
<div class="input-group">
<input type="text" class="form-control col-sm-12" name="person_to_look_after_home"
value="{{ $latest_existing_delivery_plan->home_keeper ?? '' }}">
</div>
</div>
{{-- mother and partner screened for --}}
<div class="form-group">
{{ Form::label('mother_partner_screened_for', __('maternity.mother_partner_screened_for')) }} <br>
<table class="table table-borderless">
<tbody>
<tr>
<td>
<input class="form-check-input" name="mother_partner_screened_for[]" type="checkbox" {{
in_array('1', explode(',', $latest_existing_delivery_plan->health_screening ?? '')) ?
'checked' : '' }}
id="1" value="1" @if (is_array(old('mother_partner_screened_for')) && in_array('1',
old('mother_partner_screened_for'))) checked @endif>
<label class="form-check-label" for="1"> &nbsp;
{{ __('antenatal.syphillis') }} </label>
</td>
<td>
<input class="form-check-input" name="mother_partner_screened_for[]" type="checkbox" {{
in_array('2', explode(',', $latest_existing_delivery_plan->health_screening ?? '')) ?
'checked' : '' }}
id="2" value="2" @if (is_array(old('mother_partner_screened_for')) && in_array('2',
old('mother_partner_screened_for'))) checked @endif>
&nbsp;
<label class="form-check-label" for="2"> {{ __('maternity.sickle_cell') }}
</label>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="mother_partner_screened_for[]" type="checkbox" {{
in_array('3', explode(',', $latest_existing_delivery_plan->health_screening ?? '')) ?
'checked' : '' }}
id="3" value="3" @if (is_array(old('mother_partner_screened_for')) && in_array('3',
old('mother_partner_screened_for'))) checked @endif>
&nbsp;
<label class="form-check-label" for="3"> {{ __('antenatal.hepatitis') }}
</label>
</td>
<td>
<input class="form-check-input" name="mother_partner_screened_for[]" type="checkbox" {{
in_array('4', explode(',', $latest_existing_delivery_plan->health_screening ?? '')) ?
'checked' : '' }}
id="4" value="4" @if (is_array(old('mother_partner_screened_for')) && in_array('4',
old('mother_partner_screened_for'))) checked @endif> &nbsp;
<label class="form-check-label" for="4"> {{ __('antenatal.hiv') }}
</label>
</td>
</tr>
</tbody>
</table>
</div>
{{-- family planning before next pregnancy --}}
<div class="form-group">
<label for="family_planning_method_plan">{{ __('maternity.family_planning_before_next_pregnancy') }}</label>
<div class="input-group">
<input type="text" class="form-control col-sm-12" name="family_planning_method_plan"
value="{{ $latest_existing_delivery_plan->family_planning_method ?? '' }}">
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="person_to_stay_at_facility">{{ __('maternity.person_to_stay_at_facility') }}</label>
<div class="input-group">
<input type="text" class="form-control col-sm-12" name="person_to_stay_at_facility"
value="{{ $latest_existing_delivery_plan->facility_stay ?? '' }}">
</div>
</div>
<div class="form-group">
<label for="delivery_method">{{ __('maternity.delivery_method') }}</label><br><br>
<select name="delivery_method" class="form-select form-control">
<option value="" {{ old('delivery_method')=='null' ? 'selected' : '' }}> -- Select
-- </option>
<option value="1" {{ old('delivery_method')=='1' ? 'selected' : '' }}>
{{ __('antenatal.vaginal_delivery') }}</option>
<option value="2" {{ old('delivery_method')=='2' ? 'selected' : '' }}>
{{ __('antenatal.vacuum_delivery') }}</option>
<option value="3" {{ old('delivery_method')=='3' ? 'selected' : '' }}>
{{ __('antenatal.forceps_delivery') }}</option>
<option value="4" {{ old('delivery_method')=='4' ? 'selected' : '' }}>
{{ __('antenatal.c_section') }}</option>
<option value="5" {{ old('delivery_method')=='5' ? 'selected' : '' }}>
{{ __('antenatal.vbac') }}</option>
</select>
</div>
<div class="form-group">
<label for="backup_delivery_method">{{ __('maternity.backup_delivery_method') }}</label>
<div class="input-group">
<input type="text" class="form-control col-sm-12" name="backup_delivery_method">
</div>
</div>
{{-- after birth disposal --}}
<div class="form-group">
<label for="after_birth_disposal">{{ __('maternity.after_birth_disposal') }}</label>
<select name="after_birth_disposal" class="form-select form-control">
<option value="null" {{ old('after_birth_disposal') =='null' ? 'selected' : '' }}> -- Select
-- </option>
<option value="1" {{ old('after_birth_disposal')=='1' ? 'selected' : '' }}
@if(isset($latest_existing_delivery_plan->disposal))
@selected($latest_existing_delivery_plan->disposal == '1')
@endif
>
{{ __('maternity.throw_in_placenta_pit') }}</option>
<option value="2" {{ old('after_birth_disposal')=='2' ? 'selected' : '' }}
@if(isset($latest_existing_delivery_plan->disposal))
@selected($latest_existing_delivery_plan->disposal == '2')
@endif
>
{{ __('maternity.take_it_home') }}</option>
</select>
</div>
</div>
<div class="col-md-3" style="background-color:white; padding:15px;">
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
{{-- <p>Mothers should have the following to deliver</p><br> --}}
<ul>
<li style="list-style:none; text-center;"> Mothers should have the following to deliver </li> <br>
</ul>
<ul>
<li> At least 4 pairs of gloves </li>
<li>Gauze </li>
<li>2 plastic sheets ( ekiveera ) measuring 2.5 meters </li>
<li>Cotton wool (at least 500g)</li>
<li>Needle and syringe 5ml</li>
<li>2 new razor blades </li>
<li>Sanitary pads </li>
<li>Baby clothing and sheets </li>
<li>Money for emergency transport </li>
<li>Sugar and tea leaves </li>
<li>Soap </li>
<li>Clean clothing (personal) </li>
</ul>
</div>
</div>
</div>
<hr>
{{-- END OF DELIVERY PLAN INCLUDE FILE --}}
@@ -0,0 +1,187 @@
{{-- primary diagnosis and other diagnosis --}}
<div class="row">
<div class="col-sm-8">
<div class="table-responsive">
<table class="table table-hover color-table success-table">
<thead>
<tr>
<th class="text-center">#</th>
<th>{{ __('inpatient.primary_diagnosis') }}</th>
<th>{{ __('inpatient.prompt') }}</th>
<th>{{ __('inpatient.references') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" name="chk" id="chk" /></td>
<td style="width: 30%;">
<div class="form-group">
{{ Form::select('primary_diagnosis', $diagnoses, '', ['id' => 'primary_diagnosis', 'class' => 'form-control col-sm-12 compulsory', 'required']) }}
</div>
</td>
<td style="width: 45%; color: #C85F6A;">
<div class="well well-sm" id="primary_diagnosis_prompt">&nbsp;</div>
</td>
<td style="width: 25%">
<div class="well well-sm" id="primary_diagnosis_reference">&nbsp;</div>
</td>
</tr>
<tr>
</tbody>
</table>
</div>
<div class="table-responsive table-condensed">
<table class="table color-table success-table table-condensed table-borderless"
id="other_diagnosis_table">
<thead>
<tr>
<th class="text-center">#</th>
<th>{{ __('inpatient.other_diagnosis') }}</th>
<th>{{ __('inpatient.prompt') }}</th>
<th>{{ __('inpatient.references') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" name="chk" id="chk"></td>
<td style="width: 30%;">
{{ Form::select('other_diagnosis[]', $diagnoses, '', ['class' => 'form-control col-sm-12 sec_d', 'id' => 'other_diagnosis']) }}
</td>
<td style="width: 45%">
<div class="well well-sm" id="secondary_diagnosis_prompt1">&nbsp;</div>
</td>
<td style="width: 25%">
<div class="well well-sm" id="secondary_diagnosis_reference1">&nbsp;</div>
</td>
</tr>
</tbody>
</table>
</div>
<a class="btn btn-success btn-sm m-t-10" id="add_row"
onclick="addRow('other_diagnosis_table')">{{ __('inpatient.add_row') }}</a>
<a class="btn btn-danger btn-sm m-t-10" id="delete_row"
onclick="deleteRow('other_diagnosis_table')">{{ __('inpatient.delete_row') }}</a>
</div>
<div class="col-sm-4">
<div class="panel panel-default">
<div class="panel-wrapper collapse in">
<ul class="nav customtab nav-tabs" role="tablist">
<li role="presentation" class="active nav-item"><a href="#triageSymptoms"
class="nav-link" aria-controls="home" role="tab" data-toggle="tab"
aria-expanded="true"><span class="visible-xs"><i
class="ti-home"></i></span><span class="hidden-xs">
{{ __('inpatient.symptoms_triage') }}</span></a></li>
<li role="presentation" class="nav-item"><a href="#opdInvestigations" class="nav-link"
aria-controls="profile" role="tab" data-toggle="tab"
aria-expanded="false"><span class="visible-xs"><i class="ti-user"></i></span>
<span class="hidden-xs">{{ __('inpatient.opd_invs') }}</span></a></li>
<li role="presentation" class="nav-item"><a href="#wardInvestigations" class="nav-link"
aria-controls="messages" role="tab" data-toggle="tab"><span
class="visible-xs"><i class="ti-email"></i></span> <span
class="hidden-xs">{{ __('inpatient.ward_invs') }}</span></a></li>
</ul>
<div class="panel-body">
<div class="tab-content m-t-0">
<div role="tabpanel" class="tab-pane fade active in" id="triageSymptoms">
<div class="col-md-12">
<table class="table table-bordered">
<thead>
<tr>
<th><b>{{ __('inpatient.symptoms') }}</b></th>
<th><b>{{ __('inpatient.duration') }}</b></th>
</tr>
</thead>
<tbody>
@if ($triage)
@php
$symptoms_explode = explode(',', $triage->symptoms);
$duration_explode = explode(',', $triage->symptom_duration);
@endphp
@for ($i = 0; $i < count($symptoms_explode); $i++)
<tr>
<td>{{ $symptoms[$symptoms_explode[$i]] }}</td>
<td>{{ isset($duration_explode[$i]) ? $duration_explode[$i] : '' }}
</td>
</tr>
@endfor
@else
<tr>
<td colspan="2">{{ __('inpatient.no_symptoms_triage') }}
</td>
</tr>
@endif
</tbody>
</table>
</div>
<div class="clearfix"></div>
</div>
<div role="tabpanel" class="tab-pane fade" id="opdInvestigations">
<div class="col-md-12">
<table class="table table-bordered">
<thead>
<tr>
<th><b>{{ __('inpatient.name') }}</b></th>
<th><b>{{ __('inpatient.value') }}</b></th>
<th><b>{{ __('inpatient.comment') }}</b></th>
</tr>
</thead>
<tbody>
@if (count($opd_investigations) > 0)
@for ($i = 0; $i < count($opd_investigations['name']); $i++)
<tr>
<td>{{ $opd_investigations['name'][$i] }}</td>
<td>{{ $opd_investigations['value'][$i] }}</td>
<td>{{ $opd_investigations['comment'][$i] }}</td>
</tr>
@endfor
@else
<tr>
<td colspan="3">{{ __('inpatient.no_opd_invs') }}</td>
</tr>
@endif
</tbody>
</table>
</div>
<div class="clearfix"></div>
</div>
<div role="tabpanel" class="tab-pane fade" id="wardInvestigations">
<div class="col-md-12">
<table class="table table-bordered">
<thead>
<tr>
<th><b>{{ __('inpatient.name') }}</b></th>
<th><b>{{ __('inpatient.value') }}</b></th>
<th><b>{{ __('inpatient.comment') }}</b></th>
</tr>
</thead>
<tbody>
@if (count($ward_investigations) > 0)
@for ($i = 0; $i < count($ward_investigations['name']); $i++)
<tr>
<td>{{ $ward_investigations['name'][$i] }}</td>
<td>{{ $ward_investigations['value'][$i] }}</td>
<td>{{ $ward_investigations['comment'][$i] }}</td>
</tr>
@endfor
@else
<tr>
<td colspan="3">{{ __('inpatient.no_ward_invs') }}</td>
</tr>
@endif
</tbody>
</table>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<a href="#" class="label label-info"> > {{ __('inpatient.historical_investigations') }}</a>
<a href="{{ url('investigations/investigations_review') }}" class="label label-info"> >
{{ __('inpatient.order_investigations') }}</a>
</div>
</div>
<hr>
{{-- end diagnosis --}}
@@ -0,0 +1,49 @@
{{-- gravida fields and other related fields --}}
<div class="row">
<div class="form-group col-sm-2">
{{ Form::label('gravida', __('maternity.gravida')) }}
<input type="number" name="gravida" class="form-control compulsory" required
value="{{ isset($anc_registration) ? $anc_registration->gravida : '' }}">
</div>
<div class="form-group col-sm-2">
{{ Form::label('para', __('maternity.para')) }}
<input type="number" name="para" class="form-control compulsory" required
value="{{ isset($anc_registration) ? $anc_registration->para : '' }}">
</div>
<div class="form-group col-sm-2">
{{ Form::label('abortion', __('maternity.abortion')) }}
<input type="number" name="abortion" class="form-control compulsory" required
value="{{ isset($anc_registration) ? $anc_registration->abortion : '' }}">
</div>
<div class="form-group col-sm-2">
{{ Form::label('ectopic_pregnancies', __('maternity.ectopic_pregnancies')) }}
<input type="number" name="ectopic_pregnancies" class="form-control compulsory" required
value="{{ isset($anc_registration) ? $anc_registration->ectopic_pregnancies : '' }}">
</div>
<div class="form-group col-sm-4 text-center">
{{ Form::label('postpartum', __('maternity.post_partum')) }}
<br>
<input class="form-check-input " name="postpartum" type="radio" id="postpartum" required
{{-- @if (!empty($anc_registration->postpartum)) {{ $anc_registration->postpartum == '1' ? 'checked' : '' }} @endif --}}
{{-- @checked($anc_registration->postpartum == 1 ) --}}
@checked(optional($anc_registration)->postpartum == 1 ? true : false)
value="1">
&nbsp;
<label class="form-check-label" for="postpartum">{{ __('maternity.yes') }}</label>&nbsp;&nbsp;
<input class="form-check-input" name="postpartum" type="radio" id="postpartum"
{{-- @if (!empty($anc_registration->postpartum)) {{ $anc_registration->postpartum == '0' ? 'checked' : '' }} @endif --}}
{{-- @checked($anc_registration->postpartum == 0 ) --}}
@checked(optional($anc_registration)->postpartum == 0 ? true : false)
value="0"> &nbsp;&nbsp;
<label class="form-check-label" for="postpartum">{{ __('maternity.no') }}</label>
<div class="help-block with-errors"></div>
</div>
</div>
@@ -0,0 +1,108 @@
{{-- Gynacology history --}}
<div class="row">
<div class="col">
<h4 class="text-left">{{ __('antenatal.gynacology_history') }}</h4>
</div>
</div>
<div class="row">
<div class="col-md-12">
{{-- {{ Form::label('surgical_history',__('antenatal.surgical_history')) }} --}}
<table class="table table-borderless">
<tbody>
<tr>
<td>
<input class="form-check-input" name="surgical_history[]" type="checkbox" id="d_c"
value="d_c" @if (is_array(old('surgical_history')) && in_array('d_c', old('surgical_history'))) checked @endif>
<label class="form-check-label" for="d_c"> {{ __('antenatal.d_c') }} </label>
{{-- add dilation and curettage date :input --}}
<div id="d_c_date_input" class="hidden" style="margin-top:15px;">
<input type="date" name="d_c" placeholder="Add date" class="form-control">
<small style="color:blue;">Add dilation & curettage date </small>
</div>
</td>
<td>
{{ Form::checkbox('obs_gyn[]', 2, false, ['id' => 'obs_gyn_ectopic_pregancy', 'class' => 'form-check-input']) }}
<label class="form-check-label"
for="obs_gyn_ectopic_pregancy">{{ __('antenatal.ectopic_pregancy') }}</label>
{{-- add ectopic pregnancy date :input --}}
<div id="obs_gyn_ectopic_pregancy_date_input" class="hidden" style="margin-top:15px;">
<input type="date" name="obs_gyn_ectopic_pregancy" placeholder="Add date" class="form-control">
<small style="color:blue;">Add ectopic pregnancy date </small>
</div>
</td>
<td>
<input class="form-check-input" name="surgical_history[]" type="checkbox" id="myomectomy"
value="myomectomy" @if (is_array(old('surgical_history')) && in_array('myomectomy', old('surgical_history'))) checked @endif>
<label class="form-check-label" for="myomectomy"> {{ __('antenatal.myomectomy') }} </label>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="surgical_history[]" type="checkbox"
id="operations_on_cervix" value="operations_on_cervix"
@if (is_array(old('surgical_history')) && in_array('operations_on_cervix', old('surgical_history'))) checked @endif>
<label class="form-check-label" for="operations_on_cervix">
{{ __('antenatal.operations_on_cervix') }} </label>
</td>
<td>
<input class="form-check-input" name="surgical_history[]" type="checkbox" id="evacuation"
value="evacuation" @if (is_array(old('surgical_history')) && in_array('evacuation', old('surgical_history'))) checked @endif>
<label class="form-check-label" for="evacuation"> {{ __('antenatal.evacuation') }} </label>
</td>
<td>
<input class="form-check-input" name="surgical_history[]" type="checkbox" id="std"
value="std" @if (is_array(old('surgical_history')) && in_array('std', old('surgical_history'))) checked @endif>
<label class="form-check-label" for="std"> {{ __('antenatal.std') }} </label>
</td>
</tr>
<tr>
<td>
{{ Form::checkbox('obs_gyn[]', 3, false, ['id' => 'obs_gyn_pph', 'class' => 'form-check-input']) }}
<label class="form-check-label"
for="obs_gyn_pph">{{ __('antenatal.post_partum_haemorrhaging') }}</label>
</td>
<td>
{{ Form::checkbox('obs_gyn[]', 4, false, ['id' => 'obs_gyn_retained_placenta', 'class' => 'form-check-input']) }}
<label class="form-check-label"
for="obs_gyn_retained_placenta">{{ __('antenatal.retained_placenta') }}</label>
</td>
<td>
{{ Form::checkbox('obs_gyn[]', 4, false, ['id' => 'c_section', 'class' => 'form-check-input']) }}
<label class="form-check-label" for="c_section">{{ __('antenatal.c_section') }}</label>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<hr>
@@ -0,0 +1,412 @@
{{-- maternity: mothers history --}}
<div class="row">
<div class="col-md-12 ">
<h4><span class="label label-warning">{{ __('antenatal.mother_history') }}</span></h4>
</div>
<div class="col-md-12 text-left">
<h4 class="text-left">{{ __('antenatal.menstrual_history') }}</h4>
</div>
</div>
<hr>
<div class="row">
{{-- cycle length --}}
<div class="col-md-2">
<div class="form-group">
<label for="cycle_length">{{ __('antenatal.cycle_length') }}
<a href="javascript::void(0)" data-toggle="tooltip" rel="tooltip" data-placement="top" title="" data-original-title="{{ __('antenatal.cycle_length_info') }} "> <i class="fa fa-info-circle"></i></a> </label>
<input type="text" class="form-control col-sm-12" name="cycle_length"
value="{{ $latest_existing_antenatal_mother_history->cycle_time ?? '' }}">
</div>
</div>
{{-- length of menses --}}
<div class="col-md-2">
<div class="form-group">
<label for="menses_length">{{ __('antenatal.menses_length') }}
<a href="javascript::void(0)" data-toggle="tooltip" rel="tooltip" data-placement="top" title="" data-original-title="{{ __('antenatal.menses_length_info') }} "> <i class="fa fa-info-circle"></i></a>
</label>
<input type="number" class="form-control col-sm-12" name="menses_length"
value="{{ $latest_existing_antenatal_mother_history->menses_length ?? '' }}">
</div>
</div>
{{-- amount --}}
<div class="col-md-2">
<div class="form-group">
<label for="menses_amount">{{ __('antenatal.menses_amount') }}</label>
<select name="menses_amount" class="form-select form-control">
<option value="null" {{ old('menses_amount') == 'null' ? 'selected' : '' }}> - Select
-</option>
<option value="1" {{ old('menses_amount') == '1' ? 'selected' : '' }}
@if(isset($latest_existing_antenatal_mother_history->menses_amount))
@selected($latest_existing_antenatal_mother_history->menses_amount == '1')
@endif
>
Heavy</option>
<option value="2" {{ old('menses_amount') == '2' ? 'selected' : '' }}
@if(isset($latest_existing_antenatal_mother_history->menses_amount))
@selected($latest_existing_antenatal_mother_history->menses_amount == '2')
@endif>
Normal</option>
</select>
</div>
</div>
<div class="form-group">
<label for="family_planning_method">{{ __('maternity.family_planning_method') }}</label>
<select name="family_planning_method" class="form-select form-control">
<option value="null" {{ old('family_planning_method') == 'null' ? 'selected' : '' }}> -- Select
-- </option>
@foreach ($family_planning_methods as $id => $name)
<option value="{{ $id }}" {{ old('family_planning_method') == '1' ? 'selected' : '' }}
@if(isset($latest_existing_antenatal_mother_history->family_planning))
@selected($latest_existing_antenatal_mother_history->family_planning == $id)
@endif
>
{{ $name }}</option>
@endforeach
</select>
</div>
<div class="col-md-2">
<div class="form-group">
<label for="date_discontinued">{{ __('maternity.date_discontinued') }}</label>
<div class="input-group">
<input type="text" class="form-control col-sm-12" name="date_discontinued" id="date_discontinued"
value="{{ $latest_existing_antenatal_mother_history->date_discontinued ?? '' }}">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label for="why_stop_family_planning">{{ __('maternity.why') }}</label>
<input type="text" class="form-control col-sm-12" name="why_stop_family_planning"
value="{{ $latest_existing_antenatal_mother_history->why_stop_family_planning ?? '' }}"
>
</div>
</div>
</div>
<hr>
{{-- MEDICAL HISTORY --}}
{{-- start maternity: medical history --}}
<div class="row">
{{-- medical history --}}
<div class="col">
<div class="row">
<div class="col">
<h4 class="text-left">{{ __('antenatal.medical_history') }}</h4>
</div>
</div>
{{-- {{ $latest_existing_antenatal_mother_history->medical_presentations }} --}}
{{-- {{ in_array('2', explode(',', $latest_existing_antenatal_mother_history->medical_presentations)) ? 'checked' : '' }} --}}
{{ Form::label('medical_presentations', __('antenatal.medical_presentations')) }} <br>
<table class="table table-borderless">
<tbody>
<tr>
<td>
<input class="form-check-input" name="medical_presentations[]" type="checkbox"
id="generalized_l_glands" value="1"
{{ in_array('16', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? 'checked' : '' }}
@if (is_array(old('medical_presentations')) && in_array('1', old('medical_presentations'))) checked @endif>&nbsp;
<label class="form-check-label" for="generalized_l_glands">
{{ __('antenatal.generalized_l_glands') }} </label>
</td>
<td>
<input class="form-check-input" name="medical_presentations[]" type="checkbox" id="oral_thrush"
{{ in_array('15', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? 'checked' : '' }}
value="2" @if (is_array(old('medical_presentations')) && in_array('2', old('medical_presentations'))) checked @endif>&nbsp;
<label class="form-check-label" for="oral_thrush"> {{ __('antenatal.oral_thrush') }} </label>
</td>
</tr>
<tr>
<td>
{{-- {{ Form::checkbox('medical_presentations[]', 1, false, ['id' => 'medical_presentations_sti', 'class' => 'form-check-input']) }}&nbsp; --}}
<input class="form-check-input" name="medical_presentations[]" type="checkbox"
id="sti" value="3"
{{ in_array('1', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? 'checked' : '' }}
@if (is_array(old('medical_presentations')) && in_array('3', old('medical_presentations'))) checked @endif>&nbsp;
<label class="form-check-label" for="sti">{{ __('antenatal.sti') }}</label>
</td>
<td>
<div class="form-check">
{{-- {{ Form::checkbox('any_medications[]', 1, false, ['id' => 'complications_bleeding', 'class' => 'form-check-input']) }}&nbsp; --}}
<input class="form-check-input" name="medical_presentations[]" type="checkbox"
id="bleeding" value="4" @if (is_array(old('medical_presentations')) && in_array('4', old('medical_presentations'))) checked @endif>&nbsp;
<label class="form-check-label"
for="bleeding">{{ __('antenatal.bleeding') }}</label>
</div>
</td>
</tr>
<tr>
<td>
{{-- {{ Form::checkbox('medical_presentations[]', 3, false, ['id' => 'medical_presentations_asthma', 'class' => 'form-check-input']) }}&nbsp; --}}
<input class="form-check-input" name="medical_presentations[]" type="checkbox" id="dematitis"
{{ in_array('18', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? 'checked' : '' }}
value="5" @if (is_array(old('medical_presentations')) && in_array('5', old('medical_presentations'))) checked @endif>&nbsp;
<label class="form-check-label"
for="dematitis">{{ __('antenatal.dematitis') }}</label>
</td>
<td>
{{-- {{ Form::checkbox('medical_presentations[]', 10, false, ['id' => 'complications_tb', 'class' => 'form-check-input']) }}&nbsp; --}}
<input class="form-check-input" name="medical_presentations[]" type="checkbox"
{{ in_array('10', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? 'checked' : '' }}
id="6" value="6"
@if (is_array(old('medical_presentations')) && in_array('6', old('medical_presentations'))) checked @endif>&nbsp;
<label class="form-check-label" for="6">{{ __('antenatal.tb') }}</label>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="medical_presentations[]" type="checkbox"
id="7" value="7"
{{ in_array('17', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? 'checked' : '' }}
@if (is_array(old('medical_presentations')) && in_array('7', old('medical_presentations'))) checked @endif>&nbsp;
<label class="form-check-label" for="7"> {{ __('antenatal.herpes_simplex') }}
</label>
</td>
<td>
<input class="form-check-input" name="medical_presentations[]" type="checkbox"
id="8" value="8"
{{ in_array('13', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? 'checked' : '' }}
@if (is_array(old('medical_presentations')) && in_array('8', old('medical_presentations'))) checked @endif>&nbsp;
<label class="form-check-label" for="8"> {{ __('antenatal.herpes_zoster') }}
</label>
</td>
</tr>
{{-- other medical presentations --}}
<tr>
<td class="form-check">
<input class="form-check-input" name="medical_presentations[]" type="checkbox"
{{ in_array('19', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? 'checked' : '' }}
id="show_other_medical_presentations_input" value="9">&nbsp;
<label class="form-check-label" id="others_medical_presentations"
for="show_other_medical_presentations_input">{{ __('antenatal.others') }}</label>
<br><br>
{{-- style="{{ !empty($existing_maternity_mother_history->other_medical_presentations) ? '' : 'display:none;' }}" --}}
{{-- add other medical presentations :input --}}
<div id="other_medical_presentations_input"
style="{{ in_array('19', explode(',', $latest_existing_antenatal_mother_history->medical_presentations ?? '')) ? '' : 'display:none;' }}
">
<input type="text" name="other_medical_presentations" placeholder="Specify"
value="{{ $latest_existing_antenatal_mother_history->medical_presentations_others_input ?? '' }}"
class="form-control">
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-borderless">
{{-- aph and fits --}}
<tr>
{{-- history of aph --}}
<td style="width:42%;">
{{ Form::label('history_of_aph', __('maternity.history_of_aph')) }}
<br>
{{ Form::radio('history_of_aph',1, $latest_existing_anc_clinic_followup?->aph == 1 ? true: false, ['required', 'id' => 'show_aph_details_div']) }}
{{ __('maternity.yes') }} &nbsp;&nbsp;
{{ Form::radio('history_of_aph',0,$latest_existing_anc_clinic_followup?->aph == 0 ? true: false, ['required', 'id' => 'hide_aph_details_div']) }}
{{ __('maternity.no') }}
<div class="row" id="aph_details_div" style="{{ $latest_existing_anc_clinic_followup?->aph_details == '1' ? '' : 'display:none;' }}">
<div class="form-group">
{{ Form::label('history_aph_details', __('maternity.details')) }}
{{ Form::textarea('history_aph_details', $latest_existing_anc_clinic_followup?->aph_details ?? '', ['class' => 'form-control', 'rows' => '2']) }}
</div>
</div>
</td>
{{-- history of fits --}}
<td style="width:42%; ">
{{ Form::label('history_of_fits', __('maternity.history_of_fits')) }}
<br>
{{ Form::radio('history_of_fits', 1, $latest_existing_anc_clinic_followup?->fits == 1 ? true: false, ['required', 'id' => 'show_fits_details_div']) }}
{{ __('maternity.yes') }} &nbsp;&nbsp;
{{ Form::radio('history_of_fits',0, $latest_existing_anc_clinic_followup?->fits == 0 ? true: false, ['required', 'id' => 'hide_fits_details_div']) }}
{{ __('maternity.no') }}
<div class="row" id="fits_details_div" style="{{ $latest_existing_anc_clinic_followup?->fits_details == '1' ? '' : 'display:none;' }}">
<div class="form-group">
{{ Form::label('history_fit_details', __('maternity.fits_details')) }}
{{ Form::textarea('history_fit_details', $latest_existing_anc_clinic_followup?->fits_details ?? '', ['class' => 'form-control', 'rows' => '2']) }}
</div>
</div>
</td>
</tr>
</table>
</div>
{{-- family history --}}
<div class="col">
<div class="row">
<div class="col">
<h4 class="text-left">{{ __('antenatal.family_history') }}</h4>
</div>
</div>
<table class="table table-borderless">
<tbody>
<tr>
<td>
{{ Form::label('sgbv_risk', __('antenatal.sgbv')) }}
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="sgbv_risk[]" type="checkbox" id="sgbv_risk"
value="1" @if (is_array(old('1')) && in_array('sgbv_risk_present', old('1'))) checked @endif>&nbsp;
<label class="form-check-label" for="sgbv_risk">
{{ __('antenatal.sgbv_risk') }} </label>
</td>
</tr>
<tr>
<td class="form-check">
{{-- {{ Form::checkbox('any_medications[]', 2, false, ['id' => 'any_medications_others', 'class' => 'form-check-input']) }}&nbsp; --}}
<input class="form-check-input" name="sgbv_risk[]" type="checkbox"
id="show_other_sgbv_risk_input" value="2">&nbsp;
<label class="form-check-label" id="other_sgbv_risk"
for="show_other_sgbv_risk_input">{{ __('antenatal.others') }}</label>
<br><br>
{{-- add other medical presentations :input --}}
<div id="other_sgbv_risk_input" style="display: none;">
<input type="text" name="other_sgbv_risk" placeholder="Specify Violence"
class="form-control">
</div>
</td>
</tr>
</tbody>
</table>
</div>
{{-- others --}}
<div class="col">
<div class="col">
{{-- {{ Form::label('any_medications',__('afaf')) }} <br> --}}
<table class="table table-borderless">
<tbody>
{{-- health of husband --}}
<br><br>
<tr>
<td>
<div class="form-check">
{{-- {{ Form::label('husband_health', __('antenatal.husband_health')) }} --}}
<label class="form-check-label"
for="husband_health">{{ __('antenatal.husband_health') }}</label>
<div class="input-group">
{{-- {{ Form::text('husband_health', '', ['class' => 'form-control', 'id' => 'husband_health']) }} --}}
<input type="text" name="husband_health" class="form-control"
value="{{ $latest_existing_antenatal_mother_history->husband_health ?? '' }}">
</div>
<div class="help-block with-errors"></div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group">
<label class="form-check-label"
for="other_medical_history_comment">{{ __('antenatal.other_comments') }}</label><br>
{{-- {{ Form::textarea('other_medical_history_comment', $latest_existing_antenatal_mother_history->other_comments ?? '' , ['class' => 'form-control', 'rows' => '4']) }} --}}
<textarea name="other_medical_history_comment" id="" cols="35" rows="4">{{ $anc_registration->other_comments ?? '' }}</textarea>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<hr>
{{-- end maternity: medical history --}}
@@ -0,0 +1,142 @@
{{-- pelivic examination and assessement --}}
<div class="row">
<div class="col">
<h4>{{ __('antenatal.pelvic_examination_and_assessement') }}</h4>
</div>
</div>
{{-- row-1 --}}
@php
$physical_exam = json_decode($latest_existing_anc_clinic_followup?->physical_exam, true);
@endphp
<div class="row">
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('vulva', __('antenatal.vulva')) }}
<input type="text" name="vulva" class="form-control" value="{{ $physical_exam['vulva']?? '' }}">
</div>
</div>
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('vagina', __('antenatal.vagina')) }}
<input type="text" name="vagina" class="form-control" value="{{ $physical_exam['vagina']?? '' }}">
</div>
</div>
{{-- cervix --}}
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('cervix', __('antenatal.cervix')) }}
<select name="cervix" class="form-select form-control">
<option value="null" {{ old('cervix')=='null' ? 'selected' : '' }}> -- Select -- </option>
<option value="1" {{ old('cervix')=='1' ? 'selected' : '' }}>Effaced</option>
<option value="2" {{ old('cervix')=='2' ? 'selected' : '' }}>Not Effaced</option>
</select>
</div>
</div>
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('dilatation', __('antenatal.dilatation')) }}
<input type="text" name="dilatation" class="form-control">
</div>
</div>
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('uterine_adnexa', __('antenatal.uterine_adnexa')) }}
<input type="text" name="uterine_adnexa" class="form-control">
</div>
</div>
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('moniliasis', __('antenatal.moniliasis')) }}
<input type="text" name="moniliasis" class="form-control">
</div>
</div>
</div>
{{-- row-2 --}}
<div class="row">
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('diagonal_conjugate', __('antenatal.diagonal_conjugate')) }}
<span style="color:rgb(64, 124, 220);"> ( > 11.5/<11.5cm) </span>
<input type="number" name="diagonal_conjugate" class="form-control" step="any">
</div>
</div>
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('sacrum', __('antenatal.sacrum')) }} <br>
<select name="sacrum" class="form-select form-control">
<option value="null" {{ old('sacrum')=='null' ? 'selected' : '' }}> -- Select
-- </option>
<option value="1" {{ old('sacrum')=='1' ? 'selected' : '' }}>Curve Deep</option>
<option value="2" {{ old('sacrum')=='2' ? 'selected' : '' }}>Flat</option>
</select>
</div>
</div>
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('ischial_spinces', __('antenatal.ischial_spinces')) }}
<select name="ischial_spinces" class="form-select form-control">
<option value="null" {{ old('ischial_spinces')=='null' ? 'selected' : '' }}> -- Select -- </option>
<option value="1" {{ old('ischial_spinces')=='1' ? 'selected' : '' }}>Not Prominent</option>
<option value="2" {{ old('ischial_spinces')=='2' ? 'selected' : '' }}>Prominent</option>
</select>
</div>
</div>
{{-- sub pubic angle --}}
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('sub_public_angle', __('antenatal.sub_public_angle')) }}
<select name="sub_public_angle" class="form-select form-control">
<option value="null" {{ old('sub_public_angle')=='null' ? 'selected' : '' }}> -- Select --
</option>
<option value="1" {{ old('sub_public_angle')=='1' ? 'selected' : '' }}>Obtuse</option>
<option value="2" {{ old('sub_public_angle')=='2' ? 'selected' : '' }}>Acute</option>
</select>
</div>
</div>
{{-- ischial_tuberosities --}}
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('ischial_tuberosities', __('antenatal.ischial_tuberosities')) }}
<select name="ischial_tuberosities" class="form-select form-control">
<option value="null" {{ old('ischial_tuberosities')=='null' ? 'selected' : '' }}> -- Select --
</option>
<option value="1" {{ old('ischial_tuberosities')=='1' ? 'selected' : '' }}>4 knuckles</option>
<option value="2" {{ old('ischial_tuberosities')=='2' ? 'selected' : '' }}>Less</option>
</select>
</div>
</div>
<div class="col-md-2 col-sm-12 col-xs-12">
<div class="form-group">
{{ Form::label('pelvic_adequate', __('antenatal.pelvic_adequate')) }}
<select name="pelvic_adequate" class="form-select form-control">
<option value="null" {{ old('pelvic_adequate')=='null' ? 'selected' : '' }}> -- Select -- </option>
<option value="1" {{ old('pelvic_adequate')=='1' ? 'selected' : '' }}>Borderline</option>
<option value="2" {{ old('pelvic_adequate')=='2' ? 'selected' : '' }}>Contracted</option>
</select>
</div>
</div>
</div>
<hr>
@@ -0,0 +1,687 @@
<div class="row">
<b> <span class="text-dark"> {{ __('antenatal.previous_admissions') }} </span>
</b><br><br>
</div>
{{-- NEW DISPLAY CONSULTATIONS --}}
<table class="accordion-table table table-bordered color-bordered-table success-bordered-table" id="table_1">
<thead>
<tr>
<th style="color:#ffffff;">Episode ID</th>
<th style="color:#ffffff;">{{ __('antenatal.admitted_on') }}</th>
<th style="color:#ffffff;">{{ __('antenatal.ward') }}</th>
<th style="color:#ffffff;">{{ __('antenatal.primary_diagnosis') }}</th>
<th style="color:#ffffff;">{{ __('antenatal.other_diagnosis') }}</th>
<th style="color:#ffffff;">{{ __('antenatal.discharged_on') }}</th>
<th style="color:#ffffff;">{{ __('antenatal.discharged_by') }}</th>
<th style="color:#ffffff;">Action</th>
<!-- Add more headers if needed -->
</tr>
</thead>
<tbody>
{{-- <tr class="accordion-header">
<td>Row 1 Header</td>
<td>Row 1 Data</td>
</tr>
<tr class="accordion-content">
<td colspan="2">
Content 1
</td>
</tr> --}}
@forelse ($previous_consultation_inpatient_info as $key => $patient_previous_consultation)
<tr class="accordion-header">
{{-- <td>
{{ $key + 1 }}
</td> --}}
<td>
@if ($patient_previous_consultation->episode_id)
{{ $patient_previous_consultation->episode_id }}
@endif
</td>
<td>
@if ($patient_previous_consultation->admitted_on)
{{ streamline_date($patient_previous_consultation->admitted_on) }}
{{-- {{ \Carbon\Carbon::parse($patient_previous_consultation->admitted_on)->format('Y-m-d H:i') }} --}}
@endif
</td>
<td>
@if (!empty($patient_previous_consultation->ward))
{{ $patient_previous_consultation->ward }}
@else
<span></span>
@endif
</td>
<td>
@if (!empty($patient_previous_consultation->primary_diagnosis))
{{ $patient_previous_consultation->primary_diagnosis }}
@else
<span></span>
@endif
</td>
<td>
@if (!empty($patient_previous_consultation->other_diagnoses))
@php
$checklist_array = @unserialize($patient_previous_consultation->other_diagnoses);
// echo '<li>' . $diagnoses_patient[$patient_previous_consultation->primary_diagnosis] . '</li>';
if (is_array($checklist_array)) {
for ($i = 0; $i < count($checklist_array); $i++) {
if ($checklist_array[$i] != '') {
echo '<li>' . $diagnoses_patient[$checklist_array[$i]] . '</li>';
}
}
}
@endphp
@else
<span></span>
@endif
</td>
<td>
@if ($patient_previous_consultation->discharged_on)
{{ streamline_date($patient_previous_consultation->discharged_on) }}
@endif
</td>
<td>
@if (!empty($patient_previous_consultation->first_name))
{{ $patient_previous_consultation->first_name }}
@else
<span></span>
@endif
@if (!empty($patient_previous_consultation->last_name))
{{ $patient_previous_consultation->last_name }}
@endif
</td>
<td>
<button type="button" class="btn btn-success"> Details </button>
</td>
</tr>
<tr class="accordion-content">
{{-- <td colspan="2">
Content for {{ $patient_previous_consultation->episode_id }}
</td> --}}
<td colspan="8">
<div class="row">
<div class="col-md-6">
<div class="row">
{{-- main-column-1-details --}}
{{-- observations --}}
<div class="col-md-7">
{{-- <h4 class="text-left">{{ __('antenatal.observations') }}</h4> --}}
{{-- query data from triage --}}
{{-- @php
$current_episode_id = $patient_previous_consultation->episode_id;
$triage_previous_consultation_data = \Streamline\Models\Triage::leftJoin('symptoms', 'triage.symptoms', '=', 'symptoms.id')
->where(['patient_id' => $patient_id])
->where('episode_id', $current_episode_id)
->get();
@endphp --}}
{{-- loop through observations to display each item key and value --}}
<table class="table">
<thead>
</thead>
<tbody>
{{-- @foreach ($previous_consultation_inpatient_info as $prev_observations) --}}
@php
$observations_array = explode(
',',
$patient_previous_consultation->observations,
);
$temp = null;
$pulse = null;
$respirations = null;
$blood_pressure = null;
$blood_pressure_systolic = null;
$blood_pressure_diastolic = null;
@endphp
@if (!empty($observations_array))
@foreach ($observations_array as $observation)
@php
$observation_parts = explode('=', $observation);
// Check if the explode function successfully split the observation into key and value
if (count($observation_parts) == 2) {
[$observation_key, $observation_value] = $observation_parts;
if ($observation_key == 'Temperature') {
$temp = $observation_value;
} elseif ($observation_key == 'Pulse') {
$pulse = $observation_value;
} elseif ($observation_key == 'Respirations') {
$respirations = $observation_value;
} elseif ($observation_key == 'Systolic bp') {
$blood_pressure_systolic = $observation_value;
} elseif ($observation_key == 'Diastolic bp') {
$blood_pressure_diastolic = $observation_value;
}
}
@endphp
@endforeach
<tr>
<td>Temperature : </td>
<td>{{ $temp ?? '' }} </td>
<td>Blood Pressure </td>
<td>
@if (isset($blood_pressure_systolic) && isset($blood_pressure_diastolic))
{{ $blood_pressure_systolic ?? '' }}/{{ $blood_pressure_diastolic ?? '' }}
mmHg
@endif
</td>
</tr>
<tr>
<td>Pulse : </td>
<td>{{ $pulse ?? '' }} </td>
<td>Respirations </td>
<td>{{ $respirations ?? '' }}</td>
</tr>
@endif
{{-- @endforeach --}}
</tbody>
</table>
{{-- end of loop through observations to display each item key and value --}}
</div>
{{-- outcome --}}
<div class="col-md-5">
<table class="table">
<thead>
<tr>
<th><b>Outcome</b></th>
{{-- <td>36%</td> --}}
</tr>
</thead>
<tbody>
<tr>
{{-- <td><b>Pulse</b></td> --}}
<td>
@if (!empty($patient_previous_consultation->outcome))
{{ $patient_previous_consultation->outcome }}
@else
<span></span>
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
{{-- ward treatments --}}
@php
$previous_ward_treatments = \Streamline\Models\WardTreatment::where([
['patient_id', $patient_id],
['episode_id', '=', $patient_previous_consultation->episode_id],
])->get();
@endphp
<div class="row" style="padding-left:15px; ">
<h4 class="text-left">{{ __('antenatal.ward_treatments') }}</h4>
</div>
<div class="row" style="padding-left:15px;">
@if (count($previous_ward_treatments) > 0)
<div>
<table class="table table-bordered color-bordered-table success-bordered-table"
id="table_1">
<thead>
<th>{{ __('antenatal.drug_name') }}</th>
<th>{{ __('antenatal.dosage') }}</th>
<th>{{ __('antenatal.duration') }}</th>
<th>{{ __('antenatal.quantity') }}</th>
<th>{{ __('antenatal.status') }}</th>
</thead>
<tbody>
{{-- logic to fetch ward treatments --}}
@foreach ($previous_ward_treatments as $key => $ward_treatment)
@php
$drugsData = [
'drugs' => explode(',', $ward_treatment->drugs),
'doses' => explode(',', $ward_treatment->doses),
'durations' => explode(',', $ward_treatment->durations),
'quantities_dispensed' => explode(
',',
$ward_treatment->quantities_dispensed,
),
'dispense_status' => explode(
',',
$ward_treatment->dispense_status,
),
];
$dosageNames = Streamline\Models\DosageFrequency::whereIn(
'id',
$drugsData['drugs'],
)->pluck('name', 'id');
$drugNames = Streamline\Models\Drug::whereIn(
'id',
$drugsData['drugs'],
)->pluck('name', 'id');
@endphp
{{-- Fetch drugs loop with array data --}}
@foreach ($drugsData['drugs'] as $index => $drugId)
<tr>
<td>
@if (!empty($drugNames[$drugId]))
{{ $drugNames[$drugId] }}
@else
<span></span>
@endif
</td>
<td>
@if (!empty($dosageNames[$drugId]))
{{ $dosageNames[$drugId] }}
@else
<span></span>
@endif
</td>
<td>
@if (!empty($drugsData['durations'][$index]))
{{ $drugsData['durations'][$index] }}
@else
<span></span>
@endif
</td>
<td>
@if (!empty($drugsData['quantities_dispensed'][$index]))
{{ $drugsData['quantities_dispensed'][$index] }}
@else
<span></span>
@endif
</td>
<td>
@if (!empty($drugsData['dispense_status'][$index]))
{{ $drugsData['dispense_status'][$index] }}
@else
<span></span>
@endif
</td>
</tr>
@endforeach
{{-- end fetch drugs loop with array data --}}
@endforeach
</tbody>
</table>
</div>
@else
<code>No previous ward treatments</code>
@endif
</div>
<hr>
</div>
{{-- main-column-2-details --}}
<div class="col-md-6">
{{-- <p>new date {{ $patient_previous_consultation->created_at }}</p> --}}
{{-- symptoms --}}
<h4 class="text-left">{{ __('antenatal.symptoms') }}</h4>
@if ($patient_previous_consultation->symptoms)
{{-- pick triage + consultation symptoms combined:: check controller --}}
{{-- @php $symptoms_array = explode(",", $patient_previous_consultation->symptoms); @endphp
@php $symptoms_duration_array = explode(",", $patient_previous_consultation->symptom_duration); @endphp --}}
{{-- pick consultation symptoms --}}
@php $symptoms_array = explode(",", $patient_previous_consultation->consultation_symptoms); @endphp
@php $symptoms_duration_array = explode(",", $patient_previous_consultation->consultation_symptom_duration); @endphp
<div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th><b>{{ __('consultations.symptom') }}</b></th>
<th><b>{{ __('consultations.duration') }}</b></th>
</tr>
</thead>
<tbody>
@php $counter = 0; @endphp
@for ($i = 0; $i < count($symptoms_array); $i++)
<tr>
<td> {{ isset($symptoms_array[$i]) ? get_name($symptoms_array[$i], 'id', 'name', 'symptoms') : '' }}
</td>
<td>{{ $symptoms_duration_array[$i] ?? '' }}</td>
</tr>
@endfor
</tbody>
</table>
</div>
@else
<code>{{ __('consultations.no_symptom_recorded') }}</code>
@endif
{{-- ordered investigation results --}}
<div>
@php
$ordered_investigations_results = \Streamline\Models\InvestigationResults::where([
['patient_id', $patient_id],
['episode_id', '=', $patient_previous_consultation->episode_id],
])->get();
@endphp
{{-- <div>
<h4 class="text-left">Ordered investigation results</h4>
</div> --}}
@if (count($ordered_investigations_results) > 0)
@foreach ($ordered_investigations_results as $key => $ordered_investigation)
@php
$investigationsData = [
'investigation' => explode(',', $ordered_investigation->investigation_id),
'result' => explode(',', $ordered_investigation->value),
'comment' => explode(',', $ordered_investigation->comment),
'reference_ranges' => explode(
',',
$ordered_investigation->normal_ranges ?? '',
),
// 'quantities_dispensed' => explode(',', $ward_treatment->quantities_dispensed),
// 'dispense_status' => explode(',', $ward_treatment->dispense_status),
];
// $drugFrequencies = Streamline\Models\DosageFrequency::whereIn('id', $drugsData['drugs'])->pluck('name', 'id');
$investigationName = Streamline\Models\Investigation::whereIn(
'id',
$investigationsData['investigation'],
)->pluck('name', 'id');
$investigationRange = Streamline\Models\Investigation::whereIn(
'id',
$investigationsData['investigation'],
)->pluck('normal_ranges', 'id');
@endphp
{{-- pick ordered investigation results: works --}}
{{-- <div>
<table class="table table-striped table-bordered">
<thead>
<th>{{ __('antenatal.investigation_name') }}</th>
<th>{{ __('antenatal.results') }}</th>
<th>{{ __('antenatal.reference_ranges') }}</th>
<th>{{ __('antenatal.comments') }}</th>
</thead>
<tbody>
@foreach ($investigationsData['investigation'] as $index => $investigationId)
<tr>
<td>
@if (!empty($investigationName[$investigationId]))
{{ $investigationName[$investigationId] }}
@else
<span></span>
@endif
</td>
<td>
@if (!empty($investigationsData['result'][$index]))
{{ $investigationsData['result'][$index] }}
@else
<span></span>
@endif
</td>
<td>
@php
$investigation_ranges =
$investigationRange[$investigationId];
$investigation_ranges_array = explode(
'.',
$investigation_ranges ?? '',
);
@endphp
@if (!empty($investigationRange[$investigationId]))
{{ $investigationRange[$investigationId] }}
@else
<span></span>
@endif
</td>
<td>
@if (!empty($investigationsData['comment'][$index]))
{{ $investigationsData['comment'][$index] }}
@else
<span></span>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div> --}}
{{-- end of ordered investigation results --}}
@endforeach
@else
{{-- <code>No ordered investigations </code> --}}
@endif
</div>
{{-- ordered investigations --}}
@php
$ordered_investigations_info = \Streamline\Models\OrderedInvestigation::where([
['patient_id', $patient_id],
['episode_id', '=', $patient_previous_consultation->episode_id],
])->get();
// $ordered_investigations_info2 = \Streamline\Models\OrderedInvestigation::
// leftJoin('investigation_results', 'ordered_investigations.episode_id', '=', 'investigation_results.episode_id')
// ->leftJoin('inpatient_info', 'ordered_investigations.episode_id', '=', 'inpatient_info.patient_id')
// ->where([
// ['inpatient_info.patient_id', $patient_id],
// ['inpatient_info.episode_id', '=', $patient_previous_consultation->episode_id],
// ])
// ->get([
// 'ordered_investigations.investigation_id as investigations',
// 'investigation_results.value as value_result', //results from results table
// // 'investigation_results.normal_ranges as reference_ranges',
// 'ordered_investigations.comment as investigation_comment',
// ]);
@endphp
{{-- ordered investigation --}}
{{-- <div class="row">
@php
// $investigation_rezults testing with investigations
$ordered_investigation_with_rezults_test = \Streamline\Models\OrderedInvestigation::where([
['patient_id', $patient_id],
['episode_id', '=', $patient_previous_consultation->episode_id],
])->get();
$results_test = DB::table('ordered_investigations')
->leftJoin('investigation_results', 'ordered_investigations.episode_id', '=', 'investigation_results.episode_id')
->leftJoin('inpatient_info', 'ordered_investigations.episode_id', '=', 'inpatient_info.episode_id')
->where('inpatient_info.patient_id', $patient_id)
->where('inpatient_info.episode_id', $patient_previous_consultation->episode_id)
->get([
'ordered_investigations.investigation_id as investigation_id',
'investigation_results.value as result',
]);
@endphp
--}}
<div class="row" style="padding-left:15px; padding-right:15px;">
<h4>{{ __('consultations.ordered_investigations') }}</h4>
<div class="table-responsive">
<table class="table table-hover color-table success-table table-bordered">
<thead>
<tr>
<th>{{ __('investigations.investigation_name') }}</th>
<th>{{ __('investigations.results') }}</th>
<th>{{ __('investigations.normal_ranges') }}</th>
<th>{{ __('investigations.comment') }}</th>
</tr>
</thead>
<tbody>
@php
$cardio_echo = \Streamline\Models\CardioEchoResult::where('episode_id', $patient_previous_consultation->episode_id)->first();
@endphp
@if (count($ordered_investigations_info) > 0)
@foreach ($ordered_investigations_info as $investigation)
@php $investigation_ids_array = explode(',', $investigation->investigation_id); @endphp
@for ($i = 0; $i < count($investigation_ids_array); $i++)
@php
$investigation = \Streamline\Models\Investigation::withTrashed()->find(
$investigation_ids_array[$i],
);
@endphp
@if ($investigation)
@if ($investigation->slug == 'echo')
<tr>
<td style="border-left: 1px solid #dddddd;" colspan="2">
{{ $investigation->name }}</td>
<td colspan="2">
@if ($cardio_echo)
<span>
<a target="_blank"
class="fcbtn btn btn-sm btn-default btn-outline btn-1d"
href='{{ url("/investigations/print-cardio-echo/{$patient_id}/{$episode_id}") }}'>
<i class="fa fa-print"></i>
<span>View
results</span></a>
</span>
@else
Pending
@endif
</td>
</tr>
@else
<tr>
<td style="border-left: 1px solid #dddddd;">
{{ $investigation->name }}</td>
<td>
<font color="orange">
{{ __('consultations.pending') }}
</font>
</td>
<td>
@if ($investigation->range_type == 1)
{{ get_dynamic_normal_range($investigation->id, get_patient_age_group($patient_id), get_name($patient_id, 'id', 'gender', 'patients')) }}
@else
{{ $investigation->normal_ranges }}
@endif
</td>
<td>
{{ $investigation->comments }}
</td>
</tr>
@endif
@endif
@endfor
@endforeach
@else
<td colspan="4" class="text-center">
<code>No ordered investigations</code>
</td>
@endif
</tbody>
</table>
</div>
</div>
{{-- end of ordered investigations --}}
</div>
</div>
<div class="row" style="padding-left:15px;">
<a href="/patient_episodes/"><button type="button" class="btn"
style="background-color:purple; color:white;">Inpatient Sheet </button> </a>
</div>
</td>
</tr>
@empty
<tr>No previous admissions</tr>
@endempty
</tbody>
</table>
@@ -0,0 +1,239 @@
{{-- SURGICAL HISTORY --}}
{{-- Check if surgeries exist and return the records --}}
@if(count($patient_surgeries) > 0)
<div class="row">
<div class="col-md-12 text-left">
<h4 class="text-left">{{ __('antenatal.surgical_history') }}</h4>
</div>
</div>
<hr>
<div class="row">
{{-- surgical history table --}}
<table class="table table-bordered color-bordered-table success-bordered-table" id="table_1">
<thead>
<th>{{ __('antenatal.id') }}</th>
<th>{{ __('antenatal.previous_surgical_procedure') }}</th>
<th>{{ __('antenatal.date') }}</th>
<th>{{ __('antenatal.performed_by') }}</th>
<th>{{ __('antenatal.diagnosis') }}</th>
</thead>
<tbody>
{{-- @foreach ($obstetric_history_details as $obstetric_history) --}}
@forelse($patient_surgeries as $key => $patient_surgery)
<tr>
<td>
{{ $key + 1 }}
</td>
<td>
{{ $patient_surgery->procedure_name }}
</td>
<td>
@if ($patient_surgery->date_surgery_completed)
{{ streamline_date($patient_surgery->date_surgery_completed) }}
@endif
</td>
<td>
@if (!empty($patient_surgery->first_name))
{{ $patient_surgery->first_name }}
@else
<span>N/A</span>
@endif
@if (!empty($patient_surgery->last_name))
{{ $patient_surgery->last_name }}
@endif
</td>
<td>
@php
$dianoses = [];
$dianoses[] = $patient_surgery->primary_diagnosis;
@endphp
<ul>
@php
$checklist_array = @unserialize($patient_surgery->other_diagnoses);
echo '<li>' . $diagnoses_patient[$patient_surgery->primary_diagnosis] . '</li>';
if (is_array($checklist_array)) {
for ($i = 0; $i < count($checklist_array); $i++) { if ($checklist_array[$i] !='' ) { echo '<li>'
. $diagnoses_patient[$checklist_array[$i]] . '</li>' ; } } } @endphp {{-- @foreach
($dianoses as $key=> $value)
<li> {{ $diagnoses_patient[$value] }} </li>
@endforeach --}}
</ul>
</td>
</tr>
@empty
<tr>
<td colspan="5" class="text-center">
<code>No surgery records available </code>
</td>
</tr>
@endforelse
{{-- @endforeach --}}
</tbody>
</table>
{{-- end surgical history table --}}
</div>
<hr>
@endif
<div class="row">
{{-- uterus operations --}}
@php
$anc_uterine_surgeries = !empty($latest_existing_antenatal_mother_history->uterine_surgeries)? json_decode($latest_existing_antenatal_mother_history->uterine_surgeries, true):[];
$anc_other_surgeries = !empty($latest_existing_antenatal_mother_history->other_surgeries)? json_decode($latest_existing_antenatal_mother_history->other_surgeries, true):[];
@endphp
<div class="col">
<table class="table color-table inverse-table table-responsive table-borderless"
id="uterus_operations_details_table">
<thead class="thead-light">
<th>{{ __('antenatal.uterus_operations') }}</th>
<th>{{ __('antenatal.date') }}</th>
<th>{{ __('antenatal.facility_name') }}</th>
<th></th>
</thead>
<tbody id="uterus_operations_data">
@if (!empty($anc_uterine_surgeries))
@foreach ($anc_uterine_surgeries as $key => $anc_uterine_operation)
<tr>
<td>
{{ Form::text('uterus_operations_name[]', $anc_uterine_operation['name'] ?? '', ['class' => 'form-control uterus_operations', 'id'
=> 'uterus_operations_name_1']) }}
</td>
<td style="min-width: 90px;">
<div class="input-group">
{{ Form::text('uterus_operations_date[]', $anc_uterine_operation['date'] ?? '', ['class' => 'form-control', 'id' =>
'uterus_operation_date_picker', 'placeholder' => 'When?']) }}<span
class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</td>
<td>
{{ Form::text('uterus_operations_facility_name[]', $anc_uterine_operation['facility_name'] ?? '', ['class' => 'form-control ', 'id' =>
'uterus_operations_facility_name_1']) }}
</td>
<td></td>
</tr>
@endforeach
@else
<tr>
<td>
{{ Form::text('uterus_operations_name[]', '', ['class' => 'form-control uterus_operations', 'id'
=> 'uterus_operations_name_1']) }}
</td>
<td style="min-width: 90px;">
<div class="input-group">
{{ Form::text('uterus_operations_date[]', '', ['class' => 'form-control', 'id' =>
'uterus_operation_date_picker', 'placeholder' => 'When?']) }}<span
class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</td>
<td>
{{ Form::text('uterus_operations_facility_name[]', '', ['class' => 'form-control ', 'id' =>
'uterus_operations_facility_name_1']) }}
</td>
<td></td>
</tr>
@endif
</tbody>
</table>
<a class="add_uterus_operations_button label label-inverse" style="color: #fff;" id="add_uterus_operations_1"
role="button"
onclick="add_uterus_operations_row('uterus_operations_details_table','uterus_operations_data')">{{
__('antenatal.add_uterus_operations_row') }}</a>
</div>
{{-- other operations --}}
<div class="col">
<table class="table color-table inverse-table table-responsive table-borderless"
id="other_operations_details_table">
<thead class="thead-light">
<th>{{ __('antenatal.operations') }}</th>
<th>{{ __('antenatal.date') }}</th>
<th>{{ __('antenatal.facility_name') }}</th>
<th></th>
</thead>
<tbody id="other_operations_data">
@if(!@empty($anc_other_surgeries))
@foreach($anc_other_surgeries as $key => $anc_other_operation)
<tr>
<td>
{{ Form::text('other_operations_name[]', $anc_other_operation['name'] ?? '', ['class' => 'form-control', 'id' =>
'other_operations_name_1']) }}
</td>
<td style="min-width: 90px;">
<div class="input-group">
{{ Form::text('other_operations_name_date[]', $anc_other_operation['date'] ?? '', ['class' => 'form-control ', 'id' =>
'other_operation_date_picker', 'placeholder' => 'When?']) }}<span
class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</td>
<td>
{{ Form::text('other_operations_name_facility_name[]', $anc_other_operation['facility_name'] ?? '', ['class' => 'form-control', 'id' => 'other_operations_facility_name_1']) }}
</td>
<td></td>
</tr>
@endforeach
@else
<tr>
<td>
{{ Form::text('other_operations_name[]', '', ['class' => 'form-control', 'id' =>
'other_operations_name_1']) }}
</td>
<td style="min-width: 90px;">
<div class="input-group">
{{ Form::text('other_operations_name_date[]', '', ['class' => 'form-control ', 'id' =>
'other_operation_date_picker', 'placeholder' => 'When?']) }}<span
class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</td>
<td>
{{ Form::text('other_operations_name_facility_name[]', '', ['class' => 'form-control', 'id' => 'other_operations_facility_name_1']) }}
</td>
<td></td>
</tr>
@endif
</tbody>
</table>
<a class="add_other_operations_name_button label label-inverse" style="color: #fff;"
id="add_other_operations_name_1" role="button"
onclick="add_uterus_operations_row('other_operations_details_table','other_operations_data')">{{
__('antenatal.add_other_operations_row') }}</a>
</div>
</div> <br>
@@ -0,0 +1,594 @@
@php
$physical_exam = json_decode($latest_existing_anc_clinic_followup?->physical_exam, true);
@endphp
<div class="row">
<div class="col-md-12 ">
<h4><span class="label label-warning">{{ __('maternity.this_pregnancy') }}</span></h4>
</div>
</div>
<div class="row">
<div class="col-sm-12">
{{-- row --}}
<div class="row">
{{-- col-1 --}}
<div class="form-group col-sm-3 col-md-3">
{{ Form::label('lmp', __('maternity.lmp')) }}
<div class="input-group">
{{ Form::text('lmp', isset($anc_registration) ? Carbon\Carbon::parse($anc_registration->lmp)->format('d/m/Y') : '' , ['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'lmp']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
{{-- col --}}
<div class="form-group col-sm-3 col-md-3">
{{ Form::label('accuracy', __('maternity.accuracy')) }}
{{ Form::select('accuracy', $accuracies, $anc_registration->accuracy ?? '', ['class' => 'form-control col-sm-12 compulsory', 'required']) }}
</div>
<div class="form-group col-sm-3 col-md-3">
{{ Form::label('weeks_of_amenorrhoea', __('antenatal.woa_weeks')) }}
<div class="input-group form-control border-0" id='weeks_of_amenorrhoea_text'>{!! $existing_maternity_inpatient_data->weeks_of_amenorrhoea ?? $anc_registration->woa_weeks ?? '' !!}</div>
{{ Form::hidden('weeks_of_amenorrhoea', $existing_maternity_inpatient_data->weeks_of_amenorrhoea ?? $anc_registration->woa_weeks ?? '', ['id' => 'weeks_of_amenorrhoea']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-sm-3 col-md-3">
{{ Form::label('edd', __('maternity.edd')) }}
{{-- Carbon\Carbon::parse($anc_registration->edd)->format('d/m/Y') --}}
@php
$edd_date = [];
$edd_date = isset($anc_registration->edd) ? Carbon\Carbon::parse($anc_registration->edd)->format('d/m/Y') : '';
@endphp
<div class="input-group">
{{ Form::text('edd', $edd_date , [
'class' => 'form-control compulsory',
'required', 'readonly', 'id' => 'edd']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
{{-- end row --}}
</div>
<div class="col-sm-3 col-md-3">
<div class="form-group">
{{ Form::label('refferal', __('maternity.us_scan_edd')) }}
<div class="input-group">
{{-- {{ Form::text('scan_edd', Carbon\Carbon::parse($latest_existing_anc_clinic_followup?->scan_edd)->format('d/m/Y') ?? '' , ['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'datepicker-autoclose7']) }}
--}}
<input class="form-control" required="" readonly="" name="scan_edd" type="text"
value="{{ $latest_existing_anc_clinic_followup?->scan_edd ? Carbon\Carbon::parse($latest_existing_anc_clinic_followup->scan_edd)->format('d/m/Y') : "" }}" id="datepicker-autoclose7">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('gestation_from_scan_view', __('maternity.current_gestation_from_scan')) }}
<input type="number" class="form-control" name="gestation_from_scan" id="gestation_from_scan"
value="{{ $latest_existing_anc_clinic_followup->gestation_from_scan ?? '' }}" >
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
{{ Form::label('refferal', __('maternity.referral_in_from')) }}
{{ Form::select('refferal', $referrals, $anc_registration->referral_from ?? '', ['class' => 'form-control col-sm-12 compulsory', 'required', 'id' => 'referral']) }}
</div>
<a data-toggle="modal" data-target="#referralsmodal">
<font size="1">{{ __('maternity.add_new_referral') }}</font>
</a>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-5">
{{ Form::label('pregnancy_complications', __('antenatal.complications')) }} <br>
<table class="table table-borderless">
<tbody>
<tr>
<td>
<input class="form-check-input" name="pregnancy_complications[]" type="checkbox"
id="weight_loss" value="1" @if (is_array(old('pregnancy_complications')) && in_array('1', old('pregnancy_complications'))) checked @endif>&nbsp;
<label class="form-check-label" for="weight_loss"> {{ __('maternity.weight_loss') }} </label>
</td>
<td>
<input class="form-check-input" name="pregnancy_complications[]" type="checkbox"
id="fever_one_month" value="2"
@if (is_array(old('pregnancy_complications')) && in_array('2', old('pregnancy_complications'))) checked @endif>&nbsp;
<label class="form-check-label" for="fever_one_month"> {{ __('maternity.fever_one_month') }}
</label>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="pregnancy_complications[]" type="checkbox"
id="diarrhoea_one_month" value="3"
@if (is_array(old('pregnancy_complications')) && in_array('3', old('pregnancy_complications'))) checked @endif>&nbsp;
<label class="form-check-label" for="diarrhoea_one_month">
{{ __('maternity.diarrhoea_one_month') }} </label>
</td>
<td>
<input class="form-check-input" name="pregnancy_complications[]" type="checkbox" id="pruritus"
value="4" @if (is_array(old('pregnancy_complications')) && in_array('4', old('pregnancy_complications'))) checked @endif>&nbsp;
<label class="form-check-label" for="pruritus"> {{ __('maternity.pruritus') }} </label>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="pregnancy_complications[]" type="checkbox"
id="vaginal_bleeding" value="5"
@if (is_array(old('pregnancy_complications')) && in_array('5', old('pregnancy_complications'))) checked @endif>&nbsp;
<label class="form-check-label" for="vaginal_bleeding"> {{ __('maternity.vaginal_bleeding') }}
</label>
</td>
<td class="form-check">
<input class="form-check-input" name="pregnancy_complications[]" type="checkbox" id="draining"
value="6" @if (is_array(old('pregnancy_complications')) && in_array('6', old('pregnancy_complications'))) checked @endif>&nbsp;
<label class="form-check-label" for="draining"> {{ __('maternity.draining') }} </label>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="other_pregnancy_complications" type="checkbox"
{{ in_array('3', explode(',', $anc_registration?->complications)) ? 'checked' : '' }}
id="show_other_pregnancy_complications_input" value="7">&nbsp;
<label class="form-check-label" id="other_pregnancy_complications" for="show_other_pregnancy_complications_input">{{ __('antenatal.others') }}</label>
<br><br>
{{-- add other medical presentations :input --}}
<div id="other_pregnancy_complications_input"
style="{{ in_array('3', explode(',', $anc_registration?->complications)) ? '' : 'display:none;' }}"
>
<input type="text" name="other_pregnancy_complications" placeholder="Specify"
value="{{ $anc_registration->other_complications ?? ''}}"
class="form-control">
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-2">
<div class="form-group">
{{ Form::label('iufd', __('maternity.iufd')) }} <br>
{{ Form::radio('iufd', 1, false, ['required', 'id' => 'show_iufd_alert_div']) }}
{{ __('maternity.yes') }} &nbsp;&nbsp;
{{ Form::radio('iufd', 0, false, ['required', 'id' => 'hide_iufd_alert_div']) }}
{{ __('maternity.no') }}
<div class="row" id="iufd_alert_div" style="display: none;">
<div class="alert alert-info "> {{ __('maternity.inform_medical_team_warning') }} </div>
</div>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
{{ Form::label('born_before_arrival', __('maternity.born_before_arrival')) }} <br>
{{ Form::radio('born_before_arrival', 1, false, ['required']) }} {{ __('maternity.yes') }}
&nbsp;&nbsp;
{{ Form::radio('born_before_arrival', 0, false, ['required']) }} {{ __('maternity.no') }}
</div>
</div>
<div class="col-md-3">
<div class="form-group">
{{ Form::label('progress', __('maternity.progress')) }}
{{ Form::select('progress', $maternity_progress, '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('delivery_recomendation', __('maternity.recomendation_of_delivery')) }}
{{ Form::textarea('delivery_recomendation', '', ['class' => 'form-control', 'rows' => '4']) }}
</div>
</div>
</div>
<div class="row">
{{-- physical examination --}}
<div class="col-md-3">
<label class="control-label strong">{{ __('maternity.physical_examination') }}</label>
<table class="table table-condensed">
<tr>
<td>
<input class="form-check-input" name="physical_examination[]" type="checkbox" id="show_breasts_physical_examination_input"
value="1"
@if (is_array(old('physical_examination')) && in_array('1', old('physical_examination')))
checked
@elseif (!empty($physical_exam['breasts']))
checked
@endif
> &nbsp;
<label class="form-check-label" for="show_breasts_physical_examination_input"> {{ __('antenatal.breasts') }} </label>
{{-- add breast deformity :input --}}
<div id="breasts_physical_examination_input" style="{{!empty($physical_exam['breasts']) ? '' : 'display:none; ' }} margin-top:10px;">
<input type="text" name="breasts_physical_examination_details" placeholder="Add description"
value="{{ $physical_exam['breasts'] ?? '' }}"
class="form-control">
</div>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="physical_examination[]" type="checkbox" id="show_legs_physical_examination_input"
value="2"
@if (is_array(old('physical_examination')) && in_array('2', old('physical_examination')))
checked
@elseif (!empty($physical_exam['legs']))
checked
@endif
>
&nbsp;
<label class="form-check-label" for="show_legs_physical_examination_input"> {{ __('antenatal.legs') }} </label>
{{-- add legs deformity :input --}}
<div id="legs_physical_examination_input" style="{{!empty($physical_exam['legs']) ? '' : 'display:none; ' }} margin-top:10px;">
<input type="text" name="legs_physical_examination_details" placeholder="Add description"
value="{{ $physical_exam['legs'] ?? '' }}"
class="form-control">
</div>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="physical_examination[]" type="checkbox"
id="show_heart_physical_examination_input" value="3"
@if (is_array(old('physical_examination')) && in_array('3', old('physical_examination')))
checked
@elseif(!empty($physical_exam['heart']))
checked
@endif
>&nbsp;
<label class="form-check-label" for="show_heart_physical_examination_input"> {{ __('antenatal.heart') }} </label>
{{-- add heart deformity :input --}}
<div id="heart_physical_examination_input" style="{{!empty($physical_exam['heart']) ? '' : 'display:none; ' }} margin-top:10px;">
<input type="text" name="heart_physical_examination_details" placeholder="Add description"
value="{{ $physical_exam['heart'] ?? '' }}"
class="form-control">
</div>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="physical_examination[]" type="checkbox"
id="show_lungs_physical_examination_input" value="4"
@if (is_array(old('physical_examination')) && in_array('4', old('physical_examination')))
checked
@elseif(!empty($physical_exam['lungs']))
checked
@endif
>&nbsp;
<label class="form-check-label" for="show_lungs_physical_examination_input"> {{ __('antenatal.lungs') }} </label>
{{-- add lungs :input --}}
<div id="lungs_physical_examination_input" style="{{!empty($physical_exam['lungs']) ? '' : 'display:none; ' }} margin-top:10px;">
<input type="text" name="lungs_physical_examination_details" placeholder="Add description"
value="{{ $physical_exam['lungs'] ?? '' }}"
class="form-control">
</div>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="physical_examination[]" type="checkbox"
id="show_teeth_physical_examination_input" value="5"
@if (is_array(old('physical_examination')) && in_array('5', old('physical_examination')))
checked
@elseif(!empty($physical_exam['teeth']))
checked
@endif
>&nbsp;
<label class="form-check-label" for="show_teeth_physical_examination_input"> {{ __('antenatal.teeth') }} </label>
{{-- add teeth :input --}}
<div id="teeth_physical_examination_input" style="{{!empty($physical_exam['teeth']) ? '' : 'display:none; ' }} margin-top:10px;">
<input type="text" name="teeth_physical_examination_details" placeholder="Add description"
value="{{ $physical_exam['teeth'] ?? '' }}"
class="form-control">
</div>
</td>
</tr>
<tr>
<td>
<input class="form-check-input" name="physical_examination[]" type="checkbox"
id="show_other_physical_examination_input" value="6"
@if (is_array(old('physical_examination')) && in_array('6', old('physical_examination')))
checked
@endif
>&nbsp;
<label class="form-check-label" for="show_other_physical_examination_input"> {{ __('antenatal.others') }}
</label>
{{-- add other physical_examination :input --}}
<div id="other_physical_examination_input" style="display: none; margin-top:10px;">
<input type="text" name="other_physical_examinations" placeholder="Specify others"
class="form-control">
</div>
</td>
</tr>
</table>
</div>
<div class="col-sm-9">
<label class="control-label strong">{{ __('maternity.mother_current_obstetric_risk') }}</label>
<div class="controls">
<table class="table table-condensed">
{{-- row 1 --}}
<tr>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="history_aph_pregnancy" value="1"
@if (is_array(old('obstetric_risk_factors')) && in_array('1', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="history_aph_pregnancy">
{{ __('maternity.history_aph_pregnancy') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="epilepsy" value="2" @if (is_array(old('obstetric_risk_factors')) && in_array('2', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="epilepsy">
{{ __('maternity.epilepsy') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="severe_pre_eclampsia" value="3"
@if (is_array(old('obstetric_risk_factors')) && in_array('3', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="severe_pre_eclampsia">
{{ __('maternity.severe_pre_eclampsia') }} </label>
</td>
</tr>
{{-- row 2 --}}
<tr>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="history_convulsion_pregnancy" value="4"
@if (is_array(old('obstetric_risk_factors')) && in_array('4', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="history_convulsion_pregnancy">
{{ __('maternity.history_convulsion_pregnancy') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="polyhydramnios" value="5"
@if (is_array(old('obstetric_risk_factors')) && in_array('5', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="polyhydramnios">
{{ __('maternity.polyhydramnios') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="premature_rupture_of_membranes" value="6"
@if (is_array(old('obstetric_risk_factors')) &&
in_array('6', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="premature_rupture_of_membranes">
{{ __('maternity.premature_rupture_of_membranes') }} </label>
</td>
</tr>
{{-- row 3 --}}
<tr>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="diabetes_mellitus" value="7"
@if (is_array(old('obstetric_risk_factors')) && in_array('7', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="diabetes_mellitus">
{{ __('maternity.diabetes_mellitus') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="multiple_pregnancy" value="8"
@if (is_array(old('obstetric_risk_factors')) && in_array('8', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="multiple_pregnancy">
{{ __('maternity.multiple_pregnancy') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="pph" value="9"
@if (is_array(old('obstetric_risk_factors')) && in_array('9', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="pph">
{{ __('maternity.pph') }} </label>
</td>
</tr>
{{-- row 4 --}}
<tr>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="cardiac_disease" value="10"
@if (is_array(old('obstetric_risk_factors')) && in_array('10', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="cardiac_disease">
{{ __('maternity.cardiac_disease') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="malpresentation" value="11"
@if (is_array(old('obstetric_risk_factors')) && in_array('11', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="malpresentation">
{{ __('maternity.malpresentation') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="asthma" value="12" @if (is_array(old('obstetric_risk_factors')) && in_array('12', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="asthma">
{{ __('maternity.asthma') }} </label>
</td>
</tr>
{{-- row 5 --}}
<tr>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="poor_obstetric_history" value="13"
@if (is_array(old('obstetric_risk_factors')) && in_array('13', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="poor_obstetric_history">
{{ __('maternity.poor_obstetric_history') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="pre_term_labour" value="14"
@if (is_array(old('obstetric_risk_factors')) && in_array('14', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="pre_term_labour">
{{ __('maternity.pre_term_labour') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="sickle_cell_disease" value="15"
@if (is_array(old('obstetric_risk_factors')) && in_array('15', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="sickle_cell_disease">
{{ __('maternity.sickle_cell_disease') }} </label>
</td>
</tr>
{{-- row 6 --}}
<tr>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="previous_csections" value="16"
@if (is_array(old('obstetric_risk_factors')) && in_array('16', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="previous_csections">
{{ __('maternity.previous_csections') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="polio" value="17" @if (is_array(old('obstetric_risk_factors')) && in_array('17', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="polio">
{{ __('maternity.polio') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="group_b_streptococcus_colonization" value="18"
@if (is_array(old('obstetric_risk_factors')) &&
in_array('18', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="group_b_streptococcus_colonization">
{{ __('maternity.group_b_streptococcus_colonization') }} </label>
</td>
</tr>
{{-- row 7 --}}
<tr>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="woman_advanced_age" value="19"
@if (is_array(old('obstetric_risk_factors')) && in_array('19', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="woman_advanced_age">
{{ __('maternity.woman_advanced_age') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="mental_illness" value="20"
@if (is_array(old('obstetric_risk_factors')) && in_array('20', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="mental_illness">
{{ __('maternity.mental_illness') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="adolescent_pregnancy" value="21"
@if (is_array(old('obstetric_risk_factors')) && in_array('21', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="adolescent_pregnancy">
{{ __('maternity.adolescent_pregnancy') }} </label>
</td>
</tr>
{{-- row 8 --}}
<tr>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="hypertension" value="22"
@if (is_array(old('obstetric_risk_factors')) && in_array('22', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="hypertension">
{{ __('maternity.hypertension') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="kidney_disease" value="23"
@if (is_array(old('obstetric_risk_factors')) && in_array('23', old('obstetric_risk_factors'))) checked @endif>&nbsp;
<label class="form-check-label" for="kidney_disease">
{{ __('maternity.kidney_disease') }} </label>
</td>
<td>
<input class="form-check-input" name="obstetric_risk_factors[]" type="checkbox"
id="show_other_obstetric_risk_factors_input" value="24"
>&nbsp;
<label class="form-check-label" for="show_other_obstetric_risk_factors_input">
{{ __('maternity.other') }} </label>
{{-- add other obstetric risk factor:input --}}
<div id="other_obstetric_risk_factors_input" style="display: none; margin-top:10px;">
<input type="text" name="other_obstetric_risk_factors" placeholder="Add risk factor"
class="form-control">
</div>
</td>
</tr>
</table>
</div>
</div>
</div>