343 lines
22 KiB
PHP
343 lines
22 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
@include('layouts.shared/title-meta', ['title' => 'Register & Signup'])
|
|
@include('layouts.shared/head-css', ['mode' => $mode ?? '', 'demo' => $demo ?? ''])
|
|
<link href="{{ asset('assets/libs/flatpickr/flatpickr.min.css') }}" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
|
|
<body class="loading authentication-bg authentication-bg-pattern" style="background-color: rgb(65, 154, 154);">
|
|
<div class="account-pages mt-2 mb-5">
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8">
|
|
<div class="card bg-pattern border">
|
|
<div class="card-body p-4">
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<img src="{{ asset('/images/crest-logo.jpeg') }}" class="img-fluid"
|
|
style="max-height: 70px;">
|
|
</div>
|
|
<div class="col-md-6 text-center">
|
|
<h4>Add patient for POC Spirometry</h4>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<a href="/pocpatient" class="btn btn-small btn-dark float-end">Back to Patients</a>
|
|
</div>
|
|
</div>
|
|
@if (session('error'))
|
|
<div class="alert alert-danger">{{ session('error') }}</div>
|
|
@endif
|
|
@if (session('success'))
|
|
<div class=" alert alert-success">{{ session('success') }}
|
|
</div>
|
|
@endif
|
|
@if (sizeof($errors) > 0)
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li class="text-danger">{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
@endif
|
|
<form method="POST" action="{{ route('submitpatientpoc') }}" class="mt-2">
|
|
@csrf
|
|
<input type="hidden" name="edit_record_id"
|
|
value="{{ isset($data->id) ? $data->id : '' }}">
|
|
{{-- <input type="hidden" name="position" value="{{$user->hierarchy_info->code}}"> --}}
|
|
<hr>
|
|
|
|
<div class="row mb-3">
|
|
<label for="patient_no" class="col-4 col-xl-3 col-form-label">Patient No <span
|
|
class="text-danger">*</span></label>
|
|
<div class="col-8 col-xl-9">
|
|
<input type="text" class="form-control" id="patient_no" name="patient_no"
|
|
value="{{ isset($data->patient_no) ? $data->patient_no : '' }}" required>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<label for="age" class="col-4 col-xl-3 col-form-label">Age <span
|
|
class="text-danger">*</span></label>
|
|
<div class="col-8 col-xl-9">
|
|
<input type="number" class="form-control" id="age" name="age"
|
|
value="{{ isset($data->age) ? $data->age : '' }}" required>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-6">
|
|
<label class="form-check-label" for="gender">Gender<span
|
|
class="text-danger">*</span></label>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="male" id="gender"
|
|
name="gender"
|
|
{{ isset($data->gender) ? ($data->gender == 'male' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="male">Male</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="female" id="gender"
|
|
name="gender"
|
|
{{ isset($data->gender) ? ($data->gender == 'female' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="female">Female</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-6">
|
|
<label class="form-check-label"
|
|
for="presenting_with_respiratory_symptoms">Presenting with respiratory
|
|
symptoms<span class="text-danger">*</span></label>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="yes"
|
|
id="presenting_with_respiratory_symptoms"
|
|
name="presenting_with_respiratory_symptoms"
|
|
{{ isset($data->presenting_with_respiratory_symptoms) ? ($data->presenting_with_respiratory_symptoms == 'yes' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="yes">Yes</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="no"
|
|
id="presenting_with_respiratory_symptoms"
|
|
name="presenting_with_respiratory_symptoms"
|
|
{{ isset($data->presenting_with_respiratory_symptoms) ? ($data->presenting_with_respiratory_symptoms == 'no' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="no">No</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="presenting_questions">
|
|
<div class="row mb-3">
|
|
<div class="col-6">
|
|
<label class="form-check-label" for="past_or_current_ho_smoking">Past or
|
|
current
|
|
H/O smoking<span class="text-danger">*</span></label>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="yes"
|
|
id="past_or_current_ho_smoking" name="past_or_current_ho_smoking"
|
|
{{ isset($data->past_or_current_ho_smoking) ? ($data->past_or_current_ho_smoking == 'yes' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="yes">Yes</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="no"
|
|
id="past_or_current_ho_smoking" name="past_or_current_ho_smoking"
|
|
{{ isset($data->past_or_current_ho_smoking) ? ($data->past_or_current_ho_smoking == 'no' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="no">No</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-6">
|
|
<label class="form-check-label"
|
|
for="past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution">Past
|
|
or current H/O exposure to Indoor or Ambient air pollution<span
|
|
class="text-danger">*</span></label>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="yes"
|
|
id="past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution"
|
|
name="past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution"
|
|
{{ isset($data->past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution) ? ($data->past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution == 'yes' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="yes">Yes</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="no"
|
|
id="past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution"
|
|
name="past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution"
|
|
{{ isset($data->past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution) ? ($data->past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution == 'no' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="no">No</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-6">
|
|
<label class="form-check-label" for="past_or_current_ho_atopy">Past or
|
|
current
|
|
H/O Atopy<span class="text-danger">*</span></label>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="yes"
|
|
id="past_or_current_ho_atopy" name="past_or_current_ho_atopy"
|
|
{{ isset($data->past_or_current_ho_atopy) ? ($data->past_or_current_ho_atopy == 'yes' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="yes">Yes</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="no"
|
|
id="past_or_current_ho_atopy" name="past_or_current_ho_atopy"
|
|
{{ isset($data->past_or_current_ho_atopy) ? ($data->past_or_current_ho_atopy == 'no' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="no">No</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-6">
|
|
<label class="form-check-label" for="family_ho_atopy">Family H/O
|
|
Atopy<span class="text-danger">*</span></label>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="yes"
|
|
id="family_ho_atopy" name="family_ho_atopy"
|
|
{{ isset($data->family_ho_atopy) ? ($data->family_ho_atopy == 'yes' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="yes">Yes</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="no"
|
|
id="family_ho_atopy" name="family_ho_atopy"
|
|
{{ isset($data->family_ho_atopy) ? ($data->family_ho_atopy == 'no' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="no">No</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<label for="clinical_diagnosis" class="col-4 col-xl-3 col-form-label">Clinical
|
|
Diagnosis</label>
|
|
<div class="col-8 col-xl-9">
|
|
<input type="text" class="form-control" id="clinical_diagnosis"
|
|
name="clinical_diagnosis"
|
|
value="{{ isset($data->clinical_diagnosis) ? $data->clinical_diagnosis : '' }}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-6">
|
|
<label class="form-check-label" for="whether_spirometry_advised">Whether
|
|
Spirometry advised?</label>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="yes"
|
|
id="whether_spirometry_advised_yes"
|
|
name="whether_spirometry_advised"
|
|
{{ isset($data->whether_spirometry_advised) ? ($data->whether_spirometry_advised == 'yes' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="yes">Yes</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input type="radio" class="form-check-input" value="no"
|
|
id="whether_spirometry_advised_no"
|
|
name="whether_spirometry_advised"
|
|
{{ isset($data->whether_spirometry_advised) ? ($data->whether_spirometry_advised == 'no' ? 'checked' : '') : '' }}>
|
|
<label class="form-check-label" for="no">No</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<label for="if_yes_diagnosis_after_spirometry"
|
|
class="col-4 col-xl-3 col-form-label">If yes, Diagnosis after
|
|
Spirometry</label>
|
|
<div class="col-8 col-xl-9">
|
|
<input type="text" class="form-control"
|
|
id="if_yes_diagnosis_after_spirometry"
|
|
name="if_yes_diagnosis_after_spirometry"
|
|
value="{{ isset($data->if_yes_diagnosis_after_spirometry) ? $data->if_yes_diagnosis_after_spirometry : '' }}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="text-center d-grid">
|
|
<button class="btn btn-success" type="submit" style="max-width:30%"> Submit
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div> <!-- end card-body -->
|
|
</div>
|
|
<!-- end card -->
|
|
</div> <!-- end col -->
|
|
</div>
|
|
<!-- end row -->
|
|
</div>
|
|
<!-- end container -->
|
|
</div>
|
|
<!-- end page -->
|
|
|
|
@include('layouts.shared/footer-script')
|
|
<script src="{{ asset('assets/libs/flatpickr/flatpickr.min.js') }}"></script>
|
|
<script type="text/javascript">
|
|
$('.datepicker').flatpickr();
|
|
$('#wrapper-other-specialization').hide()
|
|
$('#specialization').change(function() {
|
|
if ($(this).val() == 'Other') {
|
|
$('#wrapper-other-specialization').show()
|
|
$('#other-specialization').prop('required', true);
|
|
} else {
|
|
$('#wrapper-other-specialization').hide()
|
|
$('#other-specialization').removeAttr('required');
|
|
}
|
|
})
|
|
|
|
jQuery(document).ready(function() {
|
|
$('#if_yes_diagnosis_after_spirometry').hide()
|
|
$('label[for=if_yes_diagnosis_after_spirometry]').hide()
|
|
|
|
$('input[type=radio][name=whether_spirometry_advised]').on('change', function() {
|
|
if ($(this).val() == 'yes') {
|
|
$('#if_yes_diagnosis_after_spirometry').show()
|
|
$('label[for=if_yes_diagnosis_after_spirometry]').show()
|
|
|
|
} else {
|
|
$('#if_yes_diagnosis_after_spirometry').val('');
|
|
$('#if_yes_diagnosis_after_spirometry').hide();
|
|
$('label[for=if_yes_diagnosis_after_spirometry]').hide()
|
|
|
|
}
|
|
})
|
|
|
|
@if (isset($data->whether_spirometry_advised))
|
|
@if ($data->whether_spirometry_advised == 'yes')
|
|
{
|
|
$('#if_yes_diagnosis_after_spirometry').show()
|
|
$('label[for=if_yes_diagnosis_after_spirometry]').show()
|
|
|
|
}
|
|
@elseif ($data->whether_spirometry_advised == 'no') {
|
|
$('#if_yes_diagnosis_after_spirometry').hide()
|
|
$('label[for=if_yes_diagnosis_after_spirometry]').hide()
|
|
}
|
|
@else
|
|
{
|
|
$('#if_yes_diagnosis_after_spirometry').hide()
|
|
$('label[for=if_yes_diagnosis_after_spirometry]').hide()
|
|
|
|
}
|
|
@endif
|
|
@endif
|
|
|
|
$('#presenting_questions').hide();
|
|
$('input[type=radio][name=presenting_with_respiratory_symptoms]').change(function() {
|
|
if ($(this).val() == 'yes') {
|
|
$('#presenting_questions').show();
|
|
} else if ($(this).val() == 'no') {
|
|
$('#presenting_questions').hide();
|
|
} else {
|
|
$('#presenting_questions').hide();
|
|
}
|
|
})
|
|
|
|
@if (isset($data->presenting_with_respiratory_symptoms))
|
|
@if ($data->presenting_with_respiratory_symptoms == 'yes')
|
|
{
|
|
$('#presenting_questions').show();
|
|
}
|
|
@else
|
|
{
|
|
$('#presenting_questions').hide();
|
|
}
|
|
@endif
|
|
@endif
|
|
})
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|