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,351 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ base_path('public/uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'CHI Membership Card - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
{{-- <link href="{{ base_path('public/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet"> --}}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style style="text-css">
/* body{
}
thead {
}
tfoot {
}
tr {
}
th{
font-weight: bolder;
font-size: 22px;
color: #fff;
}
td{
font-size: 24px;
padding-top: 5px;
color: #fff;
} */
/* new card */
.a8-page {
width: 8.5cm; /* A8 width */
height: 5.4cm; /* A8 height */
/* background-color: #f8f9fa; */
margin: auto; /* Center the A8 page within the container */
border: 1px solid #dee2e6; /* Light border */
border-radius: 5px; /* Rounded corners */
padding: 5px; /* Reduced padding to fit content */
box-sizing: border-box; /* Include padding and border in element's total width and height */
overflow: hidden; Hide overflow
font-size: 10px; /* Adjust font size to fit content */
}
.container {
height: 100vh; /* Full viewport height */
display: flex;
justify-content: center;
align-items: center;
}
.medical-card-title {
font-size: 1.2em;
font-weight: bold;
text-align: center;
margin-bottom: 5px; /* Reduced margin to fit content */
}
.medical-card-content p {
margin: 2px 0; /* Reduced margins to fit content */
}
</style>
</head>
<body>
<div class="container">
<div class="row">
{{-- column --}}
<div class="col">
<div class="a8-page">
<div class="row" style="padding:3px; background-color:#eaeef3;" >
<div class="col-12 col-md">
<img style="max-width: 100px; max-height: 25px;" src="{{ asset($hospitalInfo->logo) }}" class="" alt="Responsive image">
</div>
<div class="col-12 col-md text-right" style="font-size:9px; margin-top:8px; font-weight:600;">PATIENT CARD</div>
</div>
<hr style="margin-top:5px;">
<div class="row">
<div class="col-12 col-md">
<p style="font-size:6px; margin-top:-10px;"> NAME</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;"> AREBAHOONA MBABAZI ANGELLA MBABAZI OTHER NAME</p>
</div>
</div>
<div class="row">
<div class="col-12 col-md">
<p style="font-size:6px; margin-top:-10px;"> PATIENT NUMBER</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;"> SCH-24-01290000</p>
</div>
<div class="col-12 col-md">
<p style="font-size:6px; margin-top:-10px;"> VILLAGE</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;"> NAKAPIRIPIRITI WARD</p>
</div>
</div>
<div class="row" style="margin-top:-10px;">
<div class="col-12 col-md">
<p style="font-size:6px; "> DISTRICT</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;">KABERAMAIDO DISTRICT</p>
</div>
<div class="col-12 col-md">
<p style="font-size:6px; "> BARCODE</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;">
<img style="max-width: 100%; max-height: 20px; " src="{{ asset($hospitalInfo->lab_stamp) }}" class="" alt="Responsive image">
</p>
</div>
</div>
<div class="row" style="margin-top:-8px;">
<div class="col-12 col-md">
<p style="font-size:8px;">This card is a property of Kisiizi Medical center, if found please return to the facility.</p>
</div>
</div>
<hr style="margin-top:-15px;">
<div class="row">
<div class="col-12 col-md-8" style="margin-top:-6px;">
<p style="font-size:7px; "><i>Supported by Streamline ; www.streamlinehealth.org </i></p>
</div>
<div class="col-12 col-md-4" style="margin-top:-17px;">
<img style="max-width: 100px; max-height: 20px;" src="{{ asset($hospitalInfo->stamp) }}" class="" alt="Responsive image">
</div>
</div>
</div>
</div>
{{-- column --}}
{{-- <div class="col">
<div class="a8-page">
<div class="row" style="padding:3px; background-color:#eaeef3;" >
<div class="col-12 col-md">
<img style="max-width: 100px; max-height: 25px;" src="{{ asset($hospital_details->logo) }}" class="" alt="Responsive image">
</div>
<div class="col-12 col-md text-right" style="font-size:9px; margin-top:8px; font-weight:600;">PATIENT CARD</div>
</div>
<hr style="margin-top:5px;">
<div class="row">
<div class="col-12 col-md">
<p style="font-size:6px; margin-top:-10px;"> NAME</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;"> AREBAHOONA MBABAZI ANGELLA MBABAZI OTHER NAME</p>
</div>
</div>
<div class="row">
<div class="col-12 col-md">
<p style="font-size:6px; margin-top:-10px;"> PATIENT NUMBER</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;"> SCH-24-01290000</p>
</div>
<div class="col-12 col-md">
<p style="font-size:6px; margin-top:-10px;"> VILLAGE</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;"> NAKAPIRIPIRITI WARD</p>
</div>
</div>
<div class="row" style="margin-top:-10px;">
<div class="col-12 col-md">
<p style="font-size:6px; "> DISTRICT</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;">KABERAMAIDO DISTRICT</p>
</div>
<div class="col-12 col-md">
<p style="font-size:6px; "> BARCODE</p>
<p style="font-size:9px; margin-top:-15px; font-weight:600;">
<img style="max-width: 100%; max-height: 20px; " src="{{ asset($hospital_details->lab_stamp) }}" class="" alt="Responsive image">
</p>
</div>
</div>
<div class="row" style="margin-top:-8px;">
<div class="col-12 col-md">
<p style="font-size:8px;">This card is a property of Kisiizi Medical center, if found please return to the facility.</p>
</div>
</div>
<hr style="margin-top:-15px;">
<div class="row">
<div class="col-12 col-md-8" style="margin-top:-6px;">
<p style="font-size:7px; "><i>Supported by Streamline ; www.streamlinehealth.org </i></p>
</div>
<div class="col-12 col-md-4" style="margin-top:-17px;">
<img style="max-width: 100px; max-height: 20px;" src="{{ asset($hospital_details->stamp) }}" class="" alt="Responsive image">
</div>
</div>
</div>
</div> --}}
</div>
</div>
{{-- OLD VIEW --}}
{{-- <div class="container-fluid">
<div class="row">
<div class="col-12">
<div style="background-color: rgb(43, 116, 91); color:#fff">
<div class="hospital-logo" style="padding-top: 10px;">
@include('layouts.header_pdf_print')
</div>
<div class="row" style="padding: 30px;">
<div class="col-12" style="padding-top: 10px;">
<table>
<tr>
<td><u>NAME</u></td>
<td style="padding-left: 15px;"><u>SEX</u></td>
</tr>
<tr>
<th>
{{ get_full_name($patient->id, "id", "first_name", "last_name", "patients") }}
</th>
<th style="padding-left: 15px;">
{{ $patient->gender == 1 ? "MALE" : "FEMALE" }}
</th>
</tr>
<tr>
<td></td>
<td style="padding-left: 15px;"></td>
</tr>
<tr>
<td><u>Stre@mline NUMBER</u></td>
<td style="padding-left: 15px;"><u>DATE OF BIRTH</u></td>
</tr>
<tr>
<th>
{{ $patient->number }}
</th>
<th style="padding-left: 15px;">
{{ streamline_date($patient->date_of_birth) }}
</th>
</tr>
<tr>
<td></td>
<td style="padding-left: 10px;"></td>
</tr>
<tr>
<td><u>NIN</u></td>
<td style="padding-left: 10px;"><u>HOLDER'S SIGNATURE</u></td>
</tr>
<tr>
<th>
{{ $patient->national_id }}
</th>
<th style="padding-left: 10px;">
</th>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<br><br><br>
<div class="row">
<div class="col-12">
<div style="background-color: rgb(43, 116, 91); padding:10px; padding-top: 120px;">
<table align="center">
<tr>
<td>HOST HEALTH FACILITY &nbsp;&nbsp;</td>
<td>
{{ $hospitalInfo->name }}
</td>
</tr>
<tr>
<td>VILLAGE</td>
<td>
{{ get_name(get_name($patient->id, "id", "village_id", "patients"), "id", "name", "villages") }}
</td>
</tr>
<tr>
<td>DISTRICT</td>
<td>
{{ get_name($patient->district_id, "id", "name", "districts") }}
</td>
</tr>
<tr>
<td colspan="2" style="background-color: #fff">
{{ getDNS1DBarcodePNGOtherOption(sprintf("%04u", $patient->id)) }}
<br>
<h4 style="color: black">{{ sprintf("%04u", $patient->id) }}</h4>
</td>
</tr>
</table>
<div style="text-align: center; color: #fff; padding: 10px; font-size: 22px;">
This card should only be used for identification at a Stre@mline network hospital.
</div>
</div>
</div>
</div>
</div> --}}
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
@@ -0,0 +1,401 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('layout.patient_cards') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('patients.dashboard') }}</a></li>
<li><a href="{{ route('patients.index') }}">{{ __('patients.patients') }}</a></li>
<li >{{ __('patients.print_patients_cards') }}</li>
</ol>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-12 col-md">
<a href="{{ route('patients.create') }}" class="btn btn-success"><i class="fa fa-plus"></i> {{ __('patients.add_patient') }} </a>
<a href="{{ route('patients.index') }}" class="btn btn-info"> <i class="fa fa-eye"></i> {{ __('patients.view_patients') }} </a>
</div>
<div class="col-12 col-md" style="text-align:right;">
<a href="{{ route('patients.inactive') }}" class="btn btn-danger"><i class="fa fa-eye-slash"></i> {{ __('patients.inactive_patients') }} </a>
</div>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default" style="border-radius: 5px;">
<div class="panel-body">
{{-- Search Patient Cards --}}
<form action="{{ route('patients.search_patient_cards_to_print') }}" method="POST" >
@csrf
<div class="row">
<div class="col-md">
<div class="form-group">
<label>{{ __('patients.select_registered_date') }}:</label>
<select class="form-control required" name="dates" id="dates">
{{-- <option value="null">--Select--</option> --}}
<option value="today">{{ __('patients.today') }}</option>
<option value="yesterday">{{ __('patients.yesterday') }}</option>
<option value="custom_date">{{ __('patients.custom_date') }}</option>
<option value="custom_date_range">{{ __('patients.date_range') }}</option>
</select>
</div>
</div>
<div class="col-md" id="sDate" style="display: none;">
<div class="form-group">
<label>{{ __('patients.start_date') }}:</label>
<div class="input-group">
<input type="text" name="start_date" id="start_date" class="form-control">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md" id="eDate" style="display: none;">
<div class="form-group">
<label>{{ __('patients.end_date') }}:</label>
<div class="input-group">
<input type="text" name="end_date" id="end_date" class="form-control">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md">
<label>{{ __('patients.select_patients') }}:</label>
<div class="input-group">
<select class="form-control" name="number[]" id="patient_number" multiple></select>
</div>
</div>
<div class="col-md">
<div class="form-group" style="margin-top: 25px;">
<button type="submit" class="btn btn-success"><i class="fa fa-paper-plane"></i> {{ __('patients.submit') }}</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
@include('flash::message')
@php
use \Carbon\Carbon;
$today = Carbon::now();
$patients_current_date = streamline_date($today);
@endphp
{{-- Process patient cards form --}}
<form id="patient_cards_form" action="{{ route('patients.print_patients_cards') }}" method="POST">
@csrf
<div class="row">
<div class="col-12 col-md" style="text-align:left; margin-bottom:10px;">
<h5 style="color:rgb(27, 144, 223);">{{ __('patients.patients_registered_today') }}</h5>
</div>
<div class="col-12 col-md" style="text-align:right; margin-bottom:10px;">
@if (Auth::user()->can('print-patient-cards'))
<button type="submit" id="submit-button" class="btn btn-rounded" style="background-color:purple; color:#ffffff;"><i class="fa fa-print"></i> {{ __('patients.print_cards') }}</button>
@endif
</div>
</div>
<div class="row">
<div class="table-responsive" style="padding-right:15px; padding-left:15px;">
<table class="table success-table table-sm table-striped table-hover " style="color: white; border: 1px solid #00c292;">
<thead >
<tr style="background-color: #00c292; color: white;">
<th style="color: white;">{{ __('patients.hash') }}</th>
<th style="color: white;">{{ __('patients.patient_number') }}</th>
<th style="color: white;">{{ __('patients.full_names') }}</th>
<th style="color: white;">{{ __('patients.gender') }}</th>
<th style="color: white;">{{ __('patients.age') }}</th>
<th style="color: white;">{{ __('patients.phone_number') }}</th>
<th style="color: white;">{{ __('patients.category') }}</th>
<th style="color: white;">{{ __('patients.residence') }}</th>
</tr>
</thead>
<tbody>
@forelse ( $patients as $key => $patient )
@php
$village = \Streamline\Models\Village::find($patient->village_id);
$patient_category = \Streamline\Models\PatientCategory::find($patient->category_id);
@endphp
<tr>
<td><input type="checkbox" value="{{ $patient->id }}" name="patients[]" class="patient_cards_checkbox"></td>
<td>{{ $patient->number ?? '' }}</td>
<td>{!! insurance_flag($patient->id) !!}</td>
<td>
@if($patient->gender == 1)
{{ __('patients.male') }}
@else
{{ __('patients.female') }}
@endif
</td>
<td>{{ get_patients_age($patient->date_of_birth) }}</td>
<td>{{ $patient->phone }}</td>
<td>{{ $patient_category->name ?? '' }}</td>
<td>{{ $village->name ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="3" ></td>
<td colspan="3" style="color:red;" >
No Patients Found!
</td>
<td colspan="2" ></td>
</tr>
@endforelse
</tbody>
</table>
<center>
{{-- {{ $patients->links() }} --}}
{{ $patients->appends(Request::except('page'))->links() }}
</center>
</div>
</div>
</form>
</div>
@endsection
@push('scripts')
<!-- Typehead Plugin JavaScript -->
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const checkboxes = document.querySelectorAll('.patient_cards_checkbox');
const form = document.getElementById('patient_cards_form');
const maxChecked = 10;
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', function() {
const checkedCount = document.querySelectorAll('.patient_cards_checkbox:checked').length;
if (checkedCount > maxChecked) {
alert(`You can only select up to ${maxChecked} patients.`);
// this.disabled = true;
this.checked = false;
}
});
});
form.addEventListener('submit', function(event) {
const checkedCount = document.querySelectorAll('.patient_cards_checkbox:checked').length;
if (checkedCount === 0) {
event.preventDefault();
alert('Please select at least one patient.');
}
});
});
</script>
<script type="text/javascript">
const todays_date = "Patients Registered On " + "{{ $patients_current_date }}";
// disable data tables pagination
$('.table').DataTable({
dom: 'Bfrtip',
pageLength: 200,
paging: false,
info: false,
buttons: [
'copy',
{extend: 'csv',
message: "Patients Registered",
title: todays_date,
exportOptions: {
columns: [ 1, 2, 3, 4, 5, 6,7]
},
},
{extend: 'excel',
message: "Patients Registered",
title: todays_date,
exportOptions: {
columns: [ 1, 2, 3, 4, 5, 6,7]
},
sheetName: "Patients Registered"
},
{extend: 'pdf',
message: "Patients Registered",
title: todays_date,
orientation: 'portrait',
pageSize: 'LETTER',
exportOptions: {
columns: [ 1, 2, 3, 4, 5, 6,7]
},
customize: function (doc) {
doc.defaultStyle.fontSize = 10;
}
},
{extend: 'print',
message: "Patients Registered",
title: todays_date,
exportOptions: {
columns: [ 1, 2, 3, 4, 5, 6,7]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}
]
});
</script>
<script type="text/javascript">
$('#patient_number').change(function () {
let id = $('#patient_number').val();
$('#patient_id').val(id);
});
$('#patient_number').select2({
placeholder: 'Search by patient details (names and number)',
ajax: {
url: '/patients/search_patient_by_name_number',
dataType: 'json',
delay: 250,
processResults: function (data) {
return {
results: $.map(data, function (item) {
return {
text: item.first_name + " " + item.last_name + " (" + item.number + ")",
id: item.id
}
})
};
},
cache: true
}
});
$('#dates').change(function (e) {
if($(this).val() === "custom_date"){
$("#eDate").hide();
$("#sDate").show();
}else if($(this).val() === "custom_date_range"){
$("#sDate").show();
$("#eDate").show();
}else{
$("#eDate").hide();
$("#sDate").hide();
}
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#staff_member').select2({
placeholder: "-- select --"
});
$('#staff_member_accountant').select2({
placeholder: "-- select --"
});
</script>
@endpush
@push('styles')
<style type="text/css">
.color-bordered-table.success-bordered-table {
border-top: 0px;
}
</style>
@endpush
@@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Patient Card</title>
<style>
@page {
/* margin: 5;
padding:0;
size:A4 potrait;
text-align:center; */
margin-left:35;
margin-top:12;
margin-right:0;
margin-bottom:0;
padding:0;
size:A4 potrait;
text-align:center;
}
body {
font-family: Arial, sans-serif;
/* margin:0; */
}
.a8-container {
width: 8.5cm;
height: 5.4cm;
/* width: 7.4cm;
height: 5.2cm; */
margin-top:10px;
border: 1px solid #000;
display: flex;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
border: 0px solid #000;
padding: 0px;
text-align: left;
}
</style>
</head>
<body>
<table>
<tr>
@php
$counter = 0;
@endphp
@foreach($patient_cards as $key => $patient)
<td>
<div class="a8-container">
<table >
<tr style=" border-bottom: 1px solid gray; ">
<td style="padding:8px;">
<img style="max-width: 100px; max-height: 25px;" src="{{ asset($hospital_details->logo ?? '') }}" class="" alt="">
</td>
<td style="padding:8px; text-align:right; font-weight:600;">PATIENT CARD</td>
</tr>
<tr>
<td colspan="2" style="font-size:6px; padding-top:14px;padding-left:7px; padding-right:7px; ">NAME</td>
</tr>
<tr>
<td colspan="2" style="font-size:9px; font-weight:600;padding-left:7px; padding-right:7px; text-transform: uppercase " >
{{ $patient->first_name ?? '' }}
{{ $patient->last_name ?? '' }}
{{ $patient->other_names ?? '' }}
</td>
</tr>
<tr style="">
<td style="font-size:6px; padding-top:10px;padding-left:7px; ">PATIENT NUMBER</td>
<td style="font-size:6px; padding-top:10px; padding-right:7px;text-transform: uppercase ">RESIDENCE</td>
</tr>
<tr >
<td style="font-size:9px; font-weight:600; padding-left:7px; ">{{ $patient->number ?? '' }} </td>
<td style="font-size:9px; font-weight:600; padding-right:7px; text-transform: uppercase">{{ get_name(get_name($patient->id, "id", "village_id", "patients"), "id", "name", "villages") }}</td>
</tr>
<tr >
<td style="font-size:5px; padding-top:10px; padding-left:7px;vertical-align: top; ">DISTRICT <br>
<span style="font-size:9px; font-weight:600; text-transform: uppercase">{{ get_name($patient->district_id, "id", "name", "districts") }} </span>
</td>
<td style="font-size:5px; padding-top:10px; padding-right:7px;">
{{ getDNS1DBarcodePNGOCards(sprintf("%04u", $patient->id)) }}
<br>
<h4 style="color: black">{{ sprintf("%04u", $patient->id) }}</h4></td>
</tr>
<tr>
<td colspan="2" style="font-size:5px; padding-top:5px; padding-left:7px; padding-right:7px; text-align:left; border-bottom: 0px solid gray; font-style:italic;">
This card is a property of {{ $hospital_details->name ?? '' }} , If found please return to the facility. <br>
</td>
</tr>
<tr >
<td style="font-size:4px; text-align:left; padding-left:7px; padding-top:-12px; ">Supported by Streamline ; www.streamlinehealth.org</td>
<td style="text-align:right; ">
<img style="max-width: 60px; max-height: 25px; padding-right:7px; padding-top:5px;" src="{{ asset('uploads/streamline/color/280X50-06.png') }}" class="" alt="">
</td>
</tr>
</table>
</div>
</td>
@php
$counter++;
@endphp
@if($counter % 2 == 0)
</tr><tr>
@endif
@endforeach
@if($counter % 2 != 0)
<td></td>
@endif
</tr>
</table>
</body>
</html>
@@ -0,0 +1,411 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('layout.patient_cards') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('patients.dashboard') }}</a></li>
<li><a href="{{ route('patients.index') }}">{{ __('patients.patients') }}</a></li>
@if (Auth::user()->can('print-patient-cards'))
<li class="active">v{{ __('patients.print_patients_cards') }}</li>
@endif
</ol>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-12 col-md">
<a href="{{ route('patients.create') }}" class="btn btn-success"><i class="fa fa-plus"></i> {{ __('patients.add_patient') }} </a>
<a href="{{ route('patients.index') }}" class="btn btn-info"> <i class="fa fa-eye"></i> {{ __('patients.view_patients') }} </a>
</div>
<div class="col-12 col-md" style="text-align:right;">
<a href="{{ route('patients.inactive') }}" class="btn btn-danger"><i class="fa fa-eye-slash"></i> {{ __('patients.inactive_patients') }} </a>
</div>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default" style="border-radius: 5px;">
<div class="panel-body">
{{-- Search Patient Cards --}}
<form action="{{ route('patients.search_patient_cards_to_print') }}" method="POST" >
@csrf
<div class="row">
<div class="col-md">
<div class="form-group">
<label>{{ __('patients.select_registered_date') }}:</label>
<select class="form-control required" name="dates" id="dates">
{{-- <option value="null">--Select--</option> --}}
<option value="today">{{ __('patients.today') }}</option>
<option value="yesterday">{{ __('patients.yesterday') }}</option>
<option value="custom_date">{{ __('patients.custom_date') }}</option>
<option value="custom_date_range">{{ __('patients.date_range') }}</option>
</select>
</div>
</div>
<div class="col-md" id="sDate" style="display: none;">
<div class="form-group">
<label>{{ __('patients.start_date') }}:</label>
<div class="input-group">
<input type="text" name="start_date" id="start_date" class="form-control">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md" id="eDate" style="display: none;">
<div class="form-group">
<label>{{ __('patients.end_date') }}:</label>
<div class="input-group">
<input type="text" name="end_date" id="end_date" class="form-control">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md">
<label>{{ __('patients.select_patients') }}:</label>
<div class="input-group">
<select class="form-control" name="number[]" id="patient_number" multiple></select>
</div>
</div>
<div class="col-md">
<div class="form-group" style="margin-top: 25px;">
<button type="submit" class="btn btn-success"><i class="fa fa-paper-plane"></i> {{ __('patients.submit') }}</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
@include('flash::message')
{{-- Process patient cards form --}}
<form id="patient_cards_form" action="{{ route('patients.print_patients_cards') }}" method="POST">
@csrf
<div class="row">
<div class="col-12 col-md" style="text-align:left; margin-bottom:10px;">
<h5 style="color:rgb(27, 144, 223);">
{{ $searched_data_string ?? '' }}
</h5>
</div>
<div class="col-12 col-md" style="text-align:right; margin-bottom:10px;">
@if (Auth::user()->can('print-patient-cards'))
<button type="submit" id="submit-button" class="btn btn-rounded" style="background-color:purple; color:#ffffff;"><i class="fa fa-print"></i> {{ __('patients.print_cards') }}</button>
@endif
</div>
</div>
<div class="row">
<div class="table-responsive" style="padding-right:15px; padding-left:15px;">
<table class="table success-table table-sm table-striped table-hover disable_pagination" style="color: white; border: 1px solid #00c292;">
<thead >
<tr style="background-color: #00c292; color: white;">
<th style="color: white;">{{ __('patients.hash') }}</th>
<th style="color: white;">{{ __('patients.patient_number') }}</th>
<th style="color: white;">{{ __('patients.full_names') }}</th>
<th style="color: white;">{{ __('patients.gender') }}</th>
<th style="color: white;">{{ __('patients.age') }}</th>
<th style="color: white;">{{ __('patients.phone_number') }}</th>
<th style="color: white;">{{ __('patients.category') }}</th>
<th style="color: white;">{{ __('patients.residence') }}</th>
</tr>
</thead>
<tbody>
@forelse ( $patients as $key => $patient )
@php
$village = \Streamline\Models\Village::find($patient->village_id);
$patient_category = \Streamline\Models\PatientCategory::find($patient->category_id);
@endphp
<tr>
<td><input type="checkbox" value="{{ $patient->id }}" name="patients[]" class="patient_cards_checkbox"></td>
<td>{{ $patient->number ?? '' }}</td>
<td>{!! insurance_flag($patient->id) !!}</td>
<td>
@if($patient->gender == 1)
{{ __('patients.male') }}
@else
{{ __('patients.female') }}
@endif
</td>
<td>{{ get_patients_age($patient->date_of_birth) }}</td>
<td>{{ $patient->phone }}</td>
<td>{{ $patient_category->name ?? '' }}</td>
<td>{{ $village->name ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="3" ></td>
<td colspan="3" style="color:red;" >
No Patients Found!
</td>
<td colspan="2" ></td>
</tr>
@endforelse
</tbody>
</table>
{{-- laravel pagination --}}
<center>
{{-- {{ $patients->links() }} --}}
{{ $patients->appends(Request::except('page'))->links() }}
</center>
</div>
</div>
</form>
</div>
@endsection
@push('scripts')
<!-- Typehead Plugin JavaScript -->
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
{{-- print patient cards --}}
{{-- <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script> --}}
<script>
document.addEventListener('DOMContentLoaded', function() {
const checkboxes = document.querySelectorAll('.patient_cards_checkbox');
const form = document.getElementById('patient_cards_form');
const maxChecked = 10;
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', function() {
const checkedCount = document.querySelectorAll('.patient_cards_checkbox:checked').length;
if (checkedCount >= maxChecked) {
checkboxes.forEach(box => {
if (!box.checked) {
box.disabled = true;
}
});
} else {
checkboxes.forEach(box => {
box.disabled = false;
});
}
});
});
form.addEventListener('submit', function(event) {
const checkedCount = document.querySelectorAll('.patient_cards_checkbox:checked').length;
if (checkedCount === 0) {
event.preventDefault();
alert('Please select at least one patient.');
}
});
});
</script>
<script type="text/javascript">
var searchedDataString = "{{ $searched_data_string ?? '' }}";
$('.table').DataTable({
dom: 'Bfrtip',
pageLength: 200,
//disable js pagination
paging: false,
info: false,
buttons: [
'copy',
{extend: 'csv',
message: "Patients Registered",
title: searchedDataString,
exportOptions: {
columns: [ 1, 2, 3, 4, 5, 6,7]
},
},
{extend: 'excel',
message: "Patients Registered",
title: searchedDataString,
exportOptions: {
columns: [ 1, 2, 3, 4, 5, 6,7]
},
sheetName: "Patients Registered"
},
{extend: 'pdf',
message: "Patients Registered",
title: searchedDataString,
orientation: 'portrait',
pageSize: 'LETTER',
exportOptions: {
columns: [ 1, 2, 3, 4, 5, 6,7]
},
customize: function (doc) {
doc.defaultStyle.fontSize = 10;
// doc.styles.tableHeader.alignment = 'left';
}
},
{extend: 'print',
message: "Patients Registered",
title: searchedDataString,
exportOptions: {
columns: [ 1, 2, 3, 4, 5, 6,7]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('h1')
.css('font-size', '9pt'); // Adjust font size as needed
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}
]
});
</script>
<script>
$('#patient_number').change(function () {
let id = $('#patient_number').val();
$('#patient_id').val(id);
});
$('#patient_number').select2({
placeholder: 'Search by patient details (names and number)',
ajax: {
url: '/patients/search_patient_by_name_number',
dataType: 'json',
delay: 250,
processResults: function (data) {
return {
results: $.map(data, function (item) {
return {
text: item.first_name + " " + item.last_name + " (" + item.number + ")",
id: item.id
}
})
};
},
cache: true
}
});
$('#dates').change(function (e) {
if($(this).val() === "custom_date"){
$("#eDate").hide();
$("#sDate").show();
}else if($(this).val() === "custom_date_range"){
$("#sDate").show();
$("#eDate").show();
}else{
$("#eDate").hide();
$("#sDate").hide();
}
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#staff_member').select2({
placeholder: "-- select --"
});
$('#staff_member_accountant').select2({
placeholder: "-- select --"
});
</script>
@endpush
@push('styles')
<style type="text/css">
.color-bordered-table.success-bordered-table {
border-top: 0px;
}
</style>
@endpush
@@ -0,0 +1,296 @@
<div class="row m-0 py-4 px-2" style="border: 1px solid #e4e7ea; margin: 5px">
<div class="col-sm-12">
<strong>INTENSIFIED TB CASE FINDING SCREEN: ({{ $age_group_display }})</strong>
</div>
<hr>
<div class="col-sm-12">
DOES THE PATIENT HAVE ANY OF THE FOLLOWING:
<input type="radio" name='any_tb_sysmptoms' id='tb_questions_yes' class="cough_class" value="1" @if(isset($triage->any_tb_sysmptoms) && $triage->any_tb_sysmptoms == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='any_tb_sysmptoms' id='tb_questions_no' class="cough_class" value="0" @if(isset($triage->any_tb_sysmptoms) && $triage->any_tb_sysmptoms == 0) checked @endif>&nbsp;No
@if ($age_group == 5 || $age_group_display == '> 12 Years')
{{-- adults i.e above 12 years --}}
<ol>
<li>
A cough for more than two weeks ?
</li>
<li>
Persistent fevers for 2 weeks or more ?
</li>
<li>
Noticeable weight loss of more than 3kg ?
</li>
<li>
Excessive night sweats for three weeks or more ?
</li>
</ol>
@elseif($age_group == 4 || $age_group_display == '6 - 12 Years')
{{-- between 6-12 years --}}
<ol>
<li>
A cough for more than two weeks ?
</li>
<li>
Persistent fevers for 2 weeks or more ?
</li>
<li>
Noticeable weight loss ?
</li>
<li>
Excessive night sweats for three weeks or more ?
</li>
</ol>
@elseif(
$age_group == 3 ||
$age_group == 2 ||
$age_group == 1 ||
$age_group_display == '1 - 12 Months' ||
$age_group_display == '0 - 28 Days')
{{-- children below 5 years --}}
<ol>
<li>
A cough for more than two weeks ?
</li>
<li>
Persistent fevers for 2 weeks or more ?
</li>
<li>
Noticeable weight loss ?
</li>
<li>
Poor weight gain in the last one month ?
<br>
<span style="color: red">
(weight loss or “very low weight” = where weight for age is less than -3 z-score, or
“underweight” =
weight for age less than -2 z-score, or “confirmed weight loss”= more than 5% since last visit,
or “growth
curve flattening”).
</span>
</li>
<li>
Contact with a person with pulmonary tuberculosis or chronic cough ?
</li>
</ol>
@endif
<br>
<table class="tb_questions_table table table-bordered" style="display: none; background-color: #f3f3f5;">
@if ($age_group == 5 || $age_group_display == '> 12 Years')
<tr class="cough_tb_question">
<td>A cough for more than two weeks ?</td>
<td>
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_yes' class="tb_screening_radios" value="1" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_no' class="tb_screening_radios" value="0" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="fever_tb_question">
<td>Persistent fevers for 2 weeks or more ?</td>
<td>
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_yes' class="tb_screening_radios" value="1" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_no' class="tb_screening_radios" value="0" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="weight_loss_tb_question">
<td>Noticeable weight loss of more than 3 Kg?</td>
<td>
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_yes' class="tb_screening_radios" value="1" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="excessive_night_sweats_tb_question">
<td>Excessive night sweats for three weeks or more ?</td>
<td>
<input type="radio" name='tb_excessive_night_sweats' id='tb_excessive_night_sweats_yes' class="tb_screening_radios" value="1" @if(isset($triage->tb_excessive_night_sweats) && $triage->tb_excessive_night_sweats == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_excessive_night_sweats' id='tb_excessive_night_sweats_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_excessive_night_sweats) && $triage->tb_excessive_night_sweats == 0) checked @endif>&nbsp;No
</td>
</tr>
@elseif ($age_group == 4 || $age_group_display == '6 - 12 Years')
<tr class="cough_tb_question">
<td>A cough for more than two weeks ?</td>
<td>
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_yes' class="tb_screening_radios" value="1" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_no' class="tb_screening_radios" value="0" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="fever_tb_question">
<td>Persistent fevers for 2 weeks or more ?</td>
<td>
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_yes' class="tb_screening_radios" value="1" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_no' class="tb_screening_radios" value="0" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="weight_loss_tb_question">
<td>Noticeable weight loss ?</td>
<td>
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_yes' class="tb_screening_radios" value="1" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="excessive_night_sweats_tb_question">
<td>Excessive night sweats for three weeks or more ?</td>
<td>
<input type="radio" name='tb_excessive_night_sweats' id='tb_excessive_night_sweats_yes' class="tb_screening_radios" value="1" @if(isset($triage->tb_excessive_night_sweats) && $triage->tb_excessive_night_sweats == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_excessive_night_sweats' id='tb_excessive_night_sweats_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_excessive_night_sweats) && $triage->tb_excessive_night_sweats == 0) checked @endif>&nbsp;No
</td>
</tr>
@elseif(
$age_group == 3 ||
$age_group == 2 ||
$age_group == 1 ||
$age_group_display == '1 - 12 Months' ||
$age_group_display == '0 - 28 Days')
{{-- children below 5 years --}}
<tr class="cough_tb_question">
<td>A cough for more than two weeks ?</td>
<td>
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_yes' class="tb_screening_radios" value="1" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_no' class="tb_screening_radios" value="0" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="fever_tb_question">
<td>Persistent fevers for 2 weeks or more ?</td>
<td>
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_yes' class="tb_screening_radios" value="1" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_no' class="tb_screening_radios" value="0" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="weight_loss_tb_question">
<td>Noticeable weight loss ?</td>
<td>
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_yes' class="tb_screening_radios" value="1" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="poor_weight_gain_tb_question">
<td>Poor weight gain in the last one month ?
<br>
<span style="color: red">
(weight loss or “very low weight” = where weight for age is<br> less than -3 z-score, or
“underweight” = weight for age less than<br> -2 z-score, or “confirmed weight loss”= more
than 5% since last visit, or “growth curve flattening”).
</span>
</td>
<td>
<input type="radio" name='tb_poor_weight_gain' id='tb_poor_weight_gain_yes' class="tb_screening_radios" value="1" @if(isset($triage->tb_poor_weight_gain) && $triage->tb_poor_weight_gain == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_poor_weight_gain' id='tb_poor_weight_gain_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_poor_weight_gain) && $triage->tb_poor_weight_gain == 0) checked @endif>&nbsp;No
</td>
</tr>
<tr class="contact_with_tb_person_with_tb_question">
<td>Contact with a person with pulmonary TB or chronic cough ?</td>
<td>
<input type="radio" name='tb_contact_with_tb_person' id='tb_contact_with_tb_person_yes' class="tb_screening_radios" value="1" @if(isset($triage->tb_contact_with_tb_person) && $triage->tb_contact_with_tb_person == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_contact_with_tb_person' id='tb_contact_with_tb_person_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_contact_with_tb_person) && $triage->tb_contact_with_tb_person == 0) checked @endif>&nbsp;No
</td>
</tr>
@endif
</table>
</div>
</div>
<br>
<div class="modal fade" id="TBActionModal" tabindex="-1" role="dialog" aria-labelledby="modalTBActionLabel1"
style="margin-top: 20%">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<h4 class="modal-title"><u>ACTION NEEDED: <font color=red>Possible TB</font></u></h4><br>
<div class="possible_tb_action_for_coughing" style="display:none; font: bolder">
@if ($age_group == 5 || $age_group_display == '> 12 Years')
<ol>
<li>REQUEST FOR SPUTUM TEST</li>
<li>REFER TO CLINICIAN FOR FURTHER INVESTIGATIONS</li>
<li style="color: red">DIRECT THE PATIENT TO DESIGNATED AREA FOR PEOPLE WITH CHRONIC COUGH
AWAY FROM THE MAIN QUEUE TO REDUCE THE RISK OF CROSS-INFECTION</li>
</ol>
@elseif ($age_group == 4 || $age_group_display == '6 - 12 Years')
<ol>
<li>REQUEST FOR SPUTUM TEST if child can manage</li>
<li>REFER TO CLINICIAN FOR FURTHER INVESTIGATIONS</li>
<li style="color: red">DIRECT THE PATIENT TO DESIGNATED AREA FOR PEOPLE WITH CHRONIC COUGH
AWAY FROM THE MAIN QUEUE TO REDUCE THE RISK OF CROSS-INFECTION</li>
</ol>
@elseif(
$age_group == 3 ||
$age_group == 2 ||
$age_group == 1 ||
$age_group_display == '1 - 12 Months' ||
$age_group_display == '0 - 28 Days')
{{-- children below 5 years --}}
<ol>
<li>REFER TO CLINICIAN FOR FURTHER INVESTIGATIONS</li>
<li style="color: red">DIRECT THE PATIENT TO DESIGNATED AREA FOR PEOPLE WITH CHRONIC COUGH
AWAY FROM THE MAIN QUEUE TO REDUCE THE RISK OF CROSS-INFECTION</li>
</ol>
@endif
</div>
<div class="possible_tb_action_for_non_coughing" style="display:none; font: bolder">
@if ($age_group == 5 || $age_group == 4 || $age_group_display == '6 - 12 Years' || $age_group_display == '> 12 Years')
<ol>
<li>REFER TO CLINICIAN FOR FURTHER INVESTIGATIONS</li>
</ol>
@endif
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
@push('scripts')
<script>
$("#tb_questions_no").change(function() {
$(".tb_questions_table").hide();
$(".tb_screening_radios").removeAttr("required");
console.log('no tb screening');
console.log($("#tb_questions_yes").is(':checked'));
})
$("#tb_questions_yes").change(function() {
$(".tb_questions_table").show();
$(".tb_screening_radios").attr('required', 'true');
console.log('yes tb screening');
console.log($("#tb_questions_yes").is(':checked'));
})
$('input[name="cough_for_2_weeks"]').change(function() {
if ($("#cough_for_2_weeks_yes").is(':checked')) {
//$("#TBActionModal").modal("show");
$(".possible_tb_action_for_coughing").show();
$(".possible_tb_action_for_non_coughing").hide();
}
})
$('input[name="fever_for_2_weeks"]').change(function() {
if ($("#cough_for_2_weeks_yes").is(":not(:checked)") && $("#fever_for_2_weeks_yes").is(':checked')) {
//$("#TBActionModal").modal("show");
$(".possible_tb_action_for_coughing").hide();
$(".possible_tb_action_for_non_coughing").show();
}
})
$('input[name="tb_weight_loss"]').change(function() {
var ageGroup = <?php echo $age_group; ?>;
console.log(ageGroup);
if ($("#cough_for_2_weeks_yes").is(":not(:checked)") && $("#tb_weight_loss_yes").is(':checked')) {
//$("#TBActionModal").modal("show");
$(".possible_tb_action_for_coughing").hide();
$(".possible_tb_action_for_non_coughing").show();
}
})
$('input[name="tb_excessive_night_sweats"]').change(function() {
if ($("#cough_for_2_weeks_yes").is(":not(:checked)") && $("#tb_excessive_night_sweats_yes").is(
':checked')) {
//$("#TBActionModal").modal("show");
$(".possible_tb_action_for_coughing").hide();
$(".possible_tb_action_for_non_coughing").show();
}
})
</script>
@endpush