mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 11:41:31 +00:00
Build modified streamline images
The official image from streamline does not currently work for the arm64 platform. As a temporary measure, the source code and docker build scripts have been lifted from the official images and are used to build locally. Some additional modifications are made to reduce overall image size, these are documented in docker/README.md
This commit is contained in:
+122
@@ -0,0 +1,122 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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">Assign VHT To Discharged Patient</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li class="active">Assign VHT</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@include('patients::allergies.header')
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
|
||||
<h3>Select a VHT for discharged patient</h3>
|
||||
|
||||
<br>
|
||||
|
||||
{{ Form::open(['route' => 'post_discharge_risk.save_assign_vht']) }}
|
||||
|
||||
{{ Form::hidden('discharge_id', $discharge_id) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{{ Form::label('search_vht', 'Search For VHT By Name or Village') }}
|
||||
<div class="input-group">
|
||||
<select class="form-control" name="vht" id="vht" required></select>
|
||||
</div>
|
||||
|
||||
{{ Form::hidden('vht_id', 0, ['id' => 'vht_id']) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th><b>VHT Name</b></th>
|
||||
<td id="vht_name"></td>
|
||||
<th><b>Facility</b></th>
|
||||
<td id="vht_facility"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>Parish Name</b></th>
|
||||
<td id="vht_parish"></td>
|
||||
<th><b>Village Name</b></th>
|
||||
<td id="vht_village"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
{{ Form::button('Assign VHT',['type'=>'submit','class' => 'btn btn-success', 'style'=>'float:right;']) }}
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#vht').change(function () {
|
||||
let id = $('#vht').val();
|
||||
$('#vht_id').val(id);
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/post_discharge_risk/get_info_about_vht/" + id,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
let result_arr = result.split('&&');
|
||||
$('#vht_name').html(result_arr[0]);
|
||||
$('#vht_facility').html(result_arr[1]);
|
||||
$('#vht_parish').html(result_arr[2]);
|
||||
$('#vht_village').html(result_arr[3]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#vht').select2({
|
||||
placeholder: 'Search by vht details (names and village)',
|
||||
ajax: {
|
||||
url: '/post_discharge_risk/search_vht_by_name_village',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.name + " (" + item.village_name + " in " + item.parish_name + " Parish)",
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
<!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="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
tr {
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 style="text-align: center;"><b>VHT FOLLOW-UP FORM</b></h5>
|
||||
|
||||
<h6><b>Part 1</b></h6>
|
||||
<h6><b>To be filled at the discharging facility and given to the patient / caregiver to give to their VHT for Follow Up</b></h6>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">Patient Name:</div>
|
||||
<div class="col">{{ get_full_name($patient_id, 'id', 'first_name', 'last_name', 'patients') }}</div>
|
||||
<div class="col">Reference Number:</div>
|
||||
<div class="col">{{ get_name($patient_id, 'id', 'number', 'patients') }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">Age:</div>
|
||||
<div class="col">{{ get_patients_age(get_name($patient_id, 'id', 'date_of_birth', 'patients')) }}</div>
|
||||
<div class="col">Sex:</div>
|
||||
<div class="col">{{ (get_name($patient_id, 'id', 'gender', 'patients') == 1) ? 'Male' : 'Female' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">Admission Date:</div>
|
||||
<div class="col">{{ $admission_date }}</div>
|
||||
<div class="col">Discharge Date:</div>
|
||||
<div class="col">{{ $discharge_date }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-2">Address:</div>
|
||||
<div class="col-10">{{ patient_residence($patient_id) }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Discharging Hospital/Facility:</div>
|
||||
<div class="col-8">{{ $hospital_info->name }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Main Presenting Complaint:</div>
|
||||
<div class="col-8">{{ $main_symptom }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">Discharge Diagnosis:</div>
|
||||
<div class="col-3">{{ $discharge_diagnosis }}</div>
|
||||
<div class="col-4">Post Discharge Risk of Mortality:</div>
|
||||
<div class="col-2">{!! get_post_discharge_mortality_risk_score_display($discharge_risk_score->post_discharge_mortality_risk, $discharge_risk_score->date_of_birth) !!}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">Referral Health Facility:</div>
|
||||
<div class="col"></div>
|
||||
<div class="col">District:</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">Name of VHT:</div>
|
||||
<div class="col">{{ $vht_name }}</div>
|
||||
<div class="col">Telephone Contact:</div>
|
||||
<div class="col">{{ $vht_contact }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">Name of Health Assistant:</div>
|
||||
<div class="col"></div>
|
||||
<div class="col">Telephone Contact:</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">Nearest facility Incharge:</div>
|
||||
<div class="col"></div>
|
||||
<div class="col">Telephone Contact:</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">Discharging Health worker:</div>
|
||||
<div class="col"></div>
|
||||
<div class="col">Telephone Contact:</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
|
||||
<p>------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
|
||||
|
||||
<h6><b>Part 2</b></h6>
|
||||
<h6><b>ATTENTION: Village Health Team Member</b></h6>
|
||||
<h6>You are required to follow this child on the 2 <sup>nd</sup>, 7 <sup>th</sup> and 14 <sup>th</sup> day following discharge from the hospital
|
||||
and offer post discharge care. Examine the child to see if they have any danger signs. Children identified with danger signs
|
||||
should be referred early for further management at the nearest Health Facility</h6>
|
||||
<h6><b>Fill out each section of the form for each follow-up appointment</b></h6>
|
||||
|
||||
<p>------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
|
||||
|
||||
@php
|
||||
$follow_up_days = [1 => "2", 2 => "7", 3 => "14"];
|
||||
@endphp
|
||||
|
||||
@for($i = 1; $i < 4; $i++)
|
||||
<div class="row">
|
||||
<div class="col-4"><b>Scheduled Visit {{ $i }} at day {{ $follow_up_days[$i] }}:</b></div>
|
||||
<div class="col-2">
|
||||
@if($i == 1)
|
||||
{{ $first_followup_date }}
|
||||
@elseif($i == 2)
|
||||
{{ $second_followup_date }}
|
||||
@else
|
||||
{{ $third_followup_date }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-4"><b>Actual Visit Date</b></div>
|
||||
<div class="col-2">....................................</div>
|
||||
</div>
|
||||
|
||||
<h6><b>Does child have any of the following danger signs?</b></h6>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">{{ Form::checkbox('checkbox') }} Vomiting Everything<br><br>{{ Form::checkbox('checkbox') }} Lethargic/very sleepy</div>
|
||||
<div class="col">{{ Form::checkbox('checkbox') }} Convulsions<br><br>{{ Form::checkbox('checkbox') }} Blood in stool</div>
|
||||
<div class="col">{{ Form::checkbox('checkbox') }} Difficulty breathing<br><br>{{ Form::checkbox('checkbox') }} Other (Specify)</div>
|
||||
<div class="col">{{ Form::checkbox('checkbox') }} Not able to breastfeed or drink<br><br>{{--{{ Form::checkbox('checkbox') }} --}}</div>
|
||||
</div>
|
||||
|
||||
<h6><b>Visit Outcome (Circle One)</b></h6>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">{{ Form::checkbox('checkbox') }} Counselling on Post Discharge Care</div>
|
||||
<div class="col">{{ Form::checkbox('checkbox') }} Referral to the nearest facility</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-2">VHT Name:</div>
|
||||
<div class="col-4">{{ $vht_name }}</div>
|
||||
<div class="col-2">Signature:</div>
|
||||
<div class="col-4">................................................</div>
|
||||
</div>
|
||||
<p>------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
|
||||
@endfor
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@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">Patients To Follow Up</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li class="active">Follow Up</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'post_discharge_risk.view_follow_up_patients' , 'data-toggle' => 'validator']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date','Date From') }}
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'start_date']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date','Date To') }}
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'end_date']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<br>
|
||||
{{ Form::button('Search',['type'=>'submit','class'=>'btn btn-rounded btn-success waves-effect waves-light m-r-10']) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
@include('flash::message')
|
||||
|
||||
<p><code>{{ $search_text }}</code></p>
|
||||
|
||||
<p class="text-muted m-b-30">Export data to Copy, CSV, Excel, PDF & Print</p>
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Patient Names</th>
|
||||
<th>Gender (Age)</th>
|
||||
<th>MUAC</th>
|
||||
<th>WAZ Score</th>
|
||||
<th>PD Mortality Risk</th>
|
||||
<th>Discharge Date</th>
|
||||
<th>Follow-Up Dates</th>
|
||||
<th>Caregiver</th>
|
||||
<th>Caregiver Contact</th>
|
||||
<th>VHT Name (Contact)</th>
|
||||
<th>VHT Parish</th>
|
||||
<th>VHT Village</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($risk_scores as $record)
|
||||
@if(is_patient_at_post_discharge_high_risk($record->post_discharge_mortality_risk, $record->date_of_birth) && in_array(get_name($record->patient_id, 'id', 'subcounty_id', 'patients'), [3,4]))
|
||||
<tr>
|
||||
<td>{{ get_full_name($record->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($record->patient_id, 'id', 'number', 'patients') }})</td>
|
||||
<td>{{ ($record->gender == 1) ? 'Male' : 'Female' }} ({{ get_patients_age($record->date_of_birth) }})</td>
|
||||
<td>{{ $record->muac_below_6 }}</td>
|
||||
<td>{{ $record->weight_for_age_zscore_below_6 ?? $record->weight_for_age_zscore }}</td>
|
||||
<td>{{ $record->post_discharge_mortality_risk }}</td>
|
||||
@php
|
||||
$discharge_date = new \Carbon\Carbon(get_patient_discharge_date($record->inpatient_id));
|
||||
$first_followup_date = $discharge_date->copy()->addDays(2);
|
||||
$second_followup_date = $discharge_date->copy()->addDays(7);
|
||||
$third_followup_date = $discharge_date->copy()->addDays(14);
|
||||
|
||||
$caregiver_phone = "None";
|
||||
$caregiver_name = "None";
|
||||
$vht_name = "None";
|
||||
$vht_number = "None";
|
||||
$parish = "";
|
||||
$village = "";
|
||||
|
||||
$vht = DB::table('vht_contacts')
|
||||
->where('village', get_name($record->patient_id, 'id', 'village_id', 'patients'))
|
||||
->orWhere('village', get_name(get_name($record->patient_id, 'id', 'village_id', 'patients'), 'id', 'name', 'villages'))
|
||||
->first();
|
||||
|
||||
if ($vht) {
|
||||
$vht_name = $vht->name;
|
||||
$vht_number = "+256" . $vht->contact;
|
||||
$village = $vht->village_name;
|
||||
$parish = $vht->parish_name;
|
||||
}
|
||||
|
||||
$caregiver_name = get_name($record->patient_id, 'id', 'next_of_kin', 'patients');
|
||||
$next_of_kin_contact = get_name($record->patient_id, 'id', 'phone_of_next_of_kin', 'patients');
|
||||
if ($next_of_kin_contact != "" && !is_null($next_of_kin_contact)) {
|
||||
$caregiver_phone = $next_of_kin_contact;
|
||||
} else {
|
||||
$caregiver_phone = get_name($record->patient_id, 'id', 'phone', 'patients');
|
||||
}
|
||||
@endphp
|
||||
<td>{{ streamline_date($discharge_date) }}</td>
|
||||
<td>{{ streamline_date($first_followup_date) }} / {{ streamline_date($second_followup_date) }} / {{ streamline_date($third_followup_date) }}</td>
|
||||
<td>{{ $caregiver_name }}</td>
|
||||
<td>{{ $caregiver_phone }}</td>
|
||||
<td>{{ $vht_name }} ({{ $vht_number }})</td>
|
||||
<td>{{ $parish }}</td>
|
||||
<td>{{ $village }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bInfo: false,
|
||||
bPaginate: false,
|
||||
buttons: [
|
||||
'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy/mm/dd'
|
||||
});
|
||||
|
||||
$('#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy/mm/dd'
|
||||
});
|
||||
});
|
||||
|
||||
function retry_sending_sms(id) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/post_discharge_risk/retry_sending_message/" + id,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
if (result == 1) {
|
||||
alert("A messages was sent to the VHT");
|
||||
location.reload();
|
||||
} else {
|
||||
alert("Sending message failed");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@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">Post Discharge Risk Scores</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li class="active">Risk Scores</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'post_discharge_risk.view_scores' , 'data-toggle' => 'validator']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date','Date From') }}
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'start_date']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date','Date To') }}
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'end_date']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<br>
|
||||
{{ Form::button('Search',['type'=>'submit','class'=>'btn btn-rounded btn-success waves-effect waves-light m-r-10']) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
|
||||
<a href="/post_discharge_risk/view_follow_up_patients/" class="btn btn-success pull-right">Follow up Patients</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<p><code>{{ $search_text }}</code></p>
|
||||
|
||||
<p class="text-muted m-b-30">Export data to Copy, CSV, Excel, PDF & Print</p>
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Patient Names</th>
|
||||
<th>Gender (Age)</th>
|
||||
<th>Risk Score</th>
|
||||
<th>Date Calculated</th>
|
||||
<th>Discharge Status</th>
|
||||
<th>VHT Alerted</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($risk_scores as $record)
|
||||
<tr>
|
||||
<td>{{ get_full_name($record->patient_id, 'id', 'first_name', 'last_name', 'patients') }}</td>
|
||||
<td>{{ ($record->gender == 1) ? 'Male' : 'Female' }} ({{ get_patients_age($record->date_of_birth) }})</td>
|
||||
<td>{{ $record->post_discharge_mortality_risk }} ({!! get_post_discharge_mortality_risk_score_display($record->post_discharge_mortality_risk, $record->date_of_birth) !!})</td>
|
||||
<td>{{ streamline_date_time($record->updated_at) }}</td>
|
||||
<td>
|
||||
@php
|
||||
$scheduled_followups = \DB::table('phone_followup_patients')->where('discharge_mortality_risk_id', $record->id)->get();
|
||||
$patient_discharge_date = get_patient_discharge_date($record->inpatient_id);
|
||||
$vht_form_generate = ($record->child_with_proven_infection == 1) && should_vht_form_be_generated($record->post_discharge_mortality_risk, $record->date_of_birth);
|
||||
$village_id = get_name($record->patient_id, 'id', 'village_id', 'patients');
|
||||
@endphp
|
||||
@if($patient_discharge_date)
|
||||
Discharged ({{ streamline_date($patient_discharge_date) }})
|
||||
|
||||
@if($vht_form_generate)
|
||||
<br><br>
|
||||
@if (count($scheduled_followups) > 0)
|
||||
<a href="/post_discharge_risk/print_vht_discharge_forms/{{ $record->id }}" target="_blank">Print VHT Discharge form</a>
|
||||
@else
|
||||
<a href="/post_discharge_risk/assign_vht/{{ $record->id }}">Assign VHT To Patient</a>
|
||||
@endif
|
||||
@endif
|
||||
@else
|
||||
Not Discharged
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($vht_form_generate && $patient_discharge_date)
|
||||
@if($record->is_vht_alerted == 0)
|
||||
No
|
||||
@php
|
||||
$vht = \DB::table('vht_contacts')
|
||||
->where('village', $village_id)
|
||||
->orWhere('village', get_name($village_id, 'id', 'name', 'villages'))
|
||||
->first();
|
||||
@endphp
|
||||
@if (count($scheduled_followups) < 1 && isset($vht->contact))
|
||||
<br><br>
|
||||
<a href="#" onclick="retry_sending_sms(<?php echo $record->id; ?>)">Retry Sending Message</a>
|
||||
@endif
|
||||
@else
|
||||
Yes
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td><a href="/patient_episodes/set_patient_id/{{ $record->patient_id }}" class="btn btn-success btn-sm">Select Patient</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bInfo: false,
|
||||
bPaginate: false,
|
||||
buttons: [
|
||||
'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy/mm/dd'
|
||||
});
|
||||
|
||||
$('#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy/mm/dd'
|
||||
});
|
||||
});
|
||||
|
||||
function retry_sending_sms(id) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/post_discharge_risk/retry_sending_message/" + id,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
if (result == 1) {
|
||||
alert("A messages was sent to the VHT");
|
||||
location.reload();
|
||||
} else {
|
||||
alert("Sending message failed");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user