CrestRoad/laravel/resources/views/pocspirometry/listpatient.blade.php

168 lines
8.6 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" />
<link href="{{ asset('assets/libs/datatables/datatables.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-12">
<div class="card 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-5 text-center">
<h4>POC Spirometer Patients</h4>
</div>
<div class="col-md-4">
<a href="{{ url('pocuser/' . $user_info->id) }}" class="btn btn-small btn-primary float-end">Profile</a>
<a href="/exportpocpatient" class="btn btn-small btn-primary float-end me-2">Export</a>
<a href="/addpocpatient" class="btn btn-small btn-primary float-end me-2">Add Patient</a>
<a href="/pocfeedback" class="btn btn-small btn-primary float-end me-2">Feedback</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
<hr />
<table id="list-page-datatable" class="table w-100 nowrap">
<thead>
<tr>
<th>Edit</th>
<th>Patient No</th>
<th>Age</th>
<th>Gender</th>
<th>Presenting with respiratory symptoms</th>
<th>Past or current H/O smoking</th>
<th>Past or current H/O exposure to Indoor or Ambient air pollution</th>
<th>Past or current H/O Atopy</th>
<th>Family H/O Atopy</th>
<th>Clinical Diagnosis</th>
<th>Whether Spirometry advised? </th>
<th>If yes, Diagnosis after Spirometry</th>
</tr>
</thead>
<tbody
class="{{ !empty($row->clinical_diagnosis) && (($row->whether_spirometry_advised == 'yes' && !empty($row->if_yes_diagnosis_after_spirometry)) || $row->whether_spirometry_advised == 'no') ? 'text-success' : '' }}">
@foreach ($data as $row)
<tr class="">
<td>
<a href="{{ url('editpocpatient/' . $row->id) }}"
class="btn btn-xs btn-primary">Edit</a>
</td>
<td>{{ $row->patient_no }}</td>
<td>{{ $row->age }}</td>
<td>{{ $row->gender }}</td>
<td>{{ $row->presenting_with_respiratory_symptoms }}</td>
<td>{{ $row->past_or_current_ho_smoking }}</td>
<td>{{ $row->past_or_current_ho_exposure_to_indoor_or_ambient_air_pollution }}
</td>
<td>{{ $row->past_or_current_ho_atopy }}</td>
<td>{{ $row->family_ho_atopy }}</td>
<td>{{ $row->clinical_diagnosis }}</td>
<td>{{ $row->whether_spirometry_advised }}</td>
<td>
@if ($row->whether_spirometry_advised == 'yes' && $row->if_yes_diagnosis_after_spirometry == '')
<a href="{{ url('editpocpatient/' . $row->id) }}"
class="btn btn-xs btn-danger">
<b>Pending</b></a>
@else
{{ $row->if_yes_diagnosis_after_spirometry }}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</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/datatables/datatables.min.js') }}"></script>
<script src="{{ asset('assets/libs/flatpickr/flatpickr.min.js') }}"></script>
<script src="https://cdn.datatables.net/buttons/2.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.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');
}
})
$('#list-page-datatable').DataTable({
stateSave: true,
"scrollX": true,
"language": {
"paginate": {
"previous": "<i class='mdi mdi-chevron-left'>",
"next": "<i class='mdi mdi-chevron-right'>"
}
},
"drawCallback": function() {
$('.dataTables_paginate > .pagination').addClass('pagination-rounded');
},
buttons: [
'pdf', 'print'
],
"createdRow": function(row, data, dataIndex) {
if (data[9] != '' && ((data[10] == 'yes' && data[11] != '') || data[10] == 'no')) {
$(row).addClass('table-success');
}
}
});
$("#btn-date-filter").click(function() {
$("#date_filter_modal").modal("show")
})
});
</script>
</body>
</html>